/dev/acm0 not found

Status
Not open for further replies.

jhalpin

Member
I just got a Teensy LC board, soldered pins on it and put it in a breadboard. When I connect the usb cable /dev/acm0 is not created. Teensyduino can't communicate with the board.

This is a replacement for another LC board, everything was fine with that one.

Did I do something wrong, or might this be a bad board?

Thanks

Joe
 
Could be a couple of things here: I am assuming Linux?
If a Teensy has been configured to be a serial device it will default to something like: /dev/ttyACM0
Note: if you have another Teensy plugged in or some other like device it may not be 0... that is could be /dev/ttyACM1 or ACM2 or...

New Teensy boards are not shipped being configured as a USB type of serial. So with New boards, what I typically do, is Plug it in... I may verify it sees the device. I sometimes use different commands, depending on what I am looking for:
Could use: lsusb
Which should list all USB devices.

Might use: dmesg | tail
To see what if anything that was recorded for the device.

But then I typically load up arduino IDE, with some simple app link blink, configure for the type of Teensy plugged in. In your case LC, . I make sure the Tools->USB Type is set to Serial.

Then use the verify command. When this completes the Teensy program should be launched. After the program is launched, I then press the program button on the new teensy. This should cause the teensy to go into program mode, then you should see it program the board in the Teensy app. When it completes the system should then create a /dev/ttyACMx object.

If you had not said that other teensy works, I would also mention, that to make sure you have the linux UDEV rules for the Teensy installed.
 
Yes, this is with Ubuntu Mate 17.04

The only clue I can find is dmesg:
Code:
[13649.834178] usb 3-3.1.3: new full-speed USB device number 13 using xhci_hcd
[13649.935702] usb 3-3.1.3: New USB device found, idVendor=16c0, idProduct=0486
[13649.935707] usb 3-3.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13649.935710] usb 3-3.1.3: Product: Teensyduino RawHID
[13649.935713] usb 3-3.1.3: Manufacturer: Teensyduino
[13649.935715] usb 3-3.1.3: SerialNumber: 3027300
[13649.938282] hid-generic 0003:16C0:0486.0011: hiddev0,hidraw2: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:14.0-3.1.3/input0
[13649.939393] hid-generic 0003:16C0:0486.0012: hidraw3: USB HID v1.11 Device [Teensyduino Teensyduino RawHID] on usb-0000:00:14.0-3.1.3/input1

Which doesn't show /dev/acm* being created. I downloaded the udev rules again just to be sure, with this result. I also have a Teensy 3.5, which works as expected.

Thanks

Joe
 
Again RAW HID... Did you try the method I mentioned, of loading program like example blink, choose your board, make sure USB type set to serial, do a Verify command in arduino and then press the program button on your new teensy?
 
Again RAW HID... Did you try the method I mentioned, of loading program like example blink, choose your board, make sure USB type set to serial, do a Verify command in arduino and then press the program button on your new teensy?

Yes, but no USB device is given in the port selection. I can't communicate with the Teensy.

Guess I'll just take it back.

Thanks

Joe
 
Again sorry I may not be communicating clearly enough.

When a Teensy is sold, it is shipped with RAWHID as it's USB type, As such a Serial object such as comm port on Windows or /dev/ttyACMx object is not created. However there is an object that is created. So when you follow the steps I gave above, don't worry about choosing a comm port, as the Verify command does not need one.

The Teensy boards do not use the Serial protocol to program the boards, they use a different USB protocol to write the program. So once you have the Teensy loader program running after the verify, pressing the button on the board (while it is plugged in) should cause the board to go into a special mode (https://www.pjrc.com/teensy/first_use.html) and the Teensy loader program will see that board and download the program you just ran verify on... After this is done, the Teensy board will have a program on it that has a USB type of Serial (assuming you don't change it to something else) and then the udev rules will run and the board will be assigned a /dev/ttyACMx object. And then you can choose that in the Arduino IDE and from then on simply use the sketch upload command in the Arduino IDE to download new programs.
 
No, you were pretty clear, it just doesn't work for me. The Teensydruino window pops up when I verify the program, and I can apparently program it successfully, but no ACM* device is created. Also, the program doesn't appear to run.

I loaded the example blink program and loaded it to the teensy, but the LED doesn't blink.
Code:
[30236.116511] usb 3-3.1.3: new full-speed USB device number 26 using xhci_hcd
[30236.217279] usb 3-3.1.3: New USB device found, idVendor=16c0, idProduct=0478
[30236.217281] usb 3-3.1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[30236.217283] usb 3-3.1.3: SerialNumber: 00049FFE
[30236.218214] hid-generic 0003:16C0:0478.0022: hidraw2: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:00:14.0-3.1.3/input0
[30590.228656] usb 3-3.1.3: USB disconnect, device number 26
[30590.757237] usb 3-3.1.3: new full-speed USB device number 27 using xhci_hcd
[30590.858040] usb 3-3.1.3: New USB device found, idVendor=16c0, idProduct=0478
[30590.858042] usb 3-3.1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[30590.858043] usb 3-3.1.3: SerialNumber: 00049FFE
[30590.859517] hid-generic 0003:16C0:0478.0023: hidraw2: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:00:14.0-3.1.3/input0
opus# ls /dev/ttyACM*
ls: cannot access '/dev/ttyACM*': No such file or directory

Thanks

Joe
 
I think I figured it out, turns out I had a bad libkmod2. I noticed that lsmod didn't show cdc-acm being loaded in the kernel, and when I tried to modprobe it I was getting errors about being unable to read the config file. I fiddled with it some, and then reinstalled. I'm now getting ACM0 created, and programing the Teensy works as expected,

Thanks for your help

Joe
 
Others (like Paul) can answer this a lot better than I can.... But the /dev/ttyACMx device (Abstract Control Model) is only created on the Teensy if your program specifies a USB device type that includes Serial. With this your program can do things like: Serial.print(...).

But the Teensy can be configured to be seen on the USB as several other types of devices, which are HID (Human Interface Device), Things like Mouse, Keyboard, Joystick, ... Each of these have their own protocol on how to talk to them.

I believe that all Teensies Ship with the Blink program on them with the USB type of "RAW HID", which again has it's own way of communicating with the Host. You can see an example of this with the Examples->Teensy->USB_Rawhid example. There is also an example program that can run on the host computer to talk to it...

When do you need the /dev/ttyACMx object created? If you have a linux program that you wish to talk to the Teensy using standard Serial communications. For example in C/C++ you may have a program that opens up the device file and then uses termios code to talk to the device. Or you Python code that uses pyserial or ...

Another aspect with using a device type that includes Serial is that when you are using the Arduino IDE and you do an Upload command, the stuff included in the build manipulates the Serial port to put the Teensy into program mode and then downloads the program to the Teensy. Without the Serial object, you typically need to press the program button on the Teensy to have the program downloaded to your teensy. Which is why I use the steps in #4 to program a new board which does not yet have a Serial object (/dev/ttyACMx on linux COMx on windows)
 
Ok, I think it finally sunk in to my thick head. I've never done much with USB and I wasn't seeing the difference.

I have my usb setting to Raw HID, and I can upload fine now. Don't even have to push the programming button. Serial terminal works too.

Sorry for my confusion.

Thanks

Joe
 
Status
Not open for further replies.
Back
Top