I have a really strange behaviour of the MKR 1300 regarding uplink messages.
I send messages every 5 minutes, the first one after startup is always OK (meaning I can retrieve it on the internet).
However the next ones are often in error (modem.endPacket(true); returns <=0). I really don't understand why.
Someone told me about a downlink Mac message sent by the network which could be the cause.
Any idea ?
Which size is the payload? If it is very large, you might be stopped by duty cycle limitations.
Around 10 bytes ; I also have a Sodaq board which has been updated and I don't have this problem on that board...
10 bytes is not much.
Ok, understood: when sending with modem.endPacket(true) you are asking for confirmation, and if it does not come, it fails. But the packet is sent anyway, so you have to see it on the gateway even without confirmation. Are you using a real gateway or a single channel?
Yes it's the confirmation which is the problem.
I'm using a real gateway ; the Orange (French phone operator) and its platform Liveobject.
I should then try unconfirmed and check if some messages are lost but not the best solution from my point of view.
But in my experience, even if seems to fail, packets are received by the gateway, so you should see them in the log.
Just to sort out possible reasons for not receiving downlinks. Are you using ABP or OTAA, ADR, and eventually which SF? With The Things Network, there is a downlink issue when using high SF and ABP (it depends on RX2 frequency).
Regarding confirmation, downlinks are usually limited or expensive, so it is normally better to avoid confirmation for every message.
I use OTAA ; ADR is not set so I guess it's off. Same for SF but when set I use SF12 ; is it what you call high SF ?
It is not the situation in which I found issues. Did you try to simulate a downlink? (the LoRaSendReceive example shows also downlinks when received). If confirmation is not received, likely there is some issue with downlinks. I do not know Orange offer; TTN limits the number of downlinks.
Yes the downlink messaging works in fact.
Without confirmation it works uplink.