Go to Post They already tried that... But here is the thing: it wasn't a bunch of guys in white coats. It was 3 guys: 1 in denim, 1 with a pony-tail, and 1 with a bright colored shirt.... - FIRSTtm134 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-01-2015, 20:42
backspace119 backspace119 is offline
Registered User
FRC #4576
 
Join Date: Jan 2015
Location: Knoxville Tennessee
Posts: 3
backspace119 is an unknown quantity at this point
Unhappy 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.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-01-2015, 20:49
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-01-2015, 20:51
backspace119 backspace119 is offline
Registered User
FRC #4576
 
Join Date: Jan 2015
Location: Knoxville Tennessee
Posts: 3
backspace119 is an unknown quantity at this point
Re: Explanantion needed on how to get USB data from the roboRIO

Quote:
Originally Posted by Joe Ross View Post
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 05-01-2015, 20:57
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Explanantion needed on how to get USB data from the roboRIO

Quote:
Originally Posted by backspace119 View Post
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 05-01-2015, 20:59
backspace119 backspace119 is offline
Registered User
FRC #4576
 
Join Date: Jan 2015
Location: Knoxville Tennessee
Posts: 3
backspace119 is an unknown quantity at this point
Re: Explanantion needed on how to get USB data from the roboRIO

Quote:
Originally Posted by Joe Ross View Post
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?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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