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?
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.
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.
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.
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$
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.
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.