Wednesday, 7 December 2011

Processing: USB Serial connection workaround


Hi all,
Currently I'm playing with an Arduino UNO Microcontroler but, using Processing over linux I found a bug.
When I tried to open an USB Serial port, Processing did not recognize it.

DMESG:
cristian04@finally:/dev$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.435405] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.435616] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   12.901934] cdc_acm 2-5:1.0: ttyACM0: USB ACM device << Arduino UNO
Processing Test Code:
import processing.serial.*;

void setup()

{

  println(Serial.list());

}
Processing Result:
WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] "/dev/ttyS0"
So, ttyACM0 is not listed
Workaround (As root):
root@finally:/dev$ ln -s /dev/ttyACM0 /dev/ttyS4 
And then you should get:
WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] "/dev/ttyS4"
[1] "/dev/ttyS0"
Useful? Please leave your comments ;)

1 comment:

  1. ah....weno ahora espiquineais...igual no entendi ni jota!!! Anyway I trust u now and ever!!! XXXX ME =P

    ReplyDelete

Chau Blog (.com.ar)

Bueno, post corto porque me embolé. Resulta que se me vence el dominio en Nic Argentina, organismo que se especializa en hacer las cosas d...