Beware the dodgy webcams
Okay, so before I start, I kind of already knew that these were dodgy - I can't claim that I was expecting anything different, after all, that is the reason why I don't have a RING doorbell, or anything Amazon / Google voice / Alexa / Home orientated in the house. Not that I have anything to hide, I just don't like the idea of providing these corporations with vast quantities of "free" data that they then make Trillions of $$$'s with and then charge us more money for goods / products - it's a baffling system this capitalist society concept, the sooner it implodes the better. However, this is more about "dodgy webcams".
My problem statement is explained in the image below:
basically, I need to fit 2 webcams to the rear of my motorhome so that I can reverse out of my driveway and not smash into oncoming traffic / pedestrians or cyclists!
I purchased a couple of cheap webcams that appeared to be capable for the task in hand - they were USB powered, they connected to a WiFi router or direct to my Android phone. I was thinking that if they can connect to the WiFi router that I could then connect two of them and then show the two cameras side-by-side left-and-right on one screen and that would help me with the reversing.
I confess these cameras were about £13 each, so I was not expecting much. They arrived and I was pleasantly surprised, they were well packaged / boxed and they seemed quite sturdy - I could even attach magnets to the back of them so I can put them on/off the motorhome - as I only need the cameras really for reversing and not for full time usage.
The cameras initially allow you to connect to their local Access Point (AP) - but you have to download the specific app from the Play Store (this is when I started to get a little suspicious), all seemed okay, I ran the app, I connected to the AP WiFi, I picked up the camera, all was good - I started to get a stream of the camera feed. Brilliant.
(As you read on, you'll find out that this diagram is not technically correct! however, it is what I and probably most other people "ass-u-me" is what is going on)I then set about changing the config of the app, so that it connected to my home WiFi router, that way I can connect both cameras up at the same time.
(Again, this diagram is how I "ass-u-me'd" the connectivity was working)I then connected up the second camera, exactly the same and was pretty chuffed with myself that I might be onto a cheap winner here. And, that is where I got the smack in the face with a wet-fish.
I thought I could somehow get the app to show both cameras at once on the same screen - I could not. The best I could do is get a list of the cameras and then click on one to then get a "live" stream of that camera - this will be a right royal pain in the backside if I wanted to use this in the motorhome.
Hmmmm..... this then got me to thinking. I wonder if I could code this myself, make my own screen that shows me the two camera streams side by side.Never one to lose my skills, I dug out my old hacking tools... cough cough cough.... a short while later, I remembered that lot was on a different laptop that was long dead. However, the concepts were still the same. Get the app.apk file. Use the apktool app to decompile it to a first stage extraction - ah, I wasn't going to bother with that, there must be someplace online that does this now (and takes a nice copy of your app source-code for their own needs, no doubt) and looksie-here, there is one:
After digging around the source-code, looking at what libraries were being used and having a few head-scratching moments I started to ponder something.... this code doesn't access the camera to get the video stream. How the hell is it working then?So just like Alice I went off down the rabbit hole..... and my, what a hole it was:
I thought I would double-check myself and perform a network scan to pick up the network IPs of the cameras, yep, there they were 192.168.0.80 / 81. All I need to do now is to figure out what port they are using and the connection credentials and I'd be sorted.
I then decided to install a Network Connections app onto my Android phone. Wonderful little app. it basically shows you what apps are connecting out onto the network, what IP addresses they are using and what ports:
This will get me the data I need - I'm now looking for when the app accesses the 192.168.0.80 IP address and then what port it is using... Well, bugger me, that was not what I was expecting!
CONCLUSION:
It looks like I'll have to look at drilling holes into my motorhome and fit this "proper" kit that I purchased a few months ago, but was cautious about fitting due to having to drill holes and wire it up to the 12v system of the motorhome. I reckon that I'm ready to do this now and will post an update showing it all working over the weekend!
And yes, I've tested this setup locally and the cameras only transmit to the head unit that shows the cameras (can show up to 4!), doesn't go anywhere near the internet. :-D
Yes, this kit was around the £200 region, so a far stretch from the 2x£13 (£26) I paid for the cheap cameras. Will I "bin" the cheapo ones? maybe, maybe not. I might just rig them up in the garden to view the solar panel batteries and/or the sky so I can cross reference the logged solar / battery data with visual imagery. For instance, it has been raining / overcast all day today, but I've still been getting 14.4v and 1amp from the solar panels and my batteries are at 13.1volts - but the weather is crappy. Who would have guessed?
Comments
Post a Comment