# How to Migrate ABP Devices from V2 to V3

**URL:** <https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705>\
**Category:** Migrating Devices to V3\
**Tags:** guide\
**Created:** [February 3, 2021, 10:32am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705 "2021-02-03T10:32:21Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 3, 2021, 9:28am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/62 "2021-05-03T09:28:32Z")

</div>

> [@AndyG](#):
>
> The V3 console expands it out to 35 “new channel request enqueued” messages for:

Sounds like a bug/configuration issue. There are no gateways serving 36 channels so pushing all of them to a node would result in it transmitting on channels not being listened to for a fair amount of its transmissions.

@htdvisser is TTN really meant to be pushing 35 additional channels???

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 3, 2021, 1:32pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/63 "2021-05-03T13:32:14Z")

</div>

No, that doesn’t sound right.

I’m not quite sure if/what advanced settings need to be set for US915/AU915 ABP devices. I actually thought that you didn’t need to set those at all, but I could be wrong.

And just for completeness, I’d like to repeat the first bullet point from the first post in this thread:

> [@htdvisser](#):
>
> - Using ABP devices is discouraged. We recommend to use OTAA unless you really have a good reason to use ABP.

ABP is terrible; you can save yourself (and others) a lot of trouble by using OTAA.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 3, 2021, 2:38pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/64 "2021-05-03T14:38:50Z")

</div>

> [@htdvisser](#):
>
> ABP is terrible; you can save yourself (and others) a lot of trouble by using OTAA.

OTAA is terrible, you can save yourself a lot of trouble by using ABP when you are developing your firmware as you don’t have to reset DevNonces and wot not.

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/48549_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [May 3, 2021, 8:55pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/65 "2021-05-03T20:55:25Z")

</div>

> [@htdvisser](#):
>
> ABP is terrible; you can save yourself (and others) a lot of trouble by using OTAA.

That _sounds_ like an opinion. ABP is part of the official LoRaWAN specifications however.  
Users are much better served with an _article_ where this is explained in detail and properly motivated.

Stating that “ABP is terrible” is not convincing and does not have any educational value because it lacks substance. Where can users find information with pros and cons about this?

You may be correct in your statement but I miss the motivation. What I can confirm though is that manually adding (‘Custom’) an ABP device in the console currently is a _terrible_ and error prone process for the user, having to enter every single (advanced) setting manually for each and every device.

---

<div class="post-metadata">

**Author:** ![smbunn](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/smbunn/32/47939_2.png) [@smbunn](https://www.thethingsnetwork.org/forum/u/smbunn)\
**Post date:** [May 3, 2021, 9:46pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/67 "2021-05-03T21:46:41Z")

</div>

> [@smbunn](#):
>
> but I have AU915 so have no idea what to put into RX2 data rate and RX2 frequency. Would be useful to us newbies to explaln where to find these options. Is RX2 data rate the same as Spreading Factor?

I think my post was misunderstood. I know how to get to ‘advanced settings’, my question was WHAT do I put into these settings for AU915 since the only example is for EU868.

Can I put in any value into RX2 data rate? anything at all?, Where would I find useful information on what is an appropriate value to use for AU915?

What RX2 frequencies are appropriate for AU915? There are a lot listed as transmit and receive,

```auto
AU915-928 
Uplink:

916.8 - SF7BW125 to SF12BW125
917.0 - SF7BW125 to SF12BW125
917.2 - SF7BW125 to SF12BW125
917.4 - SF7BW125 to SF12BW125
917.6 - SF7BW125 to SF12BW125
917.8 - SF7BW125 to SF12BW125
918.0 - SF7BW125 to SF12BW125
918.2 - SF7BW125 to SF12BW125
917.5 - SF8BW500
Downlink:

923.3 - SF7BW500 to SF12BW500 (RX1)
923.9 - SF7BW500 to SF12BW500 (RX1)
924.5 - SF7BW500 to SF12BW500 (RX1)
925.1 - SF7BW500 to SF12BW500 (RX1)
925.7 - SF7BW500 to SF12BW500 (RX1)
926.3 - SF7BW500 to SF12BW500 (RX1)
926.9 - SF7BW500 to SF12BW500 (RX1)
927.5 - SF7BW500 to SF12BW500 (RX1)
923.3 - SF12BW500 (RX2)

```

so do I put them all in?

Do I just put in 923300000 for RX2?

thanks

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 3, 2021, 10:45pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/68 "2021-05-03T22:45:38Z")

</div>

Have you considered taking a look at the regional parameters?

From [LoRaWAN regional parameters](https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.2_final_1944_1.pdf#page32), chapter 2.5.7 AU915-928 Receive windows:

> The RX2 (second receive window) settings uses a fixed data rate and frequency. Default parameters are 923.3Mhz / DR8

---

<div class="post-metadata">

**Author:** ![smbunn](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/smbunn/32/47939_2.png) [@smbunn](https://www.thethingsnetwork.org/forum/u/smbunn)\
**Post date:** [May 4, 2021, 12:06am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/69 "2021-05-04T00:06:31Z")

</div>

So I put in RX2 rate as 8 and RX2 frequency as 923300000?  
Plus I add in all 8 uplink frequencies and all 8 downlink frequencies?

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 4, 2021, 8:37am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/70 "2021-05-04T08:37:10Z")

</div>

> [@smbunn](#):
>
> So I put in RX2 rate as 8 and RX2 frequency as 923300000?

Yes.

> [@smbunn](#):
>
> Plus I add in all 8 uplink frequencies and all 8 downlink frequencies?

At least the 8 uplink frequencies. I’m not sure if the downlink frequencies need to be specified as well. (I’m in EU868 where those overlap so I can’t test)

---

<div class="post-metadata">

**Author:** ![smbunn](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/smbunn/32/47939_2.png) [@smbunn](https://www.thethingsnetwork.org/forum/u/smbunn)\
**Post date:** [May 4, 2021, 11:38pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/71 "2021-05-04T23:38:15Z")

</div>

I tried manually transferring one device across (I cannot use the trasnfer tool as all my devices are on ABP). It failed with a message that “Invalild value of field 'mac\_settings.factory\_preset\_frequencies” and takes me to the box where you choose the frequency plan. I tried Australia 915-928 MHz, FSB 1 right through to FSB 8, and all fail with the same message.  
It appears I should be using Australia 915-028 MHz FSB 2 but this fails

---

<div class="post-metadata">

**Author:** ![smbunn](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/smbunn/32/47939_2.png) [@smbunn](https://www.thethingsnetwork.org/forum/u/smbunn)\
**Post date:** [May 4, 2021, 11:38pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/72 "2021-05-04T23:38:44Z")

</div>

````auto
  "code": 3,
  "message": "error:pkg/networkserver:field_value (invalid value of field `mac_settings.factory_preset_frequencies`)",
  "details": [
    {
      "@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
      "namespace": "pkg/networkserver",
      "name": "field_value",
      "message_format": "invalid value of field `{field}`",
      "attributes": {
        "field": "mac_settings.factory_preset_frequencies"
      },
      "correlation_id": "9dd945c7a84c426c88fd97288ee264c3",
      "code": 3
    }
  ],```
````

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [May 5, 2021, 7:12am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/73 "2021-05-05T07:12:56Z")

</div>

> [@bluejedi](#):
>
> > [@htdvisser](#):
> >
> > ABP is terrible; you can save yourself (and others) a lot of trouble by using OTAA.
> 
> That _sounds_ like an opinion. ABP is part of the official LoRaWAN specifications however.  
> Users are much better served with an _article_ where this is explained in detail and properly motivated.

Here’s our documentation page on ABP vs OTAA:

> **[ABP vs OTAA](https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/)**
>
> This section can help you understand the differences between ABP and OTAA activation modes for LoRaWAN® end devices, and comprehend why using OTAA is …

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 5, 2021, 9:01am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/74 "2021-05-05T09:01:00Z")

</div>

We strongly recommend people use ABP for development.

It’s not terrible, it’s just not the best for deployment.

---

<div class="post-metadata">

**Author:** ![clv](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/clv/32/46568_2.png) [@clv](https://www.thethingsnetwork.org/forum/u/clv)\
**Post date:** [May 8, 2021, 6:27pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/75 "2021-05-08T18:27:06Z")

</div>

> [@htdvisser](#):
>
> Here’s our documentation page on ABP vs OTAA:
> 
> [https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/](https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/)

I am pretty sure I read many times here the recomendation that an OTAA device must be join only once in a lifetime. So in reality the ABP vs OTAA comparison has value only for roaming and not for security.

The real problem is that ABP projects don’t support MAC downlink commands. I don’t get this statement. How an OTAA device knows the RX1/2 Delay (e.t.c.) and ABP does not?  
" When registering an ABP device on The Things Stack, you will need to provide the **RX1 Delay** , **RX1 Data Rate Offset** , **RX2 Data Rate Index** , **RX2 Frequency** and a list of **Factory Preset Frequencies**. If these values are not correctly configured, uplinks and/or downlinks might not work."

> [@AndyG](#):
>
> I’m not going to type in 36 frequencies in the advanced settings so that I can use ABP.

I don’t like to type even 8. So I [prepared a script](https://raw.githubusercontent.com/clavisound/clvscripts/master/usr/local/bin/ttnV3.clv) WORK IN PROGRESS to semi-automate the procedure via CLI.

I abandoned all my LoRa projects. I hope I will restart them soon to update the script.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 8, 2021, 8:38pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/76 "2021-05-08T20:38:59Z")

</div>

> [@clv](#):
>
> The real problem is that ABP projects don’t support MAC downlink commands.

I’m not seeing where it says that. But I agree the document feels unscientifically biased towards OTAA, particularly with some scare mongering like:

“When an ABP end device runs out of frame counters, it is the end of its lifetime.”

With 32 bit counters, that would be a mere 4,294,967,296 uplinks. I’m sure I’ll cope with that.

Great script BTW.

Please don’t lose faith, the ABP ‘challenge’ was noted early on, has been well discussed over the forum and I for one have two other solutions as work in progress to add to yours.

---

<div class="post-metadata">

**Author:** ![AndyG](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/andyg/32/35697_2.png) [@AndyG](https://www.thethingsnetwork.org/forum/u/AndyG)\
**Post date:** [May 8, 2021, 9:44pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/77 "2021-05-08T21:44:32Z")

</div>

I have since found a solution to the problem that was driving me towards ABP.

V3 OTAA on AU915 with the Heltec boards I am using is sensitive to the Regional Parameters Version. I had to select “PHY V1.0.2 REV B” to get OTAA to work. Kudos goes to @bwooce for debugging and finding the solution for that one.

I now get an immediate join with my test device on V3. I only have a few nodes, all DIY. It is not going to be an issue to reprogram the rest to OTAA when I migrate them to V3.

---

<div class="post-metadata">

**Author:** ![clv](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/clv/32/46568_2.png) [@clv](https://www.thethingsnetwork.org/forum/u/clv)\
**Post date:** [May 9, 2021, 6:30am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/78 "2021-05-09T06:30:22Z")

</div>

@descartes if I remember properly (I want to re-read the protocol 2-3 times) the frame counter is always 16bit and the interpretation is done on app / whatever server.

I don’t get your disagreement about ABP. Most of the projects with ABP don’t support MAC downlinks, since most of them don’t use LMIC. That is my view. If not, even worse for the “better” OTAA in usage.

Sorry I have language barrier (not native English) so maybe I can’t express it properly. As I understand it, OTAA is better for security if your are paranoid and you reset the device (something is NOT recommended and I agree) and a necessity (?) for roaming.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 9, 2021, 8:42am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/79 "2021-05-09T08:42:07Z")

</div>

It is 16 bit on the device but can rollover 2^16 times - I’m a bit fuzzy on the actual details and implementation, but I do know I have a test device on ABP on 105936 uplinks so I know the rollover works!

I don’t know what the spread of library usage is - I can imagine that there are quite a few TinyLoRa etc ABP devices in the maker community that would be a wasted if they can’t carry on. The settings are there for us to continue to use them, we just need to make it a lot simpler to setup on v3!

The [LoRaWAN Alliance FAQ pdf on security](https://lora-alliance.org/wp-content/uploads/2020/11/la_faq_security_0220_v1.2_0.pdf) is a little less biased but does outline how OTAA is more secure. Technically ‘roaming’ is the correct word, as that’s what we think of with mobile phones etc, but the reality is that a device won’t roam, that’s the job of a packet forwarder to sort out. What TTI mean by roaming is actually switching host network. This you can only do with OTAA and only if your OTAA device is clever enough to notice it hasn’t got a valid session running OR you can send it a re-join command.

We are well aware that TTI want their offering to be the flagship stack - and that comes with changes that aren’t convenient to the more casual user - but the tools are there so we can make it happen.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [May 9, 2021, 11:07am UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/80 "2021-05-09T11:07:04Z")

</div>

> [@clv](#):
>
> the frame counter is always 16bit

For modern (last 3-4 years) LoRaWAN stacks the frame counter is 32 bit. The transmitted packet contains only the lower 16 bits of the packet but all message integrity check (MIC) uses all 32 bits.

---

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/48543_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [May 9, 2021, 2:30pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/81 "2021-05-09T14:30:54Z")

</div>

I find that the updated docs are less opinionated about OTAA vs ABP:

> <https://github.com/TheThingsNetwork/docs/blob/master/doc/content/devices/bestpractices/_index.md>

It might however be worth stating the facts to tell where ABP is better, and where OTAA is better.

For me the most important thing is that I need to switch a GPS tracker on in any location. Therefore also places without coverage. If this device uses OTAA it will never work. Using ABP the device can switch on and start transmitting packets, and as soon as it comes into range of the network, these packets will be received and forwarded to the application.

One can however argue that using OTAA for a GPS tracker, and persisting the session, restoring it after startup, will also work. But this complicates the design of the hardware. Using ABP with a frame counter that resets is a very easy piece of software that can be written by hobbyists.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 9, 2021, 3:09pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705/82 "2021-05-09T15:09:47Z")

</div>

> [@jpmeijers](#):
>
> I find that the updated docs are less opinionated about OTAA vs ABP:

Those are the version 2 docs.

We are/were enjoying the v3 docs: [https://www.thethingsindustries.com/docs/hardware/devices/concepts/abp-vs-otaa/](https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/)

The new rampant rabbit MAC command processor will flood your ABP device with ADR requests, particularly if you have told the device to stay fixed to DR5 as you recommend - at present ADR can only be turned off using the CLI

[Previous page](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705.md?page=3)

[Next page](https://www.thethingsnetwork.org/forum/t/how-to-migrate-abp-devices-from-v2-to-v3/43705.md?page=5)
