Comments (8)
I have been considering edge cases and have identified an issue where after a device joins a network and is then moved out of range of the gateway, the device continues to send packets and is not aware the packets have not reached the gateway.
I expected that somewhere along the way, the gateway would request a status (once per hour or once per day?). Perhaps this did occur but the device was out of range and did not receive the downlink. Does the murata module firmware have a timer that tracks the last time the gateway talked to the device? I am not even sure if this is something built into the LoRaWAN specification. It seems to me that if the device hasn't heard from the gateway in a while, there should be a way to identify that condition.
At the moment, the only way I can think to do so is to queue a confirmed packet every once in a while. I'm not sure thought that will work with the current firmware because of the blocking timeouts, the period between transmissions (in my case 2 mins), sleeping and watchdog. That is, it is undesirable to stay awake several seconds (or up to 16 minutes if the packet is retried up to 8 times) waiting for a confirmed packet.
We should give some consideration to providing a state machine and asynchronous function(s) that allows the device to determine the state of the network and the last time there was communication with the gateway. connected() returns the join state but doesn't really tell you if the device has stopped communicating with the gateway for some reason. Moreover, an asynchronous function to check the confirmed packet status would be helpful so that when you wake from sleep, you can check if the sent packet was confirmed.
I think a state machine could also help with checking the receive status as well when you wake from sleep.
from mkrwan.
Regarding the endpacket() issue, there are some hints in lora_send() here: https://github.com/arduino/mkrwan1300-fw/blob/63787fe5ed8bd07119caba20d2065a26004b2261/Projects/Multi/Applications/LoRa/AT_Slave/src/lora.c#L734
However, the return value is a generic "busy". I think it would it be helpful if the return value was the actual busy condition?
from mkrwan.
AFAIK, the rejection policies (which concur to define the maximum message rate) are internally handled by the LoRa standard (duty cycle, transmission windows and so on). As you correctly found, the only way to know if you are still "connected" (not the right word) is to send a confirmed packed once in a while.
To reduce the blocking timeouts I suggest to use one of the spare GPIOs as IRQ to signal that a message is available. This would require some addition to both the FW and the library.
from mkrwan.
Thank you for the feedback.
I like the idea of the GPIO connection. Sort of like a flow control line. Is there any chance you could add a GPIO connection from the Murata module to the SAMD in the board rev you guys are working on?
from mkrwan.
There are already a few unused gpios, no need to wait for the new revision. It's "only" a matter of finding the time to implement it (or accepting the right pull request 😉 )
from mkrwan.
Apologies, I am missing something here? I had a look at the MKRWAN schematic and, other than the existing SPI connections, there are no other no electrical connections from the module to the samd21? So, to use a hardware handshake would require a physical connection?
Is there some way to agree on what pins will be reserved for this purpose so when you guys update the board, the modification will be implemented?
I can in the mean time likely hack the existing board as you suggest.
BTW, any word on when the new board will become available?
from mkrwan.
PA28 on the samd21 looks like a nice potential candidate.
from mkrwan.
PA13_SCK and PA14_RF_SSN are also unused on the actual library but are routed (we use them in "dumb" mode). In normal operation mode thay could be used for this kind of "ring" indication.
from mkrwan.
Related Issues (20)
- Does this library really support US915? HOT 5
- External SPI bus freezes when LoRa is enabled MKRWAN 1310 - NOT same issue as Flash contention
- Feature Request: Allow printing the RSSI values HOT 1
- Is my MKR WAN 1300 not sending proper data to TTN? HOT 2
- Add GitHub Actions workflow to synchronise with shared repository labels
- Feature Request: Allow the MKRWAN library to send and receive very simple LoRa peer-to-peer commands HOT 5
- Class A ABP mode not receiving any messages HOT 3
- Official AT Commands for firmwares? HOT 2
- Set RX2DR - Not changing value HOT 1
- Why are join/connected methods virtual? HOT 1
- More recent LoRaWAN firmware for Murata HOT 2
- USB disconnecting when connecting via modem.joinOTAA HOT 1
- Faster upload speeds HOT 1
- Firmware version mismatch HOT 1
- how to joinOTAA with different datarate HOT 2
- Use of the restart() function is not documented
- Possible bug in `arduino_read` function of "MKRWANFWUpdate_standalone" example sketch
- Setting DR doesn't work HOT 3
- Endianness AppEui HOT 3
- Unable to join through OTAA on EU868 spectrum HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkrwan.