Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Explanantion needed on how to get USB data from the roboRIO (http://www.chiefdelphi.com/forums/showthread.php?t=132189)

backspace119 05-01-2015 20:42

Explanantion needed on how to get USB data from the roboRIO
 
My team has an idea for position tracking which requires the use of a USB port. Last year this obviously wasn't possible (without A LOT of workarounds and ordering parts from overseas). This year we were excited to see the roboRIO sporting 2 host USB ports. I'm the lead programmer and have been tasked with programming this system.

How would I go about getting data off of the USB? I found the kUSB value in the Port class that is used to construct a SerialPort object but I haven't had any luck getting data from the port through this method. (although I haven't really had much time to play with it yet)

Any help would be much appreciated and I thank you for the time you spent reading this.

Joe Ross 05-01-2015 20:49

Re: Explanantion needed on how to get USB data from the roboRIO
 
Does the device show up in the roboRIO webdashboard? If so, what is it's address? It should be INSTR::ASLR3 to work with the kUSB setting.

backspace119 05-01-2015 20:51

Re: Explanantion needed on how to get USB data from the roboRIO
 
Quote:

Originally Posted by Joe Ross (Post 1422315)
Does the device show up in the roboRIO webdashboard? If so, what is it's address? It should be INSTR::ASLR3 to work with the kUSB setting.

To be totally honest I got the device hooked up 30 minutes before I left and only deployed one set of code to it. I failed to check the address of the device as I was hoping the code would be able to access it, instead the code must've crashed on startup as I got "no robot code" and red comms light when I deployed it.

Would it change anything if this device registered as a generic HID device?

Joe Ross 05-01-2015 20:57

Re: Explanantion needed on how to get USB data from the roboRIO
 
Quote:

Originally Posted by backspace119 (Post 1422317)
Would it change anything if this device registered as a generic HID device?

Yes. The serial port class only works if the device is a serial port, ie linux recognizes it as a TTY or ACM device.

While it should be possible to use a generic HID device through linux interfaces, WPILib doesn't provide a library for it.

backspace119 05-01-2015 20:59

Re: Explanantion needed on how to get USB data from the roboRIO
 
Quote:

Originally Posted by Joe Ross (Post 1422324)
Yes. The serial port class only works if the device is a serial port, ie linux recognizes it as a TTY or ACM device.

While it should be possible to use a generic HID device through linux interfaces, WPILib doesn't provide a library for it.

So I'd be writing my own code to handle making use of input then?

Is it worth the trouble to do this? Or should I just try and find another way?


All times are GMT -5. The time now is 22:38.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi