Hey guys,
I am working with
- nrf9160-dk
- at_client
- Modem Firmware version 1.3.5
and use the iBasis SIM that was delivered with it and also have a new 1nce SIM card. I am located in Germany.
When working with LTE-M everything works as expected. Now I want to switch to NB-IOT and can not make it work.
According to iBasis it has no coverage with NB-IOT but only with LTE-M:
https://ibasis.com/solutions/iot-connectivity/network-coverage/
When scanning with iBasis I can see Telekom, Vodafone and O2. But can only register into Telekom and O2 LTE-M. That is ok for me.
According to 1nce it should have coverage:
www.1nce.com/.../our-coverage
When scanning with 1nce I can see Telekom, Vodafone and O2 LTE-M and can register into all 3 of them.
Now I use the 1nce SIM for NB-IOT.
In Germany these operators are available:
https://www.gsma.com/solutions-and-impact/technologies/internet-of-things/deployment-map/#DE
I tried many different configs to register with 1nce into NB-IOT but always failed.
My approach is using a python script that controls the at_client. The relevant excerpt is here. As you can see I tried many different combinations.
def get_init_commands(mode=None):
"""Get initialization commands based on network mode"""
base_commands = [
#("AT+CFUN=1", "Set full functionality mode"),
]
# Only add system mode command if mode is specified
mode_commands = []
if mode:
if mode.lower() == "nbiot":
mode_commands = [
("AT+CFUN=0", "Disable radio functionality"),
("AT%XSYSTEMMODE=0,1,0,2", "Set NB-IoT mode"),
("AT%XSYSTEMMODE?", "Query current system mode"),
("AT+CFUN=1", "Re-enable full functionality mode after setting NB-IoT"),
#("AT+CGDCONT=1,\"IP\",\"internet.telekom\"", "Set APN for Telekom"),
#("AT+COPS=1,2,\"26201\"", "Manual selection of Telekom network"),
#("AT+COPS=1,2,\"26202\"", "Manual selection of Vodafone network"),
("AT+CPSMS=0", "Disable Power Saving Mode (PSM)"),
("AT+CEDRXS=0", "Disable extended DRX (eDRX)"),
("AT+CGDCONT=1,\"IP\",\"iot.1nce.net\"", "Set APN for 1NCE"),
# ("AT+COPS=1,2,\"26201\"", "Manual selection of Telekom network"),
# ("AT+CGDCONT=1,\"IP\",\"internet.o2.de\"", "Set APN for O2"),
#("AT+COPS=1,2,\"26203\"", "Manual selection of O2 network"),
("AT+COPS=0", "Automatic operator selection (let modem pick any available NB-IoT network)"),
]
elif mode.lower() == "ltem":
mode_commands = [
("AT+CFUN=0", "Disable radio functionality"),
("AT%XSYSTEMMODE=1,0,0,0", "Set LTE-M mode"),
("AT%XSYSTEMMODE?", "Query current system mode"),
("AT+CFUN=1", "Re-enable full functionality mode after setting LTE-M"),
]
common_commands = [
("AT+CPSMS=0", "Disable Power Saving Mode (PSM)"),
("AT+CEDRXS=0", "Disable extended DRX (eDRX)"),
]
return base_commands + mode_commands + common_commands
My first question is: What is the correct command sequence?
My second question is: Is it possible that the command sequence is ok, but the signal quality in my exact place is so bad that the network it not available?
Here is a full log of the script and at_client trace. I added some additional info that is logged which is not from the modem:
2025-07-26 16:58:19 INFO: Connected to /dev/ttyACM0 at 115200 baud 2025-07-26 16:58:19 INFO: Started: 2025-07-26 16:58:19 2025-07-26 16:58:19 INFO: Log file: network_comparison_20250726_165819.log 2025-07-26 16:58:19 INFO: Test duration per network: 3 minutes 2025-07-26 16:58:19 INFO: ============================================================ 2025-07-26 16:58:19 INFO: Testing basic connectivity... 2025-07-26 16:58:20 INFO: AT command response: 'OK' 2025-07-26 16:58:20 INFO: Basic AT test successful 2025-07-26 16:58:20 INFO: ============================================================ 2025-07-26 16:58:20 INFO: INITIALIZING MODEM (NB-IoT MODE) 2025-07-26 16:58:20 INFO: ============================================================ 2025-07-26 16:58:20 INFO: Disable radio functionality 2025-07-26 16:58:20 INFO: Command: AT+CFUN=0 2025-07-26 16:58:20 INFO: ---------------------------------------- 2025-07-26 16:58:20 INFO: +CEREG: 0 OK 2025-07-26 16:58:21 INFO: Set NB-IoT mode 2025-07-26 16:58:21 INFO: Command: AT%XSYSTEMMODE=0,1,0,0 2025-07-26 16:58:21 INFO: ---------------------------------------- 2025-07-26 16:58:21 INFO: OK 2025-07-26 16:58:22 INFO: Query current system mode 2025-07-26 16:58:22 INFO: Command: AT%XSYSTEMMODE? 2025-07-26 16:58:22 INFO: ---------------------------------------- 2025-07-26 16:58:22 INFO: %XSYSTEMMODE: 0,1,0,0 OK 2025-07-26 16:58:23 INFO: Re-enable full functionality mode after setting NB-IoT 2025-07-26 16:58:23 INFO: Command: AT+CFUN=1 2025-07-26 16:58:23 INFO: ---------------------------------------- 2025-07-26 16:58:23 INFO: OK 2025-07-26 16:58:24 INFO: Disable Power Saving Mode (PSM) 2025-07-26 16:58:24 INFO: Command: AT+CPSMS=0 2025-07-26 16:58:24 INFO: ---------------------------------------- 2025-07-26 16:58:25 INFO: OK 2025-07-26 16:58:26 INFO: Disable extended DRX (eDRX) 2025-07-26 16:58:26 INFO: Command: AT+CEDRXS=0 2025-07-26 16:58:26 INFO: ---------------------------------------- 2025-07-26 16:58:26 INFO: OK 2025-07-26 16:58:27 INFO: Set APN for 1NCE 2025-07-26 16:58:27 INFO: Command: AT+CGDCONT=1,"IP","iot.1nce.net" 2025-07-26 16:58:27 INFO: ---------------------------------------- 2025-07-26 16:58:27 INFO: OK 2025-07-26 16:58:28 INFO: Automatic operator selection (let modem pick any available NB-IoT network) 2025-07-26 16:58:28 INFO: Command: AT+COPS=0 2025-07-26 16:58:28 INFO: ---------------------------------------- 2025-07-26 16:58:28 INFO: OK 2025-07-26 16:58:29 INFO: Disable Power Saving Mode (PSM) 2025-07-26 16:58:29 INFO: Command: AT+CPSMS=0 2025-07-26 16:58:29 INFO: ---------------------------------------- 2025-07-26 16:58:29 INFO: OK 2025-07-26 16:58:30 INFO: Disable extended DRX (eDRX) 2025-07-26 16:58:30 INFO: Command: AT+CEDRXS=0 2025-07-26 16:58:30 INFO: ---------------------------------------- 2025-07-26 16:58:30 INFO: OK 2025-07-26 16:58:31 INFO: Modem NB-IoT initialization completed! 2025-07-26 16:58:31 INFO: Checking SIM card status... 2025-07-26 16:58:31 INFO: PIN status response: +CPIN: READY OK 2025-07-26 16:58:31 INFO: ✓ SIM PIN status: Ready (no PIN required) 2025-07-26 16:58:31 INFO: Verifying SIM card with IMSI read... 2025-07-26 16:58:31 INFO: Nordic SIM status: ERROR 2025-07-26 16:58:31 INFO: ℹ️ Nordic SIM command not supported (this is normal for some modems) 2025-07-26 16:58:31 INFO: ✓ SIM card check passed - SIM is present and ready 2025-07-26 16:58:31 INFO: Verifying NB-IoT mode was set correctly... 2025-07-26 16:58:31 INFO: Setting CEREG to report detailed network information with cause codes... 2025-07-26 16:58:33 INFO: Reading network registration status... 2025-07-26 16:58:34 INFO: CEREG response: +CEREG: 5,4 2025-07-26 16:58:34 INFO: Registration status: 4 2025-07-26 16:58:34 INFO: Registration status meaning: Unknown (out of coverage) 2025-07-26 16:58:34 WARNING: Warning: Device not registered to network yet 2025-07-26 16:58:34 INFO: Waiting for network registration (max 120s)... 2025-07-26 16:58:34 INFO: Registration status: 4 OK 2025-07-26 16:58:39 INFO: Registration status: 4 OK 2025-07-26 16:58:44 INFO: Registration status: 4 OK 2025-07-26 16:58:49 INFO: Registration status: 4 OK 2025-07-26 16:58:54 INFO: Registration status: 4 OK 2025-07-26 16:58:59 INFO: Registration status: 4 OK 2025-07-26 16:59:04 INFO: Registration status: 4 OK 2025-07-26 16:59:09 INFO: Registration status: 4 OK 2025-07-26 16:59:14 INFO: Registration status: 4 OK 2025-07-26 16:59:20 INFO: Registration status: 4 OK 2025-07-26 16:59:25 INFO: Registration status: 4 OK 2025-07-26 16:59:30 INFO: Registration status: 4 OK 2025-07-26 16:59:35 INFO: Registration status: 4 OK 2025-07-26 16:59:40 INFO: Registration status: 4 OK 2025-07-26 16:59:45 INFO: Registration status: 4 OK 2025-07-26 16:59:50 INFO: Registration status: 4 OK 2025-07-26 16:59:55 INFO: Registration status: 4 OK 2025-07-26 17:00:00 INFO: Registration status: 4 OK 2025-07-26 17:00:05 INFO: Registration status: 4 OK 2025-07-26 17:00:11 INFO: Registration status: 4 OK 2025-07-26 17:00:16 INFO: Registration status: 4 OK 2025-07-26 17:00:21 INFO: Registration status: 4 OK 2025-07-26 17:00:26 INFO: Registration status: 4 OK 2025-07-26 17:00:31 INFO: Still searching for network... (117.4s) 2025-07-26 17:00:36 ERROR: Network registration failed after 120s 2025-07-26 17:00:36 ERROR: ERROR: Device out of network coverage 2025-07-26 17:00:36 ERROR: Try moving to an area with better signal coverage 2025-07-26 17:00:36 ERROR: ERROR: Failed to set NB-IoT mode correctly! 2025-07-26 17:00:36 ERROR: Exiting due to incorrect network mode... 2025-07-26 17:00:36 ERROR: Modem initialization failed! 2025-07-26 17:00:36 INFO: Disconnected from /dev/ttyACM0