ValueError: frequency 903900000 out of range



  • I searched the forums and didn't find an answer. I have two FiPys flashed with "PyCom Firmware Updater" on Mac to latest firmware for US. os.uname() shows: (sysname='FiPy', nodename='FiPy', release='1.16.0.b1', version='v1.8.6-849-055728a on 2018-02-13', machine='FiPy with ESP32', lorawan='1.0.0', sigfox='1.0.1')

    I've run through the LoRa examples with success but I'm trying the nano-gateway example and seeing this error:

    [  2789.768] Opening UDP socket to us-west.thethings.network (13.66.229.235) port 1700...
    [  2789.781] Setting up the LoRa radio at 903.9001 Mhz using SF7BW125
    Traceback (most recent call last):
      File "main.py", line 19, in <module>
      File "nanogateway.py", line 167, in start
    ValueError: frequency 903900000 out of range
    

    Thoughts?



  • it works after i change it to region=LoRa.AS923

    thanks!



  • @jmarcelino hello. i am also facing the same problem.

    ValueError: frequency 922000000 out of range

    i tried to add region=LoRa.AS920 to the nanogateway.py line 161 but it show:

    Traceback (most recent call last):
      File "main.py", line 19, in <module>
      File "/flash/lib/nanogateway.py", line 169, in start
    AttributeError: type object 'LoRa' has no attribute 'AS920'
    MicroPython v1.8.6-849-055728a on 2018-02-13; LoPy with ESP32
    

    what should i add? please advice. thank you



  • @ssmith @semireg
    Yes I'm afraid we took a narrow view of the specification (which does suggest Joins should be done on either DR=0 or DR=4 at least for US) on the latest release.

    Quoting from the spec: "it is recommended that the end-device transmit the JoinRequest message alternatively on a random 125 kHz channel amongst the 64 channels defined using DR0 and a random 500 kHz channel amongst the 8 channels defined using DR4"

    We'll change it back to allow join at any datarate for US915 as the specification only recommends it, it's not mandatory.

    For now please use DR0 or DR4 for joins in US915.



  • @semireg Try DR=0 or DR=4 for the join. 3 doesn't work anymore.



  • That did the trick for that error. Now I'm seeing another in the node.

      File "main.py", line 39, in <module>
    ValueError: invalid join data rate 3
    

    Strange, though, the line numbering is off.

    0_1519175216747_2018-02-20 at 7.06 PM.jpg

    Anyways, if I remove the dr=LORA_NODE_DR line I don't receive errors, but the node seems locked up. CTRL-C doesn't interrupt to a REPL. If I press reset button I can immediately CTRL-C to get to a REPL. Hmmm... It seems to hang on the first join:

    # join a network using OTAA
    lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0)
    

    In a somewhat related question. I can't get the gateway to connect. Why is the TTN server's port specified as 1700 in the example, but TTN's website lists it as port 1901? Is it the difference between UDP/TCP, respectively?

    0_1519177548240_2018-02-20 at 7.44 PM.jpg



  • @semireg
    Could you add region=LoRa.US915 to the LoRa initialisation calls in nanogateway.py line 161 please? Your board may not be picking its default location correctly on the new "global" firmware 1.16.

    Change (line 161)

            self.lora = LoRa(
                mode=LoRa.LORA,
                frequency=self.frequency,
                bandwidth=self.bw,
                sf=self.sf,
                preamble=8,
                coding_rate=LoRa.CODING_4_5,
                tx_iq=True
            )
    

    to

            self.lora = LoRa(
                mode=LoRa.LORA,
                frequency=self.frequency,
                bandwidth=self.bw,
                sf=self.sf,
                preamble=8,
                coding_rate=LoRa.CODING_4_5,
                tx_iq=True, 
                region=LoRa.US915
            )
    

    Thanks.


Log in to reply
 

Pycom on Twitter