How to check and change the usb port on Linux?

I have used an Arduino Micro successfully on Windows. I have just bought another Micro to use on Linux and can set the IDE to tell it the board is a Micro. In the tools menu "serial port" is greyed out. When I try to upload it tells me to check that I have the correct port selected. Anyone know how I do that please?

Regards

Geoff

My Linux OS required that I add the group "dialout" to my user to access the usb ports. Open a command prompt and enter "groups". If dialout is not there, you must add it to your user.

I had a similar issue a long time ago, but the group was UUCP for me, so you can add yoruself to both groups, orone at a time to see which fixes it. IMPORTANT! you must remember to logout and in again for changes to take effect. I didn't realize thisand spentmany an hourtrying to troublshhoot a problem I had fixed lol

Thanks for those suggestions. When installing the IDE it pompts to confirm adding the user to the dialout group. There is no UUCP group:

geoff@geoff-laptop:~$ groups geoff adm lp dialout cdrom sudo dip plugdev lpadmin sambashare uinput geoff@geoff-laptop:~$ useradd -G {UUCP} geoff useradd: group '{UUCP}' does not exist geoff@geoff-laptop:~$

Futher clues are that when I plug the Micro into the USB port the blue light comes on and the green light flashes. I tried pressing the reset button during upload but it still failed with the same error message. Any further suggestions would be much appreciated.

Regards

Geoff

geoff@geoff-laptop:~$ useradd -G UUCP geoff
useradd: group ‘UUCP’ does not exist

What distro are you using? Are you using a 'package' from your distro or the tarball from the Arduino website?

ls -l /dev/ttyACM? With your board plugged in will tell you what group can access the port. If that dosn't work try, ls -l /dev/ttyUSB?

http://playground.arduino.cc/Learning/Linux These pages may be of some help.

You always can give full permisions to the USB. In my case I have to type in a terminal

sudo chmod 777 /dev/ttyUSB0

and then you can check the serial port menu on the IDE.

Just check if your Arduino is plugged at ttyUSB0 or at another.

Use dmseg | tail to figure out what port the USB is after plugging in the USB device.

echo "Hello world" > /dev/USB0 and echo "Hello World" > /dev/ACM0 depending on the USB device used.

The above seems to a good way to determine permissions. You can also watch for an Rx LED to blink on the board when you execute the cmd and it succeeds. At least you'll get errors that make more sense than from the IDE.

Use dmseg | tail to figure out what port the USB is after plugging in the USB device.

echo "Hello world" > /dev/USB0 and echo "Hello World" > /dev/ACM0 depending on the USB device used.

The above seems to a good way to determine permissions. You can also watch for an Rx LED to blink on the board when you execute the cmd and it succeeds. At least you'll get errors that make more sense than from the IDE.

You may

Thanks for those suggestions.
I am on Ubuntu 12.04 32 bit but will probably upgrade to 14.04 64 bit soon.
dmesg|tail does not show any new messages.
Also I attach a screenshot of the IDE, which was downloaded from the Arduino website.

geoff@geoff-laptop:~/Downloads/arduino-1.0.5$ ls -l /dev/ttyACM
ls: cannot access /dev/ttyACM: No such file or directory
geoff@geoff-laptop:~/Downloads/arduino-1.0.5$ ls -l /dev/ttyUSB
ls: cannot access /dev/ttyUSB: No such file or directory
geoff@geoff-laptop:~/Downloads/arduino-1.0.5$ cd /dev
geoff@geoff-laptop:/dev$ ls
autofs fd loop-control ram1 random stdin tty2 tty33 tty47 tty60 ttyS15 ttyS29 vcs1 vga_arbiter
block full mapper ram10 rfkill stdout tty20 tty34 tty48 tty61 ttyS16 ttyS3 vcs2 vhost-net
bsg fuse mcelog ram11 rtc tty tty21 tty35 tty49 tty62 ttyS17 ttyS30 vcs3 video0
btrfs-control hpet mei ram12 rtc0 tty0 tty22 tty36 tty5 tty63 ttyS18 ttyS31 vcs4 zero
bus input mem ram13 sda tty1 tty23 tty37 tty50 tty7 ttyS19 ttyS4 vcs5
char kmsg net ram14 sda1 tty10 tty24 tty38 tty51 tty8 ttyS2 ttyS5 vcs6
console log network_latency ram15 sda2 tty11 tty25 tty39 tty52 tty9 ttyS20 ttyS6 vcs7
core loop0 network_throughput ram2 sda5 tty12 tty26 tty4 tty53 ttyprintk ttyS21 ttyS7 vcsa
cpu loop1 null ram3 sda6 tty13 tty27 tty40 tty54 ttyS0 ttyS22 ttyS8 vcsa1
cpu_dma_latency loop2 port ram4 sda7 tty14 tty28 tty41 tty55 ttyS1 ttyS23 ttyS9 vcsa2
cuse loop3 ppp ram5 sg0 tty15 tty29 tty42 tty56 ttyS10 ttyS24 uhid vcsa3
disk loop4 psaux ram6 shm tty16 tty3 tty43 tty57 ttyS11 ttyS25 uinput vcsa4
dri loop5 ptmx ram7 snapshot tty17 tty30 tty44 tty58 ttyS12 ttyS26 urandom vcsa5
ecryptfs loop6 pts ram8 snd tty18 tty31 tty45 tty59 ttyS13 ttyS27 v4l vcsa6
fb0 loop7 ram0 ram9 stderr tty19 tty32 tty46 tty6 ttyS14 ttyS28 vcs vcsa7
geoff@geoff-laptop:/dev$ cd -
/home/geoff/Downloads/arduino-1.0.5
geoff@geoff-laptop:~/Downloads/arduino-1.0.5$ sudo ./arduino
Experimental: JNI_OnLoad called.
Stable Library

Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Binary sketch size: 5,190 bytes (of a 28,672 byte maximum)
processing.app.debug.RunnerException: Couldn’t find a Leonardo on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board’s reset button after initiating the upload.
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:153)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:701)
geoff@geoff-laptop:~/Downloads/arduino-1.0.5$

If you need information about USB buses just use lsusb, it will list your buses and devices connected.

I suggest you try sudo chmod 777 /dev/ttyUSB0 and let us know your results ;)

lsusb looks the same whether the Micro is plugged in to a blue or black port or not at all:

geoff@geoff-laptop:~ lsusb Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 003: ID 5149:13d3 geoff@geoff-laptop:~ sudo chmod 777 /dev/ttyUSB0
[sudo] password for geoff:
chmod: cannot access `/dev/ttyUSB0’: No such file or directory
geoff@geoff-laptop:~$

Then change your USB cable. Yes, it seems stupid answer but arduino is a bit sensitive with USB cables or maybe is an USB cable with only power supply, no data transmission, like cables for wireless mouses, for example.

When I use a cheap USB cable I get the same results as you, but when I use a good cablethis is what I get after doing lsusb:

Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 002: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 019: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 001 Device 004: ID 8087:07dc Intel Corp. Bus 001 Device 003: ID 04ca:7017 Lite-On Technology Corp.

I'm not an arduino expert, but I hope I help you.

Oh yes thank you very much I had forgotten to check that. I swapped the cable for a thicker one marked "USB shielded high speed cable 2.0 revision 28AWG/2C+22AWG/2C ROHS compliant" and I can now upload.