Hello, I’ve been working on a project that sends data using a modem via a physical 5 G-capable SIM from Telekom (HU). However, I’ve been running into an issue where the modem won’t connect to the data provider.
I have a different set-up (but still applicable) and have been following this loosely:
https://www.jeffgeerling.com/blog/2022/using-4g-lte-wireless-modems-on-raspberry-pi
Any help or insight would be much appreciated.
root@5g-edgepmu0:/home/pmu# qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
[/dev/cdc-wdm0] Operating mode retrieved:
Mode: 'online'
HW restricted: 'no'
root@5g-edgepmu0:/home/pmu# ip link set wwan0 down
root@5g-edgepmu0:/home/pmu# echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip
Y
root@5g-edgepmu0:/home/pmu# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root@5g-edgepmu0:/home/pmu# ip link set wwan0 up
root@5g-edgepmu0:/home/pmu# qmicli -d /dev/cdc-wdm0 --wda-get-data-format
[/dev/cdc-wdm0] Successfully got data format
QoS flow header: no
Link layer protocol: 'raw-ip'
Uplink data aggregation protocol: 'disabled'
Downlink data aggregation protocol: 'disabled'
NDP signature: '0'
Downlink data aggregation max datagrams: '0'
Downlink data aggregation max size: '0'
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='internet.telekom',ip-type=4" --client-no-release-cid
error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (3): generic-no-service
verbose call end reason (2,209): [internal] pdn-ipv4-call-throttled
[/dev/cdc-wdm0] Client ID not released:
Service: 'wds'
CID: '14'
root@5g-edgepmu0:/home/pmu# qmicli -d /dev/cdc-wdm0 --atr-send-only="AT!IMPREF?"
bash: !IMPREF?: event not found
root@5g-edgepmu0:/home/pmu# qmicli -d /dev/cdc-wdm0 --atr-send-only="AT+CFUN=1"
error: couldn't create client for the 'atr' service: QMI protocol error (31): 'InvalidServiceType'
root@5g-edgepmu0:/home/pmu# qmicli -d /dev/cdc-wdm0 --atr-send-only="AT+CFUN=1" --client-cid=14
error: operation failed: Transaction timed out
error: couldn't release client: QMI protocol error (31): 'InvalidServiceType'
root@5g-edgepmu0:/home/pmu# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 003: ID 09db:0114 Measurement Computing Corp. USB-204
Bus 001 Device 004: ID 0403:6030 Future Technology Devices International, Ltd FT260
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 2c7c:0801 Quectel Wireless Solutions Co., Ltd. RM520N-GL
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@5g-edgepmu0:/home/pmu# mmcli -L
error: couldn't find the ModemManager process in the bus
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 -v --dms-get-manufacturer
[28 Feb 2025, 00:01:17] [Debug] [/dev/cdc-wdm0] opening device with flags 'proxy, auto'...
[28 Feb 2025, 00:01:17] [Debug] [/dev/cdc-wdm0] automatically selecting QMI mode
[28 Feb 2025, 00:01:17] [Debug] [/dev/cdc-wdm0] created endpoint
[28 Feb 2025, 00:01:17] [Debug] cannot connect to proxy: Could not connect: Connection refused
[28 Feb 2025, 00:01:17] [Debug] spawning new qmi-proxy (try 1)...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<< length = 28
<<<<<< data = 01:1B:00:00:00:00:00:01:00:FF:10:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 27
<<<<<< flags = 0x00
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 1
<<<<<< tlv_length = 16
<<<<<< message = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<< type = "Device Path" (0x01)
<<<<<< length = 13
<<<<<< value = 2F:64:65:76:2F:63:64:63:2D:77:64:6D:30
<<<<<< translated = /dev/cdc-wdm0
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 19
<<<<<< data = 01:12:00:80:00:00:01:01:00:FF:07:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 18
<<<<<< flags = 0x80
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 1
<<<<<< tlv_length = 7
<<<<<< message = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 00:00:00:00
<<<<<< translated = SUCCESS
[28 Feb 2025, 00:01:18] [Debug] QMI Device at '/dev/cdc-wdm0' ready
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] assuming service 'dms' is supported...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] allocating new client ID...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<< length = 16
<<<<<< data = 01:0F:00:00:00:00:00:02:22:00:04:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 15
<<<<<< flags = 0x00
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 2
<<<<<< tlv_length = 4
<<<<<< message = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<< type = "Service" (0x01)
<<<<<< length = 1
<<<<<< value = 02
<<<<<< translated = dms
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 24
<<<<<< data = 01:17:00:80:00:00:01:02:22:00:0C:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 23
<<<<<< flags = 0x80
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 2
<<<<<< tlv_length = 12
<<<<<< message = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 00:00:00:00
<<<<<< translated = SUCCESS
<<<<<< TLV:
<<<<<< type = "Allocation Info" (0x01)
<<<<<< length = 2
<<<<<< value = 02:05
<<<<<< translated = [ service = 'dms' cid = '5' ]
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] registered 'dms' (version unknown) client with ID '5'
[28 Feb 2025, 00:01:18] [Debug] Asynchronously getting manufacturer...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<< length = 13
<<<<<< data = 01:0C:00:00:02:05:00:01:00:21:00:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 12
<<<<<< flags = 0x00
<<<<<< service = "dms"
<<<<<< client = 5
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 1
<<<<<< tlv_length = 0
<<<<<< message = "Get Manufacturer" (0x0021)
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 30
<<<<<< data = 01:1D:00:80:02:05:02:01:00:21:00:11...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 29
<<<<<< flags = 0x80
<<<<<< service = "dms"
<<<<<< client = 5
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 1
<<<<<< tlv_length = 17
<<<<<< message = "Get Manufacturer" (0x0021)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 00:00:00:00
<<<<<< translated = SUCCESS
<<<<<< TLV:
<<<<<< type = "Manufacturer" (0x01)
<<<<<< length = 7
<<<<<< value = 51:75:65:63:74:65:6C
<<<<<< translated = Quectel
[/dev/cdc-wdm0] Device manufacturer retrieved:
Manufacturer: 'Quectel'
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] releasing 'dms' client with flags 'release-cid'...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] unregistered 'dms' client with ID '5'
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<< length = 17
<<<<<< data = 01:10:00:00:00:00:00:03:23:00:05:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 16
<<<<<< flags = 0x00
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 3
<<<<<< tlv_length = 5
<<<<<< message = "Release CID" (0x0023)
<<<<<< TLV:
<<<<<< type = "Release Info" (0x01)
<<<<<< length = 2
<<<<<< value = 02:05
<<<<<< translated = [ service = 'dms' cid = '5' ]
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 24
<<<<<< data = 01:17:00:80:00:00:01:03:23:00:0C:00...
[28 Feb 2025, 00:01:18] [Debug] [/dev/cdc-wdm0] received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 23
<<<<<< flags = 0x80
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 3
<<<<<< tlv_length = 12
<<<<<< message = "Release CID" (0x0023)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 00:00:00:00
<<<<<< translated = SUCCESS
<<<<<< TLV:
<<<<<< type = "Release Info" (0x01)
<<<<<< length = 2
<<<<<< value = 02:05
<<<<<< translated = [ service = 'dms' cid = '5' ]
[28 Feb 2025, 00:01:18] [Debug] Client released
[28 Feb 2025, 00:01:18] [Debug] Closed
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='internet.telekom',username=' ',password=' ',ip-type=4" --client-no-release-cid
error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (3): generic-no-service
verbose call end reason (2,209): [internal] pdn-ipv4-call-throttled
[/dev/cdc-wdm0] Client ID not released:
Service: 'wds'
CID: '17'
AT Commands
root@5g-edgepmu0:/home/pmu# minicom -b 115200 -D /dev/ttyUSB2
Welcome to minicom 2.9
NO CARRIER
at
OK
ate1
OK
ati
Quectel
RM520N-GL
Revision: RM520NGLAAR01A08M4G
OK
at+qgmr
RM520NGLAAR01A08M4G_01.200.01.200
OK
at+cpin?
+CPIN: READY
OK
at+cpas
+CPAS: 0
OK
at+cfun?
+CFUN: 1
OK
at+cops?
+COPS: 0
OK
at+qcfg="usbnet"
+QCFG: "usbnet",0
OK
at+qcfg="band"
ERROR
at+creg=
OK
at+creg?
+CREG: 0,0
OK
at+cgdcont?
+CGDCONT: 1,"IPV4V6","internet.v6.telekom","0.0.0.0.0.0.0.0.0.0.0.0.0.00
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,0
+CGDCONT: 3,"IPV4V6","hos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,0
+CGDCONT: 4,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1,,,0
OK
at+csq
+csq: 99,99
OK
at+cgatt?
+CGATT: 0
OK
at+qcfg="nwscanseq"
ERROR
at+qcfg="nwscanmode"
ERROR
at+qcsq
+QCSQ: "NOSERVICE"
OK
Signal Info
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 --nas-get-signal-strength
[/dev/cdc-wdm0] Successfully got signal strength
Current:
Network '5gnr': '-78 dBm'
IO: '-106 dBm'
SINR (8): '9.0 dB'
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 --nas-get-signal-info
[/dev/cdc-wdm0] Successfully got signal info
5G:
RSRP: '-85 dBm'
SNR: '25.5 dB'
RSRQ: '-11 dB'
root@5g-edgepmu0:/home/pmu# qmicli -p -d /dev/cdc-wdm0 --nas-get-home-network
[/dev/cdc-wdm0] Successfully got home network:
Home network:
MCC: '216'
MNC: '30'
Description: 'THU'
Network name source: se13