From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA USB-RAW on cRIO-9030

Why don't you just use the standard HID stack (as the device seems to be speak the standard USB HID protocol) ?

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 11 of 16
(964 Views)

Hi Metrux, 

 

Can you explain your suggestion further? While I have my device and application working as described in this thread I'm always happy to gain more understanding or find a better way.

0 Kudos
Message 12 of 16
(955 Views)

@Jolt wrote:

Hi Metrux, 

 

Can you explain your suggestion further? While I have my device and application working as described in this thread I'm always happy to gain more understanding or find a better way.


If the device is really an USB HID device (as it seems - dont have one here to confirm that), it should be automatically detected by the linux input subsystem and appear under /dev/input/ (assuming they didn't forget to compile in the generic usb hid driver).

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 13 of 16
(944 Views)

Maybe, and this is admittedly a bit out of my depth, but the only way I could get the device to be available through my LV code was as described above. The OS does recognize it natively as an HID device but without an address in MAX/LV I couldn't figure out how to target it with the USB Raw functions in LV. 

0 Kudos
Message 14 of 16
(930 Views)

Maybe, and this is admittedly a bit out of my depth, but the only way I could get the device to be available through my LV code was as described above. 

I guess, LV doesn't have an binding for the standard input/event device API, you could just write one.

 

IIRC you can call C code from a VI, correct ? Well, then just call libevdev:

https://www.freedesktop.org/wiki/Software/libevdev/

(this library supports Linux as well as BSD).

 

The OS does recognize it natively as an HID device but without an address in MAX/LV I couldn't figure out how to target it with the USB Raw functions in LV. 


If the driver is already bound to the device, you won't get direct access via USB subsystem.

You'd have to unbind the driver (or reconfigure udev to completely ignore that device).

 

OTOH, reimplementing the whole HID stack in userland isn't an entirely trivial job. I don't see much value in going through all of that, doing an completely own implementation, just for one project.

Instead I'd advice just to use the standard API.

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 15 of 16
(923 Views)

I just posted a new proposal @ idea exchange:

 

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/LV-binding-for-Linux-Unix-evdev-API-eg-USB-touch-pane...

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 16 of 16
(920 Views)