ATOM-DTU-NB-IOT no connect to sim7020G Module
roadfox last edited by
I try to run the following code on a Atom-DTU NB-IOT
from m5stack import *
from m5ui import *
from uiflow import *
from base.DTU_NB import DTU_NB
dtu_nb = DTU_NB()
"dtu initialized..." is never printed, if i connect via usb/serial and enter ctrl-C i get the following output:
Traceback (most recent call last):
File "main.py", line 30, in <module>
File "base/DTU_NB.py", line 31, in init
File "base/DTU_NB.py", line 42, in ischeck_IP
File "libs/simcom/common.py", line 265, in send_at_cmd
File "libs/simcom/common.py", line 274, in wait_at_cmd_ok
MicroPython d725c2ac8-dirty on 2022-10-13; M5Stack with ESP32
Type "help()" for more information.
while i'm not shure if my sim card is working for nb-iot and not just for LTE, was hoping to be able to communicate with the sim7020G to get some information.
what could be wrong?
the Init NB-IoT DTU block (aka
dtu_nb = DTU_NB()) executes the below conversation with the modem and if it doesn't get the proper responses repeats the commands forever.
> ATE0 < OK > AT+CPIN? < +CPIN: READY < OK > AT+CGCONTRDP < +CGCONTRDP: 1,5,"myapn","10.10.10.84.255.255.255.0",,"10.10.20.210","10.10.20.211" < OK
So make sure that your SIM card doesn't have a PIN set and works for NB-IoT.
From my experience SIM cards for NB-IoT are different from SIM cards for smartphones.
roadfox last edited by roadfox
Thanks for the fast response!
I'm pretty sure it is the SIM, while pin is removed the card is probably not valid for NB-IOT. I can also not figure out how to get an NB-IOT compatible SIM card here in Switzerland, seems to be an "enterprise thing" :-(
Before i return the Device and try with the Lora version, is there an easy way for me to test if communication with the sim7020G is ok, so setting up the correct serial and issue an AT command in mycropython by hand?
Tried to find the source code for base/DTU_NB.py but without success.
I've put together an example which sends an AT command when the M5Atom button is pressed and then waits for the OK response or times out.
BTW: I am using an NB-IoT SIM card from IoT Creators - they offer a free testkit.
roadfox last edited by
thank you so much. was able to verify that the sim7020G is responding
so next to find a sim card which works...
you are welcome. I am glad it worked for you.
Please let me know what you find regarding NB-IoT SIM card.
in case you are still looking for a suitable NB-IoT SIM card. I recently got one from Miotiq which works fine for me. See here for more detail.