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

possibility to choose for abp or otaa device activation (when registering device) #83

Closed jirikrepl closed 3 years ago

jirikrepl commented 6 years ago

Hi, is it possible to register device with abp activation mehtod (otaa is set by default)?

I am looking at application.registerDevice() method but it seems to be that choosing activation method is not supported

I don't see it defined DeviceUpdates type which registerDevice() method is using https://github.com/TheThingsNetwork/node-app-sdk/blob/327c3ea997fdbe7f04e832676ae84fb6d83c6d3c/src/applications/types.js#L82

thank you;)

johanstokking commented 6 years ago

Devices are registered as "OTAA" by default, as in, they don't have a session associated. You can personalize a device to create a new session, i.e. use that session for ABP. It seems that this personalize call is not exposed by the Node.js SDK...