How to claim a new TTIG in V3 using API?

Hi,

I am trying to register a new TTIG using the API. That appears to work, and the device DOES show up in the console but it never changes from the Disconnected state (I did manually add the Gateway Server Address). The device shows a green LED, so I assume IT thinks it is connected properly. To the wrong server maybe?

If I configure a new device from the console all is well.

Any suggestions as of what I might be missing?

Cheers,

Erwin

This is the CLI command I executed:

erwin@Erwins-Macbook ~ % ttn-lw-cli gateways claim 58A0CBFFFEABCDEF --authentication-code 12345678 --user-id ehogeweg --target-gateway-id a-target-gateway-id --target-frequency-plan-id US_902_928_FSB_2 --target-cups-uri https://nam1.cloud.thethings.industries:443

This is the response:

{
“gateway_id”: “a-target-gateway-id”,
“eui”: “58A0CBFFFEABCDEF”
}

All I see in the live Data are a few “Update gateway” msgs. with the following details:
> {
> “name”: “gateway.update”,
> “time”: “2021-08-06T21:10:06.189875367Z”,
> “identifiers”: [
> {
> “gateway_ids”: {
> “gateway_id”: “a-target-gateway-id”
> }
> }
> ],
> “context”: {
> “tenant-id”: “CgN0dG4=”
> },
> “visibility”: {
> “rights”: [
> “RIGHT_GATEWAY_INFO”
> ]
> },
> “unique_id”: “01FCEMTF3D2KZW5S0F9TKXYFNV”
> }

You’ll need to powercycle the gateway or wait for 24 hours until it connects to the configuration server and pick up the new configuration.

Thanks Krishna,

It’s been 4 days now… should have been enough time. I truly believe I bricked it by forgetting to add the server gateway address in the ttn-lw-cli command. This was a brand new device, right out of the box.

If anyone has any ideas to recover this device and/or stick the proper server gateway in there it would be appreciated.

Cheers,

Erwin

I truly believe I bricked it by forgetting to add the server gateway address in the ttn-lw-cli command.

You can update this field at any time. In the WiFi configuration window of your gateway, can you check what is the Firmware version?

Sure. It is 2.0.4.

Erwin

Ok then all you have to do is to set the gateway-server-address in the console and restart the gateway and it will connect.

Hi Krishna,

Thanks for your help again. That didn’t work. The command executed successfully but the gateway still doesn’t connect.

% ttn-lw-cli gateway --gateway-id my-gateway-id set --gateway-server-address nam1.cloud.thethings.network
    {
      "ids": {
        "gateway_id": "my-gateway-id"
      },
      "created_at": "2021-08-06T17:49:12.581Z",
      "updated_at": "2021-08-11T11:51:21.301Z",
      "version_ids": {

      },
      "gateway_server_address": "nam1.cloud.thethings.network"
    }

All I see in the activity window is: "Update gateway [“gateway_server_address”].

The device ‘thinks’ it is connected but TTN console still says disconnected.

Cheers,

Erwin

Ok can you reset your device? Hold the Reset button for 5 seconds until a RED blinking LED and setup the WiFi again. That should fix any corrupted configuration.

That should fix any corrupted configuration.

Should is the magic word here… Done that many times already, and just did it again. Doesn’t seem to make any difference.

Should I delete it and try to re-claim? Would that work?

Erwin

Sure. You can re-claim it without having to delete it.

Sorry, I missed your reply.

I tried that, both w/o and w/ deleting it. After I deleted it I re-claimed it with a new ID, just to avoid any confusion. Device still show as not connected in console and/but shows a solid greed LED on the device itself.

I did power cycle it.

Erwin

OMG, It worked! I went through the whole factory reset thing one more time and this time it did do the update thing and then it showed up on the console…

See, the definition of insanity, try the same thing twice and expect different results, isn’t that far fetched after all :slight_smile:

Thanks for the help.

2 Likes