How do I send text to a USB device?

10,360

Solution 1

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"

Solution 2

Yes, this should be doable given the information provided. Stack exchange has a site specifically for robot builders which may be a more appropriate location for this question.

EDIT: You may not have a FTDI to USB driver installed but you will need it. This will provide you with the tty interface which handles this.

I think that you'll find that this link has all of the information you need to get this going: https://pixhawk.ethz.ch/tutorials/serial_terminal . Replace any hardware references with your board.

Share:
10,360

Related videos on Youtube

ChronoFish
Author by

ChronoFish

Updated on September 18, 2022

Comments

  • ChronoFish
    ChronoFish almost 2 years

    I'm trying to get the "Torobot" USB servo controller to work with Angstrom on a Beagle Board XM.

    The servo controller registers as a USB device. The device just takes simple text commands, but there is no TTY associated with it. So I'm not sure how to send commands to it.

    Can I just send data like this (assuming that 002/005 is the device):

    $ cat file.txt >> /dev/bus/usb/002/005
    

    Or do I need to associate it with the generic USB device? If so, how do I do that?

    • sparrowceg
      sparrowceg over 10 years
      Can you post the output of the command "lsusb" when the device is connected.
    • ChronoFish
      ChronoFish over 10 years
      @Ufoguy Please see my answer below.
    • SF.
      SF. over 10 years
      By the way, the proposal angled towards this kind of questions is Embedded Programming and Design although still only in commitment phase.
  • ChronoFish
    ChronoFish almost 11 years
    I understand why you are suggesting the robot site, but this really has less to do with the specific device (a servo controller) and more to do with serial-usb devices in general. For instance if I wanted to send text data to a PIC64F for adjusting a temperature control - the "robot" angle is totally removed yet the underlying problem is identical.
  • krowe
    krowe almost 11 years
    See my edit for more information.