Home        Store        Learn        Blog

Raspberry Pi bridge for second camera

Greetings Bluerobotics community!
I have topside router connected to my ROV, and I would like to connect second camera for another video stream. My idea is to use sportcam (EKEN h9R) mounted to ROV frame and connect to PI’s wireless network. Since Pi is connected to topside router via ethernet teether I should configure Pi to work as a bridge between ethernet and wifi and connect EKEN to wifi. Will my idea work? Anyone tried to configure Pi as network bridge or knows how to do it? Thank you!

Really interesting idea. Wifi waves are attenuated really quickly under water, so it’s not a viable communication method to the top-side, but to the RPi very close to it it just might work.

I’d expect it’s less likely to work with a metal enclosure for the electronics because it can act like a faraday cage and block any incoming wireless signal, so I’d suggest trying the acrylic option first. Definitely worth a shot though, I’d be really interested in how it goes!

My enclosure is acrylic so it might work. Wifi signal penetrates around 15 cm trough salt water so camera mount should be placed close to Pi. I found a tutorial how to bridge wifi and ethernet but I didn’t have time to mess up my PI. Second camera would be a good option for rear view to track the teether. I just wanted to check if someone else had some experience with my idea before i dig into problem. If I succeed I will keep you posted with my results.

I’ve used a second camera before, but it was a bluerobotics camera that I enclosed and wired up through a penetrator and some spare tether, as opposed to using a wireless option. If you’ve got a penetrator spot available then that might be easier to set up, but the wireless option is (at minimum as a point of technical interest) still worth exploring.

My major concerns (outside of signal degradation) would be potential latency issues (especially if you’re trying to use full definition video).

From the connection/streaming side of things, it seems like the EKEN H9R creates its own wifi network you need to connect to. From there you’ll need determine how to access the specific stream you want. The documentation is really poor on this, but a quick search online got me to here and a few other similar sources, which seem to imply that you can connect to it over rtsp using the port 192.168.1.1. That should enable you to set up a gstreamer stream on the companion computer that can connect to the camera and then stream the result up to your top computer as a UDP stream.

It might be worth trying that on your computer first to get it working, and then using the working code on the raspberry pi. Note that the camera specifies it can record h264 videos, so I’d suggest trying to stream with h264 first before mjpg (which the other sources use) as h264 is generally a better format for streaming.

I appreciate your effort. I already streamed video from eken few years ago when i was coding GUI in Processing language, so I’m familiar with setting up the stream to pc. I would like to avoid opening the housing to power up the EKEN or set it up to car mode (works like USB camera), that’s the main reason why I want to mount it outside. I think I will use extra 2 pairs of wire from my teether to implement another camera inside the housing. Quick battery drain could also be the problem so I think I will stick with the wired plan. Any good suggestion which ethernet camera to use to connect it to topside router?

I haven’t tried connecting an ethernet camera through the tether before, but there are definitely a few others on the forum who have - you should be able to find some relevant people/posts by searching for “IP camera”.

I have however added an additional bluerobotics camera and plugged it into a spare USB slot in the raspberry pi. If you choose that approach then you basically need to duplicate the camera connection and streaming scripts from the companion computer to detect and set up a gstreamer stream for the second camera. Make sure to set them up on different ports so your cameras don’t fight for the attention of a single receiver on the top side.

Note that QGC currently only has support for a single camera stream, so to display another one you’ll want to use VLC, or OBS with the OBS-gstreamer plugin :slight_smile:

Tnx! I’m planning to purchase USB low light camera for better quality, so I’ll use Raspberry pi camera as a rearview since my back endcap is acrylic.