Hey @abcd,
So let me try understand what you are looking to setup. You basically want to set up a Beaglebone green to use the fona modem via UART to give you a GSM network connection. You also want this connection to be the primary route to the internet rather than the ethernet port. Will the ethernet port be connected to another network?
ResinOS has a service called ModemManager installed in it and at boot this service will try to discover and configure any modems attached to it, whether they are USB or UART, so the first test would be to connect up the fona modem to your BBG and the boot a dev version resinOS on it. You can then either SSH or use serial console into the device and run the following commands to check if the modem is being discovered correctly:
List all discovered modems:
mmcli -L
Get the logs from ModemManager
journalctl -u ModemManager --no-pager
If the modem is being correctly setup, the first command above will show you which modem number it is and then you can see the modem details using mmcli -m 0
where 0 is the modem number it shows you previously.
if you system is correctly showing a modem, then the next step is to set up a connection file to correctly point it to the APN, etc. For this you need to create a file on the BBGs file system in /mnt/boot/system-connections
the file should look something like the one listed here: https://docs.resin.io/deployment/network/2.x/#cellular-modem-setup , but replacing the APN with your cellular providers APN.
After this you can reboot the BBG and when it comes up, you can check if the new cellular connection is correctly brought up by using the following command: nmcli -c no c
you should see a new connection there with a type of GSM
and connected to a ppp0
interface.
Now to make your cellular interface the primary route to the internet you just need to add the following file to your /mnt/boot/system-connections
folder:
[connection]
id=my-ethernet
type=ethernet
interface-name=eth0
permissions=
secondaries=
[ethernet]
mac-address-blacklist=
[ipv4]
never-default=true
route-metric=2000
dns-search=
ignore-auto-routes=true
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
This connection profile will be assigned to the eth0
interface and will set it to have a lower route-metric than the cellular connection, so all network traffic will automatically be routed through cellular rather than ethernet.
Some notes on the above:
- You should try use as new a version of resinOS as possible as they have latest NetworkManager and ModemManager, for the BBG I suggest using the Beaglebone Black v2.7.8 image (don’t worry, the Beaglebone Black images now work on all Beaglebone device types, green, green wifi and Blue)
- Running and setting up modem connections from within the container is not encouraged or supported by resin, this is because it becomes very easy to remotely brick or mess up the connectivity during container updates and we have seen it happen too often. The recommended approach is to always us NetworkManager and ModemManager.
Let me know if this is what you are looking for or if I have misunderstood anything.