How to get a DevAddr to register ABP device through REST API?

I have registered two devices with the TTN network with ABP. I am currently using TTIG gateway. Device 1 was registered via the TTN Console where I let TTN generate most of the key fields, and Device 2 was registered via the REST API.

I can see both devices in my Console correctly assigned to my application. Everything appears to be correct (both using ABP, generated keys, etc.). When I submit packets from both devices, I do see traffic on the Gateways tab for my Gateway from both devices; however, I only see Data on the Devices tab from the TTN Console Device and not the REST API device.

Is there something I’m missing in the REST API that needs to be sent across that the Console is sending? I’m happy to paste my JSON. Thanks.

So I somewhat figured it out, but I still have some questions. I was generating a DevAddr and needed to start with 0x26 as the first byte so that it could be routed to TTN; however, I thought I could randomly generate the next 3 bytes, but it didn’t work.

If I use the same DevAddr assigned by a console created device, then the traffic gets routed to my Rest API device; however, if I prefix 0x26 and randomly create the next 3 bytes, it does not get routed to TTN. Is there some way I can generate the DevAddr or does it really matter since I am using the same DevAddr now?

There’s more to that:

Within TTN, we assign device address prefixes to “regions” (for example, device addresses in the eu region start with 0x2601). Within a region, the NetworkServer is responsible for assigning device addresses. We are using prefixes here too for different device classes (for example, ABP devices in the eu region start with 0x26011) or to shard devices over different servers.

I don’t think you can generate a DevAddr yourself. From the same documentation, emphasis mine:

The NetworkServer assigns device addresses to devices (based on configuration). For ABP devices you have to request an address from the NetworkServer (the console or ttnctl will do this for you). For OTAA devices, the NetworkServer will assign an address when the device joins.

1 Like

Bummer. I want to use OTAA; however, there are some timing issues with LMIC for my hardware (and various other Arduino variants as well), so I’m stuck with ABP for now. I guess I’ll just grab some generated dev addresses via the console for short-term and pool those on my backend.