API V3 Network Server setting parameters

Hi!

We are developing an application which registers new devices on the V3 console automatically. We are able to set the basic parameters on the Identity Server, like the ID, name, AppEUI and DevEUI using the EndDeviceRegistry service.

The problem comes when trying to set parameters on the Network server, such as LoRaWAN version, regional parameters version and frequency plan. When we GET from the NsEndDeviceRegistry the server returns OK and basic EndDeviceRegistry parameters, but none of the set NS parameters. When we PUT to the NS server with the required parameters, the server again returns OK, but the parameters are not set in the console.

Does the current API support setting the network server parameters? Is there anything we are missing? Thanks.

The console uses the API. May-be take a look at the calls the console makes when adding a device using your browsers developer mode?

Yes, we did precisely this to get the call for the EndDeviceRegistry. For the network server though, the parameters are not present in any of the calls, even though they get updated in the console.

EDIT: I tried it again and I can see some of the parameters, I will update the results later.

It works for me - somewhere on this forum I’ve done this for Python or PHP which is just the delivery mechanism, the JSON & API calls are the same: Registering a sensor in an TTN application via API - #33 by descartes

You may need to understand the difference between the different fields: https://www.thethingsindustries.com/docs/devices/mac-settings/

This may be of help: https://www.thethingsindustries.com/docs/getting-started/api/#multi-step-actions

I know this issue is resolved but I have a similar issue. I wanted to update the mac_settings field of my end device precisely the status_time_periodicity and the status_count_periodicity

I am using PUT request in python. Although I don’t get any error, those parameters never get updated. Any help will be appreciated.

I am using these parameters.
networkServer = {“ids”: {“device_id”: device_id},
“mac_settings”: {“status_time_periodicity”: “0s”, “status_count_periodicity”: None},
“field_mask”: {
“paths”: [
“mac_settings.status_time_periodicity”,
“mac_settings.status_count_periodicity”
]
}}

From the doucmentation, I noticed the data type for status_time_periodicity and status_count_periodicity are google.protobuf. Duration and google.protobuf. UInt32Value respectivelly. How do I assign such values in python in case those are the reasons my end device is NOT updated?

Also, in my url, I have include field_mask for only mac_settings because this is the only field I want to update.
Thank you.