I've a SODAQ Mbili board with a LoRa bee. I've also a GPS sensor. Below you could find how I add the bee and the sensor.
On that board I make a JSON string with the GPS coordinates and I'll send that data over the LoRa network. But How could I do that.
In the source code I've download they use next code:
LoRaModemMicrochip modem(&MODEM_SERIAL, &debugSerial);
Device libTest(&modem, &debugSerial);
void readGPSData() {
GPSSensor gpsSens(4.3, 51.222, 15.5, 0);
dumpSendResult(gpsSens);
}
void dumpSendResult(Sensor& sns) {
bool sendResult = libTest.send(sns, true);
}
I'll change this code like code below so I could send my JSON data
LoRaModemMicrochip modem(&MODEM_SERIAL, &debugSerial);
Device libTest(&modem, &debugSerial);
void readGPSData() {
String json = "My JSON code";
dumpJsonResult(json);
}
void dumpJsonResult(String& text) {
bool sendResult = libTest.send(text, true);
}
But it gives me this error:
In function
void dumpJsonResult(String&)
:Error: no matching function for call to
Device::send(String&, bool)
bool sendResult = libTest.send(text, true); ^
Did you know how I could send JSON data to the LoRaWAN?
If you have correct NWSessionKey and APPSessionKey and so on, you could try to onboard your device over Actility's free partner zone. https://partners.thingpark.com/
Once you do that, you would need to:
Your device could also send ack to an Applicative Server you would plug to Actility's solution (REST-POST/JSON)
Let us know how it goes Best regards,