JeroenKl
(Jeroen)
1
Dear RAK support team,
I’m trying to get the GPS_tracker code running with the example solution code provided:
It works fine only when the Serial port tool IDE is opened and starts logging:
When booting the WisBlock without Serial port tool, it is not working. (standalone)
any advice?
BR, Jeroen
carlrowan
(Carl Rowan)
2
Hi Jeroen,
With not working, do you mean no uplink data was sent to TTN? Or just no GPS data?
Also, did you get a GPS fix (good GPS coordinates) on the serial terminal?
JeroenKl
(Jeroen)
3
Hi Carl,
With not working I mean nothing happens, no first TTN join request etc.
As soon as I open a serial logger console in IDE the tracker starts up and first join request is sent
Only after that, yes a GPS Fix is seen and sent when ’ twisting’ the device as described according the manual.
BR, Jeroen
Outlook for Android downloaden
beegee
(Bernd Giesecke)
4
Hi Jeroen,
The problem is in the example code.
// Initialize Serial for debug output
Serial.begin(115200);
while (!Serial)
{
delay(10);
}
Will wait forever when no USB cable is plugged in. We need to correct the example codes and change this.
I personally do like:
// Initialize Serial for debug output
Serial.begin(115200);
time_t timeout = millis();
while (!Serial)
{
if ((millis() - timeout) < 5000)
{
delay(100);
}
else
{
break;
}
}
which waits 5 seconds and if no Serial is detected just continuous.
2 Likes
JeroenKl
(Jeroen)
5
Thanks for the fast reply.
Yes this did the trick (ofcourse).
BR, Jeroen
1 Like
system
(system)
Closed
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.