Fipy Modem Error



  • Am new to this setup, after successful Lora Attempts we are trying to do some testing on NB-IOT, please help in some newbie queries

    1. how do i get to know the band number ?
    2. how do i get to know the apn name ?

    I see SIM is active on Pybytes portal, its a NB IOT sim and am located in Ireland.

    Fipy with Vodafone NBIOT giving "modem" not found error

    >>> lte.init()
    >>> lte.connect()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: modem not attached
    >>> lte.attach()
    >>> lte.isattached()
    


  • I'm aware there is a learning curve for the LTE modem, please let me know how we can make it easier for beginners.

    Could you elaborate what is happening here? the lte.isattache is half finished, making me think the error comes from somewhere else. Does the error just appear, does it always appear? Are you running any code on micropython _thread

    lte.isattached() cannot return that error, it only returns True or False.

    Are you perhaps using the mesh (that is the only place I could refernence the ENXIO error to) ?



  • Haha This forum thread burns and burns i guess , no stopping

    >>> lte.attach(band=20, apn="pycom.io")
    >>> lte.isattache> Failed to connect (Error: ENXIO: no such device or address, write).
    

    what i now see is this strange log and connection times out



  • @Gijs I could get this working after couple of formats again

    [(2, 1, 0, '', ('172.31.8.78', 80))]
    >>> 
    

    I would document everything as a starter guide and update my own blog and also here so that it would be helpful for few others, again I appreciate the support, as a feedback this is not as easy as our testing with LoPy and looks like we cannot ship it to our end user as is for plug and play as we could with Lopy as an example, looks like there is some learning curve here, when is this expected to end, any future releases will have appropriate firmwares by default without having our on field guys to do all this

    -Rakesh



  • @Gijs said in Fipy Modem Error:

    lte=LTE(debug=True)

    >>> Connecting to /dev/tty.usbmodemPy27899a1...
    WMAC: F008D1CBCE30
    Firmware: 1.20.2.r4
    Pybytes: 1.6.1
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    Error connecting using WIFI: Connection to AP Timeout!
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    Exception connect_lte: can't convert NoneType to int
    Traceback (most recent call last):
      File "_pybytes_connection.py", line 188, in connect_lte
    TypeError: can't convert NoneType to int
    ERROR! Could not connect to Pybytes!
    Pybytes configuration read from /flash/pybytes_config.json
    Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; FiPy with ESP32
    Pybytes Version: 1.6.1
    Type "help()" for more information.
    >>> 
    >>> from network import LTE
    >>> lte=LTE(debug=True)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: Couldn't start connection to Modem (modem_state=disconnected)
    >>> 
    
    >>> print(sqnsupgrade.info())
    <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
    >>> FiPy with firmware version 1.20.2.r4
    Cannot determine modem state!
    None
    >>> 
    

    I have tried powering off and reset as well, enabled wifi



  • You might have to hard-reset the device using the reset button (or unplugging-replugging the device) to put the LTE modem back in application mode. Next, could you paste your code in codeblocks in the future, using three backticks (```) to start and end. That makes for more convenient reading.

    If that does not work, could you use lte=LTE(debug=True) and paste the output?



  • @Gijs, looks like something new, I have attached LTE antenna as well, am i missing anything here ?

    print(sqnsupgrade.info())

    FiPy with firmware version 1.20.2.r4
    Your modem is in application mode. Here is the current version:
    UE6.0.0.0
    LR6.0.0.0-41019

    lte.attach(band=20, apn="pycom.io")
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    OSError: the requested operation failed

    lte.connect()
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    OSError: modem not attached



  • Never mind, i should have downgrade the base version and then applied the Diff file. It would help if you could mention in the documentation for starters like me.



  • @Gijs Thank you for the reply. Am trying to upgrade again seeing the below message

    sd = SD()
    os.mount(sd, '/sd')
    print(os.listdir('/sd'))
    ['.Spotlight-V100', '.fseventsd', 'NB1-41019.dup', '._NB1-41019.dup', 'updater.elf', '._updater.elf', 'upgdiff_33080-to-41019.dup', '._upgdiff_33080-to-41019.dup', 'upgdiff_39529-to-41019.dup', '._upgdiff_39529-to-41019.dup', 'upgdiff_40343-to-41019.dup', '._upgdiff_40343-to-41019.dup', 'upgdiff_41065-to-41019.dup', '._upgdiff_41065-to-41019.dup']

    import sqnsupgrade
    print(sqnsupgrade.info())
    <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>

    FiPy with firmware version 1.20.2.r4
    Your modem is in application mode. Here is the current version:
    UE5.0.0.0d
    LR5.1.1.0-47510

    IMEI:
    None

    sqnsupgrade.run('/sd/upgdiff_41065-to-41019.dup')
    <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>

    FiPy with firmware version 1.20.2.r4
    Attempting AT wakeup...
    Session opened: version 1, max transfer 8192 bytes
    Sending 2427590 bytes: [########################################] 100%
    Waiting for modem to finish the update...
    This might take several minutes!
    <<<=== DO NOT DISCONNECT POWER ===>>>
    Upgrade failed with result failure[diffUpgrade,239] Patch didn't apply!
    Please check your firmware file(s)
    True

    I have made sure i downloaded the files multiple times still it gives out this error , any way forward for this, does this only mean corrupt firmware?



  • All parameters, except for the APN, should become available after a first connection. The APN should show pycom.io for the Vodafone simcard. The band is region dependent and you'll have to check the Vodafone information for that. Leaving it open is also possible, but it will take a longer time before the device is attached to the network.



  • @Gijs Thank you for the reply. Some Reason Image is not going through. Below are the details that i see

    IMEI
    n/a

    last Detected IMEI
    n/a

    APN
    n/a

    Base Country
    N/A

    First Used On
    n/a

    Has Been Active Test
    No - n/a

    Sim is Active



  • It seems like something failed while uploading the image. But the APN should be listed in a screen on this page: https://pybytes.pycom.io/sim-cards



  • @Gijs Thank you. I will update all the steps that I have taken till now. Antenna placement and SIM card placements are good as i see that in portal.

    What i dont see is the APN in the pybytes portal , were you referring to this section ?
    (/assets/uploads/files/1626084079173-screenshot-2021-07-12-at-10.59.24-resized.png) image url)



  • Please read the page carefully. Did you check the LTE modem firmware? Did you read the Pycom-Vodafone simcard FAQ? Did you check the antenna placement etc. Please elaborate in your response what you tried and what did not work so we can give you better support.

    You can find the APN and band number in the Pybytes simcard section. Please use those in the example



  • Thank you for the reply , i see it always loops between Scanning and goes back to Initial

    print(lte.send_at_cmd('AT!="fsm"'))

    print(lte.send_at_cmd('AT!="fsm"'))

    SYSTEM FSM

    +--------------------------+--------------------+
    |            FSM           |        STATE       |
    +--------------------------+--------------------+
    | RRC TOP FSM              |SCANNING            |
    | RRC SEARCH FSM           |WAIT_SCAN_DELAY     |
    | RRC ACTIVE FSM           |NULL                |
    | PMM PLMN FSM             |ANY_WAITCELL        |
    | EMM MAIN FSM             |NULL                |
    | EMM AUTH FSM             |NULL                |
    | EMM CONN FSM             |NULL                |
    | EMM TAU FSM              |NULL                |
    | EMM TEST FSM             |NULL                |
    | ESM BEARER FSM           |BEARER_NULL         |
    | SMS MT FSM               |IDLE                |
    | SMS MO FSM               |IDLE                |
    | HP MAIN FSM              |IDLE                |
    | HP USIM FSM              |READY               |
    | HP SMS MO FSM            |IDLE                |
    | HP SMS MT FSM            |IDLE                |
    | HP CAT FSM               |IDLE                |
    +--------------------------+--------------------+
    

    OK

    print(lte.send_at_cmd('AT!="fsm"'))

    SYSTEM FSM

    +--------------------------+--------------------+
    |            FSM           |        STATE       |
    +--------------------------+--------------------+
    | RRC TOP FSM              |INITIAL             |
    | RRC SEARCH FSM           |INITIAL             |
    | RRC ACTIVE FSM           |NULL                |
    | PMM PLMN FSM             |PARKING             |
    | EMM MAIN FSM             |NULL                |
    | EMM AUTH FSM             |NULL                |
    | EMM CONN FSM             |NULL                |
    | EMM TAU FSM              |NULL                |
    | EMM TEST FSM             |NULL                |
    | ESM BEARER FSM           |BEARER_NULL         |
    | SMS MT FSM               |IDLE                |
    | SMS MO FSM               |IDLE                |
    | HP MAIN FSM              |IDLE                |
    | HP USIM FSM              |READY               |
    | HP SMS MO FSM            |IDLE                |
    | HP SMS MT FSM            |IDLE                |
    | HP CAT FSM               |IDLE                |
    +--------------------------+--------------------+


  • Have a look at the example here: https://docs.pycom.io/tutorials/networks/lte/#example

    Further down the page there is also some information about troubleshooting the LTE connection


Log in to reply
 

Pycom on Twitter