USB Serial Communication with Arduino

Started by alecnotalex, April 15, 2013, 09:33:12 PM

Previous topic - Next topic

alecnotalex

There's a problem that I've been working on for a little while now, but I've had no success. I now turn to you guys looking for advice.

A while ago I purchased an A13 OLinuXino for a project that I'm working on. To be a little more specific, it was meant to do vision processing and pass data on to an Arduino. I set up a camera and OpenCV on it just fine, it actually worked better than expected. What I've got is an externally powered USB hub plugged into the OLinuXino, and the camera and Arduino plugged into the hub. I wrote a python script with pyserial to pass the data on to the Arduino, and it's been tested on my laptop.

Now, here's what my problem actually is. The Arduino does not show up in /dev on the OLinuXino. It is shown in lsusb, a some "usbdev" comes up in /dev, but /dev/ttyACM0 isn't there. Without this, there is no port for pyserial to send data through, and, well, that's my problem. Do any of you have experience with solving this sort of issue? I suppose I would be open to suggestions of other methods of transferring data, but I would really like to be able to send serial data over the USB port.

Thank you in advance for any help you might be able to give to me. 

Lasse

Hi,
my suggestion would be sending the Data over the UART of Olimex and Arduino. It should be nearly the same like Using USB because the Arduino (especially the Arduino One which I have here) has only a USB <> Serial converter. But watch out with the Signal voltages. Maybe you need to build a little converter inbetween (3,3V Signal level vs. 5V Signal level but I am not sure about that). Then you only need to throw out the Data from the Olimex and there is no need for a driver for Arduino any more (for the USB <> Serial device)

Lasse

Lioric

What arduino?

See what arduino you have (what usb to serial driver IC it uses) and load the kernel module for it

Most probably just load FTDI module and you are good to go (ftdi_sio.ko if I remeber correctly, used by my Duemilanove, UNO and Mega boards), that will create the needed /dev/ttyACM(USB)n devices in the filesystem

alecnotalex

#3
Thanks for the replies, I'll look into installing the ftdi module.
It's the Arduino UNO by the way.

Autom01

Hello, did u succeed to plug your Ardunio ?

I'm unable to load the proper module. My boards is not detected. Arduino 2560 and 1280. No ttyUSB or ttyACM.

Can you give me some advise ?

Thx in advance.

Autom01

Little up. does anywone succeed to plug an arduino and talk to him via ttyUSB or ttyACM ???

I'm quite stuck ...

gkania

Hi
I'm not sure, but I think that, if you want to communicate with FTDI converter using the /dev/tty... then in the linux kernel shoud be compiled driver for these chips, or should be loaded module ftdi_sio.ko. This module is also created while your Linux kernel is build. You can check if you got this file by adb. Perhaps this file is in the directory /system/data/vendor.

Another way to communicate with FTDI chips - is communication from the application level using UsbManager. Something like that I was able to run, but the transmission rate is very low: at the level of 20kB/sec.

Autom01

Ok... i succeded to build ftdi_sio.ko. Copied on my board.

modprobe ftdi_sio
...ok (seems to be)

But, when i plug the board... i get nothing. No ttyUSB/ACM mounted.

My kernel + module was created with an auto generated .config. (with ftdi enabled). Could be the problem ?

BJFreeman

I have an A13 wifi, which i doubt makes a difference.
using R1 linux I see the /dev/ttyACM0
unfortunately I am NOOB to linux and don't know how to access the terminals yet.
Fulltimer since 89

BJFreeman

Fulltimer since 89

alecnotalex

...
#10
I'm still stuck on this. I ran "modprobe ftdi_sio" and it didn't come up with any errors. I restarted the OLinuXino, but still the Arduino didn't show up in /dev/. I then tried running "lsmod", but it came up with absolutely nothing. Any suggestions?