BalenaOS config.json udev rules

Could someone assist in identifying where I find information about how to customize this udev rule for different modem models? I think I may have been experiencing problems because I wasn’t paying attention to the fact that in this ( guide the writer was using a different Quectel modem model than what I’m using.

Writer used a EC25, I have a EG25-G.

For example, I believe the things I need to change include ATTRS{idProduct}==\"9003\" and SYMLINK+=\"UC20.MODEM\"

But I’m not clear on where I find the specific values for different modems.

From the instructions:

"os": {
        "udevRules": {
            "20-quectel": "SUBSYSTEMS==\"usb\", ENV{.LOCAL_ifNum}=\"$attr{bInterfaceNumber}\"\n\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"05c6\", ATTRS{idProduct}==\"9003\", ENV{.LOCAL_ifNum}==\"01\", SYMLINK+=\"UC20.NMEA\", MODE=\"0660\"\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"05c6\", ATTRS{idProduct}==\"9003\", ENV{.LOCAL_ifNum}==\"02\", SYMLINK+=\"UC20.AT\", MODE=\"0660\"\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"05c6\", ATTRS{idProduct}==\"9003\", ENV{.LOCAL_ifNum}==\"03\", SYMLINK+=\"UC20.MODEM\", MODE=\"0660\"\n\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"2c7c\", ATTRS{idProduct}==\"0121\", ENV{.LOCAL_ifNum}==\"02\", SYMLINK+=\"EC21.AT\", MODE=\"0660\"\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"2c7c\", ATTRS{idProduct}==\"0121\", ENV{.LOCAL_ifNum}==\"03\", SYMLINK+=\"EC21.MODEM\", MODE=\"0660\"\n\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"2c7c\", ATTRS{idProduct}==\"0125\", ENV{.LOCAL_ifNum}==\"01\", SYMLINK+=\"EC25.NMEA\", MODE=\"0660\"\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"2c7c\", ATTRS{idProduct}==\"0125\", ENV{.LOCAL_ifNum}==\"02\", SYMLINK+=\"EC25.AT\", MODE=\"0660\"\nSUBSYSTEMS==\"usb\", KERNEL==\"ttyUSB[0-9]*\", ATTRS{idVendor}==\"2c7c\", ATTRS{idProduct}==\"0125\", ENV{.LOCAL_ifNum}==\"03\", SYMLINK+=\"EC25.MODEM\", MODE=\"0660\"\n\n"

Hello @barryjump good to read you again here.

Could you please confirm what board are you using? balenaFin? i used to have this running with a fin and a EG25-G!

Let me know what are you using exactly.

Please also let us know your OS version! thanks!

Howdy @mpous yeah it was both BalenaOS 2.38.0+rev1 and BalenaOS 2.58.3+rev1.
Same for the modem, trouble with both the EG25-G and the EC25-AF.

Over the past few days I managed to get the EC25-AF running flawlessly on a non-balenaified version of the same Pi4 I had trouble with. Very stable connection.

So I’ve narrowed it down to some odd behavior with the combination of BalenaOS, ModemManager and NetworkManager. In particular I noticed that if I ever managed to get the modem out of the registered state, it would move to connecting but cylce through a new dbus path assignment every second or so. So that if I left it running long enough it could get up to an assignment of 850 or higher.

@barryjump we are going to test this, but we need to know exactly the hardware that you are using.
Is this a Pi4 with a hat? or usb with mpcie adapter? what hat are you using? thanks :slight_smile:

Awesome thanks Marc.

Test 1: Balena Fin v1.1, Quectel EC25-AF mpcie (attached to bottom of the board, no hat) and a RAK2245 HAT on top, Sim in Fin’s sim holder, power via 12v2a to Fin’s barrel jack.

Test 2: Balena Fin v1.1, Quectel EG25-G mpcie (attached to bottom of the board, no hat) and a RAK2245 HAT on top, Sim in Fin’s sim holder, power via 12v2a to Fin’s barrel jack.

Test 3: Pi4, Sixfab Power HAT, Quectel EC25-AF via Sixfab LTE HAT stacked on top. Power via USB-C to Sixfab Power HAT.

Test 4: Pi4, Sixfab Power HAT, Quectel EG25-G via Sixfab LTE HAT stacked on top. Power via USB-C to Sixfab Power HAT.

All tests were on BalenaOS. Only setup I managed to get working was Test 3, but with RaspberryOS instead.

Quectel provided me a newer firmware file, but I’m a bit nervous to attempt since it comes with some big warnings and isn’t very user friendly.

1 Like

Thank you for the information @barryjump What version of the Quectel firmware do you have?

I upgraded my Quectel EG25-G to version EG25GGBR07A08M2G_01.001.01.001 and QFirehose to v1.2.4 and it worked well.

Follow these instructions if this is the same version from hostOS:

(1) balena run -it --privileged --net=“host” balenalib/fincm3-debian:stretch-build /bin/bash
(2) download the 2 new firmware zips (i used wget)
(3) install_packages unzip
(4) unzip (files)
(5) cd QFirehose && make
(6) ./QFirehose -f …/ and i rebooted the fin because it didn’t recognize commands
(7) mmcli -m 0 - (see if the sim is detected)
(8) nmcli con add type gsm ifname …
(9) cat /etc/NetworkManager/system-connections/*

Let me know if this works

1 Like

Hey Marc, thanks for the instructions. I will upgrade the firmware for both the EC25-AF and EG25-Gs.
This is what I’m running now:
EG25-G: EG25GGBR07A08M2G_01.002.01.002

I did hear from Quectel support and apparently there is even newer firmware for both. They sent me EG25GGBR07A08M2G_01.003.01.003 for the EG25-G which I’ll update today. Still waiting on the EC25 firmware.

For what it’s worth, T-mobile does not list the EG25-G as a certified modem (IoT Device Certification | Certify Your Device On the T-Mobile Network), however Quectel sent me a document which says indeed it is certified as of July 2020.

Thanks for the info barryjump.
Did you finally get the EC25 firmware and tried it? We are interested in the results, although hopefully there aren’t any issues. Let us know how it goes!

1 Like

@rmorillo24 and @mpous unfortunately I didnt get a chance to get past these errors when running Marc’s instructions:

root@7f09eff:~# balena run -it --privileged --net=“host” balenalib/fincm3-debian:stretch-build /bin/bash
Unable to find image 'balenalib/fincm3-debian:stretch-build' locally

stretch-build: Pulling from balenalib/fincm3-debian
ebe5f2b76040: Pull complete 
626b5b0a2678: Pull complete 
54b32b6cf3f3: Pull complete 
5d133c9bd492: Pull complete 
caa3b2b9eed0: Pull complete 
5d0ca5abde69: Pull complete 
f3861e1f94db: Pull complete 
b73bcbf3d304: Pull complete 
934d3a08de55: Pull complete 
478f9c615994: Pull complete 
d77c71eab61f: Pull complete 
9532a028db51: Pull complete 
91884773fd6e: Pull complete 
059b79664145: Pull complete 
43e022d818e7: Pull complete 
56e94d373ed2: Pull complete 
ddc56578e351: Pull complete 
26260516f4dd: Pull complete 
Total:  [==================================================>]  216.2MB/216.2MB
Digest: sha256:96a8a2fea6b801b381ac5c92ace5918e44469dfa5f14e0464bb8e45fda309cba
Status: Downloaded newer image for balenalib/fincm3-debian:stretch-build
balena: Error response from daemon: network “host” not found.
ERRO[2021-04-04T01:16:10.205774977Z] error waiting for container: context canceled 

root@7f09eff:~# install_packages unzip
bash: install_packages: command not found

Maybe I misinterperted this statement:

Do I need to be running balenalib/fincm3-debian:stretch-build on the host OS before running the command?

@barryjump try balena run -it --privileged --net=host ... (you have some extended characters instead of normal " quotes).

Hey @barryjump how is it going? did you succeed with this?