# Data received in Gateway but not in Application \[no brokers\]

**URL:** <https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121>\
**Category:** v2 Backend\
**Created:** [October 25, 2018, 1:45pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121 "2018-10-25T13:45:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![IoTeeLab-AU-CBD](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@IoTeeLab-AU-CBD](https://www.thethingsnetwork.org/forum/u/IoTeeLab-AU-CBD)\
**Post date:** [October 25, 2018, 1:45pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/1 "2018-10-25T13:45:17Z")

</div>

Hi guys,

We have a LoRaWAN device that is using ABP.  
We have created an application, where we added the device and set:

- DevAddr
- AppSKey
- NwkSKey  
As they were given by the device manufacturer.

We can see data coming from the device in the gateway, but it never gets routed to the application. In the gateway we can see the following:

![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/4/7/47de177e925157d5cf3b91d39b0c0b0e363e6e59.png)

Any help will be highly appreciated!

/Szabolcs

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [October 25, 2018, 2:04pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/2 "2018-10-25T14:04:42Z")

</div>

’ If a manufacturer puts fixed DevAddr/NwkSKey/AppSKey in a device without giving the customer the ability to change those, they either don’t know what they’re doing or they don’t really care about the customer or they try to create some kind of lock-in to their own network.’

- [Can I register an ABP device that has fixed DevAddr, NwkSKey and AppSKey?](https://www.thethingsnetwork.org/forum/t/can-i-register-an-abp-device-that-has-fixed-devaddr-nwkskey-and-appskey/3831/16)

_ **all** TTN device addresses will start with `0x26` or `0x27` if not they are 'dropped and that’s what you see_

---

<div class="post-metadata">

**Author:** ![IoTeeLab-AU-CBD](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/d2c977/32.png) [@IoTeeLab-AU-CBD](https://www.thethingsnetwork.org/forum/u/IoTeeLab-AU-CBD)\
**Post date:** [October 25, 2018, 8:02pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/3 "2018-10-25T20:02:43Z")

</div>

Thanks for your response.

What can we do in this case, to receive data from the sensor?  
Change the DevAddr to something with 0x26 / 0x27 or switch over to OTAA?

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [October 25, 2018, 8:07pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/4 "2018-10-25T20:07:26Z")

</div>

> [@IoTeeLab-AU-CBD](#):
>
> to receive data from the sensor?

ask the manufacturer … _but I think in general that devices with fixed DevAddr/NwkSKey/AppSKey are useless_

---

<div class="post-metadata">

**Author:** ![SensoneoBA\_SVK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sensoneoba_svk/32/25844_2.png) [@SensoneoBA\_SVK](https://www.thethingsnetwork.org/forum/u/SensoneoBA_SVK)\
**Post date:** [October 29, 2018, 12:53pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/5 "2018-10-29T12:53:32Z")

</div>

> [@BoRRoZ](#):
>
> t they are 'dropped and that’s what you see

Dear BoRRoZ,

I am representing the manufacturer in this case. This is just second time we work with customer using TTN therefore please apologize my maybe not well educated questions.

For this specific devices we have bought our own prefix from IEEE (4.5 bytes) and we auto-generate the rest of the **DEVEUID** (3.5bytes) by incrementing.

**DevAdr** is always the last 4 bytes of DEV EUID.  
Net and App keys are for the ABP mode autogenerated from the DEV EUID by our own secure algorithm.

We do this to make sure we are able to produce high amount of devices by sequence flashing of the devices at the production lines. To do manual change of DevAddr or Keys based on the keys generated by TTN server is simply not reasonable.

When it comes to “allowing” customers to change the keys and dev address, could you please advise how the other vendors do it? On other devices we have ability to do via bluetooth anything but there is nothing like that on this device.

Thank you for your advice in advance.

Martin

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [October 29, 2018, 4:17pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/6 "2018-10-29T16:17:15Z")

</div>

> [@SensoneoBA\_SVK](#):
>
> On other devices we have ability to do via bluetooth anything but there is nothing like that on this device.

what device are we actually talking about ?

---

<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:** [October 29, 2018, 6:58pm UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/7 "2018-10-29T18:58:40Z")

</div>

> [@SensoneoBA\_SVK](#):
>
> **DevAdr** is always the last 4 bytes of DEV EUID.

You cannot do that: the DevAddr should be assigned by the operator, not by the manufacturer.

A DevAddr as assigned by TTN will always start with `0x26` or `0x27`, and for TTN the next bytes indicate other details such as the region; see [https://www.thethingsnetwork.org/docs/lorawan/address-space.html](https://www.thethingsnetwork.org/docs/lorawan/address-space.html) Again, a manufacturer cannot assign those addresses.

Rather than hardcoding ABP details, a manufacturer could assign all details needed for OTAA though.

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [October 30, 2018, 9:09am UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/8 "2018-10-30T09:09:10Z")

</div>

I think there isn’t anything to add to @arjanvanb’s answer. TTN’s official recommendation is to use OTAA unless you have an extremely good reason not to. If your devices are currently incapable of doing OTAA I would definitely recommend implementing that, it will save you a lot of trouble in the future.

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [October 30, 2018, 9:09am UTC](https://www.thethingsnetwork.org/forum/t/data-received-in-gateway-but-not-in-application-no-brokers/19121/9 "2018-10-30T09:09:14Z")

</div>


