Raspberry Pi MJPG Streamer -port 8080 okay?

Hi all -
We’re using a Raspberry Pi for our vision coprocessor this year. Things are working great. We have a native opencv application that thresholds and processes target info for the roborio (sent via network table), and the RPi has an MJPG streaming server for sending camera images to the drive station (either on smart dashboard or via an MJPG-capable browser).

The instructions for setting up the MJPG server have it streaming to port 8080. I was looking through the game manual and noticed that the following entry is for cameras:

HTTP 80 Camera connected via switch on the ROBOT

Is port 8080 not legal to stream video from the RPi to driver station?
If not, any advice on how to configure mjpgstreamer to use a different port?

Thanks!

I believe you are correct. Cording to R65, that pork is not allowed.

R65. Communication between the ROBOT and the OPERATOR CONSOLE is restricted as follows:
A. Network Ports:
UDP/TCP 1180-1190: Camera data from the roboRIO to the Driver Station
(DS) when the camera is connected the roboRIO via USB, bi-directional.
TCP 1735: SmartDashboard, bi-directional
UDP 1130: Dashboard-to-ROBOT control data, uni-directional
UDP 1140: ROBOT-to-Dashboard status data, uni-directional
HTTP 80: Camera connected via switch on the ROBOT, bi-directional
HTTP 443: Camera connected via switch on the ROBOT, bi-directional
UDP/TCP 554: Real-Time Streaming Protocol for h.264 camera streaming,
bi-directional
UDP/TCP 5800-5810: Team Use, bi-directional
Teams may use these ports as they wish if they do not employ them as outlined
above (i.e. TCP 1180 can be used to pass data back and forth between the ROBOT
and the DS if the Team chooses not to use the camera on USB).

My team used this setup last year to stream vision data to the driver station, and our solution was to just run mjpg-streamer on port 80. You can change the port by running the command like this:

./mjpg_streamer -o "output_http.so -w ./www -p 80"

Note that you will now have to run mjpg_streamer with sudo or root.

Those restrictions are for ports on the rio, because the field uses certain ports to communicate with the robot. What port you use to stream off of the raspberry pi doesn’t matter.

Hang on, this is incorrect.

Data between an on board RPi and the RoboRio will not cross the WiFi, that is corrrect. It still should NOT use a port that conflicts with control packets. Data between the RPi and the DS is carried over the WiFi and is thus subject to the port restrictions.
mjpg_streamer does just that and therefore is subject to the restrictions.

If the traffic is going between the radio on the robot and the driver station ethernet port, it is subject to those restrictions via R65, policed by the FMS.

Anything completely internal to the robot (even through the radio’s switch) or completely internal to the DS (Operator Console and attached devices) is unaffected by those restrictions.

Nate,
You are 100% correct.

My comment above was aimed at making certain that there is no interference with command packets. If you follow the port restrictions, there is no chance of doing that. Now, flooding your network on the robot with TCP packets is another issue altogether! Trust me on that, we found out the hard way.

Thanks all for the quick replies!

We were able to add the -p 80 option to our mjpg_streamer call, but are now encountering a different problem: bind(80) failed on the Raspberry Pi.

I think the HTTP server is used to port 8080 by default, and I need to figure out how to open/enable port 80 on the RPi instead.

Suggestions?

Found the issue - it was a permission denied problem.
Executing same call with ‘sudo mjpg_streamer…’ worked.
We’re up and running now, streaming video from the Raspberry Pi port 80!

Thanks for the help.