• AS923 Class C not working?

    LoPy lora lopy lorawan asia class c
    9
    0 Votes
    9 Posts
    2k Views
    H
    @oligauc Can you tell what is wrong with this code then: from network import LoRa import socket import binascii import settings import sys import time import pycom LORA_FREQUENCY = 923000000 LORA_FREQ_ADD = 20000 LORA_GW_DR = "SF10BW125" LORA_NODE_DR = 2 # initialize LoRa in LORAWAN mode. # Please pick the region that matches where you are using the device: # Asia = LoRa.AS923 # Australia = LoRa.AU915 # Europe = LoRa.EU868 # United States = LoRa.US915 lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.AS923, device_class=LoRa.CLASS_C) # create an OTA authentication params dev_eui = binascii.unhexlify('70b3d5499da97f9c') app_eui = binascii.unhexlify('ADA4DAE3AC12676B') app_key = binascii.unhexlify('11B0282A189B75B0B4D2D8C7FA38548B') # set the 3 default channels to the same frequency (must be before sending the OTAA join request) print('Adding channels') lora.add_channel(0, frequency=923200000, dr_min=0, dr_max=5) #join a network using OTAA print('Joining...') lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0, dr=LORA_NODE_DR) #lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0) # wait until the module has joined the network while not lora.has_joined(): time.sleep(2.5) print('Not joined yet...') print('Joined') # remove all the non-default channels print('Removing other channels') for i in range(1, 16): lora.remove_channel(i) # 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, LORA_NODE_DR) #test set unconfirmed. s.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, 0) # make the socket blocking s.setblocking(False) time.sleep(5.0) pkt = b'PKT #' + bytes([i]) print('Sending:', pkt) s.send(pkt) time.sleep(4) print('Listening...') while True: rx, port = s.recvfrom(256) if rx: print('Received: {}, on port: {}'.format(rx, port)) time.sleep(1)
  • 0 Votes
    3 Posts
    978 Views
    A
    Hello @jmarcelino I have currently set up a nano gateway and several nodes (with LoPy) on the 868MHz using the EU868. From what I understand, AS923 is supposed to be used, but there are no strict regulations on the frequencies around 868MHz as of today. It would be better to work on the 923MHz frequency, thus I am currently wondering if anyone has gotten any success on 923MHz, or AS923. When I tried to replicate the EU868 to the AS923, I couldn't get the TTN to display any values other than a random value to pop up only once. I was wondering if anyone with success or failures can share their experience. [image: 1519737904112-lopy-resized.png]
  • Use LoPy in ASIA

    LoPy lopy asia frequency
    5
    0 Votes
    5 Posts
    1k Views
    K
    @bmarkus I found out that Thailand is using 920-950Mhz bands while The Thing Network Propose Cambodia to use AS923-925Mhz (AS2) so 915Mhz bands could be used.