Arduino MKR WAN 1300

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:

Correct, @MotionTronic.
The code I’ve been using is pretty much like this:

void loRaSend(uint8_t *msg, uint8_t size)
    int err;

    tLastLoRaSend = millis(); //Keep track of timing
    modem.write(msg, size);
    err = modem.endPacket(false);

    if (err > 0)        
        Serial.println("LoRa send error!");

Sorry for not answering you on time. Glad you solved it, already. :+1:

1 Like