Hardware Developers Community - NI sbRIO & SOM

cancel
Showing results for 
Search instead for 
Did you mean: 

SOM9561 communication to PC via USB0

Hello community,

maybe you can help me, is there any example how to communicate to a PC via USB0 (device port).

the Problem starts, when I connect it to the PC that no drivers are found and installed...

please give me a hind.

best regards,

Nico

0 Kudos
Message 1 of 6
(7,685 Views)

Hello,

thisis what i see in MAX the SOM installed drivers on a different port, so this seems to work, but how to let the som work as a USD device (exchange data)?

The goal is thatthe somm sends sensor data to a PC via USB (as any other "normal" USB device, e.g. usb camera or usb scanner)

I dont want to use the TCPIP, because we already do this and we would like to use the USB, because the customes does not accept any network technology.

please help!

max.png

0 Kudos
Message 2 of 6
(6,736 Views)

Hi Nico,

To restate your question, you are wanting to use an sbRIO's USB Device port which currently acts as a network adapter to actually send raw USB data to the PC so that in your end application it acts or shows up as a true USB Device rather than a network device

The short answer is that we do not have a way to support MAX or a PC end application to see the sbRIO as a native USB Device. We have a USB network gadget driver built into our kernel. What you are asking for would require building a different USB Device gadget driver in our NI Linux Real-Time kernel and may also require writing/using a driver of some sorts on the PC-side to communicate with the sbRIO.

So, even though underneath 'My System' in MAX, there is a USB icon where the sbRIO shows up, that is just stating that NI recognizes the sbRIO. The real place to interact with the device when USB Device is being used is still through the 'Remote Systems' section of MAX.

Our software implementation chose to have the USB Device act like a network adapter as our cRIO/sbRIO software infrastructure communication to a PC is built on Ethernet. The USB Device is meant as a way to easilly target your device without having to worry about configuring all of the network settings the first time you attempt to communicate with the device.

-Tanner

Tannerite
National Instruments
0 Kudos
Message 3 of 6
(6,736 Views)

Hello Tanner,

ok, i understand what you say... but isnt that a really bad feature then? the som could act in millions of measurement/control systems where µCs are just too slow, have to less RT capabilities or too less IOs,etc... even my slow blackfin 527 has a USB 2.0 480MBIT connection and can run as a stand alone device connected via usb to a PC (data acquisition for example)...

A high speed (USB2.0 should be enough for most applications) connection to a PCs is really neccesary and TCPIP is not acceptable everywhere... Is there any other solution?

I checked out the USB to LAN connection to our PC, means: usb cable, Software on the Som communicates with the PC via TCP on the usb to lan adapter... I could get 98Mbit (i would understand 100Mbit).

My question now is, why is it limited to 98Mbit? is it a real hardware network adapter, or emulated by software and then i could have something close to 480Mbit maybe?

Best regards,

Nico

0 Kudos
Message 4 of 6
(6,736 Views)

Hi Nico,

If you have to have USB, another option would to use an UART/SPI/I2C to USB bridge chip. You could use digital I/O to interact with one of these chips, which handle converting the data from the SOM to the USB protocol. A good example are the FTDI chips that can convert a UART, SPI or I2C to USB. FTDI is also nice because they provide a free Virtual Com Port driver, which allows the USB connection to present itself as a COM port.

http://www.ftdichip.com/FTProducts.htm

This may complicate your design somewhat but it could be an option if standard TCP is not.

Thanks,

Frank

0 Kudos
Message 5 of 6
(6,736 Views)

Hi Nico,

Can you explain why a virtual network connection over USB is inferior to any other logical connection over USB for this application?  The benefit of the virtual Ethernet port is it enables common host/device SW to communicate between sbRIO and a PC/host using the same familiar network commands, rather than requiring a new/incompatible application layer implementation.

How much bandwidth do you need?  I'm not exactly sure if/why the USB->Ethernet connection appears to be limited to 98Mb/s.  I've never seen a USB2.0 device that actually performed anywhere near 480Mbit/s.  The encoding scheme alone (8b/10b) for USB dictates that the maximum throughput before protocol overhead is reduced by ~25% off of the 480Mbit theoretical max.

Would you prefer to implement a lower level USB raw driver on your own?  What stream mechanisms would you prefer (Bulk, Interrupt, Isochronous)?  Do you expect a Windows class driver for the USB device connection?

For higher end microprocessors running Linux, it appears that USB->Ethernet gadget driver device connections are a common abstraction, including Android devices.  The most common alternative USB implementation I have seen is the USB->UART implementation, which fblerg mentioned.  Another user on this forum was able to stream data continuously from the SOM to a host PC at >35MB/s via a USB->UART chip from FTDI.  https://decibel.ni.com/content/message/96084#96084

Regards,

spex

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 6 of 6
(6,736 Views)