arduino / mkrwan1300-fw

22 stars 23 forks source link

1.2.3 (and all >1.2.0) breaks ABP #41

Closed Bobblybook closed 3 years ago

Bobblybook commented 3 years ago

Hi, I have been experimenting with this over the last few days running on an Arduino MKRWAN1300, in Australia (AU915, SB2, TTN). ABP connection hangs forever on 1.2.3 firmware (no packets even make it to router, modem fails to connect), though OTAA works fine.

I also saw this issue which may be related: #33 It also references the change from 1.2.0 -> 1.2.3 breaking ABP, though the conclusion is that it was a library issue that was apparently fixed back in April this year, but clearly did not fix it for me.

I did a bit of searching and found the 1.1.3 firmware which had ABBP fix comments. I flashed this old firmware and ABP works perfectly.

I compiled and flashed every single firmware version available between 1.1.3 and 1.2.3, and narrowed it down to the 1.2.0->1.2.1 release (1.2.0 works, 1.2.1 doesn't).

In particular, I've verified that it's this: f7cd69f.

I have downloaded the 1.2.3 source and manually changed this line back to LPUART_InitStruct.StopBits = LL_LPUART_STOPBITS_1;, compiled and re-flashed and it now works fine for ABP.

I'm not sure this is the proper fix.. the stop bits were obviously changed for some reason back in 1.2.1 so I'm hesitant to just change them back incase I break something else. I have no idea why nobody else seems to be experiencing a complete inability to connect via ABP - It may somehow be related to my region/sub band, not sure.

Wondering if someone can take a look at this and see if it needs changing back, or what the deal is with the stop bits.

Bobblybook commented 3 years ago

Upon further testing, changing stop bits causes other issues. I have found your branch at https://github.com/flhofer/mkrwan1300-fw/tree/fix-hup1.2.3 and have compiled using this, and it appears to fix ABP. I will continue using your modified lib until the pull request is accepted. Thank you