Hi Paul,
could you please take a look at usb_dec.h?
I think the config for USB_MTPDISK_SERIAL is wrong. My Lubuntu (dmesg) says:
Code:
[ 58.300446] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 58.659302] usb 1-1: config 1 has an invalid interface number: 3 but max is 2
[ 58.659305] usb 1-1: config 1 has no interface number 0
[ 58.673878] usb 1-1: New USB device found, idVendor=16c0, idProduct=0476
[ 58.673881] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 58.673883] usb 1-1: Product: Teensy MTP Disk/Serial
[ 58.673884] usb 1-1: Manufacturer: Teensyduino
[ 58.673885] usb 1-1: SerialNumber: 7820070
[ 58.690544] cdc_acm 1-1:1.1: ttyACM0: USB ACM device
[ 58.693345] usbcore: registered new interface driver cdc_acm
[ 58.693346] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 98.089536] usb 1-1: USB disconnect, device number 2
[ 98.130423] cdc_acm 1-1:1.1: failed to set dtr/rts
If have modified it to :
Code:
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0476 //fake an include everything device
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
#define DEVICE_CLASS 0xEF
#define DEVICE_SUBCLASS 0x02
#define DEVICE_PROTOCOL 0x01
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','T','P',' ','D','i','s','k','/','S','e','r','i','a','l'}
#define PRODUCT_NAME_LEN 22
#define EP0_SIZE 64
#define NUM_INTERFACE 3
#define NUM_ENDPOINTS 5
#define CDC_IAD_DESCRIPTOR 1 //1
#define CDC_STATUS_INTERFACE 0 //1
#define CDC_DATA_INTERFACE 1 // Serial //2
#define CDC_ACM_ENDPOINT 2 //2
#define CDC_RX_ENDPOINT 3 //3
#define CDC_TX_ENDPOINT 3 //3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE_480 512
#define CDC_TX_SIZE_480 512
#define CDC_RX_SIZE_12 64
#define CDC_TX_SIZE_12 64
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_UNUSED + ENDPOINT_TRANSMIT_INTERRUPT
#define ENDPOINT3_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define MTP_INTERFACE 2 // MTP Disk
#define MTP_TX_ENDPOINT 4
#define MTP_RX_ENDPOINT 4
#define MTP_EVENT_ENDPOINT 5
#define MTP_TX_SIZE_480 512
#define MTP_RX_SIZE_480 512
#define MTP_TX_SIZE_12 64
#define MTP_RX_SIZE_12 64
#define MTP_EVENT_SIZE 32
#define MTP_EVENT_INTERVAL_12 10 // 10 = 10 ms
#define MTP_EVENT_INTERVAL_480 7 // 7 = 8 ms
#define ENDPOINT4_CONFIG ENDPOINT_RECEIVE_BULK + ENDPOINT_TRANSMIT_BULK
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_INTERRUPT + ENDPOINT_TRANSMIT_INTERRUPT // ????
Now, Linux seems to be happy, but I'm not entirly sure, that it is correct now.
Thank you!
Edit: After a while, it continous to write:
Code:
cdc_acm 1-1:1.1: failed to set dtr/rts
Not sure, if this is normal.
Then, lsusb needs a long time (several seconds) to display the verbose info for the Teensy (tested with USB_MTPDISK_SERIAL only) and sometimes fails to prints the strings (serial-no, manufacturer etc)