Go Down

Topic: More GNU/Linux serial problems (Read 2489 times) previous topic - next topic

5inister

Hello everyone,

I have an Arduino Uno R2, I run a GNU/Linux computer with ubuntu maverik 10.10 x86. As everyone else I had serial communication problems and proceeded to flash my firmware to the Arduino-usbserial-uno.hex provided with the distribution (using the dfu-programmer method). I thought that hadn't done anything since every time I try to upload I get the posted error and serial port /dev/ttyACM* disappears from the menu. I tried uploading as root and it worked, than i tried changing the permissions on /dev/ttyACM* but that still didn't fix it. Does anyone have any idea on how to access ttyACM* without privileges? Here is the error I get on the Arduino IDE (version 022):

Error opening serial port '/dev/ttyACM1'.
Binary sketch size: 428 bytes (of a 32256 byte maximum)
processing.app.SerialException: Error opening serial port '/dev/ttyACM1'.
   at processing.app.Serial.<init>(Serial.java:146)
   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)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
   at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:171)
   at processing.app.Serial.<init>(Serial.java:136)
   ... 9 more
processing.app.debug.RunnerException: Error opening serial port '/dev/ttyACM1'.
   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:636)

Thanks

mrtaylor

Are you in the same group as .dev/ttyACM*?  You can check this by executing an ls -ls /dev/ttyACM* and then executing an groups command.



5inister

I added root to my group just to make sure we're together. Here is my output from a few commands

Code: [Select]

$ ls -ls /dev/ttyACM0
0 crw-rw---- 1 root dialout 166, 0 2011-06-03 15:50 /dev/ttyACM0
$ ls -ls /dev/ttyACM1
0 crw-rw---- 1 root dialout 166, 1 2011-06-03 16:11 /dev/ttyACM1


Than I did:
Code: [Select]

$ groups diego
diego : diego root adm sudo
$ groups root
root : root diego


I tried again and I can still only access the port running the Arduino IDE with sudo.

mrtaylor

Try adding (your userid?) diego to the dialout group

5inister

Still no luck, tried adding myself to the dialout group and even changed the account type to administrator. I can't even select my serial port on the IDE without root privileges.

hcl2

I hate to flaunt my ignorance like this but...  When I did this I added myself to the dailout group, not the dialout group (a and i reversed).  You have to log out of any existing session to get the new group to take effect.  You can check you groups with the command `groups`.  If you can't do:

cat /dev/ttyACM0
or
echo "foo" > /dev/ttyACM0

then it is still an OS permission problem and not related to ardunio IDE.

Go Up