Pages: [1]   Go Down
Author Topic: Serial Port grayed out  (Read 12321 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just got my Arduino Mega 2560 R3.  Was able to load Blink and play with updating it to change the frequency of the blink etc.  Moved on to a sketch with Serial.Write... Now I CAN upload from Windows but CANNOT from my Ubuntu box where I really need to work. 

Any ideas on what to do to get uploading working on Ubuntu?

Arduino 1.0.1 on Ubuntu 12.04.1

Log from Arduino Window:
Binary sketch size: 1,624 bytes (of a 258,048 byte maximum)
Binary sketch size: 1,624 bytes (of a 258,048 byte maximum)
processing.app.SerialException: Error opening serial port '/dev/ttyACM0'.
   at processing.app.Serial.<init>(Serial.java:178)
   at processing.app.Serial.<init>(Serial.java:77)
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:172)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
   at processing.app.Sketch.upload(Sketch.java:1706)
   at processing.app.Sketch.exportApplet(Sketch.java:1662)
   at processing.app.Sketch.exportApplet(Sketch.java:1634)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2346)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2355)
   at java.lang.Thread.run(Thread.java:679)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
   at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)
   at processing.app.Serial.<init>(Serial.java:163)
   ... 10 more
processing.app.debug.RunnerException: Error opening serial port '/dev/ttyACM0'.
   at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:172)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
   at processing.app.Sketch.upload(Sketch.java:1706)
   at processing.app.Sketch.exportApplet(Sketch.java:1662)
   at processing.app.Sketch.exportApplet(Sketch.java:1634)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2346)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2355)
   at java.lang.Thread.run(Thread.java:679)


Device is created:

 ls -la /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Oct  7 20:55 /dev/ttyACM0

have access:

 groups | grep -o '\bdialout\b'
dialout

Communicating with Arduino:  the following causes the Rx diod to flicker indicating it's getting a signal
echo ciao > /dev/ttyACM0

When I try to upload a script a file gets created:LCK..ttyACM0.  I can delete this file but can't upload.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 152
Posts: 6181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you using the IDE downloaded from the Arduino site or the Ubuntu repository? If the latter, try downloading and running the version from the Arduino site. It is working well here. The repository version did not work that well.

Download and unpack it into a local directory, and run the arduino shell script in that directory to run the new version.
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Some nice person did this :   http://blog.markloiseau.com/2012/05/install-arduino-ubuntu/

The troubleshooting section is your likely promlem, ie your user doesn't have rights to access the serial ports.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried the re=istall - nothing
I tried the access the user to the port - nothing.

Then
"
I am not sure if I have any better advise than SurferTim. The only crazy longshot is open your Arduino IDE, go to File->Preferences then click on path hyperlink to preference.txt file near the bottom of the preferences window. Open and view the preference.txt file and find "serial.debug_rate". Verify that it is set to 9600."

My file was set to 28800.

Setting it back to 9600 fixed the issue!!!!!

Massive celebration!!!!

Thank you.
Logged

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad it worked.  It was my best guess to save me re-installing Ubuntu.

Anyone know why Linux tries to run @ 14400-28800 while WinDoze is 9600?
Logged


Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 152
Posts: 6181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Neither of my Ubuntu installs have that baud rate. If you installed the version from your repository, maybe that is where it picked up the bad preferences.txt file?
Both my installs show:
serial.debug_rate=9600
Logged

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It is odd that the re-installation did not clear out the preference file.  I guess it is just one of those enigmas wrapped in bacon.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear all, I had the same problem with the Ubuntu repository IDE and tried to fix the issue by changing the baud to 9600 in Preferences.txt. It seems however that each time I restart the IDE or upload a sketch Preferences.txt is changed by arduino again to a value of 38440. I tried  to change the owner to root in order to avoid arduino from changing it, but it cannot start if it has no access to Preferences.txt.

The 1.0.2 IDE from the site works fine and does not modify that value in Preferences.

Cheers
Logged

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you change it, is the Arduino IDE open?
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Download the Software to Downloads
Then open up terminal and type :
      cd Downloads
then,
      tar xzvf arduino-1.0.5-linux64.tgz
then,
      cd arduino-1.0.5
plug in your Arduino (even UNO and Mega)
then type,
      sudo ./arduino
this gives reply
      [sudo] password for yourusername:
type in the password

This loads Arduino IDE with Serial Port problem resolved

There is another way:
After installing Arduino IDE, plug in your Arduino, open up terminal and type
      sudo arduino
This too solves the problem
« Last Edit: June 29, 2013, 02:14:03 am by Kishore S » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try to add your user to tty and dialout. Execute the following commands:
Code:
sudo usermod -a -G tty yourUserName
sudo usermod -a -G dialout yourUserName

Log off and log on again for the changes to take effect!

I've found it here: http://playground.arduino.cc/Linux/Debian. It worked for me.

Cheers.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had this same issue. Simple way to solve it is:
1. Run terminal
2. Type "sudo arduino"
3. Type password
4. It's works!
That's all. You must just run it as administrator:D
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I ask the OP, if any of these values differ from mine on Ubuntu?

serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=COM1
serial.stopbits=1
sketchbook.path=/home/ubuntu/Arduino
software=ARDUINO


especially the one on Bold?
Logged

Pages: [1]   Go Up
Jump to: