TheThingsArchive / node-app-sdk

The Things Network Application SDK for Node.JS
https://www.thethingsnetwork.org/docs/node-js/
MIT License
41 stars 28 forks source link

can I generate a proper devAddr with the API? #79

Closed braadworst closed 6 years ago

braadworst commented 6 years ago

I am working with the API to register a device, application.registerDevice just like in the examples. But I am stuck with the devAddr. According to the docs: https://www.thethingsnetwork.org/wiki/LoRaWAN/Address-Space there is a format to follow.

Now I need a devAddr for Indonesia and ABP. I am not sure how todo that, I would expect that I could generate that from the API.

How do I go about doing this? Furthermore, any following bytes after the ABP byte can they be anything, or is there are pattern as well?

Cheers,

Braadworst

johanstokking commented 6 years ago

Yes, your assumptions are correct. The Broker/NS issues a DevAddr, and we have an API for this available to support ABP.

Looping in @romeovs to see if this API is exposed or how to expose it. https://github.com/TheThingsNetwork/api/blob/master/protocol/lorawan/DevAddrManager.md

romeovs commented 6 years ago

The API is currently not exposed trough the node-app-sdk but it should be quite trivial to add it.

johanstokking commented 6 years ago

@braadworst @noerw any chance you can make a PR?

braadworst commented 6 years ago

Not right now. Need to do some preparing for field testing in january. It is not my highest prio either. Just want to have the right address for ttn. But it seems to work now too.

On 22 Dec 2017 21:33, "Johan Stokking" notifications@github.com wrote:

@braadworst https://github.com/braadworst @noerw https://github.com/noerw any chance you can make a PR?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheThingsNetwork/node-app-sdk/issues/79#issuecomment-353599215, or mute the thread https://github.com/notifications/unsubscribe-auth/ACkBVvS_s242LXvq1BqMsPzmLwmUNV1aks5tC6-mgaJpZM4Q8jv_ .

romeovs commented 6 years ago

Fixed by #82