How to Migrate OTAA Devices from V2 to V3

Not sure that strategy would work, I think V2 transit times are just faster - not least as there may be transit times through PacketBroker when transitioning between V2 & V3 GW’s and Apps/Devices, also Rx windows are set shorter in V2 than V3 so suspect that is another factor… Node (depending actual internet routing as well) will just see the V2 before V3 - only when V2 off will V3 be guaranteed to ‘win’ the race I suspect.

Am not a fan of CLI’s unless playing with some linux bits so havent tried yet but have you looked at/tried the V2 to V3 CLI migration tool/script? (ttn-lw-migrate tool) Nick is a fan of such options and perhaps can guide you - suggest you go read the CLI/tool install and use docs 1st and come back with questions if needed?

Sorry to hear that - perhaps I will hold a while then!!! :wink: Though I atleast have ready access to the device in question if I need to reprogramme…

I’ll have a go at the v2 CLI in the morning but I’ve added my 2c worth on Slack.

I think the missing concept for the TTI eggheads is that a good number of older devices don’t have any of the link check code in the stack - so they never check if they are online ever. And a fair few implementations don’t have a rejoin/reboot downlink command baked in.

So if we can’t change the AppKey, even if we go to the device to restart it, we either have to reflash its keys OR wait until 1st Jan when the v2 gateways aren’t online & then cycle the power manually, ie up close & personal.

Final observations of the night, don’t send a reboot command as confirmed and don’t eat yellow snow.

I cannot change the app key because now everything is readonly in v2.
any workaround here?

AppKey should still be updatable. In the device settings page you can change it and save. (The save button is grayed out if you haven’t changed any values yet)

Nope! Whilst you were off I discovered that on an old things uno sketch were I got a troublesome device up on V2 but after 24hrs lost the data tab I was left with no option but to try on V3. Set up fine and could seen V3 join accept being offered but V2 offer gets there 1st! Classic change Appkey tried but system rejects on saving due to save being disabled…cause V2! Tried changing other V2 reg entries but no joy.

no, when I change the last byte of the app key, the ‘save’ button gets active. but when I click on it the following error is shown:
permission denied: V2 clusters are now read-only. Migrate your devices to a The Things Stack (V3) cluster now! V2 clusters will permanently shut down in December 2021.
image

1 Like

Yes, that was problem I saw, and a sad (unintended?) consequence of V2 RO. See my advice/ recommendation to @Inou above as it looks like we have to jump wholesale across to V3 without V2 fall back safety net… I jump after Summer Academy is over! :wink: :crossed_fingers:

Hmm, that’s strange. V2 should allow clearing the AppKey, because that’s also what the migration tool does. Can you try emptying it out completely? Or setting it to all zeros?

Also getting the error when trying to change the AppKey to prevent a device from joining V2 - allowing me to fall back to V2 if the migration fails.

Screenshot from 2021-08-18 11-57-38

See recommendation in docs here, which recommends changing the AppKey.
https://www.thethingsindustries.com/docs/getting-started/migrating/migrating-from-v2/migrate-using-migration-tool/establish-new-session/#prevent-the-end-device-from-joining-v2-network

If someone can confirm that clearing (not changing) the AppKey works I’ll change the wording in the documentation.

But clearing, not changing, will mean we don’t have a fall net (v2) if the migration failed.

Currently I have an issue with my device experiencing packet loss on V3, while the same packets are received on V2.

One way migration makes it very difficult to debug.

Okay, that makes sense. I just deployed a quick change that should allow you to change the AppKey.

2 Likes

Tried changing AppKey again tonight (just now) and still seeing cant be saved error message :frowning:

Enquiring minds would like to know why you don’t have a handful of devices & a couple of gateways running on a login that’s not directly connected to a staff level account so you can try this stuff yourself? Surely as quick to try as it is to type a request for someone who may then not test it as you expect & then give you duff information …

Asking for a friend who’s trying to rip me a new lower waste orifice as their frustration levels with migration make an outbreak of the T-Virus in the Hive at the Umbrella Corporation look like a company picnic. I think they are alluding to all the zombie devices they anticipate owning in Jan '22.

All of my test devices have been migrated to V3 a long time ago, so no, I don’t have anything left on V2.

…And of course he cant add any more now! :rofl:

That’s a bit unfortunate - how did you plan to test the migration after going read-only?

Surely TTI has a test setup still?

1 Like

Just tried an un-used device on V2 and I can swap the octals in the last byte of the AppKey for an OTAA device :champagne: :partying_face: :beers: :heart: :tada:

Can we have the same ability for ABP devices please.

Ah good to know - will go try shortly…

Also discovered cant edit general info (I typically give a general location indicator in description - 1st part or post code etc - helps me scanning list when I only have anonymized eui-blahblah to work of quickly),

and worst still as you know I often relocate GW’s for trials and test deployments, community or client loans etc. and whilst I dont always change location in settings if I remember I like to change description and location on Map for longer term deployments - more than a few days…location cant be changed either. Not adding a new GW just ‘updating’ where in the world it might be, ah well (confuses the hell out of TTN Mapper! with some crazy links shown ;-)) :man_shrugging:

As here:
image

Editing that worked! Changing front failed but selective edit possible…save failed initially as I also edited description to remind myself what I has changed, Dhoh! Removed reminder and all good, now see repeatedly able to trigger V3 joins and get stream of data. Integration added (Cayenne for now MQTT and other Webhooks later per ttsa! :wink: ), and device deployed for collaborator/client who’s happy with a quick dashboard monitoring bulk water system:-)

Will nuke original V2 device/app reg later…