Teensy++ 2.0 gets garbage whenever I cat /dev/ttyACM0

Status
Not open for further replies.

blargg

Member
Ubuntu 12.04 modem manager still screws with Teensy serial

OK, after hours of hair-pulling, I found that even in Ubuntu 12.04, the modem manager screws with Teensy serial, sending it lots of garbage. The 49-teensy.rules made it sound like it was a problem only in much older versions. For the moment I've disabled that piece of crap:

Code:
$ sudo service modemmanager stop

I'm going to try removing it next. So apparently the

Code:
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

line in 49-teensy.rules STILL isn't enough to stop it interfering. How frustrating.
 
Last edited:
Looks like you have an old copy of the udev rules. They were updated several months ago, because of the new modemmanager in 12.04.

http://www.pjrc.com/teensy/49-teensy.rules

Edit: believe me, I know your frustration!!! The modem manager has caused a lot of pain over the last the last 5 years. Twice the guy at Redhat who maintained early versions promised to add Teensy to the built-in list, but forgot, and promised again upon the next release, but he never did. Then he redesigned nearly all the code, losing the original exclusion list. Finally, so many bug reports piled up on Redhat's bug tracker, because modemmanager messed with lots of other USB devices, that they added the ID_MM_DEVICE_IGNORE ignore check. This time, they merely changed how it matches udev properties for ID_MM_DEVICE_IGNORE. I exchanged a couple emails with the modem manager devs. This new udev rule is supposed to work permanently. I'm not holding my breath.......
 
Last edited:
Ugh, finally figured it out; apparently stty sane turns echo on. Should have figured that since I was seeing some of the menu coming back to its input. So
Code:
$ stty -F /dev/ttyACM0 sane
$ stty -F /dev/ttyACM0 raw 57600 cs8 -crtscts -cstopb -parenb -echo
Is the way to get binary data (I know that the 57600 doesn't matter with the teensy; it's what I use for other serial devices as well). And I found that the sane must be done as a separate command or some things aren't necessarily reset by raw.

So sorry modem-manager, it wasn't you this time. But the fact that your designers require that every non-modem serial device be black-listed, and that apparently your designers broke a previous black-listing scheme that non-modem serial devices had listed themselves with means that you can't ever be easily ruled out as the cause of serial problems.
 
Last edited:
Status
Not open for further replies.
Back
Top