I have programmed my teensy 3.1 board via my MacBook Pro, and all works great. My program displays a line of text every few seconds. However, when I plug it into my Linux box, the device is recognized, but when I try to read from the device, nothing. I have verified that /dev/ttyACM1 is the teensy (I unplug the teensy and it goes away). I have verified the teensy is getting power (my program blinks the led as well). Needless to say, I am using the exact same cable for both the Mac and the Linux box.
One difference is my Mac has USB 2.0 ports and my Linux box only has USB 3.1 Gen 1 and Gen 2 ports. Is there a known issue with using USB 3.x ports with the teensy? I have been searching the net but have not found anything that sheds light on this specifically problem.
Normally I would just cat /dev/ttyACM1 to watch the output. I have also used a serial port program I wrote for other devices, it can successfully communicate with my /dev/ttyACM0 device (a fan controller hub), so I am pretty darn sure it isn't that I am just not reading it correctly.
Below I have a bunch of data, including what "lsusb -v" sees for the device, and the terminal settings for both the Mac (it works) and Linux (it doesn't). Any help would be appreciated.
Thanks,
-Paul
Using lsusb I see the line:
I did notice the teensy advertises bmAttributes as 0xC0, which mean it is self powered. I modified the usb driver to report 0x80, no change.
The relevant output from lsusb -v is:
On my Mac I have the following settings:
On Linux my settings are:
(Even though it shouldn't make a difference, I have tried with hupcl on and off).
One difference is my Mac has USB 2.0 ports and my Linux box only has USB 3.1 Gen 1 and Gen 2 ports. Is there a known issue with using USB 3.x ports with the teensy? I have been searching the net but have not found anything that sheds light on this specifically problem.
Normally I would just cat /dev/ttyACM1 to watch the output. I have also used a serial port program I wrote for other devices, it can successfully communicate with my /dev/ttyACM0 device (a fan controller hub), so I am pretty darn sure it isn't that I am just not reading it correctly.
Below I have a bunch of data, including what "lsusb -v" sees for the device, and the terminal settings for both the Mac (it works) and Linux (it doesn't). Any help would be appreciated.
Thanks,
-Paul
Using lsusb I see the line:
Code:
Bus 001 Device 023: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
I did notice the teensy advertises bmAttributes as 0xC0, which mean it is self powered. I modified the usb driver to report 0x80, no change.
The relevant output from lsusb -v is:
Code:
Bus 001 Device 023: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.01
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x16c0 Van Ooijen Technische Informatica
idProduct 0x0483 Teensyduino Serial
bcdDevice 2.00
iManufacturer 1 Teensyduino
iProduct 2 USB Serial
iSerial 3 627840
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x01
call management
bDataInterface 1
CDC ACM:
bmCapabilities 0x06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 64
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
On my Mac I have the following settings:
Code:
Mac$ sudo stty -af /dev/cu.usbmodem627841
speed 9600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
-echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
-nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -iutf8
-ignbrk -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 0; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
Code:
Linux$ stty -aF /dev/ttyACM1
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 0; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
Code: