Replace firmware of random devices with nerves

I’m completely new to nerves, so I’m not sure what is/isn’t possible.

I have a couple IP cameras from different brands and I’m wondering if it’s possible to flash these with nerves so I could have a consistent interface to all of them. I also have a smart doorbell I’d like to eventually replace with a custom firmware. An initial goal would be to run Membrane to stream (RTSP?) these devices to a central hub and go from there. What would it take to get that to work?

Any resources you can point me to so I can read up on the matter would be helpful!

This potentially takes quite a lot. Nerves is a glue between the hardware layer and the BEAM, but requires very specific configuration for the processor+circuit board combo you’re using (ie the Nerves systems).

All of the official Nerves systems are based on development boards that are either nicely documented or had enough information across the Internet from others using a mostly open board that a system could be derived for Nerves use.

In your case, these are proprietary devices which most likely have an undocumented design. You could take it apart to see what processor is used, but you would also need to know other crucial things like the pinout for connections to the processor, device trees, basic board schematic, how it currently boots to see how to flash over current firmware, etc etc. Unless you find other alternative firmwares for these devices online or documentation about the circuit design, it is going to be very in depth to attempt reverse engineering for getting Nerves in it

7 Likes

Thank you. Great explanation.

See this thread for one of those journeys (running nerves on a fairphone 2): Running Nerves on Android e-waste

One of the key takeaways: getting buildroot to run on the device is a first step.

2 Likes

Yeah, people certainly get it done with random devices but it is a lot of effort per device typically, as Jon said.

Eric Rauer got Nerves onto the Spotify Car Thing:

2 Likes

For IP cameras you can check out https://openipc.org/ and see if your cameras are compatible with it.

They use buildroot to build OpenIPC firmware for them GitHub - OpenIPC/firmware: Alternative IP Camera firmware from an open community .It should be relatively straightforward to create nerves system out of that.

One thing to note about those IP cameras is that multimedia pipeline is proprietary. You load a bunch of blobs (you can find them in the firmware repo linked above) that give you C API to control video frontend and encoder and it spits out video/audio in requested format. In order to use it with membrane you would have to make a new membrane source that deals with that. Best resource I could find on how to use C API is GitHub - OpenIPC/divinus: Multi-platform open source streamer.

OpenIPC firmware usually uses different streamer called majestic which has a lot more feature but it is closed source. Shame for project starting with open in the name.

5 Likes

See this thread for one of those journeys (running nerves on a fairphone 2): Running Nerves on Android e-waste

Nice, detailed write up. Was a good read and now making me wonder what I can do with an old Pixel 3 I have. haha

Yeah, people certainly get it done with random devices but it is a lot of effort per device typically, as Jon said.

One of the reasons I started this post was because I saw Jason’s talk on use cases for Nerves and that got my noggin joggin:

For IP cameras you can check out https://openipc.org/ and see if your cameras are compatible with it.

Gonna check all these links out!

Thank you all, really informative info everyone provided :heart:

2 Likes