OK, here's what I've found so far.

1. The ftdi_sio driver is included in the generic 8.04 kernel and the 
   Arduino attaches to port /dev/ttyUSB0 as expected.

1.1. Both GtkTerm and the Python serial library can then communicate
     with the Arduino (I programmed it to act like a serial loopback) 
     so the driver appears to be working correctly.

1.2. The Arduino IDE still fails to connect to the board, firing a Java
     exception:
     gnu.io.UnsupportedCommOperationException: Invalid Parameter
     This seems to be an Arduino problem that I'll pursue elsewhere
     (Thanks for your comments Dirk: I'm sure I have the right port and
     I've tried replacing librtx-java with no effect).
     Meanwhile, I can program the Arduino from a Windows XP machine.

1.3  I haven't yet finished testing whether I can get the Arduino
     talking to the EMC2 sim since I need to hack around with my 
     config to do so. Jeff's comments and my own tests with Python
     imply that it should work.

2. The ftdi_sio driver is missing from the 8.04 rtai kernel, so the
   Arduino fails to attach to a port 

2.1  Since there's no port attached, neither GtkTerm nor Python can talk
     to the Arduino.

2.2  I tried using the generic USB serial driver as per instruction on
     the RepRap forum. (http://forums.reprap.org/read.php?12,4546) 
     The Arduino does bind to a port but generates a constant stream of
     garbage input in GtkTerm and Python.

3. I conclude I need the ftdi_sio driver for the 8.04 rtai kernel.
   (I suspect anyone else trying to use the Arduino Diecimila will
   also).

3.1  I tried to follow Jeff's instructions to build the kernel with
     the driver included, but came off the rails at step 3 with:
     dpkg-src: command not found

3.2  I tried unpacking the source manually and building from it but 
     hit many errors so I was evidently missing some magic!

So please can someone advise how to complete the build process. I'd like
to know how to build this driver module myself, but if someone has it
built already I'd be glad to give it a try.

And a final dumb question so you can be sure how little I know: I can't
simply use the ftdi_sio.ko from the generic kernel with the rtai kernel,
can I?

Steve

On Sat, 2008-09-20 at 15:37 -0500, Jeff Epler wrote:
> I haven't tested this myself, and it will be a time-consuming process,
> but you can rebuild the realtime kernel with this driver included.
> 
> 0. Because you're going to overwrite the installed kernel, install a
> generic kernel so you can still boot even if something goes wrong
> with the new kernel you're installing
>     sudo apt-get install linux-image-2.6.24-16-generic
> (if you can live with rebooting between work on arduino and work on emc,
> maybe it's sufficient to stop here -- the -generic kernel should have
> the ftdi_sio driver available)
> 
> 1. Prepare your system with packages needed to rebuild the kernel
>     sudo apt-get install build-essential fakeroot
>     sudo apt-get build-dep linux-image-2.6.24-16-rtai
> 
> 2. Get the kernel source in a subdirectory of the current directory
>     wget 
> http://linuxcnc.org/hardy/dists/hardy/base/source/linux_2.6.24-16.30.linuxcnc.1.tar.gz
>     wget 
> http://linuxcnc.org/hardy/dists/hardy/base/source/linux_2.6.24-16.30.linuxcnc.1.dsc
> 
> 3. Extract the kernel source
>         dpkg-src -x linux_2.6.24-16.30.linuxcnc.1.dsc
> 
> 4. Change to the linux-2.6.24 directory and apply this patch with 'patch -p0':
> 
> --- debian/binary-custom.d/rtai/config.i386.1 2008-09-20 15:24:36.000000000 
> -0500
> +++ debian/binary-custom.d/rtai/config.i386   2008-09-20 15:24:45.000000000 
> -0500
> @@ -2905,7 +2905,7 @@
>  # CONFIG_USB_SERIAL_CP2101 is not set
>  # CONFIG_USB_SERIAL_CYPRESS_M8 is not set
>  CONFIG_USB_SERIAL_EMPEG=m
> -# CONFIG_USB_SERIAL_FTDI_SIO is not set
> +CONFIG_USB_SERIAL_FTDI_SIO=m
>  CONFIG_USB_SERIAL_FUNSOFT=m
>  CONFIG_USB_SERIAL_VISOR=m
>  CONFIG_USB_SERIAL_IPAQ=m
> 
> 5. Build the binary package
>     NOEXTRAS=1 fakeroot debian/rules custom-binary-rtai
> 
> 6. Install the package
>     sudo dpkg -i ../linux-image*.deb
> 
> 7. Reboot and test the new kernel (with two kernels you may need to
> choose the rtai kernel at the boot menu)
> 
> 8. If you're satisfied with the new kernel, you can remove the
> linux-2.6.24 directory and the linux-image-2.6.24-16-generic package you
> installed.
> 
> Jeff



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to