if I log in as root, I can upload, because ttyACM0 is selected under
Tools>Serial Port in the IDE
BUT if I log in as someone else...(non-root)
then I can't upload, because the IDE is looking for
COM1 and the Tools>Serial Port menu item is greyed out.
Hey i did the same thing earlier and it showed me ttyACM0. But later on i input this:
user@userPC:~$ ls -l /dev/ttyACM*
and this is the output:
ls: cannot access /dev/ttyACM*: No such file or directory
Meaning there aren't any ttyACM* files in the directory, so the question is: how do i create one? Is a plain text file enough, so that linux will later populate the file when i connect my board?
If you run a modern linux distribution (using udev), these files will be created automatically when they are needed. That is once you plug the arduino into your machine, it will show up. If you need to know more about this process, google for "udev rules" (can get quite confusing at first).
That also means that if you unplug the board, this file vanishes.
Make sure you are in the same user group as the file to have write access.
ok so now i know the file vanishes when the board is unplugged. So now i run the arduino software as root. It DOES let me choose the (correct) port and there is connection&power to the arduino but when uploading i still get same problem: serial port /dev/ttyACM0 not found. ... what am i doing wrong? btw TX light is constantly on, does that indicate anything?
There seems to be a problem with java not looking for devices named "ttyACM*".
Try adding a custom udev rule to automatically create a symlink. Locate your udev 'rules.d' folder (presumably somewhere in /etc/, maybe even /etc/udev/rules.d) and create a custom rule file, e.g. named '99-arduino.rules' - the ending should be the same as all the other files.
The file's content:
KERNEL=="ttyACM[0-9]", SYMLINK+="ttyUSB%n"
Now restart udev manually or restart your machine. This should now create a symlink for every "ttyACM*" named "ttyUSB*".
And please don't run the IDE as root. This is not windows. Fix your group membership as shown above and it will work.
unbelieveable. I done exactly as you said and i finally managed to upload the 'blink' example. So it finally worked. Then i uploaded the 'DigitalReadSerial' sketch and it uploaded successfully. Then when i wanted to see the output, i pressed on the serial monitor icon and...AGAIN! Same shit - i cannot upload sketches AGAIN, the analogue example doesn't work AGAIN! It is definitely something with the software. By the way thank you for the previous solution.
hmmm looks like i need that group membership fixed... how do i do that again? I changed the permissions for the file itself but i still can only run it as root
ok so my ttyACM0 was also in the dialout group. i added my user to the group (but i think you got the group and user wrong way round so i just changed that) and then, just in case, checked the file. My username is 'user' and it was there so i restarted. When it booted i loaded arduino software again and tried to upload something but i still get the same error.
try executing the "id" command: The ouput on my machine looks like:
uid=1000(mark) gid=1000(mark) groups=1000(mark),4(adm),20(dialout),24(cdrom),46(plugdev),112(lpadmin),120(admin),122(sambashare)
That one look good. Post an ls -l /etc/ttyACM*. I'm looking at the permissions of the device. Looks like:
crw-rw---- 1 root dialout 188, 0 2011-06-15 11:26 ttyUSB0
Your should be different: My uno is at the other house