Also some people are looking at the mbed framework that recently has added support for the RAK811 board.
However using the mbed framework with OS fills the entire flash and not the basic support for the gps and sensor. I would like to get the people interested in this to write in this thread.
I will do my best to get the GPS and mems sensor working here,
Mbed LoRaWANStack initialized
CONFIRMED message retries : 3
Adaptive data rate (ADR) - Enabled
Connection - In Progress ...
Connection - Successful
Dummy Sensor Value = %3.1f
27 bytes scheduled for transmission
Message Sent to Network Server
@BoRRoZ as this thread is already getting confusing with the different options for the RAK811, could you split off the mbed question from @OlofAst and reply from @nicbkw above.
I have added MEMS and GPS support and it seems to work.
I still just send 4 bytes. 00010203 and the data gets through but it sends way too fast and too often. Maybe someone can help me understand the results.
Why does payloadsize vary so much? Why all the zero size downlinks?
It was “lora.duty-cycle-on”: true,
When I set it to false, sending was ok.
However I would have guessed that the lorawan stack should have kept the data rate at a lower level.
I also added a 1306 display. Tomorrow I will add data from the gps.
Really interested on getting https://github.com/ARMmbed/mbed-os-example-lorawan
going on either an mDot or RAK811. The problem I have is that when I set the lora.phy value to 2 (AU915) the compiler gives this error-
Error: Declaration does not declare anything in “extras/mbed-os.lib/features/lorawan/LoRaWANStack.h”, Line: 446, Col: 6 and-
Error: Declaration does not declare anything in “extras/mbed-os.lib/features/lorawan/LoRaWANStack.h”, Line: 446, Col: 6
All other PHY numbers compile fine
Because I have an 8 channel gateway I also need to select sub band 2, which the MBed docs don’t seem to mention how to do.
If you want to fix it yourself.
You can compile with lora.phy = 0 and save the result in one directory then compile with lora.phy=2 and see what defines are missing.
Its probably something easy to fix.
Hello,
I Implemented the GPS function in my example, but it is not working.
I am not sure what is the problem but there does not seem like I get any serial data from the GPS.
If anyone with more experience could look at this, I would be greatful.
FYI. Now it works.
I think it was that Gps.service(); was not called often enough.
The payload format still needs some fixing.
If you have an 1306 I2C display, checn #define HAS_DISPLAY 1 in main.cpp
I ended up creating an issue on github. The cause turned out to be an semicolon typo.
I’m now trying to get the RAK811 to sleep using -
…
case TX_DONE:
dbg.printf("\r\n Message Sent to Network Server\r\n");
if (MBED_CONF_LORA_DUTY_CYCLE_ON) {
dbg.printf("\r\n Sleeping for %d seconds, sleep allowed %i \r\n",SEND_INTERVAL,sleep_manager_can_deep_sleep());
wait(SEND_INTERVAL);
send_message();
…
sleep_manager_can_deep_sleep() returns 0, the processor doesn’t sleep.
Is there a better place to stick the wait statement?
Sorry for the borked code formatting.