Hi could anyone recoment a library that works with Seeeduino lora gps , i have tested tiny gps ++ but with some libary it works and i get wrong location ANY IDEAS ?
Hi Dear customer, we have one example to extract the gps data. but it has one bug that it seems acquire data at beginning and the data is not updated when we are moving. thanks.
4.2 Lat and Lng
Thanks for Todd Krein for sharing the example in Github. Please download the TinyGPS++ library and then copy below code to Seeeduino Lorawan.
#define USE_GPS 1
#include “LoRaWan.h”
#ifdef USE_GPS
#include “TinyGPS++.h”
TinyGPSPlus gps;
#endif
void setup(void)
{
char c;
#ifdef USE_GPS
bool locked;
#endif
SerialUSB.begin(115200);
while(!SerialUSB);
lora.init();
lora.setDeviceReset();
#ifdef USE_GPS
Serial.begin(9600); // open the GPS
locked = false;
// For S&G, let’s get the GPS fix now, before we start running arbitary
// delays for the LoRa section
while (!gps.location.isValid()) {
while (Serial.available() > 0) {
if (gps.encode(c=Serial.read())) {
displayInfo();
if (gps.location.isValid()) {
// locked = true;
break;
}
}
// SerialUSB.print©;
}
// if (locked)
// break;
if (millis() > 15000 && gps.charsProcessed() < 10)
{
SerialUSB.println(F(“No GPS detected: check wiring.”));
SerialUSB.println(gps.charsProcessed());
while(true);
}
else if (millis() > 20000) {
SerialUSB.println(F(“Not able to get a fix in alloted time.”));
break;
}
}
#endif
}
void loop(void)
{
displayInfo();
delay(1000);
}
void displayInfo()
{
SerialUSB.print(F(“Location: “));
if (gps.location.isValid())
{
SerialUSB.print(gps.location.lat(), 6);
SerialUSB.print(F(”,”));
SerialUSB.print(gps.location.lng(), 6);
}
else
{
SerialUSB.print(F(“INVALID”));
}
SerialUSB.print(F(" Date/Time: “));
if (gps.date.isValid())
{
SerialUSB.print(gps.date.month());
SerialUSB.print(F(”/"));
SerialUSB.print(gps.date.day());
SerialUSB.print(F("/"));
SerialUSB.print(gps.date.year());
}
else
{
SerialUSB.print(F(“INVALID”));
}
SerialUSB.print(F(" “));
if (gps.time.isValid())
{
if (gps.time.hour() < 10) SerialUSB.print(F(“0”));
SerialUSB.print(gps.time.hour());
SerialUSB.print(F(”:"));
if (gps.time.minute() < 10) SerialUSB.print(F(“0”));
SerialUSB.print(gps.time.minute());
SerialUSB.print(F(":"));
if (gps.time.second() < 10) SerialUSB.print(F(“0”));
SerialUSB.print(gps.time.second());
SerialUSB.print(F("."));
if (gps.time.centisecond() < 10) SerialUSB.print(F(“0”));
SerialUSB.print(gps.time.centisecond());
}
else
{
SerialUSB.print(F(“INVALID”));
}
SerialUSB.println();
}
Seeed techsupport team
Bill
Hey guys,
i also work with the seeeduino loraWan w/gps and i also try to get the Lat/Lng. I walked through the wiki and examples and tried the example of Todd Krein. But all i get in the SM is this:
</s>Location: INVALID Date/Time: 1/6/2080 00:00:15.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:16.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Not able to get a fix in alloted time.
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
Location: INVALID Date/Time: 1/6/2080 00:00:17.79
<e>
so, where is the problem?
Dear Customer:
I have got your question.The wiki and the examples of Todd Krein have been checked,I don’t find any problem.If you want get gps information from Seeeduino LoRaWAN module, may not receive GPS signals indoors,and you should take it outdoor open space.
Best Wishes!
So I’m not sure what others have encountered, but I’ve tried this with and without an external antenna, and I have the exact same results. I get back a time result from the GPS in that test sketch, but never get a location returned. Since I’m getting time, I’m assuming that it’s talking to the GPS hardware properly, but the device is sitting in a clear open area for hours and never able to get a position fix.
Hi,
I submitted the issue to Todd and he is not checked yet. please refer to below link.
<LINK_TEXT text=“https://github.com/toddkrein/OTAA-LoRaW … d/issues/1”>https://github.com/toddkrein/OTAA-LoRaWAN-Seeed/issues/1</LINK_TEXT>
Seeed techsupport team
Bill
I just bought a LoRaWAN with GPS. I tried the Todd Krein example on the wiki and I get only this:
+RESET: OK
No GPS detected: check wiring.
0
Should I assume the board is defective?
Ooooookay, reading the previous sample code (Serial bridge) I realized that the GPS is on Serial5 and not on Serial – as used in the Todd Krein example. Replacing Serial with Serial5 fixed the issue. You should fix that on the wiki…
The lat lng example on the wiki of the Seeeduino LoRaWan is still not working for updating the position. Is there any fix for this problem?