arduino-aprs-tracker
arduino-aprs-tracker copied to clipboard
SmartBeaconing is sending invalid packets after long time continuous working
Hello, We have tested new SmartBeaconing feature (tested on 2 devices) during long time (few days) continuous work. We found very strange issues.
During first several days all sending correctly. But later we found that trackers send invalid data
-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5036.75N/02614.07E>/A=000746Arduino APRS Tracker
Should be
UR5KSH-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5036.75N/02614.07E>/A=000746Arduino APRS Tracker
And the second tracker
UR5KHL-9>APZMDM,UR5KSH-1,WIDE1*,WIDE2-2,qAO,UR5KDK-2:=5044.37N/02603.18E>-16/60/A=000670Arduino APRS Tracker
To fix invalid behavior I restarted device.
I think this error someway connected with buffer overload.
Still checking it, thanks for reporting it
Was it possible to reproduce the error?
Nope, i reset it today and will let it there running for 48h again (stationery)
In our case bug appears after 7 days. So, maybe 48h would be not enough.
Hello @billygr Any news? Does only our setup has such kind of problem? If yes maybe we need to try to change Arduino board.
Hi,
It is software related for sure but i cannot trace it. What is the Arduino IDE version you are using ? Can you please try with the latest ?
Good morning, hope you are doing well. After long time we found what's cause problem of irregular distance (it was our second problem). Definitely something wrong with GPS data.
Please look here, this is Arduino terminal:
Sometimes GPS send incorrect coordinates (putting zero) to Arduino:
Sometimes like this> Lat: correct_data Lon: 0.00000
Sometimes like this> Lat: 0.00000 Lon: 0.00000
In theory any object could be in such position, but in practice this is almost impossible. Maybe it's good idea to add additional check ? I will explain what I mean. For instance if distance between 2 coordinates more than 100 km, it's mean that something wrong with GPS data, and in this case just ignore such packet ? Almost all our tracker (3 pieces) has such type of bug.
In additional. The same hardware (Arduino, GPS) works create in previous firmware, without SmartBeacon, where only interval beaconing send. Maybe this problem somehow connected with continuous data transmission between Arduino and GPS in case of SmartBeaconing and interval data transmission in case of interval beaconing ?
Today we are going to upload firmware with latest Arduino and library. I'll let you know about the results.
Got it , it looks like the invalid is always 0.0000 let me work with it over the weekend and drop this type of location when they arrive from the GPS
This is packet from aprsdirect.com. I think at least Lat or Lon is 0.0000 when it failed.
UR5KSH-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=0000.00N/00004.00E>-48/03/A=000662Arduino APRS Tracker
Also this string -48/03/
is very strange
-48/03/A=000662Arduino APRS Tracker
In additional to manuall validate coordinates maybe we shoud also validate that temp
variable from
https://github.com/billygr/arduino-aprs-tracker/blob/de4ff6c1971c3560d853e6b98d39e82cd3298869/arduino-aprs-tracker/arduino-aprs-tracker.ino#L218
is correct before sending packet APRS_sendLoc()
Or even check that variable APRS_comment
started from /A=
.
Thank you, and the code is from the SmartBeacon branch ?
Thank you, and the code is from the SmartBeacon branch ?
Yes. It's from SmartBeacon branch. Master branch works without bugs.
Please take a look on this packet
UR5KHL-9 to APZMDM-0 via WIDE1-1,WIDE2-2 UI PID=F0 5037.58N/02614.70E>-22/23./A=004200Arduino APRS Tracker. V=13.5
This is decoded APRS packet. After 6 hours we have lot's of packet's with incorrect course and speed data.
This -22/23./
should be represented as 000/000 or .../... or VVV/VVV
APRS reference:
The 7-byte CSE/SPD Data Extension can be used to represent the course and
speed of a vehicle or APRS Object.
The course is expressed in degrees (001-360), clockwise from due north. The
speed is expressed in knots. A slash / character separates the two.
For example:
088/036 represents a course 88 degrees, traveling at 36 knots.
If the course and speed are unknown or not relevant, they can be set to
000/000 or .../... or VVV/VVV.
I found that this data are based on following expressions https://github.com/billygr/arduino-aprs-tracker/blob/de4ff6c1971c3560d853e6b98d39e82cd3298869/arduino-aprs-tracker/arduino-aprs-tracker.ino#L127
https://github.com/billygr/arduino-aprs-tracker/blob/de4ff6c1971c3560d853e6b98d39e82cd3298869/arduino-aprs-tracker/arduino-aprs-tracker.ino#L125
Where the problem is ? Is it because of incorrect Arduino calculation or incorrect data received from satellite ?
gps.f_course()
calculated on Arduino with TinyGPS
or this is just received data from satellite ?
This is from TiniGPS
case COMBINE(_GPS_SENTENCE_GPRMC, 8): // Course (GPRMC)
_new_course = parse_decimal();
Can you confirm that speed_kt
is received from GPS module. So, Arduino received speed and course in GPRMC message which had calculated on GPS module compute system ?
Hi,
Let's try to fix it one step at a time. I have added a small check for lat if 0 it will be ignored Can you please confirm that it is working as expected ?
Hi,
Let's try to fix it one step at a time. I have added a small check for lat if 0 it will be ignored Can you please confirm that it is working as expected ?
Hey, thanks! I will test new code and let you know.
BTW, we use Neo-6m GPS module. This is quite similar, to Adafruit Ultimate GPS. But much more cheaper.
Also I found this library dedicated to work with our hardware.
Hi,
I am waiting for a one Neo-6m. Use whatever is available, there is a chance that are fake (if coming from china) but still they work . I will look over this code maybe it will help to reduce the ram usage (needed for LibAPRS)
Billy
Hi,
I am waiting for a one Neo-6m. Use whatever is available, there is a chance that are fake (if coming from china) but still they work . I will look over this code maybe it will help to reduce the ram usage (needed for LibAPRS)
Billy
We bought Neo-6m on Aliexpress, so definitely fake. But nevertheless they correctly work with U-Center.
Here is our APRS log with new firmware after 8 hours. For example randomly 10 minutes from 9:30 to 9:40. We got 16 packet.
Problem with incorrect coordinates not found.
Problem with incorrect course/speed is found.
11 packet are correct,
5 packet are not correct.
All the time Arduino is connected and doesn't move.
26.01.2021 09:30:10+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.71E>/A=004200Arduino APRS Tracker
26.01.2021 09:30:40+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.71E>-31/35/A=004200Arduino APRS Tracker
26.01.2021 09:30:43+01:00: UR5KHL-9>APZMDM,UR5KSH-1,WIDE1,UR4PWJ-1*,WIDE2-1,qAS,UR3PDA-9:=5037.59N/02614.71E>-31/35
26.01.2021 09:31:09+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>/A=004200Arduino APRS Tracker
26.01.2021 09:31:58+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.69E>/A=004200Arduino APRS Tracker
26.01.2021 09:33:28+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.71E>/A=004200Arduino APRS Tracker
26.01.2021 09:34:35+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.58N/02614.69E>/A=004200Arduino APRS Tracker
26.01.2021 09:35:39+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.58N/02614.70E>/A=004200Arduino APRS Tracker [Duplicate]
26.01.2021 09:36:29+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.58N/02614.70E>/A=004200Arduino APRS Tracker [Duplicate]
26.01.2021 09:37:13+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>/A=004200Arduino APRS Tracker
26.01.2021 09:38:12+01:00: UR5KHL-9>APZMDM,UR5KSH-1,WIDE1*,WIDE2-2,qAR,UR4PWJ-1:=5037.59N/02614.70E>138/001/A=004200Arduino APRS Tracker
26.01.2021 09:38:36+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.58N/02614.70E>/A=004200Arduino APRS Tracker [Duplicate]
26.01.2021 09:39:03+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>183/002/A=004200Arduino APRS Tracker
26.01.2021 09:39:33+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>/A=004200Arduino APRS Tracker
26.01.2021 09:40:10+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>173/001/A=004200Arduino APRS Tracker
26.01.2021 09:40:54+01:00: UR5KHL-9>APZMDM,WIDE1-1,WIDE2-2,qAR,UR5KSH-1:=5037.59N/02614.70E>/A=004200Arduino APRS Tracker
We will continue to monitor.
Problem with incorrect coordinates appears again (approximately after 18 hours continuously work ).
Here is the bug Lot: 00000.39E
:)
My personal opinion. After few days of thinking I believe that the problem is in Arduino, maybe lack of RAM or buffer overhead.
I will try to explain my thoughts.
- When we connect GPS module and run this https://github.com/mikalhart/TinyGPS/blob/master/examples/test_with_gps_device/test_with_gps_device.ino we never saw incorrect coordinates.
- We never saw incorrect coordinates when we use arduino-aprs-tracker master branch (without smart beaconing).
- Lack of RAM or buffer overhead could explain issue with inconsistent speed/course. Restart helps.
All of the above shows that GPS works correctly and problem is not in incorrect NMEA sentences, but with operation in Arduino.
Hi,
- This is the reason that it is difficult to trace it What worries me is that the altitude is WAY wrong and this value is reported directly from the GPS
Did you ever seen a correct altitude ?
Did you ever seen a correct altitude ?
Hm, good question. We tested GPS using this example https://github.com/mikalhart/TinyGPS/blob/master/examples/test_with_gps_device/test_with_gps_device.ino
Altitude shows correctly.
But with your firmware altitude always the same.
m/ft: 1000000.00/4200
What is the most interesting. According to code https://github.com/billygr/arduino-aprs-tracker/blob/b32518e5d32f26526903e803a8dba6900cd4fa45/arduino-aprs-tracker/arduino-aprs-tracker.ino#L161
First should be falt
and than ialt
.
But
https://github.com/billygr/arduino-aprs-tracker/blob/b32518e5d32f26526903e803a8dba6900cd4fa45/arduino-aprs-tracker/arduino-aprs-tracker.ino#L124
https://github.com/billygr/arduino-aprs-tracker/blob/b32518e5d32f26526903e803a8dba6900cd4fa45/arduino-aprs-tracker/arduino-aprs-tracker.ino#L125
ialt
should be always bigger then falt
.
In our case falt
= 1000000.00 and ialt
= 4200
I tried to run code but without your library, https://github.com/billygr/LibAPRS .
Here is result
Everything is ok with altitude. So something wrong with https://github.com/billygr/LibAPRS definitely.
Hi,
Not sure if it will make a big difference, i reduced a bit the memory usage on the latest update by 31 bytes...
I will also check with the altitude is not displayed correctly
bit the memory us
We've checked your new firmware.
Here is result
In short, after 15-20 seconds, Arduino starting continuously transmitting UPDATE packets.
i see also altitude is completely wrong, i am waiting for a NEO-6m to be delivered (hopefully this month...) i will be able to understand what is going wrong when i receive the hardware
Hello, @billygr How is your success ? Have you received NEO-6m ?
For information. I bought Neo-M8N and checked. Founded that this GPS module not working with TinyGPS. There is new library TinyGPS++ for new GPS module. I would appreciate if you use this library.
Hi,
NEO-6m never arrived, dispute is open. You are right about the TinyGPS++ i will try to convert it to this. Expect an update till the weekend
B
During this week I made some tests. I have 2 GPS module. 1 coming from Aliexpress. Which shows incorrect altitude and in general working very buggy with APRS firmware, but works ok with GPS test firmware. 2 branded GPS module "Velleman VMA430 " coming from local shop. It shows correct altitude and seems to work good.
For now I have only one question. What's wrong with Aliexpress GPS module.... Would be very interesting to test it after you implement TinyGPS++ library.
By the way, if you are interesting I can send you my chines version of GPS.
Hi,
I am working on using the TinyGPS++, there is a bigger issue because it's not compatible with the previous version, mainly the lat/long that the library provides is TinyGPS 3802ABCD/2385ABCD TinyGPS++ 38.02ABCD,23.85ABCD and uses also more memory, in any case i am working on it on a different branch
As for the version reading on the internet i found out that they are clones and not real NEO modules
I will update you if i need a module THANKS for the offer !!!
Give it a try static test displays the correct location, don't know how stable it is or it will run out of memory (TinyGPSPlus needs more memory) https://github.com/billygr/arduino-aprs-tracker/tree/TinyGPSPlus