# Packet Forwarder: Who sets "powe" in JSON downstream txpk packet?

**URL:** <https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481>\
**Category:** Gateways\
**Created:** [February 17, 2020, 2:06pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481 "2020-02-17T14:06:10Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [February 27, 2020, 1:44pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/23 "2020-02-27T13:44:51Z")

</div>

> [@kersing](#):
>
> it addresses the issue by finding the closest match with lower power to avoid exceeding the requested power

Nice. And on Slack, @TonySmith wrote:

> Tony Smith [2020-02-27 1:40 PM](https://thethingsnetwork.slack.com/archives/C1Q5XLNDT/p1582807221026500)
> 
> > @arjanvanb its caused by an “error” in the packet forwarder. instead of finding the next lowest power in the Tx\_Lut table in the conf file, it rejects the packet. I have a fix which has been tested for about a week now. Will release soon.

First: silently fixing it by falling back to a lower (or: higher?) TX power is a great help, of course. 👍

But still, just curious: shouldn’t a network be notified about that? Rejecting a setting might allow the network to know that the gateway does not support it, which (at least in theory) might make it select another gateway next time?

(The network can infer if MAC commands have been received by validating if the next uplink uses the new settings, which TTN indeed does for ADR. But not so much for application-level downlinks.)

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [February 27, 2020, 6:05pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/24 "2020-02-27T18:05:54Z")

</div>

> [@arjanvanb](#):
>
> shouldn’t a network be notified about that?

AFAIK there is no mechanism to do so.

Keep in mind the the antenna gain in the configuration is used to chance the value provided by the backend to the actual value used to lookup the transmission parameters. By using a packet forwarder that has been ‘improved’ the gateway is perfectly able to handle the issue.

---

<div class="post-metadata">

**Author:** ![TonySmith](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tonysmith/32/46334_2.png) [@TonySmith](https://www.thethingsnetwork.org/forum/u/TonySmith)\
**Post date:** [February 27, 2020, 6:51pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/25 "2020-02-27T18:51:59Z")

</div>

There is another issue, the packet forwarder has no error checking of the Tx\_lut table which is stored in global\_conf.json file. If the entries are not in increasing order of power, the second part of the packet forwarder, (which takes the packet from a queue and passes it to the SX1301 gateway chip) can select the wrong power.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [February 27, 2020, 7:21pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/26 "2020-02-27T19:21:44Z")

</div>

In stead of error checking a simple sort would solve the issue without the need to reject the input.  
However, in 5 years working with packet forwarders I’ve never encountered that issue so the question is whether there is a need to fix anything. TTN gateways should use the TTN provided configuration anyway which has the entries in the right order.

---

<div class="post-metadata">

**Author:** ![TonySmith](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tonysmith/32/46334_2.png) [@TonySmith](https://www.thethingsnetwork.org/forum/u/TonySmith)\
**Post date:** [March 5, 2020, 8:36am UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/27 "2020-03-05T08:36:23Z")

</div>

Came across a relevant quote in another post by @htdvisser

> _Every device has the same transmit duty cycle, gateways are no exception. The TTN backend is compliant with these regulations, so in Europe we stay under the 1% duty cycle for g and g1 and under 10% for g3 . By default, **gateways transmit with maximum allowed TX power (14 for EU-868)**._

See original at [Fair Use Policy explained - #7 by jakl5749](https://www.thethingsnetwork.org/forum/t/limitations-data-rate-packet-size-30-seconds-uplink-and-10-messages-downlink-per-day-fair-access-policy-guidelines/1300/7)

So wonder if this approach has changed or something has slipped through in the updates to the TTN server.

@kersing, I also went back and reread the LoraWan Regional parameters and agree, they seem to be written from a Node’s perspective.

---

<div class="post-metadata">

**Author:** ![hobo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/hobo/32/25844_2.png) [@hobo](https://www.thethingsnetwork.org/forum/u/hobo)\
**Post date:** [March 5, 2020, 7:53pm UTC](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481/28 "2020-03-05T19:53:32Z")

</div>

> [@TonySmith](#):
>
> By default, **gateways transmit with maximum allowed TX power (14 for EU-868)**.

27 for g3, where 10% DC is allowed.

[Previous page](https://www.thethingsnetwork.org/forum/t/packet-forwarder-who-sets-powe-in-json-downstream-txpk-packet/34481.md?page=1)
