MKRWAN icon indicating copy to clipboard operation
MKRWAN copied to clipboard

joinABP not working since library update from 1.0.14 to 1.0.15

Open wapel opened this issue 4 years ago • 5 comments

Using this command in my sketch on MKR1310: Firmware: 1.2.1

  connected = modem.joinABP(devAddr, nwkSKey, appSKey);
  
  if (!connected) {
    if(debug)Serial.println("Lora ABP Connection failed !");
    while (1) {}
  } else {
    if(debug)Serial.println("Connected successful !");
  }

The "joinABP" is not working anymore since library update from 1.0.14 to 1.0.15 Perhaps the additional "sendAT()" is a problem ? Thanks for help.

wapel avatar Feb 16 '21 12:02 wapel

Same issue here, I observed the opposite problem. Updating firmware from 1.2.0 to 1.2.3 with the same 1.10 library and the thing stopped working. Must be a common change that was implemented in fw and library. There was something done to the default AT responses, I think. issue

flhofer avatar Apr 26 '21 16:04 flhofer

Fixed it on my side. The issue is that the new firmware responds according to standard with +OK on every command. So after the join event feedback, there is another +OK message in the queue. The status read comming next will then just read a +OK and hang forever for the = sign to read the join status.

In line 950 of Mkrwan.h after the wait for "+EVENT=1,1" add

    if (waitResponse() != 1) {
      return false;
    }

This wait defaults to 1 second wait for +OK or +ERR

flhofer avatar Apr 28 '21 00:04 flhofer

better solution #93. The +OK is due to an implemented hack but it doesn't seem to always show up. A now timed skipUntil should resolve the issue

flhofer avatar Apr 30 '21 00:04 flhofer

See the not yet released v1.2.4 of my pull request. It includes the necessary modem firmware update in the MKRWAN standalone sketch. (link to repo next to the title flhofer...)

flhofer avatar Jan 31 '22 08:01 flhofer