Bridging Ethernet and Wifi from BalenaCloud

Hello forum,

I’ve successfully deployed my first BalenaCloud project, taking RFID chips numbers from a RFID reader, and sending it on to an API on my server.

Unfortunately the RFID reader I use does not have wifi, only ethernet. And initially I was going to let the reader send its data to my server directly, but I decided to use a Pi instead to first de-duplicate the data and then send it on. With the initial setup (pre-Pi) I added a small TPlink wifi-etheret bridge to allow the reader to connect to my wifi network. Now that I use a Pi however, I’d like to plug the reader directly into the Pi.

Now since the config file for the Pi gets overwritten when using BalenaCloud, are there settings I can set in the device configuration setup or elsewhere, that would bridge my Pi’s ethernet and wifi adapters? From what I’ve read I could probably do this with a multicontainer setup, but for the moment this is a bit above my experience level.

Hey there, balenaOS uses NetworkManager to handle all networking, so it should be possible using nmcli from within your container. You can read about NetworkManager bridges here: https://www.cyberciti.biz/faq/how-to-add-network-bridge-with-nmcli-networkmanager-on-linux/

You will need to change the dbus env var as documented here: https://www.balena.io/docs/reference/OS/network/2.x/#changing-the-network-at-runtime