Waveshare 7000E NB-IOT/GSM cellular modem not recognised on Balena but fine on Raspbian PiZero

Hello,

I am new to Balena, so this could entirely be a case of me missing an obvious step, apologies if so.

I have raspberry pi zero onto which I have the waveshare 7000E cellular HAT connected via UART. https://www.waveshare.com/sim7000e-nb-iot-hat.htm

On Raspian OS (bull’s eye) the modem works fine after, activating UART on ttyACM0 (using cmdline.txt and Config.txt). I also had to add two udev lines below.

ACTION=="add", KERNEL=="3f201000.serial", ENV{ID_MM_DEVICE_PROCESS}="1"
ACTION=="add|change|move", KERNEL=="ttyAMA0", ENV{ID_MM_TTY_FLOW_CONTROL}="none", ENV{ID_MM_TTY_BAUDRATE}="115200", ENV{ID_MM_CANDIDATE}="1", ENV{ID_MM_DEVICE_PROCESS}="1"

I dial using PPP and I can send AT commands via picom at 11500 baud rate.

Onto Balena,
I made the exact same changes

  1. Enabled UART and dtoverlays (pi3-miniuart-bt) via fleet configuration.
  2. I also added a cellular file to the connections folder
  3. added the UDEV rules via config.json. which show up in /etc/udev/rules.d.

After all this,

a. UART is on serial0 → ttyAMA0 (good)
b. Udev rules show (good) - Example of one below.

root@d3f3c85:/lib/udev# cat /etc/udev/rules.d/64-cellular7000E.rules
ACTION=="add|change|move", KERNEL=="ttyAMA0", ENV{ID_MM_TTY_FLOW_CONTROL}="none", ENV{ID_MM_TTY_BAUDRATE}="115200", ENV{ID_MM_CANDIDATE}="1", ENV{ID_MM_DEVICE_PROCESS}="1"

c. mmcli -S and mmcli -L show no modem found. (bad)
d. no cellular connection set up (bad, though not a surprise given mmcli shows no modem)

What am I missing/doing wrong? Any one had any success with the waveshare 7000E on Balena using UART?

Happy to provide more info

[UPDATE]

Finally made this work. The issue was to do with the UDEV rules.

The realpath for ttyAMA0 differ on Balena to Raspian and thus the UDEV rules needs to be updated accordingly. In my case

KERNEL=="3f201000.serial" should be  KERNEL=="20201000.serial"

You can verify the realpath for ttyAMA0 on your pi using

realpath /sys/class/tty/ttyAMA0

From then on, its quite straight forward to make the HAT work using the cellular file.

1 Like

Great to see it is working for you @duncanngenda and thank you for sharing more details here. Do reach out if you run into any other issue with Balena.