I have the BalenaFin board v 1.1 with OS balenaOS 2.36.0+rev2 running on it. I’ve installed the EC25 mPCIe on the back of it. However, I’m unsure on how to change the the network to use the EC25 instead of the Wifi. I found a tutorial online about it, and it looks like I need to edit resin-boot/system-connections file. However, I’m unsure how to do that on Web’s terminal. All of the commands I’ve tried to get into anything, returns a command not valid. Can someone help with this?
My other question, is once I add this cellular file to the .img, what file extension should I have and is there any other changes I need to make to have it default to cellular?
Hi,
you can edit or add network manager files in /mnt/boot/system-connections while the device is running but you will need to reboot for the changes to take effect.
Changes can be made to the running configuration using nmcli but they will not persist and be lost after the next boot.
The only editor I am aware of that you can use to create files on the device is vi which unfortunately has a bit of a learning curve. You will find plenty of info about vi on the web.
As a tip: Open the file you want to write with vi , type i to get to insert mode. Paste your otherwise prepared content into the terminal (don’t bother trying to edit if you are not familiar with vi). Type [ESC] : wq to save it.
Regards
Thomas
Excellent, thanks for the tip. I was able to add the cellular file by connecting the device to my PC. It will work for what I’m trying to do for right now. I’ve followed the tutorial for setting up the tutorial here https://www.balena.io/docs/reference/OS/network/2.x/#cellular-modem-setup and I’m still unable to connect. My ACT light blinks 4 times, and according to the documentation I’ve found online means it can’t connect to a network. I’m assuming it can’t connect to the cellular network, as I’ve set the other files in the systems-connection folder to ignore. This isn’t able to connect to the cloud, due to the network error, so there are no logs to report on. Do you have any information or documentation that can be shared on this?
Hi @jmeyers2 are you running development build of balenaOS and have a serial cable, then you can easily hook up a serial cable and checkout the logs of both networkManager and modemManager. However if you are running a production build I would recommend hooking up the device to ethernet while debugging and then from the balena dashboard open a webterminal into the hostOS and pull out the NM and MM logs and past them here, the logs can be fetched by:
I hooked it up via ethernet to check the logs. After looking through all the logs, it appears the one is probably causing the issue.
May 27 13:08:23 dc1373c NetworkManager[747]: [1558962503.9626] keyfile: error loading connection from file /etc/NetworkManager/system-connections/CELLULAR: invalid connection: connection.type: connection type 'gsm ’ is not valid
I don’t understand why this isn’t working. The tutorial I found online had GSMin the connection type. I know I’m using Twilio instead of Hologram but I’ve updated the APN and Number fields. Is the container suppose to have the drivers for the EC25 installed in them or is that supported out of the box? My connection cellular file is below, I’ve removed the phone number for privacy purposes.
Yeah, our GSM examples look very similar to this. The log that you pasted is very little, I’m guessing it can also be that you see the connection file being applied to the available interfaces, and one that is not a gsm, throws the error that this file doesn’t apply - which is indeed correct behaviour.
Maybe can you paste the following information here:
mmcli -L (meaning does the device see the modem properly? )
nmcli c (meaning what connection files are being used for what interface)
@imrehg I’ve been using the GPS tracker project, to go get familiar with this concept, as it’s new to me. Please see the results below for the first two commands:
mmcli -L /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module
According to the Modem Manager, the only things that seem to be causing an error are the following:
May 27 14:45:52 dc1373c ModemManager[700]: [/dev/cdc-wdm0] loaded driver of cdc-wdm port: qmi_wwan
May 27 14:45:52 dc1373c ModemManager[700]: cannot connect to proxy: Could not connect: Connection refused
May 27 14:45:52 dc1373c ModemManager[700]: spawning new qmi-proxy (try 1)…
May 27 14:45:53 dc1373c ModemManager[700]: Couldn’t check support for device ‘/sys/devices/platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1’: not supported by any plugin
May 27 14:45:53 dc1373c ModemManager[700]: Couldn’t check support for device ‘/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1’: not supported by any plugin
May 27 14:46:02 dc1373c ModemManager[700]: (tty/ttyUSB0) failed to parse QCDM version info command result: -7
May 27 14:46:08 dc1373c ModemManager[700]: Could not grab port (tty/ttyUSB1): ‘Cannot add port ‘tty/ttyUSB1’, unhandled serial type’
May 27 14:46:09 dc1373c ModemManager[700]: Unhandled QMI radio interface (9)
May 27 14:46:09 dc1373c ModemManager[700]: Unhandled QMI radio interface (9)
May 27 14:46:09 dc1373c ModemManager[700]: Unhandled QMI radio interface (9)
May 27 14:46:09 dc1373c ModemManager[700]: couldn’t load list of Own Numbers: ‘Couldn’t get MSISDN: QMI protocol error (16): ‘NotProvisioned’’
@jmeyers2 is this a balenaFin v1.1 or v1.0? Could you share the output of lsusb ? Edit: sorry I see that it is a Fin v1.1 - but I’d still be interested to see the output of lsusb!
@chrisys The output is below. I’m not sure what these mean.
Bus 001 Device 004: ID 2c7c:0125
Bus 001 Device 003: ID 0424:ec00
Bus 001 Device 002: ID 0424:9514
Bus 001 Device 001: ID 1d6b:0002
I just tried EC25 on a Fin device with the same OS version and everything worked properly for me.
If UDEV is enabled in a container (enabled by default in older resin base images), it may lead to modem initialization issues on boot.
Can you please try to activate the modem with an empty application (without any code pushed) and simply by defining the connection profile in the path you use.
I do not think the serial baud option is really needed. Also usually you may also avoid the gsm apn setting since it will be automatically picked up.
Please let us know whether you still have initialization issues with an empty application.
Thanks for getting back to me. I’m a little confused on what you mean by “Simply by defining the connection profile in the path you use.” I’ve adjusted my file to match the one @dirk created. I’ve emptied my dockerfile to only have one command. That command is FROM balenalib/artik530-alpine-python:latest. I’m unsure on how to set something like you mentioned in my dockerfile. Can you provide the steps or an example of your Dockerfile so I can compare? Thanks for your help.
What majorz was suggesting was to use and empty application with no release pushed to it at all. I guess your dockerfile only containing a balenalib base image should work as well. I am not quite sure either, what @majorz meant by ‘simply by defining the connection profile in the path you use.’ . If your up to date connection-profile is in /mnt/boot/system-connections it should be used on next boot and that should be fine.
Hi @jmeyers2 , yeah the connection file can be added to /mnt/boot/system-connections from the hostOS. If you have your device connected to ethernet, you should be able to access the hostOS from the webdashboard. You can then use vi to add the connection file.
@shaunmulligan Thanks for the information. I’ve added a file named CELLULAR to that directory and rebooted the device. Unfortunately it still isn’t working. Did I miss a step somewhere?
This is the error I’m getting from Network Manager:
keyfile: error loading connection from file /etc/NetworkManager/system-connections/CELLULAR: invalid connection: connection.type: connection type 'gsm ’ is not valid.