Go Down

Topic: Cant Select "Serial Port" From Arduino Menus Or Program Arduino Uno, Ubuntu (Read 30530 times) previous topic - next topic

jaggernought

Hi, first I want to say how awsome my new Arduino is. I've been using in with "Windows 7" for a while now and its worked fine but my main Os is Ubuntu Linux and I and tired of having to constantly switch between to two.

Arduino 0022 loads up perfectly and I cant write sketches, load libraries..... the problem is that in the  "Tools -> SerialPort" menu is greyed out and I cant select it. If I try to program my board it says "COM..." cant be found. I've tried changing to COM in the Arduino preferences.txt file but it hasn't worked. The board worked perfectly with "Windows 7" so it must be my Ubuntu setup. Please can some body help

Im using Arduino Uno board, i get this error message "Binary sketch size: 806 bytes (of a 32256 byte maximum)
processing.app.SerialNotFoundException: Serial port 'COM1' not found.  Did you select the right one from the Tools > Serial Port menu?
   at processing.app.Serial.<init>(Serial.java:153)
   at processing.app.Serial.<init>(Serial.java:76)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:636)

To sum thing up i basically cant load my Arduino Uno board or use  the "Tools -> SerialPorts" menu.

Thanks alot  :) :) :)

Magician


Plug in usb cable from arduino and run "dmesg" command in terminal window.
You should see if system assign a new port for serial and it's name.

jaggernought

I did what you said and the terminal gave me a long list of what it did/didn't do but it doesnt seam to of done anything. the "Tools -> "Serial Port" is still blanked out :( thanks anyway

mrtaylor

On the ubuntu. plug in the usb port and in a terminal type the command lsusb and post the output.

When you ran the dmesg command look for something that kind of looks like this.
cdc_acm 7-2:1.0: ttyACM0: USB ACM device

jaggernought

when I ran to "lsusb" i got:

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 2341:0001 
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 064e:a103 Suyin Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When I ran "dmesg" i got:

"cdc_acm 4-2:1.0: ttyACM0: USB ACM device", but not, "cdc_acm 4-2:1.0: ttyACM0: USB ACM device" like you said, could this be part of the problem?

Thanks for the help so far

jaggernought

Ok well i may of taken a step in the right direction, I downloaded the "Windows Arduino IDE" and ran that. I can now chose between different COM'S, WHOO, but i cant right to them. I have no idea which COM Arduino is on so i tried all 4 and got the message "COM is already in use". Ive checked and theres nothing using them apart from the Arduino IDE. Is this because im trying to run the Windows version. Heres the fulll list of problems

"Binary sketch size: 10400 bytes (of a 32256 byte maximum)
processing.app.SerialException: Serial port 'COM3' already in use.  Try quiting any programs that may be using it.
   at processing.app.Serial.<init>(Serial.java:144)
   at processing.app.Serial.<init>(Serial.java:76)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:619)
processing.app.debug.RunnerException: Serial port 'COM3' already in use.  Try quiting any programs that may be using it.
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:99)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
   at processing.app.Sketch.upload(Sketch.java:1603)
   at processing.app.Sketch.exportApplet(Sketch.java:1568)
   at processing.app.Sketch.exportApplet(Sketch.java:1524)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2293)
   at java.lang.Thread.run(Thread.java:619)"

Back to square 1 or is there hope :)

jaggernought

P.S. to my last post,

I'm still running on Ubuntu Os i just ran to "Arduino IDE" using Wine.

mrtaylor

Quote
Bus 004 Device 003: ID 2341:0001

This is your usb device
Quote
cdc_acm 4-2:1.0: ttyACM0: USB ACM device

This is the correct log entry

So far so good so try running as root (sudo) and see what happens and check to make sure your a member of the dialout group you can do this by using the following commands. With arduino plugged in
id
ls -l /dev/ttyACM*

note:  I have seen other people using Ubunty 10.04 were using arduino-0021.
note:  I have never used wine and arduino, so i have no idea what to expect there.

Magician


Ubuntu 10.10 and IDE 22, for your reference:

