Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • YouTube
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

SG Community Forum

  1. Home
  2. Getting Started
  3. F1 Starter Kit
  4. LTE Mode check (and switching) not possible in PPP mode?

LTE Mode check (and switching) not possible in PPP mode?

Scheduled Pinned Locked Moved F1 Starter Kit
4 Posts 2 Posters 291 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jandls
    wrote on last edited by
    #1

    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()
    0
    

    I 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.

    1 Reply Last reply
    1
    • cehlersC Offline
      cehlersC Offline
      cehlers
      wrote on last edited by
      #2

      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.

      F1 introduction video: https://youtu.be/8fsoL0ga_lo

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jandls
        wrote on last edited by
        #3

        OK, thanks. That means I need to use lte.pppsuspend() before using these commands (and lte.pppresume afterwards)?

        1 Reply Last reply
        0
        • cehlersC Offline
          cehlersC Offline
          cehlers
          wrote on last edited by cehlers
          #4

          Yes, you can use lte.pppsuspend() to run AT commands, but then please use lte.connect() to re-connect. If you switch modes, you need to attach again first as the modem resets.

          F1 introduction video: https://youtu.be/8fsoL0ga_lo

          1 Reply Last reply
          0

          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • YouTube