Go to Post Robots can be fixed, glory is forever - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
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 03-02-2013, 11:01
merscwog merscwog is offline
Registered User
FRC #0116
 
Join Date: Feb 2013
Location: Herndon, VA
Posts: 11
merscwog is an unknown quantity at this point
Unhappy Labview FRC Dashboard Camera code not HTTP 1.1 compliant

In attempts to discover why the default FRC Dashboard doesn't successfully connect to an embedded web server on a Raspberry Pi (when it works just fine from IE on the classmate PC itself), I discovered that it's because the Dashboard is sending out invalid HTTP requests, which the Axis camera's embedded server seems to accept.

Here is a raw data capture of what the current default Dashboard sends out to receive video from the axis camera.

GET /axis-cgi/mjpg/video.cgi?fps=30&compression=30&resolution=320x240 HTTP/1.1
User-Agent: HTTPStreamClient
Connection: Keep-Alive
Cache-Control: no-cache
Authorization: Basic RlJDOkZSQw==

This is not compliant, as the 1.1 spec requires the Host: field which is clearly missing, even though it is stating it is an HTTP/1.1 request.

This probably is a very simple fix to the Labview code, as it just needs to provide the IP address it is trying to send to:

Host: 10.xx.yy.11:80

where xx.yy is the normal team designation when running camera on the 10 network.

Still trying to work around this bug, as even the proxy servers I'm attempting to pass it through are kicking back a 400 Bad Request response before attempting anything adjustments to the headers. Even an incorrect Host entry would be easy to work around.

-Spencer
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2013, 12:58
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Labview FRC Dashboard Camera code not HTTP 1.1 compliant

Quote:
Originally Posted by merscwog View Post
This probably is a very simple fix to the Labview code, as it just needs to provide the IP address it is trying to send to:

Host: 10.xx.yy.11:80

where xx.yy is the normal team designation when running camera on the 10 network.
It is indeed a very simple fix. The http header is a string constant in WPI_CameraIssue HTTP Request with Authentication.vi. It's trivial to put a specific team number's address into the string. The code would take a little modification in order to use the cRIO's address automatically, but not much.
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 19:02.

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