[27753.620054] usb 2-3: new full speed USB device using ohci_hcd and address 2
[27754.859788] cdc_acm 2-3:1.0: ttyACM0: USB ACM device
[27754.864536] usbcore: registered new interface driver cdc_acm
[27754.864546] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
magician@magician-pc:~$

I installed IDE 18 first, as it latest version in repository Ubuntu. After that I always
working with 22-nd version without any big problem. It's possible that installation of old version set up some libraries, so newer can access.
One more things, create a link:

sudo ln -sf /dev/ttyACM0 /dev/ttyS0

In this case IDE can use ether names.

jaggernought

Ok, Im a little bit close now, thanks "Mrtaylor and Magician". The "Tools -> SerialPort" menus is available and displays "/dev/ttyS0", ive selected it and tried writing to my Arduino board.

When I ran "id, ls -l /dev/ttyACM*" i got....
"cannot access /dev/ttyACMls: No such file or directory
crw-rw---- 1 root dialout 166, 0 2011-02-24 18:55 /dev/ttyACM0", this sounds troubling.


Arduino says "Done Uploading", this all sounds very good but then i get the message underneath saying...

"Binary sketch size: 750 bytes (of a 30720 byte maximum)

avrdude: stk500_getsync(): not in sync: resp=0x08"

The first line is as I expected but I have never seen the second line before and obviously it shows there something wrong with "avrdude", that's.

P.S. Is the Serial Port sup-post to be displayed as "/dev/ttyS0", it's just that in Windows I don't remember it looking like that.

P.P.S Big thank you to the two people who have got me this far, just one last push I hope :D:D:D


jaggernought

Good though "Magician" but would I be able to run an older Arduino IDE and still use my Arduino UNO board, I've not seen it displayed in the "Boards" menu. :/

Magician

You are right, 18 is not support Uno.
I suggest, installation of older version helpful to fill all path and directories,
that would be necessary for newer version. You will run 22-nd after that.

jaggernought

Cool, I'm not running verison 18 and Serial Ports but there no Arduino UNO. I update to 22 and there was UNO but no Serial Ports selection available. Is there any files i can copy from 22 to 18 to enable Arduino UNO in 18.

Thanks for quick reply

jaggernought

MUWAHAHAHAHA,,,

ITS ALIVE  ]:D

Not sure what finally did it in the end. I ran all the code you guys sent me, installed version 18 through Ubuntu Software centre, downloaded version 22 and ran that, reinstall Java numerous time and it works :D,

Thank you both :),  I just hope I can reboot my laptop and not have to restart the process again.

thanks you thank you thank you :D:D:D



mojotexas

Same problem, no solution.
I can connect to the board, upload code, but I cannot select the serial port, and attempts result in a "Serial Port not found" error.


Code: [Select]

Binary sketch size: 3018 bytes (of a 32256 byte maximum)
processing.app.SerialNotFoundException: Serial port '/dev/ttyUSB0' not found.  Did you select the right one from the Tools > Serial Port menu?
at processing.app.Serial.<init>(Serial.java:153)
at processing.app.Serial.<init>(Serial.java:76)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:75)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:93)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:56)
at processing.app.Sketch.upload(Sketch.java:1603)
at processing.app.Sketch.exportApplet(Sketch.java:1568)
at processing.app.Sketch.exportApplet(Sketch.java:1524)
at processing.app.Editor$DefaultExportAppHandler.run(Editor.java:2327)
at java.lang.Thread.run(Thread.java:662)


My System: Ubuntu 10.10 64bit, Arduino Uno, IDE 22

Things I have already tried:
Symbolic link between /dev/ttyACM0 and /dev/ttyUSB0


  • Installed IDE from Natty repository (022). This didn't fix the issue, which was the same in IDE 018.


  • uninstalled brltty


  • in /etc/modules Added "ftdi_sio"


  • remove librxtxSerial.so, then put it back


  • many combinations of resetting the Uno, unplugging, plugging, etc.



I followed the troubleshooting guide, and I still get "Serial Port not found" every time I try to run a sketch.

I feel like a lot of people have had this issue, but there is no clear solution. Any ideas out there?
Arduino Uno (IDE 22)
Ubuntu 10.10 Maverick

Go Up