-
@miroslav.petrov What version of firmware is your LoPy using? You can find out with this command:
import os os.uname() -
The latest.
-
@miroslav.petrov I assume you're not based in an 868 MHz region? What do you have the data rate (e.g. dr_min=0, dr_max=5) set to?
-
@bucknall
I am in Bulgaria we are using 868mhz. The data rate is set to (dr_min=0, dr_max=5) as in the example. If I change the dr_max to more than 5 I get errors. -
@miroslav.petrov in 868Mhz EU and with a multichannel gateway you can delete all the remove_channel and add_channel calls as you'll just the default channels, which match TTN's
-
@miroslav.petrov Hmm ok. Yes, the data rate you have set is correct. Can you share your abp_node.py file with your channel changes, please? If you're not using the nano-gateway, you don't need to set the channels as the gateway you are using will likely be multichannel.
-
@bucknall
I tried setting the channels with this codefrom network import LoRa import socket import binascii import struct import time # Initialize LoRa in LORAWAN mode. lora = LoRa(mode=LoRa.LORAWAN) # create an ABP authentication params dev_addr = struct.unpack(">l", binascii.unhexlify('26 XX XX AE'.replace(' ','')))[0] nwk_swkey = binascii.unhexlify('A07061XXXX60D67F3XXXX28436D001C0'.replace(' ','')) app_swkey = binascii.unhexlify('A89CE0XXXXECBCAD2F48F1XXXX6FCD81'.replace(' ','')) # join a network using ABP (Activation By Personalization) lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey)) # remove all the non-default channels for i in range(3, 16): lora.remove_channel(i) # set the 3 default channels to the same frequency lora.add_channel(0, frequency=868100000, dr_min=0, dr_max=5) lora.add_channel(1, frequency=868300000, dr_min=0, dr_max=5) lora.add_channel(2, frequency=868500000, dr_min=0, dr_max=5) lora.add_channel(0, frequency=867100000, dr_min=0, dr_max=5) lora.add_channel(1, frequency=867300000, dr_min=0, dr_max=5) lora.add_channel(2, frequency=867500000, dr_min=0, dr_max=5) lora.add_channel(0, frequency=867700000, dr_min=0, dr_max=5) lora.add_channel(1, frequency=867900000, dr_min=0, dr_max=5) # create a LoRa socket s = socket.socket(socket.AF_LORA, socket.SOCK_RAW) # set the LoRaWAN data rate s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5) # make the socket blocking s.setblocking(False) for i in range (200): s.send(b'PKT #' + bytes([1, 2, 3])) time.sleep(4) rx = s.recv(256) if rx: print(rx) time.sleep(6) exI also tried removing the channel specifications like this:
from network import LoRa import socket import binascii import struct import time # Initialize LoRa in LORAWAN mode. lora = LoRa(mode=LoRa.LORAWAN) # create an ABP authentication params dev_addr = struct.unpack(">l", binascii.unhexlify('26 XX XX AE'.replace(' ','')))[0] nwk_swkey = binascii.unhexlify('XXXXXX79F460XXXXXX8AD28436XXX1C0'.replace(' ','')) app_swkey = binascii.unhexlify('XXXXXXE33XXXXXXD2F48F1F5CDXXXD81'.replace(' ','')) # join a network using ABP (Activation By Personalization) lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey)) # create a LoRa socket s = socket.socket(socket.AF_LORA, socket.SOCK_RAW) # set the LoRaWAN data rate s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5) # make the socket blocking s.setblocking(False) for i in range (200): s.send(b'PKT #' + bytes([1, 2, 3])) time.sleep(4) rx = s.recv(256) if rx: print(rx) time.sleep(6) ex -
Do you have any suggestions?
-
I updated my LoPy to the latest firmware and go the latest nano gateway sources from Pycom from github.
The issue is still there. Gateway is connected well but node is not able to connect to TNN. The join accept messages shown in the TTN console are received but PyMakr console still shows "Not joined".
Can you please fix this issue? -
@gertjanvanhethof I have the same problem with joining by OTAA.
Strangely it works after I do a reset of the nano gateway, so:
- switch on the gateway (and wait a bit)
- switch on the node --> not joining
- reset the gateway --> now it works
I bet there is something wrong in the order the nano gateway handle things.
-
I know this is a quite old topic, but I have the same issue. It seems like the issue does still persists.
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