PC104 with QNX in Windows as device

Hi,

I’m developing an embedded system which runs on PC104 platform with QNX as operating system. It is self contained box with no keyboard/mouse input and/or video output. Only available interface is USB port. I would like to know, how to implement next idea:

  • QNX box acts as USB device from Windows point of view (just like any ordinary mass storage or mp3 player device in windows)
  • there is no problem writing special USB driver for Windows machine

I’m curious if anybody have an idea how to implement such system on QNX device?

Best regards,
Greg

Greg,

I know just enough to be dangerous.   USB is asymmetric.  The hardware chips/interface in the host are different from those in peripherals.   So you would have to build a board that would connect to the PC104, either as a PC104 board, or (heavens so complicated) through another USB channel.   If through the USB channel, you are talking about building an embedded peripheral with two USB channels.   What would this look like, I don't know.   I could have an OS running it, even QNX.   The main point is that you would have to write peripheral driver code.   If instead you build a PC104 board, you have one less piece of independent hardware, but you still have to write the peripheral code. 

If you get this far, you have to decide what the properties of the device you implement will be. If you choose a standard USB hardware definition, then you may remove the need to write a Windows USB driver to interact.

I hope this helps to get you started. If I’ve made any errors, I’m sure that more experienced (with USB) members will join in.

Is the USB port on the pc/104 card a client port, host port, or USB OTG port? QNX has a USB TDK (for QNX6 anyway) for implementing host devices, but for client or OTG I think you’re still on your own. USB Clients aren’t so hard to write if you can find an example that supports your chipset but without an example it can be a difficult effort. You also should have a good USB bus analyzer (not just protocol analyzer) to do the work.

Doing the slave side is simple from the USB P.O.V., but you are receiving a bunch of sector read/write requests, and what do you do with them on the QNX side? Unfortunately, I think what you’d need to do is implement something that takes the place of the driver (say devb-eide), and has a “back door” for the USB slave side (somewhere in the cam interface I suspect).

Ugly.

Might be better to appear to be an ethernet adapter, and plug this into io-net as a “ethernet driver”. That way you could run Samba on QNX and mount it as a network drive on windows. This would be much cleaner from your POV, since you only have to write a "slave-side USB ethernet driver for io-net/io-pkt). Writing network drivers is well supported, and you aren’t hacking into a disk driver…