Migration of TTIGs to The Things Stack CE (v3)

./ttn-lw-cli gateways claim <the eui in this format: AABBCCDDEEFFGGHH> --authentication-code <the wifi password printed> --user-id <my user id to log into the console> --target-gateway-id <i found this already created in the new V3 console: algorni-lora-gateway-goa01-v3> --target-cups-uri https://ttn.eu1.cloud.thethings.network/

Just running the CLI that I’ve downloaded few minutes before: lorawan-stack-cli_3.13.2_linux_amd64 on my WSL2 on my Windows 10 but I was able to log in properly as I did

./ttn-lw-cli use eu1.cloud.thethings.network

Close but you can’t use an ID that you found in the console.

The ID has to be unique to the entire of TTN

ttn-lw-cli gateways claim The-TTIG-EUI --authentication-code TTIG-WiFi-Password --user-id your-user-id --target-gateway-id gateway-id-you-want --target-cups-uri https://eu1.cloud.thethings.network:443 --target-gateway-server-address eu1.cloud.thethings.network --target-frequency-plan-id EU_863_870_TTN

You will have to ./ttn-lw-cli login before hand

1 Like

yep i did the login before… and… now no more error message and my new gateway apppeared on the V3…

Should i restart now the gateway? or the migration will be completed automatically (i see the V3 entry still as “Disconnected”)

Both. Reboot if you are impatient. Otherwise it will move over automatically in the next 24 hours.

1 Like

BINGO!!! Last Seen: 12 seconds ago!! migration done!

Thanks sir! appreciated a lot!

sounds great @gornialberto @kersing @descartes – more or less consequent i tried this too, but getting stuck again, again. trying to follow up the manuals on thethingsindustries.com “make a gateway claimable” and “claim a gateway” but its not working for my setup: here is my current setup

  • TTIG running well in v2 (with known credentials wifi password)
  • latest ttn-lw-cli on my local Windows-Desktop – its working as i can see my applications, devices and also gateways (have raspi-gateways in v3)

the result from the command to claim this v2-gateway to v3 ist this

C:\Users\jens_>ttn-lw-cli gateways claim 58A0CBFFFE80299E --authentication-code WLANCODE --user-id jensileinchen --target-gateway-id ttn-rhein-sieg-10 --target-cups-uri https://eu1.cloud.thethings.network:443 --target-gateway-server-address eu1.cloud.thethings.network --target-frequency-plan-id EU_863_870_TTN

WARN    Finished unary call     {"duration": 0.0413, "error": "rpc error: code = FailedPrecondition desc = error:pkg/deviceclaimingserver:gateway_not_authorized (gateway not authorized for claiming)", "error_correlation_id": "cd5e3017475742daa120fdb35abb45d8", "error_name": "gateway_not_authorized", "error_namespace": "pkg/deviceclaimingserver", "grpc.method": "Claim", "grpc.service": "ttn.lorawan.v3.GatewayClaimingServer", "grpc_code": "FailedPrecondition", "namespace": "grpc"}
error:pkg/deviceclaimingserver:gateway_not_authorized (gateway not authorized for claiming)
    correlation_id=cd5e3017475742daa120fdb35abb45d8

C:\Users\jens_>

i am not sure about this command is correctly built – i used as target gateway id one of i have created before in the v3 TTS CE – with the gw-eui as before in v2 — mybe you can check this for me or explain if there is some free time ? thanks a lot in advance — greetings from Germany

additional information: after reading one more time carefully here the posts before i removed the gateway from the v3 again – (lost the id forever, i know) but then the cli result is different: "claim authentication code mismatch) ---- i used the WLAN-Passwort as printed on my invoice from the TTIG

The target gateway should not exist in V3 yet.

The password should be printed on the label next to the plug of the TTIG. Please make sure that is the same password.

The gateway shouldn’t be in the console yet, just added mine successfully:

ttn-lw-cli gateways claim 58A0C0FF33C0FFEE \
--authentication-code SECR3t1 \ 
--user-id paderijk --target-gateway-id ttn-example-gw01 \
--target-cups-uri https://eu1.cloud.thethings.network:443 \
--target-gateway-server-address eu1.cloud.thethings.network \
--target-frequency-plan-id EU_863_870_TTN

