CAT-M1 cannot Attached
-
Device using: Gpy
SIM card: HologramI activated some hologram sim cards and test it on my Gpy but it cannot attach to the network. I test "at+cereg" in the loop of attaching, and the result is:
^EXIT: Assertion failed +SYSSTART +CEREG: 2,0I tested Gpy that can work perfectly with the newly activated sim card, and it can connect.
But the same code on a new board with the same sim card, it cannot attach to the network. So I guess it is probably not the problem of sim cards.My lte connection code is
lte.init() lte.send_at_cmd('AT+CFUN=0') lte.send_at_cmd('AT!="clearscanconfig"') print("Hologram use"+lte.send_at_cmd('at+cgdcont=1,"IP","hologram"')) lte.send_at_cmd('AT+CFUN=1') while not lte.isattached(): time.sleep(0.5) attachTimeout += 1 print(lte.send_at_cmd('AT+CEREG?')[:-1], end='') if attachTimeout == 15: print(" LTE Failed") time.sleep(0.750) # # Shutdown the LTE system if lte.isconnected: lte.disconnect() time.sleep(2) if lte.isattached(): lte.dettach() time.sleep(2) lte.deinit(reset=True) machine.reset() print("lte is attached") ## # Now we busy wait for the Internet connection print("Start to connect") lte.connect() connectTimeout = 0 while not lte.isconnected(): time.sleep(1) connectTimeout += 1 if connectTimeout == 15: # pycom.rgbled(ucot.LED_RED) time.sleep(0.750) # pycom.rgbled(ucot.LED_BLACK) print("lte is not connected") # # Shutdown the LTE system lte_off() # # # # Go to deepsleep for one tenth of a reporting interval # pySense.setup_sleep((REPORTING_INTERVAL/10) * 60) # pySense.go_to_sleep() machine.reset() time.sleep(1) print("lte is connected")Is there any problem of this usage or do I need to specially config anything?
-
@Terry666 Can you try to set the timeout to a much larger value? For the first time, that may be needed.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login