Arduino MKR WAN 1300

Which sketch are you using? By the way, RSSI seems very low. Is the gateway far?


I am using the example sketch from MKRWAN lib documentation so I suppose it should be okay. Gateway is probably some 8 kilometers from where I am so that explains bad RSSI. I think I turn other of the MKR 1300 units to one channel gateway and see what results I get.

Are you sure joining succeeded? In case try with ABP, or try with an higher SF. By the way, there is no single channel gateway implementation for MKR WAN 1300 (and do not trust the “Error sending message” message on the serial console).

Hi ggeorgiou007,

I’m dealing with the same issue with the MKR 1300 using a I2C connection to an ads1115.
I’m sending data every 20’ everything works fine and after 2 days, data is no longer transmitted.

Since then, have you found the reason or a workaround?


Hi everyone, I already met some of you guys on other forums and github issues, good to know you keep this conversation going here.
I can see this is a quite broad topic, but please move it to another one if my question is offtopic.

I’ve been struggling with MKRWAN1300 for about 6 months and - like many of you - faced some troubles. To make it work a little more reliable I changed the MKRWAN.h improving the joiOTAA function because it was frequently losing the modem answer. On my system I have a loraserver as the Network Server and the ADRACKReq messages works just fine! When I set on the NS that I have channels 1-8 enable, on the first message from the device that reaches the network it sends a downlink with the channel configuration in the ADRACKReq MAC command and the device configures itself correctly based on it.
One problem I have now is that when I need to power off/reset my device I don’t want to go trhough the OTAA process everytime, so I keep the NetworkAddres, NetworkSkey and AppSKey values saved then I run a local ABP join which doesn’t send a Join Request message. This is also working correctly, BUT, in this case the NS doesn’t sends a ADRACKReq MAC command since it considers that the session is the same and no parameters was changed.
So, this whole story was to ask: Is there a way to ask (force) to the Network Server to send to the device a ADRACKReq MAC command?

Here: Does ADR require the use of confirmed uplinks? , @arjanvanb suggests that the end device should trigger it, but I see no further information about how this could be done.
If you have some clue about how to do this on the MKRWAN1300, please share.
Thanks in advance.

That’s not enough; you also need to store the counters, the ADR state, and much more; see OTAA best practice: how to not join every time? I’d assume that would also solve your problem.

OK, I’ll check it!
Thanks a lot for the help. But, on my current tests I’m only keeping those data and it’s working quite well (I don’t use the counters). My only real problem now is that the device sends over all the channels, and the current version of the modem on MKRWAN1300 doesn’t have an AT command to mask the channels, so I would need to receive it from the NS.

But TTN surely will. If your device is starting at zero again, then TTN will reject your messages.

(You should store the network settings as well, like mentioned in the linked topic.)

1 Like

Sure, I’m aware that TTN will validate the counters. I’m not using TTN on those tests. I’m running my own loraserver, then I can ignore the counters if I have to.
Anyway, I read the thread you mention about OTAA best practice, and I’m still confused about the ADRACKReq command. On my analysis here I believe that forcing the NS to send a ADRACKReq command would solve my current situation and probably can be the final solution or part of it. Using the MKRWAN lib I can easily keep track of the counters, but as far as I know I can’t mask the channels by myself (there’s no AT command to do so), that’s why I need the NS to send the ADRACKReq MAC command to the device, defining the channels to be used.

Thanks again.

If you want to resume you need to save and restore all state information of the LoRaWAN stack to conform to the specification.

1 Like

Can you tell how to do it in the MKRWAN1300 ? :thinking:

Hey @Amedee , I was looking at your solution on Github as you mentioned here: Arduino MKR WAN 1300.
It looks like you were doing the same aproach as I am. Don’t you have problems with the channels used? In my case if the device doesn’t receive the ADRACKReq MAC command from the NS, having the available channels it will randomize a channel (over all 64 there are on the AU915 plan) for every message. If a I have only 2 8-channels gateways near me (my actual situation!) only 25% of the messages are received.
When I run an OTAA join, the NS will send a downlink with the ADRACKReq MAC command informing the available channels (which was configured on my loraserver). But when I reboot the end device and retrieve the key from memory then perform a ABP join, it is not aware of what are the available channels, and by default, will pick any channel to send each message. Don’t you have this kind of problem? Do you know if it is possible to force the NS to send the channel availability to the device? Do you know if it’s possible to directly mask the channels on the MKRWAN1300?


Yes, my solution is not complete…
It works well with EU868 because the channels are fixed… (I still should change the downlink channel config for higher SF though as TTN is non standard)

I’m afraid you will have to hack the firmware to get/set channel config

Yes, that’s my current problem @Amedee !
MKRWAN’s modem doesn’t has an AT command to get / set the channel. The Murata’s firmware has the AT+CHMASK to do so, but Arduino doesn’t implemented it. So, my solution to do the OTAA join once and then use ABP join on the next ones can’t be successfully used 'cause it will start losing a lot of packets due to sending on channels that has no gateways listening to!

Does anyone has a solution for it, to be used on the US915 or AU915 channel plan?

Is there any way to set the frequency to 868.1 Mhz only? Since the gateway I’m using is only able to receive from that frequency…

Since the LoRaWAN chip is certified, in principle is not possible - the standard asks for at least 3 frequencies.

Can’t find it, but is there any LiPo/solar shield for this one?
I know that the initial board version is not really low power (yet)…

Hi, I have just started playing with my MKR1300 lorawan unit and the example which is great and simple only sends its payload as Ascii String. i want to send my payload as bytes to save on airtime, can anyone advise on the commands to use , i tried to go through the Library but there are private commands. any help or guidance would be awesome.

ok so it seems if you use the following command you can send bytes
however how would you send an array? as it seems to be only 1 byte in size allowed? maybe i am doing something wrong :frowning:

modem.write(payload,sizeof(payload)); // send data as bytes

this is the correct command :slight_smile: