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 possibleThe 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!
-
@iotor Would you also show us the code related to Lora that was executed before that line.
-
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) -
@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) -
Thanks Robert! Its working now
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