Setting PyGate Downlink TX power to default

  • Hello everyone,

    Recently received my PyGate unit, which I am trying to get working alongside a couple of Laird RG1XX Gateways. However, there is some discrepancy regarding the max TX power of each GW which I have not been able to solve.

    Basically, I want each GW to transmit at the max possible TX power. For the PyGate, this is 20 dBm, but for the Laird units, this is 28 dBm. I am using Chirpstack, and within the loraserver.toml config file I can select the downlink TX power. Currently, I have it set to 28 dBm through the downlink_tx_power parameter. Unfortunately, I cannot select the TX power on a per-GW from the Chirpstack server. downlink_tx_power is a global setting.

    This poses the problem: when downlinks are scheduled by the server through the PyGate, the PyGate refuses to transmit because 28 dBm is not a valid power setting. I get the following messages:

    [567803149] lorapf: INFO_ [down] a packet will be sent in "immediate" mode
    [567803149] lorapf: ERROR [down] Packet REJECTED, unsupported RF power for TX - 28
    [567809630] lorapf: INFO_ [up  ] received pkt from mote: 95ED56B1 (fcnt=36922/903A), RSSI -45.0 
    [567809633] lorapf: WARN_ [up  ] ignored out-of sync PUSH_ACK packet buff_ack[0:6] != token[0:8][567809685] lorapf: WARN_ [up  ] PUSH_ACK recieve timeout 1
    [567814065] lorapf: INFO_ [main] report
    ##### 2020-08-24 19:00:48 GMT #####
    ### [UPSTREAM] ###
    # RF packets received by concentrator: 2
    # CRC_OK: 50.00%, CRC_FAIL: 50.00%, NO_CRC: 0.00%  
    # RF packets forwarded: 1 (20 bytes)
    # PUSH_DATA datagrams sent: 2 (313 bytes)
    # PUSH_DATA acknowledged: 0.00%
    ### [DOWNSTREAM] ###
    # PULL_DATA sent: 3 (100.00% acknowledged)
    # PULL_RESP(onse) datagrams received: 1 (176 bytes)
    # RF packets sent to concentrator: 0 (18 bytes)    
    # TX errors: 0
    ### [JIT] ###
    [jit] queue is empty
    ### [GPS] ###
    # GPS sync is disabled
    ##### END #####

    This makes sense, but is there a way to locally, within the PyGate software, configure the TX power so that it will default to the max (20 dBm) when receiving an invalid TX power setting?



    CC: @Gijs do you think you could weigh in on this? I am sorry to bother.

  • Another solution to this which seems a lot cleaner IMO is to change the antenna gain in the config.json file such that when the system substracts the commanded TX power (coming from the server) with the antenna gain, it finds a valid RF power in the lookup table. So in my case, if I set the antenna gain to 8 dBi, then the server would go and find the parameters corresponding to 20 dBm (which is tx_lut_11):

    "tx_lut_11": {
                "pa_gain": 3,
                "mix_gain": 9,
                "rf_power": 20,
                "dig_gain": 0

    This was suggested to me by Tony over on the Chirpstack forum:

    Thanks Tony!

  • So this is kind of a hacky fix, but I modified the TX power lookup table in the config.json file in order to make this work. Specifically, I changed the rf_power param from 20 to 28 in the tx_lut_15 key, like so:

            "tx_lut_15": {
                "pa_gain": 0,
                "mix_gain": 12,
                "rf_power": 28,
                "dig_gain": 3

    Now, I am not sure how to verify if I am in fact transmitting at 20 dBm (the Pygate's max)... Any ideas on how to verify this? Is this a viable fix for the functionality I require?

    Thanks all!



Pycom on Twitter