Topic: usbserial?

Hi everyone,

My chumby arrived yesterday and I've been trying to connect it to an Arduino, using usbserial.  It looks like usbserial is not compiled in to the kernel and I don't see it as an optional kernel module when I re-compile the kernel.

Interestingly enough, I do see /dev/usb/USBtty1, etc on the chumby.

I don't know much about how drivers and kernel modules work in linux.  Can any of you point me in the right direction?

Thanks,
John

Re: usbserial?

Also, I should mention how arduino's are typically communicated to from Linux, etc:

http://www.arduino.cc/playground/Interfacing/LinuxTTY
http://www.arduino.cc/playground/Main/Interfacing

Re: usbserial?

I should also mention that I've had the arduino send characters over usbserial, but those characters don't show up when I cat the ports located in /dev/usb/.  Meanwhile, when I echo characters at the ports in /dev/usb/, the arduino doesn't receive them.

Re: usbserial?

Thanks to lots of help from dwatson, the basics are working.  dwatson suggested I modify certain config values for compiling the kernel. 

Here are the steps required:

First, I built the kernel per the directions on http://wiki.chumby.com/mediawiki/index. … for_chumby

Then I opened .config with vi and added these lines:
CONFIG_USB=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_FTDI_SIO=m

Then, I remade the kernel with the following command line (and hit enter at every question thrown at me):
ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make all modules

That resulted in usbserial.ko and ftdi_sio.ko being added to the devices/usb/serial directory.

I put those files onto my usb memory stick, booted the chumby, ssh'd in, navigated to the stick's directory (/mnt/usb) and ran:
insmod usbserial.ko
and
insmod ftdi_sio.ko

Then, I connected the arduino via USB2 and ran dmesg to verify that it is now attached at /dev/ttyUSB0.

If you need these files, you can get my copies at http://chumby.tokash.org/ftdi_sio.ko and http://chumby.tokash.org/usbserial.ko.

Excellent!  More later!  Thanks dwatson!!

Re: usbserial?

I was able to compile busybox with support for stty.

I downloaded the busybox source from busybox.net.  I went with the same version I found on the chumby, version 1.6.1.

I ran make menuconfig and said yes to STTY and TTY support.  I also said yes to STATIC, but that turned out to be a mistake that I had to fix later.  Don't say yes to that one!

I then tried the ARM cross compile instructions on the busybox site, but they did not work (didn't get an ARM executable).  AWalton (THANKS!) on IRC encouraged me to try other options to further force the cross compile.  I tried a bunch and was successful when I ran the following command line:

ARCH=arm BOARD=mx21ads CROSS_COMPILE=arm-linux- make

My build is at: http://chumby.tokash.org/cc/busybox
DO NOT attempt to replace the built-in busybox with this version.  This build supports STTY, but it doesn't support a bunch of important functions that the built-in build does.

Re: usbserial?

Arduino?  That's awesome.  I was just going to try to get my arduino running this week.  wink

Re: usbserial?

Hello jtokash,
how is your progress connecting an arduino board to chumby?
Are you able to get the data from the arduino into a flash widget?

That's what I'm interested in.

Thanks,
Michael.

Re: usbserial?

I think he's given up hmm

Anybody want to turn it this into a community project? Well anybody with an interest in Arduino?

Music Tames The Savage Beast

As does PHP and Perl.

Re: usbserial?

Hmm, I think I have not yet too much experience with chumby yet in order
to start such a community project.

I will try to get much more knowledge about it and hopyfully there is a way to connect an Arduino boad to chumby.

Thanks,
Michael.

Re: usbserial?

serial drivers for arduino are now already compiled into the kernel

Re: usbserial?

elliotwoods wrote:

serial drivers for arduino are now already compiled into the kernel

cool.  i plugged in my ftdi cable and sure enough the drivers show up, but busybox is built without stty.  rats.