[beagleboard] USB device + tcp/ip server over ethernet

I am looking for a board that I can run as a USB device while also
running a tcp/ip client over ethernet. Does anyone know if this has
been done with the BeagleBoard, or if there is a better option
available? I am also considering the CY3662 by Cypress. Any help is
appreciated.

Patrick,

could you provide some more details? your description is somewhat ambiguous as to what you want to accomplish.

Dave

Dave,

Well, I'd like to plug one PC into the BeagleBoard through the USB-B
port and send data between them. Then, at the same time, I'd also
like to be able to plug another PC into the BeagleBoard through the
Ethernet port.

I was hoping I could do this by running one of the available Linux
distros on the BeagleBoard and just using available drivers for the
USB port and the Ethernet to communicate between the PCs. However, I
am worried that the USB-B port on the BeagleBoard is restricted to
only certain functions (such as uploading code to the board from the
PC).

thanks,
Patrick

Yes, the BeagleBoard can run multiple networks over the various USB ports. You can (obviously) connect a USB-Ethernet dongle to the USB EHCI port and connect it to a regular ethernet network. You can simultaneously connect the USB OTG port directly to a PC and have it appear to be a network and connect to/from both ports simultaneously. To do the USB OTG in linux you need to enable USB Gadget support and load the USB ethernet or USB ACM driver. The Angstrom distro is a good place to start as it does this by default.

The only consideration (as with all TCP/IP) is to make sure the two networks don’t overlap and you have any relevant routing configured properly.

Thank you for the information. So, to be specific, what I'd like to do
is connect this USB-hub/ethernet (http://www.amazon.com/USB-2-0-3-port-
Hub-Ethernet/dp/B0030DO7OY) to the USB-host port, and then connect to
a PC through the ethernet. Then, use this USB mini-b cable (http://
www.amazon.com/Cables-Go-27005-Mini-B-Cable/dp/B000067RVL) to connect
from the USB OTG port to another PC.

I am just mainly worried that the board might only be able to be used
as either a USB host OR USB device at any given time. That is, that
the USB-OTG and USB host port come in through the same chip which can
only be in host OR device mode, but not both. But, if I understand
correctly, this isn't the case. Is it correc that the board can be
used as the USB host and device at the same time?

Thanks.

What you are suggesting will work fine. The BeagleBoard has two independant USB controllers (MUSB and EHCI). The MUSB port is OTG capable which means it can do host/device. The EHCI is host only.

I've got my board, and I'm able to speak with a PC on the ethernet
side. We're having problems talking to the PC through the OTG. We're
trying to use libusb but we're having problems compiling. Does anyone
know a good library/toolchain to use for programming USB on the board?

thanks,
Patrick

If you build Angstrom with Narcissus it will also package the SDK (not
sure about compiler).

If you build Angstrom with openembedded it will also create compiler,
headers and libraries as part of the build process.

Libusb is usually used as a way to talk to usb devices. If you are trying to use it to
connect to a PC this would imply you have software on the PC making it appear as
a device. If you are expecting to use the Beagle as a device then you need to look
into USB gadget support instead of libusb.
~GeoD

Thanks. Does anyone know of an API for the OTG port when using the
board as a device?

Patrick