LTE Mode check (and switching) not possible in PPP mode?
-
I am trying to follow the documentation that proposes the following to check the LTE Mode :
from LTE import LTE lte = LTE() lte_mode = lte.mode() # Return current mode if lte_mode == LTE.CATM1: print(‘Modem is in CAT-M1 mode!’) if lte_mode == LTE.NBIOT: print(‘Modem is in NB-IoT mode!’)However, when I try the mode checking, I get the following:
>>> lte = LTE() >>> lte.mode() 0I believe the value 0 indicates that the LTE module is in idle mode. Is that correct?
So next I attach and I connect, and then try the lte.mode() command again. By the way, it seems double quotes are needed for “iot.1nce.net”. The single quotes in the documentation do not work. This is what now happens:>>> lte.attach(apn="iot.1nce.net") >>> lte.isattached() True >>> lte.connect() >>> lte.isconnected() True >>> lte.mode() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "LTE.py", line 312, in mode File "LTE.py", line 472, in check_ppp OSError: Operation not possible while in PPP mode!Any solution? What is this PPP mode? Point-to-Point Protocol mode? How was that mode selected? Not in my simple script.
-
The mode means operating mode of the currently running LTE modem firmware. If you switch between CAT-M and NB-IoT mode, the modem will change the operation mode and will reset to load the firmware for the new mode. If it returns 0 it means it is running the CAT-M firmware, if it returns 1 it means it is running the NB-IoT firmware.
The device automatically enabled the LTE connection in order to provision the device on our cloud platform using the bundled 1NCE SIM car. In order to communicate with the cloud platform, it will use PPP (point to point) protocol. In the mode, the modem exchanges data with the host (the esp32-s3 running MicroPython) using a binary protocol. When this is active, it is currently not possible to send AT commands to the modem.