LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-07-2012, 09:00 PM   #1
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 36
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.
 
Old 04-11-2012, 10:38 AM   #2
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Original Poster
Rep: Reputation: 36
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!
 
  


Reply

Tags
java, serial port



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing arduino (1.0) on slackware (13.37) aikempshall Slackware 4 03-06-2012 02:51 PM
arduino board for FC14 PoleStar Linux - Hardware 2 11-01-2011 09:41 AM
Arduino on Bluewhite64 - 13 DEA Bluewhite64 4 01-30-2010 02:42 AM
Arduino carbonfiber General 3 01-18-2010 01:05 PM
Trying to Program the Arduino oakmanor1 Linux - Newbie 2 07-02-2009 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration