Trying to get Torobot USB servo controller to work with BeagleBoard

Hello,

I have a Torobot (24 I think) USB servo controller which takes text commands and converts them to servo controlls.

I am using a Beagleboard XM (not the Bone) with an Angstrom distribution on it.  I am having a hard time accessing the board programmatically and have tried several approaches.  The board itself is fine, I'm just trying to send it commands.  The Python API seemed to be the most straight forward, but, of course, there are a lot of depencies I'm fighting with.

I am trying to get the usb.find command to work properly in a python script I'm writing on Angstrom for the Beagleboard.



Here is my code:

    #!/usr/bin/env python
   
    import usb.core
    import usb.util
    import usb.backend.libusb01 as libusb

    
    PYUSB_DEBUG_LEVEL = 'debug'
    # find our device
    # Bus 002 Device 006: ID 1208:0815
    #  idVendor           0x1208
    #  idProduct          0x0815
    # dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
    # iManufacturer           1 TOROBOT.com
   
    dev = usb.core.find(idVendor=0x1208, idProduct=0x0815,
    backend=libusb.get_backend() )

I don't know what's missing, but here is what I do know.
When I don't specify the backend, no backend is found.  When I do specify the backend "usb.backend.libusb01" I get the following error:

    root@beagleboard:~/servo# ./pyServo.py
    Traceback (most recent call last):
      File "./pyServo.py", line 17, in <module>
        dev = usb.core.find(idVendor=0x1208, idProduct=0x0815, backend=libusb.get_backend() )
      File "/usr/lib/python2.6/site-packages/usb/core.py", line 854, in find
        return _interop._next(device_iter(k, v))
      File "/usr/lib/python2.6/site-packages/usb/_interop.py", line 60, in _next
        return next(iter)
      File "/usr/lib/python2.6/site-packages/usb/core.py", line 821, in device_iter
        for dev in backend.enumerate_devices():
      File "/usr/lib/python2.6/site-packages/usb/backend/libusb01.py", line 390, in enumerate_devices
        _check(_lib.usb_find_busses())
      File "/usr/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__
        func = self.__getitem__(name)
      File "/usr/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__
        func = self._FuncPtr((name_or_ordinal, self))
    AttributeError: python: undefined symbol: usb_find_busses

What am I missing so that this will work properly?

Thank you.

RE:Better questions give better answers

The actual device is immaterial.  It’s the Angstrom/Python/USB setup that is in question.  But to satisify the curious, here is the PDF for the board.

 

http://www.torobot.com/down/usc_en.pdf

 

Thanks for your help.

-CF

Have you seen

http://learn.adafruit.com/hacking-the-kinect/installing-python-and-pyusb ?

It might help you out.

Finally Success:

I found that the Torobot USB board could be communicated with an Arduino serial driver. Conveniently this is available through opkg:

opkg install kernel-module-cdc-acm

When the board is plugged in, it comes up as

/dev/ttyACM0

From here you can simply echo commands to the device.

echo “#8P1500T100” > /dev/ttyACM0

This basically says “set servo 8 to position 1500 with speed 100”