Can't connect TTIG to TTN v3

Thanks @filipgDSE but I would like to use TTN/TTS.

I now have it working.

First of all, I followed the instruction as written, and created ttn-lw-cli.yml config as above:
oauth-server-address: ‘https://eu1.cloud.thethings.network/oauth’
identity-server-grpc-address: ‘eu1.cloud.thethings.network:8884’
etc

$ ttn-lw-cli gateways claim authorize my-gateway-id

This failed with:
parse “‘https://eu1.cloud.thethings.network/oauth’”: first path segment in URL cannot contain colon

Fix: Remove quotes on every line of the file.

$ ttn-lw-cli gateways claim authorize my-gateway-id

This failed with:
error:cmd/ttn-lw-cli/commands:unauthenticated (not authenticated with either API key or OAuth access token)

Fix: Run ttn-lw-cli login, open the link provided in Firefox and login. You will get the following message in the browser: “The CLI successfully got an access token. You can now close this window and return to the CLI.”

$ ttn-lw-cli gateways claim authorize my-gateway-id

API key provided (didn’t need do anything with this). Power cycled gateway, and waited a few minutes - it’s now connected!

So these are the step by step by instructions to claiming a gateway which has been deleted TTN v2 and added to TTN v3 (aka The Things Stack Community Ediition), but remain disconnected.

Install the CLI on Linux:
$ cd ~
$ mkdir ttn
$ nano ttn/ttn-lw-cli.yml

Copy & paste the following in to the file:

oauth-server-address: The Things Network Account
identity-server-grpc-address: eu1.cloud.thethings.network:8884
gateway-server-grpc-address: eu1.cloud.thethings.network:8884
network-server-grpc-address: eu1.cloud.thethings.network:8884
application-server-grpc-address: eu1.cloud.thethings.network:8884
join-server-grpc-address: eu1.cloud.thethings.network:8884
device-claiming-server-grpc-address: eu1.cloud.thethings.network:8884
device-template-converter-grpc-address: eu1.cloud.thethings.network:8884
qr-code-generator-grpc-address: eu1.cloud.thethings.network:8884

Save the file and exit.

$ export TTN_LW_CONFIG=/home/myname/Desktop/ttn/ttn-lw-cli.yml

$ ttn-lw-cli login

Open the link provided in Firefox and login:
https://eu1.cloud.thethings.network/oauth/authorize?client_id=cli&redirect_uri=local-callback&response_type=code

You will get a message in the browser indicating successful login and you can return to the command line.

$ ttn-lw-cli gateways claim authorize my-gateway-id

|INFO|No API Key provided. Creating one
|INFO|Created API Key with ID: OJRNVEKPFNNXXXXXXXXXXXXX

Gateway no authorized for claiming.

Return to The Things Network Console
Click ‘Claim Gateway’
Enter the EU ID (same as my existing gateway), Gateway ID (I chose a new one but I think the same would be ok from @KrishnaIyerEaswaran2’s post above.

Gateway claimed successfully.

Power cycle TTIG gateway and wait for initialisation sequence to complete.
Solid green LED shown.

Wait a few more minutes, refresh the page and you should see Status ‘Connected’ on the Gateways page.

Thanks to @descartes and @KrishnaIyerEaswaran2 for the support.

I would definitely recommend a review of those instructions @KrishnaIyerEaswaran2. They jump all over the place, assume a lot of implied knowledge and in some cases are just plain wrong.

Regards
Richard.

2 Likes