I have used the Arduino IoT Cloud web app to
- Register the MKR WAN 1310 device. This created the device entry in the Arduino Cloud Console, and in The Things Stack console arduino.nam1
- Create a new Thing
- Create a variable, "count:integer", read-write, update every 60 seconds
- 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. ![]()
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
- https://app.arduino.cc/things/a46a9...snip... (available as needed)