After hitting enter, I received the following

{ 
  "gateway_id": "ttn-example-gw01",
  "eui": "58A0C0FF33C0FFEE" 
}

The gateway (after restarting it by power off/on) appeared nicely in the V3 TTS CE Console as connected. The only thing I had to add manually were the coordinates (which probably can also be done via the CLI).

Please note that you should have done a ‘login’ with the ttn-lw-cli first!

ttn-lw-cli login

My $HOME/.ttn-lw-cli.yml file has the following content:

oauth-server-address: 'https://eu1.cloud.thethings.network/oauth'
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'

credentials-id: 'ttn'
1 Like

thanks for quick reply ------ small problem is right now the distance to my gateway but i asked the person who is nearby to send a picture — i guess that the password could be different ? – hopefully not

AFAIK the password is ‘baked’ into the gateway, haven’t find an easy way yet to change that. So a pic of the sticker with the EUI and the wifi-password should be sufficient.

@paderijk i agree – and just a second ago i recieved the picture with the label on the TTIG — its same password as mentioned before on invoice … running out of ideas now … mightbe i missed an important step before ? – hmppfffff

C:\Users\jens_>ttn-lw-cli gateways claim 58a0cbfffe80299e --authentication-code WLANPasswordFromLabel --user-id jensileinchen --target-gateway-id ttn-rhein-sieg-11 --target-cups-uri https://eu1.cloud.thethings.network:443 --target-gateway-server-address eu1.cloud.thethings.network --target-frequency-plan-id EU_863_870_TTN

> WARN Finished unary call {“duration”: 0.148, “error”: “rpc error: code = Aborted desc = error:pkg/deviceclaimingserver:claim_authentication_code_mismatch (claim authentication code mismatch)”, “error_correlation_id”: “7db820f1191f453595433c5d2f187e8d”, “error_name”: “claim_authentication_code_mismatch”, “error_namespace”: “pkg/deviceclaimingserver”, “grpc.method”: “Claim”, “grpc.service”: “ttn.lorawan.v3.GatewayClaimingServer”, “grpc_code”: “Aborted”, “namespace”: “grpc”}
> error:pkg/deviceclaimingserver:claim_authentication_code_mismatch (claim authentication code mismatch)
> correlation_id=7db820f1191f453595433c5d2f187e8d
*> *
> C:\Users\jens_>

The error message says you didn’t get the WiFi password as the TTIG / claim server is expecting.

There’s no rush on this, no need to hammer away at it, it will still route packets between v2 & v3, so no need to “run out of ideas” - you are ahead of the curve before instructions have been officially released. If you want to be an early adopter, live with the chaotic landscape that some of us live in.

2 Likes

I’ve had to do that for two gateways as well already. Not fun but it works.

yeppp thats not too bad i agree — BUT i got the picture and its same Password as i have on the invoice – thats crazy for me atm. but as @descartes told me i will be patient, and think about all steps one more time … well we tested the process with a collaborateur (with all rights) on my TTIG — same result.

We (the collective of forum members & TTI) are aware that the WiFi password isn’t going to be accessible to everyone so once the dust has settled on today (v2 read only and TTIG CLI migration) it can be revisited.

In the meanwhile, check that there aren’t any transposed zeros and ohs etc

i did several times and luckly there are no critical characters in the passwort – its absolute clear readable and was tested from two different persons … i will go out for lunch now to get some fresh air around the brain … well – a big thanks to all the volunteers and people who are running this forum and helping the people like me step by step …

2 Likes

Hi all:

I have just claimed mine using cli and it works. I had to remove the previous definition I had in the v3 console and chose a new Gateway ID. With that, I could see the new definition in the console. After that I had to reboot the TTIG and live packets showed up in v3 console.

Thanks a lot to all!

1 Like

You do not have a gateway defined in V3 with the same EUI by any chance?

no — 100% sure

@jensileinchen: Your EUI is 58a0cbfffe80299e right?

I’ll check what’s happening and get back to you.