US915 ABP and OTAA work fine. But AU915 would not work with same configs on V3 (Solved)

Hi all.

I’m in Brazil and working with a custom node to work with sx1276 and LMIC.

I got all working well in us915, OTAA and ABP work fine.

When i change all to AU915 I can’t get OTTA or ABP working. Seems like downlink are not correct on AU915.

Any glue?

US915 downlink:

{
  "name": "gs.down.send",
  "time": "2021-07-12T01:39:43.939745976Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "lora-lrsb-gateway03"
      }
    },
    {
      "gateway_ids": {
        "gateway_id": "lora-lrsb-gateway03",
        "eui": "58A0CBFFFE80XXXX"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.DownlinkMessage",
    "raw_payload": "YAFeK9ysAAADMAAAcQMwAP8BCAUFH6x/",
    "request": {
      "downlink_paths": [
        {
          "uplink_token": "CiEKHwoTbG9yYS1scnNiLWdhdGV3YXkwMxIIWKDL//6AC20Qw4TClAMaDAjfuq6HBhCe+dn3ASC4q/Oj2JIC"
        }
      ],
      "rx1_delay": 1,
      "rx1_data_rate_index": 13,
      "rx1_frequency": "923300000",
      "rx2_data_rate_index": 8,
      "rx2_frequency": "923300000",
      "priority": "HIGHEST",
      "frequency_plan_id": "US_902_928_FSB_2"
    },
    "correlation_ids": [
      "gs:conn:01FABWXCHWR7597B2CVVYGPP9D",
      "gs:up:host:01FABWXCPTG76DNCA5GS4078ET",
      "gs:uplink:01FAC5XF8ZT73542ZC9XRRCMGG",
      "ns:downlink:01FAC5XFP3BE1QN4MD4GW36BRJ",
      "ns:uplink:01FAC5XF91653CA1JD04DZKCHB",
      "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01FAC5XF90VREFC6889WMEFARG",
      "gs:conn:01FABWXCHWR7597B2CVVYGPP9D",
      "rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FAC5XFP30JMDRNRZG4M961SW"
    ]
  },
  "correlation_ids": [
    "gs:conn:01FABWXCHWR7597B2CVVYGPP9D",
    "rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FAC5XFP30JMDRNRZG4M961SW"
  ],
  "origin": "ip-10-101-5-4.us-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ",
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01FAC5XFP3J4DTJ675KZ7QTXHE"
}

And a AU915 downlink

{
  "name": "gs.down.send",
  "time": "2021-07-12T02:21:35.755238187Z",
  "identifiers": [
    {
      "gateway_ids": {
        "gateway_id": "lora-lrsb-gateway05"
      }
    },
    {
      "gateway_ids": {
        "gateway_id": "lora-lrsb-gateway05",
        "eui": "58A0CBFFFE80XXXX"
      }
    }
  ],
  "data": {
    "@type": "type.googleapis.com/ttn.lorawan.v3.DownlinkMessage",
    "raw_payload": "YAFeK92wAAAAJeQOZFdKRfn4RvT/SaB4c6LGRf3Kmv3/+FptpXcueuCOGazrqI/V7qZF6yvmrl0UmnzqDCd8iw==",
    "request": {
      "downlink_paths": [
        {
          "uplink_token": "CiEKHwoTbG9yYS1scnNiLWdhdGV3YXkwNRIIWKDL//6AC7cQzPayIhoMCK/OrocGEIzK/aEBIODB7t2MAg=="
        }
      ],
      "rx1_delay": 1,
      "rx1_data_rate_index": 8,
      "rx1_frequency": "923300000",
      "rx2_data_rate_index": 8,
      "rx2_frequency": "923300000",
      "priority": "HIGHEST",
      "frequency_plan_id": "AU_915_928_FSB_1"
    },
    "correlation_ids": [
      "gs:conn:01FAC87W4PBED4HAKPJWZ98K7J",
      "gs:up:host:01FAC87W9A63SVRE2YD4TVQ9YG",
      "gs:uplink:01FAC8A47BFC82G4MMG1CHVT0T",
      "ns:downlink:01FAC8A4MAR7VE2Q4MWR91V974",
      "ns:uplink:01FAC8A47DBXAXM6MHM3QNWCMV",
      "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01FAC8A47D31NQMY1DWY3K2P05",
      "gs:conn:01FAC87W4PBED4HAKPJWZ98K7J",
      "rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FAC8A4MBNEWSN24PKDJJZ3YA"
    ]
  },
  "correlation_ids": [
    "gs:conn:01FAC87W4PBED4HAKPJWZ98K7J",
    "rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FAC8A4MBNEWSN24PKDJJZ3YA"
  ],
  "origin": "ip-10-101-5-4.us-west-1.compute.internal",
  "context": {
    "tenant-id": "CgN0dG4="
  },
  "visibility": {
    "rights": [
      "RIGHT_GATEWAY_TRAFFIC_READ",
      "RIGHT_GATEWAY_TRAFFIC_READ"
    ]
  },
  "unique_id": "01FAC8A4MBF91N7DKJ2DEXDV3C"
}

I Tried both AU_915_928_FSB_2 and AU_915_928_FSB_1

#if defined(CFG_us915)
#if defined(TTN)
  LMIC_selectSubBand(1);
#else
  LMIC_selectSubBand(0);
#endif
#elif defined(CFG_au915)
#if defined(TTN)
  LMIC_selectSubBand(1);
#else
  // Disable channels 8-64
  for (int channel = 8; channel < 72; ++channel) {
    LMIC_disableChannel(channel);
  }
  LMIC_enableChannel(64);
  // This means only channels 0-7 and 65 are up
#endif
#endif
  // allow much more clock error than the X/1000 default. See:
  // https://github.com/mcci-catena/arduino-lorawan/issues/74#issuecomment-462171974
  // https://github.com/mcci-catena/arduino-lmic/commit/42da75b56#diff-16d75524a9920f5d043fe731a27cf85aL633
  // the X/1000 means an error rate of 0.1%; the above issue discusses using values up to 10%.
  // so, values from 10 (10% error, the most lax) to 1000 (0.1% error, the most strict) can be used.
  LMIC_setClockError(MAX_CLOCK_ERROR * 5 / 100); //LMIC_setClockError(1 * MAX_CLOCK_ERROR / 40);

  // Disable link check validation
  LMIC_setLinkCheckMode(0);

  //LMIC_setAdrMode(1);

  LMIC.dn2Dr = DR_SF9;

#if defined(TTN)
  LMIC_setDrTxpow(DR_SF7, 5); //indoor use
#else
  // TTN uses SF9 for its RX2 window.
  LMIC_setDrTxpow(DR_SF7, 30);
#endif
  LMIC.txpow=17;

If you are on V3 there’s a hint in the console. Device Settings > Network Layer > Frequency Plan. “Australia 915-928 Mhz, FSB2 (used by TTN)”.

Also I’ve found with OTAA that V3 needs you to be more precise with the Regional Settings in the Device Settings…

All configurations are fine.

Captura de tela 2021-07-12 101421

@AndyG I recreated a new application on au1.cloud.thethings.network and register new device on that application.

Below are the first downlink sended to node. Node ask for ack.

{
  "name": "gs.down.send",
  "time": "2021-07-12T16:30:40.594819382Z",
  "identifiers": [
{
  "gateway_ids": {
    "gateway_id": "lora-lrsb-gateway01"
  }
},
{
  "gateway_ids": {
    "gateway_id": "lora-lrsb-gateway01",
    "eui": "58A0CBFFFE80152B"
  }
}
  ],
  "data": {
"@type": "type.googleapis.com/ttn.lorawan.v3.DownlinkMessage",
"raw_payload": "YAFeK92wAgAAlwXFlp6KNmucs76ITbLps5rNFQLXjJ7fXDu89NLhkXO90lNF1lpM9f6YrqDSmXpXQwCH8WuIbQN1ew9/yWVwBF4=",
"request": {
  "downlink_paths": [
    {
      "uplink_token": "CiEKHwoTbG9yYS1scnNiLWdhdGV3YXkwMRIIWKDL//6AFSsQpK26iQoaCwiw3LGHBhDg8rg/IKDh8e/ZyAI="
    }
  ],
  "rx1_delay": 1,
  "rx1_data_rate_index": 10,
  "rx1_frequency": "924500000",
  "priority": "HIGHEST",
  "frequency_plan_id": "AU_915_928_FSB_2"
},
"correlation_ids": [
  "gs:conn:01FADE43A7107R9TX72NPCQSCN",
  "gs:up:host:01FADE43JY5E0VWC0GV04XKWS4",
  "gs:uplink:01FADRWV052ETVK86GWCXK5A0K",
  "ns:downlink:01FADRWVEJ9Q0ZA3VS6NBKCEC2",
  "ns:uplink:01FADRWV06AT6YA24XN7YEQKF0",
  "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01FADRWV060XYBMC9PC0NDZYP8",
  "gs:conn:01FADE43A7107R9TX72NPCQSCN",
  "rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FADRWVEJWV3NZ3YC4YASCYJM"
]
  },
  "correlation_ids": [
"gs:conn:01FADE43A7107R9TX72NPCQSCN",
"rpc:/ttn.lorawan.v3.NsGs/ScheduleDownlink:01FADRWVEJWV3NZ3YC4YASCYJM"
  ],
  "origin": "ip-10-102-5-39.ap-southeast-2.compute.internal",
  "context": {
"tenant-id": "CgN0dG4="
  },
  "visibility": {
"rights": [
  "RIGHT_GATEWAY_TRAFFIC_READ",
  "RIGHT_GATEWAY_TRAFFIC_READ"
]
  },
  "unique_id": "01FADRWVEJCHF6WSEEE7EXRA8Y"
}

I’ve never needed to use downlinks, and because the Fair Use Policy sets a limit of 10 downlinks per day, I don’t use confirmed uplinks. So I don’t have any experience getting them to work.

In V3 the RX1 delay should be 5 seconds.

With ABP you should set rx1_delay to 5 in your device and in the console. You should also set the RX parameters, and all the frequencies that your device will use in the Device Settings > Network Layer > Advanced Settings. There are several posts about this in the forum.

If you use OTAA the join negotiation will sort everything out for you.

I have foud a solutions on Heltec Forum

Thanks to @bwooce for sharing with us.

Ah, been there. Had exactly the same problem with my Heltec dev boards and V3. Hence the advice about having to be more precise with the regional parameters in V3.