Log in

View Full Version : Communicating with a laptop


BEEKMAN
03-11-2009, 19:40
Okay, so, now that all of team 1058's competitons are over, we are playing around with some coding. We plan on making our robot driven via a wireless 360 controller. Currently we have it working via a Laptop, passeing data to an arduino, then to the digital/analog IO on teh DS, however, this is inefficient, and slow. Is ther a way i can directly communicate from a laptop to the DS (or maybe even to the robot with wifi???".

I'm not 100% sure, but cant i send an array of bytes through a digital port from a serial port on the laptop (wit the proper hard ware of course)?? How do I do that?

Can i use teh second ethernet port, and send data that way?

RyanCahoon
04-11-2009, 06:46
To have the laptop control the robot directly, take a look at [Dave Flowerday]'s virtual driver station (http://www.chiefdelphi.com/forums/showthread.php?t=75431&highlight=virtual+driver+station) software.

For information on sending serial data through the DS's digital inputs, check out this prior discussion (http://www.chiefdelphi.com/forums/showthread.php?t=77903).

--Ryan

virtuald
30-11-2009, 07:54
Also keep in mind that there is a full network stack in vxWorks, so you can communicate over the network too using traditional socket programming. We put a lightweight webserver on our bot so we can control it by accessing a webpage. :)

slavik262
06-12-2009, 00:27
So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?

What about the user data packet already sent back to the robot from the DS? Is there any way to access that?

virtuald
06-12-2009, 00:33
So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?

Yes. If you've done sockets before, this is probably the most flexible way to go. Probably not legal to use during a competition though.

What about the user data packet already sent back to the robot from the DS? Is there any way to access that?

Yes, look into the dashboard class. The official dashboard stuff is done in labview, but I know I saw some threads about someone who made one in C# or C++ or something...

slavik262
06-12-2009, 00:41
I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?

Alan Anderson
06-12-2009, 09:25
I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?

It was legal last year. That's exactly what the Dashboard packets are for.

slavik262
06-12-2009, 09:29
Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?

Alan Anderson
06-12-2009, 12:55
Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?

I misunderstood the question anyway. Sending arbitrary data to the robot is not supported by the Dashboard protocol; it's one-way UDP from the robot only.

slavik262
06-12-2009, 14:03
Thanks for clearing up the confusion. And using sockets during competition would probably be illegal. That's unfortunate... I was hoping for two-way communication. Oh well... at least we can have it for debugging.

Joe Ross
06-12-2009, 19:36
Last year, I did not find any rule that made it illegal to use your own socket interface to communicate from the dashboard to the robot. It would be very easy for FIRST to firewall off unnecessary ports (I don't know if they did or not). There was a few questions on the Q/A about what ports were open, but there was never an adequate answer.

slavik262
11-12-2009, 10:18
So we shouldn't completely rule it out then, but try to get a better answer to whether FIRST will allow us to use sockets?

Also, if it wouldn't be too inconvenient, would you kindly give me a link to the networking API for VxWorks? I'm browsing around in the library documentation but dont' know where to look.

EDIT: Is this what I'm looking for?

http://www.slac.stanford.edu/exp/glast/flight/sw/vxdocs/vxworks/ref/sockLib.html#top

byteit101
12-12-2009, 08:41
yes, that is the docs.
see http://www.chiefdelphi.com/forums/showthread.php?t=72874 and download the link on the 4th post for a small library using sockLib
the man documentation is also in C:\WindRiver\vxworks-6.3\man\cat1\sockLib.1
and C:\WindRiver\vxworks-6.3\man\cat2\functionname.2

slavik262
05-01-2010, 11:00
Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?

byteit101
05-01-2010, 15:06
Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?

FIRST forums for official answers

slavik262
08-01-2010, 10:50
FIRST forums for official answers

Yes, but is there/will there be a specific thread for Q & A?

slavik262
09-01-2010, 21:08
Scratch that. Got the Q & A system all figured out.