One USB device, Two tasks

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!

Reply to
Johnson
Loading thread data ...

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.

Reply to
larwe

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.

Reply to
Johnson

Oh, I see - yes. I thought your project contained USB host side.

Reply to
larwe

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!

Reply to
Johnson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.