Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Error while connecting - The requested operation is not possible

    Scheduled Pinned Locked Moved LoPy
    lopy4connect issues
    5 Posts 2 Posters 694 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      ioTor
      last edited by

      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-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @ioTor
        last edited by

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

        I 1 Reply Last reply Reply Quote 0
        • I Offline
          ioTor @robert-hh
          last edited by

          @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
          
          pycom.heartbeat(True)
          
          # 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)
          
          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @ioTor
            last edited by robert-hh

            @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)

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              ioTor @robert-hh
              last edited by

              @robert-hh

              Thanks Robert! Its working now

              1 Reply Last reply Reply Quote 0

              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
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom