Create device with API defaults to ABP mode

Hi everyone

creating a device using POSTMAN and API with this JSON to the V3 community server:
endpoint: https://eu1.cloud.thethings.network/api/v3/applications/myappid/devices
method: POST
{
“end_device”:{
“multicast”:false,
“supports_join”:true,
“lorawan_version”:“MAC_V1_0_2”,
“lorawan_phy_version”:“PHY_V1_0_2_REV_B”,
“supports_class_c”:false,
“supports_class_b”:false,
“frequency_plan_id”:“EU_863_870_TTN”,
“name”: “0000056b”,
“description”:“0000056b”,
“ids”:{
“device_id”:“0000056b”,
“dev_eui”:“A81758FFFE04456B”,
“join_eui”:“70B3D57ED0035800”
},
“mac_settings”:{
“rx1_delay”: “RX_DELAY_5”,
“supports_32_bit_f_cnt”:true
}
}
}
THE ANSWER:
{
“ids”: {
“device_id”: “0000056b”,
“application_ids”: {
“application_id”: “myappid”
},
“dev_eui”: “A81758FFFE04456B”,
“join_eui”: “70B3D57ED0035800”
},
“created_at”: “2021-10-03T07:24:44.696Z”,
“updated_at”: “2021-10-03T07:24:44.696Z”,
“name”: “0000056b”,
“description”: “0000056b”,
“version_ids”: {}
}

it works and creates a device, but later in console i can see that the activation mode it is ABP and this setting it is Locked. does anyone know which is the cause?, despite ABP it is not encouraged and “supports_join”:true is sent, why it is registered as ABP?

Regards

End devices need to be registered in multiple places, and it looks like you only registered in one place (which doesn’t actually store the supports_join field).

Take a look at https://www.thethingsindustries.com/docs/reference/api/end_device/; that page should tell you which fields to send where.

In case you haven’t already, you should probably also read these documentation pages:

I’ve already read this many times, also tested to register in:
https://eu1.cloud.thethings.network/api/v3/ns/myappid/devices
https://eu1.cloud.thethings.network/api/v3/js/myappid/devices

in that case the answer i’ve got is:

{
“code”: 12,
“message”: “Not Implemented”
}

Have you found the solution for this? could you share the body of a sample request?

I would look at the json built by the web UI using the browser inspect option from the right click menu. The network tab will show the API call and JSON data.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.