Go to Post My mom's cousin heard from her friend who heard from her brother who heard from his barber who heard from his son that his teacher told him that his father's brother's sister's former roommate heard from Frank himself. - notmattlythgoe [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 16-04-2009, 11:32
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,082
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
vxWorks networking quirks?

Does anyone have any experience with vxWorks and its networking stack? In particular, I'm wondering if anyone is aware of any quirks of the vxWorks stack that make it different enough from a normal BSD stack that could cause annoying errors if one wasn't aware of it.

I'm trying to use boost::asio to do this, so that I can run the project on my local machine and on vxWorks without too many problems. It took a small bit of effort to port asio to vxWorks, since theres a few type oddities that exist, and the open/ioctl calls vary slightly, but for the most part the patch was pretty trivial.

I'm using a modified version of the asio webserver example, and I have the thing working perfectly on my windows box.

However, on the cRio for whatever reason when serving pages, the buffers keep getting mixed up and it sends invalid data (but only for large files), and additionally it will sometimes *keep* sending data (hundreds of megabytes in fact) until some error occurs. This makes me suspect that one or more of the vxworks network calls are returning something that the asio code isn't expecting, and so it thinks that the data hasn't really been sent. Or something to this effect.

Any thoughts anyone could provide would be great.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #2   Spotlight this post!  
Unread 17-04-2009, 10:34
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,082
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: vxWorks networking quirks?

I found the error, it was a bug in asio. Turns out that vxWorks has a rather small send buffer, or at least small enough where the call ends up blocking while partially transmitting the buffer. Asio didn't adjust for that. Since most modern OS don't have a small buffer like that, apparently nobody has caught that error (and in fact, I wasn't able to duplicate it on a non-cRio platform).

Filed a bug at https://svn.boost.org/trac/boost/ticket/2953

I've now got boost::threads and boost::asio working on vxWorks correctly. Let me know if you're interested, I'll be releasing a patchset soon.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #3   Spotlight this post!  
Unread 18-04-2009, 18:51
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,082
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: vxWorks networking quirks?

I've released the patchset here: http://www.virtualroadside.com/blog/...s-for-vxworks/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
VxWorks Kernel Cadyyan C/C++ 6 04-04-2009 19:37
Disassemble VxWorks (WindRiver) ELF Binaries? GeneralFailure C/C++ 5 20-01-2009 19:41
Networking Problems Mike Chit-Chat 0 26-01-2005 13:57
MPLAB quirks Mercutio Programming 5 10-12-2003 21:08
Networking Dial-up Ashley Weed Math and Science 13 05-09-2003 23:30


All times are GMT -5. The time now is 03:29.

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