BalenaOS GSM Setup

Hi,
i´m using BalenaOS with Raspberry Pi 3 B+.
I want to setup a GSM connection via NetworkManager. What I did is using the Tutorial form Balena to do it. The GSM Modem shows as connected and gets an IP but the problem is, its not in the dashboard as online nor can I ping sites if I connect via LAN to the device. So there is no Internet available on the device.

nmcli shows

ttyUSB1: connected to balena-cellular
        "Huawei E220 / E230/E270/E870 HSDPA/HSUPA"
        gsm (option1), hw, iface ppp0, mtu 1500
        inet4 100.83.184.31/32
        inet4 100.83.184.31/32
        route4 10.64.64.64/32
        route4 10.64.64.64/32
        route4 0.0.0.0/0

wlan0: connected to balena-hotspot1
        "Broadcom Wi-Fi"
        wifi (brcmfmac), XXX, hw, mtu 1500
        inet4 192.168.125.1/24
        route4 192.168.125.0/24
        route4 0.0.0.0/0
        inet6 fe80::ba27:ebff:fea6:76b7/64
        route6 ff00::/8
        route6 fe80::/64

supervisor0: connected to supervisor0
        "supervisor0"
        bridge, XXX, sw, mtu 1500
        inet4 172.17.0.1/16
        route4 172.17.0.0/16

ppp0: disconnected
        "ppp0"
        ppp, sw, mtu 1500

root@XXX:~# mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id '95ebf7e8923f07d4e525624b04ab9f6ef582a1d1')
  -------------------------
  Hardware |   manufacturer: 'huawei'
           |          model: 'E17X'
           |       revision: '11.304.19.20.00'
           |   H/W revision: 'unknown'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: 'XXX'
  -------------------------
  System   |         device: '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3'
           |        drivers: 'option1'
           |         plugin: 'Huawei'
           |   primary port: 'ttyUSB1'
           |          ports: 'ttyUSB0 (at), ttyUSB1 (at)'
  -------------------------
  Numbers  |           own : 'unknown'
  -------------------------
  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'umts'
           | signal quality: '38' (recent)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: 2g
           |                  allowed: 2g, 3g; preferred: 3g
           |                  allowed: 2g; preferred: none
           |                  allowed: 3g; preferred: none'
           |        current: 'allowed: 2g, 3g; preferred: none'
  -------------------------
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  -------------------------
  IP       |      supported: 'ipv4'
  -------------------------
  3GPP     |           imei: 'XXX'
           |  enabled locks: 'none'
           |    operator id: '26202'
           |  operator name: 'klarmobil'
           |   subscription: 'unknown'
           |   registration: 'home'
           |    EPS UE mode: 'unknown'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'

The NetworkManager Config

[connection]
id=balena-cellular
type=gsm
autoconnect=true

[gsm]
apn=web.vodafone.de
number=*99#

[serial]
baud=115200

[ipv4]
dns=8.8.8.8;
dns-search=
ignore-auto-dns=true
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Thanks for your help!

Hi @danielboe welcome to the forums!

If you have console/ssh access to the device could you grab the logs from both modemManager and NetworkManager using the following commands:

modemmanager:

journalctl -u ModemManager --no-pager

NetworkManager:

journalctl -u NetworkManager --no-pager

those should highlight where to look for the issue.

Additionally does your SIM have a pin number on it and is there a reason you are forcing DNS on the ipv4 specifically?

Hi,
I changed the SIM card and got it working now. So there are two options: One the SIM Card ist garbage (but it works in my smartphone) the other is my apn setup was false. But then the question is how it gets a public IP.
For me the Problem is nevertheless solved now. Thanks for the Help. If I find the Time I will investigate the other SIM with the Help of your commands

Awesome thanks for letting us know @danielboe. Its probably some combination of APN, user, password settings in the config file. It often takes quiet a bit of googling to find the right combo for each carrier :slight_smile: