# Create new End-node with special MAC settings via API

**URL:** <https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481>\
**Category:** The Things Stack v3\
**Created:** [February 3, 2025, 1:12pm UTC](https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481 "2025-02-03T13:12:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnyland](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/n/4af34b/32.png) [@nnyland](https://www.thethingsnetwork.org/forum/u/nnyland)\
**Post date:** [February 3, 2025, 1:12pm UTC](https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481/1 "2025-02-03T13:12:13Z")

</div>

Hi,  
I’d like to know if there is a way to set some specific MAC settings values when creating a new node on my application.

I’ve tried to follow the logic from this post: [Register device The Things Stack v3 API](https://www.thethingsnetwork.org/forum/t/register-device-the-things-stack-v3-api/51816)  
together with the docs: [Network Server APIs | The Things Stack for LoRaWAN](https://www.thethingsindustries.com/docs/api/reference/grpc/network_server/#enum:RxDelay)

but no success so far.  
This is what is sent to the NS server when creating the node:

```auto
{
    "end_device": {
        "frequency_plan_id": "EU_863_870_TTN",
        "ids": {
            "dev_eui": "0080XXXXXXXXXXXX",
            "device_id": "new-node-test",
            "join_eui": "FAXXXXXXXXXXXXXX"
        },
        "lorawan_phy_version": "PHY_V1_0_3_REV_A",
        "lorawan_version": "MAC_V1_0_3",
        "mac_settings": {
            "rx1_delay": "RX_DELAY_1"
        },
        "supports_join": true
    },
    "field_mask": {
        "paths": [
            "supports_join",
            "lorawan_version",
            "ids.device_id",
            "ids.dev_eui",
            "ids.join_eui",
            "lorawan_phy_version",
            "frequency_plan_id",
            "mac_settings.rx1_delay"
        ]
    }
}

```

and this is what I get back:

```auto
{
    "created_at": "2025-02-03T12:52:36.534465003Z",
    "frequency_plan_id": "EU_863_870_TTN",
    "ids": {
        "application_ids": {
            "application_id": "test-app"
        },
        "dev_eui": "0080XXXXXXXXXXXX",
        "device_id": "new-node-test",
        "join_eui": "FAXXXXXXXXXXXXXX"
    },
    "lorawan_phy_version": "PHY_V1_0_3_REV_A",
    "lorawan_version": "MAC_V1_0_3",
    "mac_settings": {
        "rx1_delay": 1
    },
    "supports_join": true,
    "updated_at": "2025-02-03T12:52:36.534465003Z"
}

```

But when I look into the settings of the created device, I find the “Desired Rx1 delay” set to its default value 5s, instead of 1s.

Am I doing something wrong? How could I set the Desired Rx1 delay settings to 1 second, via API?

Many thanks in advance,  
Nathan

---

<div class="post-metadata">

**Author:** ![jezd](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jezd/32/46461_2.png) [@jezd](https://www.thethingsnetwork.org/forum/u/jezd)\
**Post date:** [February 4, 2025, 10:36am UTC](https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481/2 "2025-02-04T10:36:06Z")

</div>

Check out here\>

[https://www.thethingsindustries.com/docs/hardware/devices/configuring-devices/mac-settings/](https://www.thethingsindustries.com/docs/hardware/devices/configuring-devices/mac-settings/)

I suspect TTN V3 network side insists on initial value of 5 seconds, requested changes happen only as part of join/rejoin process - ie you can request a desired change.

" The Things Stack configures the `Rx1Delay` to 5 seconds by default to accommodate for high latency backhauls and/or peering with Packet Broker, so this is the recommended configuration"

Perhaps this overrides values on creation - have you tried creating via the admin page and import a json file to see if the same things happens?

---

<div class="post-metadata">

**Author:** ![nnyland](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/n/4af34b/32.png) [@nnyland](https://www.thethingsnetwork.org/forum/u/nnyland)\
**Post date:** [February 4, 2025, 1:41pm UTC](https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481/3 "2025-02-04T13:41:25Z")

</div>

Hi jezd,

your answer gave me an idea, which at the end helped me finding the issue.  
I’ve tried the export tool from TTS to export my own end-node created manually,  
to verify how the output JSON looks like.

From that, I noticed that not only the “rx1\_delay” must be defined, but also the “desired\_rx1\_delay”. By adding it to the request, I was able to create the node via REST API with this setting set to any other value than the default one.

Best Regards,  
Nathan

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [February 5, 2025, 1:42pm UTC](https://www.thethingsnetwork.org/forum/t/create-new-end-node-with-special-mac-settings-via-api/70481/4 "2025-02-05T13:42:28Z")

</div>

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