Error while connecting - The requested operation is not possible

  • Hi,

    I have a Pysense board and a loPy4 with pyCom version: 1.18.1.r7

    I trying to connect to "The Things Network". and keep getting the error:
    File "<stdin>", line 28, in <module>
    OSError: the requested operation is not possible

    The line is:
    lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)

    What does that error message mean?. The Firmware is the current version.

    Thanks for help!

  • @robert-hh

    Thanks Robert! Its working now

  • @iotor said in Error while connecting - The requested operation is not possible:

    lora = LoRa(mode=LoRa.LORA, rx_iq=True, region=LoRa.EU868)

    This line should be as below, if you want to connect to a Lora network like TTN or Loriot:
    lora = LoRa(mode=LoRa.LORAWAN, rx_iq=True, region=LoRa.EU868)

  • @robert-hh

    Re: Error while connecting - The requested operation is not possible

    Of course,:

    import socket
    import time
    import ubinascii
    import pycom
    import network
    from network import LoRa
    from CayenneLPP import CayenneLPP
    from pysense import Pysense
    from LIS2HH12 import LIS2HH12
    from SI7006A20 import SI7006A20
    from LTR329ALS01 import LTR329ALS01
    from MPL3115A2 import MPL3115A2, ALTITUDE, PRESSURE
    # Initialize LoRa in LORAWAN mode.
    app_eui = ubinascii.unhexlify('70...')
    app_key = ubinascii.unhexlify('11B0282A189B75..')
    lora = LoRa(mode=LoRa.LORA, rx_iq=True, region=LoRa.EU868)
    print("DevEUI: %s" % (ubinascii.hexlify(lora.mac()).decode('ascii')))
    print("AppEUI: %s" % (ubinascii.hexlify(app_eui)))
    print("AppKey: %s" % (ubinascii.hexlify(app_key)))
    # join a network using OTAA (Over the Air Activation)
    lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)

  • @iotor Would you also show us the code related to Lora that was executed before that line.

Log in to reply

Pycom on Twitter