I installed the Arduino IDE according to the arduino.cc instructions (invoking install.sh
) rather than sudo apt install ...
. The ports /dev/ttyACM*
were present when the following Linux command is issued.
ls -l /dev/ttyACM*
This shows that the devices have membership in the dialout
group. It is necessary to add myself as a user to the group dialout
.
sudo usermod -a -G dialout <username>
I selected the board and the port and did a download which eventually completed but it seemed to take a long time. The program probably wasn't working since the program was to flash an LED at a 2 second period but the flash rate was definitely much faster so it seems the download did not work.
I deleted the IDE and reinstalled and the ports disappeared.
I have applied this fix for using the Arduino IDE on Linux.
From the description of the fix the instruction is to issue the following commands:
wget https://github.com/adafruit/Trinket_Arduino_Linux/raw/master/99-adafruit-boards.rules
sudo cp 99-adafruit-boards.rules /etc/udev/rules.d/
Next reboot Linux.
According to this page on Arduino for Linux there ought to be some devices at /dev/ttyACM*
but mine are missing. What is the solution to this problem? I have replaced the USB cable and it makes no difference.
The board is Adafruit Feather 32u4 which has an ATmega32u4. The OS is Ubuntu 16.04.
6 Answers 6
According to this page on Arduino for Linux there ought to be some devices at /dev/ttyACM*
That is not the case. On a "traditional" Arduino board, like the Uno, you have two chips: the main MCU which you program, and a USB interface chip, which is pre-programmed with code to present a CDC/ACM interface to the computer (which it then creates a /dev/ttyACMx device for).
With the feather you don't have that. You have one single chip. That chip is both the USB interface and the chip that you program - and most importantly, it is your program that provides the CDC/ACM device if you choose. If your program doesn't provide a CDC/ACM device then the computer will never see one, so it will never create /dev/ttyACMx.
In general the Arduino core always adds a CDC/ACM device whether or not you ask for it, since it is often used to initiate a reset into the bootloader. However if your sketch stops working for whatever reason then the CDC/ACM port is no longer there.
The M0 on the feather has a neat trick though - if you reset the board with the reset button twice the startup code recognises that fact and forces it to run the bootloader. That bootloader then presents the needed CDC/ACM device to the computer allowing you to upload new code.
Of course, if your program that you upload then doesn't initialise its own CDC/ACM device, or crashes, the CDC/ACM device will not be presented until you do the double-reset trick again.
-
doesn't he have a Micro clone? I know the double click trick for M0, but does it work for Micro?2018年09月27日 09:42:27 +00:00Commented Sep 27, 2018 at 9:42
-
I read the comments. Looks to me like he's talking about the feather.Majenko– Majenko2018年09月27日 09:47:57 +00:00Commented Sep 27, 2018 at 9:47
-
at Adafruit half of the products are feathers :-)2018年09月27日 09:50:24 +00:00Commented Sep 27, 2018 at 9:50
-
@Juraj Also the double click thing worked, according to the comments. So the double click thing is the answer. Which means it must logically be an M0 feather.Majenko– Majenko2018年09月27日 10:02:20 +00:00Commented Sep 27, 2018 at 10:02
-
that is what I have a problem with. the Adafruit FAQ for the 32u4 feather recommends the double click. Do they have a different bootloader or Micro bootloader has the double click too? or is the FAQ copypasted from M0 FAQ and a simple reset worked for OP?2018年09月27日 10:07:47 +00:00Commented Sep 27, 2018 at 10:07
/dev/ttyACM* mine are missing.
I think that something udev rules issue, you can define another rules with add Feather32u4.rules
and remove 99-adafruit-boards.rules
file before.
SUBSYSTEM=="usb", ATTRS{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"
ATTRS{idVendor}=="239a", ENV{ID_MM_DEVICE_IGNORE}="0"
ATTRS{idVendor}=="239a", MODE="0660", GROUP="dialout"
SUBSYSTEM=="tty", ATTRS{idProduct}=="8011", ATTRS{idVendor}=="239a", MODE="0660", GROUP="dialout"
SUBSYSTEM=="tty", ATTRS{idProduct}=="0011", ATTRS{idVendor}=="239a", MODE="0660", GROUP="dialout"
after saved and copy your files to /etc/udev/rules.d/
sudo cp Feather32u4.rules /etc/udev/rules.d/
and then restart your udev
sudo reload udev
or,
sudo udevadm control --reload-rules
sudo udevadm trigger
don't forget to restart your service
sudo systemctl restart ModemManager.service
check again your port with following ll /dev/tty*
, if it appear with named /dev/ttyUSBx
or /dev/ttyACMx
add a user to your group
sudo usermod -a -G plugdev <user>
also try to automatically reset button with add a delay into your sketch
while(!Serial){
delay(1000);
}
Serial.begin(115200);
if it not showed port on /dev/tty
list, try
- Enabled verbose upload in the Arduino Preferences.
- Open the Blink example.
- and add automatically reset above.
that will showed as the Bootloader COM/Serial Port with bootloading mode.
If didn't work, i advice install driver on Adafruit_Driver Windows only using Wine or PlayOnLinux, and remove udev files. also check again your /dev/tty*
list.
Hope this helps.
If the Arduino IDE does not show the port or does not allow you to select the port, load a known to be working program (such as Example> Blink), start a download, and then double-click the board's reset button.
For the same advice plus extraneous information view this help page on the particular Feather, the 32u4 micro-controller board, which seems to suggest the use of a verbose download mode but that seems to be unnecessary because you can just try again if it failed. The verbose download mode is enabled in preferences. Even though it is unnecessary I eventually decided to always use the verbose download mode because it gives what appears, to me at least, more immediate and obvious feedback about success and failure.
-
it same purpose that speeded up of @Majenko and Juraj.abu-ahmed al-khatiri– abu-ahmed al-khatiri2018年09月30日 09:41:03 +00:00Commented Sep 30, 2018 at 9:41
So I tried EVERYTHING... turns out my USB cable was a cheaper cable that didn't have the data pins in it. It is worth making sure your cable supports data transfer by plugging it into something else to make sure it w
ttyACM*
didn't show up on my /dev/ also, but as soon as I changed the USB port I was working with, the arduino board started blinking differently. So I checked the IDE again and under Tools
> port
> Serial Port
I saw ttyACM0 came up. Didn't make sense to me but it worked.
For my situation, where I'm using a custom Linux kernel, I was missing the cdc_acm driver.
This excellent page on the Gentoo Wiki helped me find it: https://wiki.gentoo.org/wiki/Arduino
ll /dev/tty*
what appears asttyACM*
orttyUSB*