-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent end device settings and defaults #47
Comments
I could really use this info, as I am momentarily working on devices CRUD. I am wondering what options we should provide in the console when creating devices. From the getting started guide, I see the following options set when creating devices: |
@kschiffer great, looking forward to Console support. Please have a look at how the CLI does it; https://github.com/TheThingsNetwork/lorawan-stack/blob/master/cmd/ttn-lw-cli/commands/end_devices.go#L234-L313. Also, here's how the CLI currently splits fields for components: https://github.com/TheThingsNetwork/lorawan-stack/blob/master/cmd/ttn-lw-cli/commands/end_devices_split.go. Looping in @rvolosatovs to coordinate consistency for CLI and Console, as well as commenting on NS behavior for defaults as filed in #60. |
In #101 I moved most of NS-related defaults from CLI to NS lorawan-stack/pkg/networkserver/grpc_deviceregistry.go Lines 62 to 65 in 348ac03
Of course, besides these 4 there also must be valid Device/Application IDs and Join/Dev EUIs For the rest, if unspecified, NS will assume a sane default. Some defaults will be added to The console should not send any "default" settings to NS - only the things that user explicitly chooses(e.g. ADR margin - by default, console should not send anything. I user sets it to X - only then X is sent) Also, note that in #101 the API for |
@rvolosatovs what is the status here and what is the impact for the Console in terms of required fields? |
Required fields for: lorawan-stack/pkg/networkserver/grpc_deviceregistry.go Lines 169 to 172 in e35ce50
b) if supports_class_b == true (Class B device)lorawan-stack/pkg/networkserver/grpc_deviceregistry.go Lines 188 to 190 in e35ce50
c) if supports_join == false || specified(session) (ABP device or OTAA device with existing session)lorawan-stack/pkg/networkserver/grpc_deviceregistry.go Lines 209 to 210 in e35ce50
d) if (supports_join == false || specified(session)) && lorawan_version >= 1.1 (LoRaWAN 1.1+ ABP device or OTAA device with existing session)lorawan-stack/pkg/networkserver/grpc_deviceregistry.go Lines 222 to 223 in e35ce50
The resulting set of required fields is a function on the device. |
@rvolosatovs for completeness can you update your comment with the AS and JS fields? |
How would this be obtained using the SDK/console? @johanstokking |
This would be a new rpc in |
Summary:
Help CLI and Console users a bit by filling boilerplate for devices.
Why do we need this?
The CLI and Console would be very unfriendly if (for example) you'd had to generate keys with openssl and then copy-paste them. Better to let the CLI and Console generate those and other boilerplate.
Also, we need a consistent set of defaults in the CLI and Console to avoid user confusion.
What is already there? What do you see now?
The CLI sets some sane defaults; i.e. ADR on, 32-bit frame counters enabled, OTAA by default. See the up-to-date settings in
cmd/ttn-lw-cli/commands/end_devices.go
.What is missing? What do you want to see?
How do you propose to implement this?
Original issue: https://github.com/TheThingsIndustries/lorawan-stack/issues/1392 by @htdvisser
The text was updated successfully, but these errors were encountered: