MKR WAN 1310 + TTN + ArduinoIoTCloud ==> Message ack was not received, the message could not be delivered

I have used the Arduino IoT Cloud web app to

  1. Register the MKR WAN 1310 device. This created the device entry in the Arduino Cloud Console, and in The Things Stack console arduino.nam1
  2. Create a new Thing
  3. Create a variable, "count:integer", read-write, update every 60 seconds
  4. Create a sketch
12:04:50.565 -> Thing ID: a46a9756-48e2-4088-8ddc-bc229db6bbe9
12:04:51.568 -> Connecting to the network
12:04:57.715 -> Connected to the network (Wow! It joined on the first try!)
12:04:57.715 -> Connected to Arduino IoT Cloud
12:04:58.848 -> Message ack was not received, the message could not be delivered
12:05:58.793 -> Message ack was not received, the message could not be delivered
12:06:58.775 -> Message ack was not received, the message could not be delivered
etc...

I have traced the error to MKRWAN.h, in the function modelSend(void*, size_t, bool):

  int modemSend(const void* buff, size_t len, bool confirmed) {

    // ...snip...
    if (confirmed) {
        sendAT(GF("+CTX "), len);
    } else {
        sendAT(GF("+UTX "), len);
    }

    stream.write((uint8_t*)buff, len);

    int8_t rc = waitResponse( GFP(LORA_OK), GFP(LORA_ERROR), /*...snip...*/);

//  rc is always -1 (timeout), even if I add a longer timeout to waitResponse(...)

There is no uplink listed on TTN after the join-request / join-accept events.
I see this only when I try to run the generated sketch.

If I run the example LoraSendAndReceive, I can see the uplink and downlink messages. This example code uses the same API ( modem.endPacket(true) -->modemSend(...) ), so I am befuddled. :thinking:

Any ideas?


Device:

  • Model: Arduino MKR WAN 1310
  • FQBN: arduino:samd:mkrwan1310
  • Firmware: 1.2.3
  • Library: MKRWAN 1.1.1

Gateway:

  • Model: BrowWan MiniHub Pro TBMH110(US)
  • Firmware: 0.9.48

Frequency Plan:

  • US915 (United States 902-928 MHz, FSB 2 (used by TTN))

Application Server, Network Server, and Join Server:

  • arduino.nam1.cloud.thethings.industries

Thing

I have found a way to work around the issue.
In the generated file thingProperties.h:

// Change this line:
LoRaConnectionHandler ArduinoIoTPreferredConnection(APPEUI, APPKEY, _lora_band::US915, "00000000000000000000FF00");

// to this
LoRaConnectionHandler ArduinoIoTPreferredConnection(APPEUI, APPKEY, _lora_band::US915);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.