Rx2 Downlink not working

  • Hi,

    I'm using cisco lorawan gateway and thingpark actility as a network server. I was able to uplink the data from node to the network server from there routing to application server through https. But, when im testing the downlink i was able to send the data to the network server from application and also able to see at the gateway also through its logs. I was using european downlink frequency RX2 869.525 Mhz with SF12 and class A. But i was not able to see the data at the Pycom Lopy Node. Please have a look at the attached code below. Let me know how to fix it if possible. I have tested for OTTA even that has failed. at network server it shows as join accept but it always stays in the infinite loop.
    @robert-hh @jmarcelino
    Thanks in advancee

    from network import LoRa
    import socket
    import binascii
    import struct
    import time
    import config
    from network import LoRa
    import ubinascii
    lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868)
    # create an ABP authentication params
    dev_addr = struct.unpack(">l", binascii.unhexlify('91B716BD'))[0]
    nwk_swkey = binascii.unhexlify('2B7E151628AED2A6ABF7158809CF4FAE')
    app_swkey = binascii.unhexlify('2B7E151628AED2A6ABF7158809CF4FAE')
    # remove all the non-default channels
    for i in range(3, 16):
    # set the 3 default channels to the same frequency
    lora.add_channel(0, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=5)
    lora.add_channel(1, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=5)
    lora.add_channel(2, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=5)
    # 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, config.LORA_NODE_DR)
    # make the socket non-blocking
    while True:
        for i in range (5):
            pkt = bytes([i])
            print('Sending:', pkt)
            rx = s.recv(256)
            print("received data:",rx)
            #print("rx : {}, port {}".format(rx,port))
            #if rx:
                #print('Received: {}, on port: {}'.format(rx, port))

  • @jcaron There is no problem with uplink channel. But i'm facing problem with downlink which is coming at channel 869.525 Mhz witjh SF12 and class A and im not able to receive at node. By the way gateway is cnfigured for all its available channels it's 16 channel gateway in which it consists of 3 uplink and 1 downlink european channel configured.

  • @prashanth note that this example is for use with a nano-gateway, which only listens on a single channel. You should be able to use the standard channels with a “real” gateway.

Log in to reply

Pycom on Twitter