# SX1302 Using Semtech packet forwarder can not register the gateway

**URL:** <https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211>\
**Category:** How to get started\
**Created:** [November 9, 2020, 2:10pm UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211 "2020-11-09T14:10:33Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![haowong](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/haowong/32/36740_2.png) [@haowong](https://www.thethingsnetwork.org/forum/u/haowong)\
**Post date:** [November 25, 2020, 12:38am UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211/42 "2020-11-25T00:38:14Z")

</div>

Is it possible to solve this problem simply by changing the variable type of variable temperature in lora\_pkt\_fwd.

---

<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:** [November 25, 2020, 10:59am UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211/43 "2020-11-25T10:59:27Z")

</div>

@haowong. Changing the SX1302 UDP Packet Forwarder to send an integer rather than a float does solve the problem.

I have just tested and it works on the Meshed server.

You can use your normal global\_config.json file with this version of the packet forwarder.

> **[JoToSystems/SX1302\_UDP\_Packet\_Forwarder\_Integer\_Temperature](https://github.com/JoToSystems/SX1302_UDP_Packet_Forwarder_Integer_Temperature)**
>
> Contribute to JoToSystems/SX1302\_UDP\_Packet\_Forwarder\_Integer\_Temperature development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![haowong](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/haowong/32/36740_2.png) [@haowong](https://www.thethingsnetwork.org/forum/u/haowong)\
**Post date:** [November 25, 2020, 2:22pm UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211/44 "2020-11-25T14:22:42Z")

</div>

I believe that’s the answer to the question. Why are the designers of TTN so careless? If they have read the source code of the package forwarder, they should not have made such a mistake.

---

<div class="post-metadata">

**Author:** ![cslorabox](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cslorabox/32/35697_2.png) [@cslorabox](https://www.thethingsnetwork.org/forum/u/cslorabox)\
**Post date:** [November 25, 2020, 3:00pm UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211/45 "2020-11-25T15:00:16Z")

</div>

Please, please if you are going to create a github repo of a variation of the Semtech packet forwarder, _retain_ Semtech’s commit history (either fork it on github, or pull from Semtech’s repo and push to yours) and then make your change in a commit. This is presumably a change to a single sprintf() line - a proper commit would represent it as such.

That way it remains compatible with any _other_ changes or evolutions that may be needed.

Also posting a _binary_ does little good - presumably it’s for a raspberry pi, but?

---

<div class="post-metadata">

**Author:** ![cslorabox](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cslorabox/32/35697_2.png) [@cslorabox](https://www.thethingsnetwork.org/forum/u/cslorabox)\
**Post date:** [November 25, 2020, 3:08pm UTC](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211/46 "2020-11-25T15:08:43Z")

</div>

> [@haowong](#):
>
> If they have read the source code of the package forwarder, they should not have made such a mistake.

To be clear, the format is specified in [sx1302\_hal/packet\_forwarder/PROTOCOL.md at master · Lora-net/sx1302\_hal · GitHub](https://github.com/Lora-net/sx1302_hal/blob/master/packet_forwarder/PROTOCOL.md) which although distributed with the code is really _documentation_ not _source code_.

The important point being that you’re not supposed to have to read the code of another component in order to correctly interface with it, but only the documentation. And the documentation does say “float”.

[Previous page](https://www.thethingsnetwork.org/forum/t/sx1302-using-semtech-packet-forwarder-can-not-register-the-gateway/41211.md?page=2)
