LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Processing will not communicate with Arduino (http://www.linuxquestions.org/questions/linux-hardware-18/processing-will-not-communicate-with-arduino-938691/)

zuzoa 04-07-2012 10:00 PM

Processing will not communicate with Arduino
 
I have an Arduino Uno that is recognized by lsusb and is given the device name /dev/ttyACM0, as recognized by the Arduino IDE. I am added to the uucp group. Despite this, Processing will not show any available serial ports, nor will it communicate with the arduino if I tell it to use /dev/ttyACM0.

I have the ambient light code/setup detailed here working perfectly in Windows, and the same code will not run under Arch linux. I have installed the packages libxtst 1.2.1-1, lib32-libxtst 1.2.1-1, and the AUR versions of (Oracle) jre 7u3-1, jdk 7u3-1, arduino 1.0, and processing 1.5.1.

Code:

[susie@luka ~]$ groups susie
uucp video audio users

Code:

[susie@luka ~]$ sudo lsusb -s 005:002 -v

Bus 005 Device 002: ID 2341:0001 
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.10
  bDeviceClass            2 Communications
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        8
  idVendor          0x2341
  idProduct          0x0001
  bcdDevice            0.01
  iManufacturer          1 Arduino (www.arduino.cc)
  iProduct                2 Arduino Uno
  iSerial              220 64934333235351218242
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          62
    bNumInterfaces          2
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC              10.01
      CDC ACM:
        bmCapabilities      0x06
          sends break
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface        1
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0008  1x 8 bytes
        bInterval            255
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        1
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0040  1x 64 bytes
        bInterval              1
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0040  1x 64 bytes
        bInterval              1
Device Status:    0x0000
  (Bus Powered)

Code:

[susie@luka ~]$ stat /dev/ttyACM0
  File: /dev/ttyACM0
  Size: 0                Blocks: 0          IO Block: 4096  character special file
Device: 5h/5d        Inode: 5627        Links: 1    Device type: a6,0
Access: (0660/crw-rw----)  Uid: (    0/    root)  Gid: (  14/    uucp)
Access: 2012-04-07 20:58:52.497971334 -0400
Modify: 2012-04-07 21:11:51.354636461 -0400
Change: 2012-04-07 21:34:05.677967159 -0400
 Birth: -

Processing code:
Code:

import processing.serial.*;

// The serial port
Serial myPort;     

// List all the available serial ports
println("Available serial ports:");
println(Serial.list());

Processing output:
Code:

[susie@luka ~]$
Available serial ports:
WARNING:  RXTX Version mismatch
        Jar version = RXTX-2.2pre1
        native lib Version = RXTX-2.2pre2

Any insight or suggestions are appreciated.

zuzoa 04-11-2012 11:38 AM

Also, running a command like `$echo "test">/dev/ttyACM0` causes the RX led on the arduino to blink, which leads me to believe it may be a software issue with Proccesing.org.

Still haven't figured this out, suggestions are welcome!


All times are GMT -5. The time now is 01:40 AM.