EmbeddedRelated.com
Forums

One USB device, Two tasks

Started by Johnson August 26, 2010
I have only one USB device port in my development board (running
Linux), no Ethernet, no UART. I would like to use the USB device port
as an interface by parsing and responding to the commands from the
external users. I also need this USB port to output debuging
information.

Here is my proposed solution:
1. Create virtual ethernet ports via the USB device.
2. Run GDB Server at the board side,  then connect it to the GDB at my
desktop via Port X.
3. Run a socket at the board side, then communicate with the socket at
my desktop vis Port Y, then parse and response to the user commands as
the user interface.

Do you think it is feasible? Are you aware of  any better or simpler
solution?

Thank you very much!
On Aug 26, 1:31=A0am, Johnson <gpsab...@yahoo.com> wrote:

> Here is my proposed solution: > 1. Create virtual ethernet ports via the USB device.
In fact there is no need to create multiple port*S* since a single Ethernet interface will obviously support multiple logical connections. But what you propose will work. You could also simply use an off-the-shelf USB to multiple serial port device (2 and 4-port devices are readily available) and not have to do any work at all.
On Aug 26, 3:37=A0am, larwe <zwsdot...@gmail.com> wrote:
> On Aug 26, 1:31=A0am, Johnson <gpsab...@yahoo.com> wrote: > > > Here is my proposed solution: > > 1. Create virtual ethernet ports via the USB device. > > In fact there is no need to create multiple port*S* since a single > Ethernet interface will obviously support multiple logical > connections. But what you propose will work. You could also simply use > an off-the-shelf USB to multiple serial port device (2 and 4-port > devices are readily available) and not have to do any work at all.
Hi larwe, you are right about the ethernet port. I mean my application will use 2 port address of ethernet, not two ports, it is a typo. As for the off-the-shelf USB to multiple serial port device, my understandig is, since my board supports USB device, not USB host, I will still need to modify the firmware to support USB composite device, right? So there is still work.
On Aug 26, 9:41=A0am, Johnson <gpsab...@yahoo.com> wrote:

> As for the off-the-shelf USB to multiple serial port device, my > understandig is, since my board supports USB device, not USB host, I > will still need to modify the firmware to support USB composite > device, right? So there is still work.
Oh, I see - yes. I thought your project contained USB host side.
On Aug 25, 11:31=A0pm, Johnson <gpsab...@yahoo.com> wrote:
> I have only one USB device port in my development board (running > Linux), no Ethernet, no UART. I would like to use the USB device port > as an interface by parsing and responding to the commands from the > external users. I also need this USB port to output debuging > information. > > Here is my proposed solution: > 1. Create virtual ethernet ports via the USB device. > 2. Run GDB Server at the board side, =A0then connect it to the GDB at my > desktop via Port X. > 3. Run a socket at the board side, then communicate with the socket at > my desktop vis Port Y, then parse and response to the user commands as > the user interface. > > Do you think it is feasible? Are you aware of =A0any better or simpler > solution? > > Thank you very much!
I also heard there is USBNET Driver Framework might do the same job for me. Do you think it will be a better and easier solution by implementinmg the USBNET Driver Framework into the firmware of our device? Thanks!