New device not working, should it?

Max2 years ago

Hello, I'm trying to get a new device working with Traccar.

The device uses port 5005 with NMEA.
The old device sends this message (RMC) and it works:

amit4g$GPRMC,144111.00,A,XXXX.XXXXXX,N,XXXXX.XXXXXX,E,0.0,3.9,131123,1.3,E,A*31

Then I tried to use the same settings for the new device, it's just a new version of the old one. But using RMC I only get the online status of the device even though it sends the correct position:

testamit5g2$GNRMC,144121.000,A,XXXX.XXXX,N,XXXXX.XXXX,E,0.00,118.86,131123,,,D,V*01

I'm guessing GNRMC is not supported?

Then I tried using the other formats available for the device, and using GGA I finally got it working. This worked for a couple of hours until for some reason it just stops updating the map even though the device is sending, what looks like, correct data:

testamit5g2$GPGGA,145319.000,XXXX.XXXX,N,XXXXX.XXXX,E,2,10,1.01,99.1,M,39.0,M,,*51
id: testamit5g2, time: 2023-11-13 16:12:39, lat: XX.XXXXX, lon: XX.XXXXX, course: 0.0

But this doesn't register trips or stops since it's not sending speed data?

What am I missing here? Is GPGGA and GNRMC not supported? Is there something I can do about it?

Still quite the noob at this, so any help would be appreciated.

Anton Tananaev2 years ago

GPGGA should be supported, but it doesn't include speed, as you correctly identified.

GNRMC is probably not supported.

Max2 years ago

Thanks for the fast reply.
Not including speed is fine, but can I get the server to register the trips?

I get the position in reports/route but I'm guessing it's not creating trips due to no stops being sent or something like that?

Anton Tananaev2 years ago

This should answer the question:

https://www.traccar.org/trips-stops/

Platoa year ago

I tested GNRMC and there was also a problem.
I looked at the source code of traccar, and it seems that GNRMC should support it.

I think there should be a bug in the code.

/workspaces/traccar/src/main/java/org/traccar/protocol/T55ProtocolDecoder.java

    private static final Pattern PATTERN_GPRMC = new PatternBuilder()
            .text("$")
            .expression("G[PLN]RMC,")
            .number("(dd)(dd)(dd).?d*,")         // time (hhmmss)
            .expression("([AV]),")               // validity
            .number("(dd)(dd.d+),")              // latitude
            .expression("([NS]),")
            .number("(d{2,3})(dd.d+),")          // longitude
            .expression("([EW]),")
            .number("(d+.?d*)?,")                // speed
            .number("(d+.?d*)?,")                // course
            .number("(dd)(dd)(dd),")             // date (ddmmyy)
            .expression("[^*]+")
            .text("*")
            .expression("[^,]+")
            .number(",(d+)")                     // satellites
            .number(",(d+)")                     // imei
            .expression(",([01])")               // ignition
            .number(",(d+)")                     // fuel
            .number(",(d+)").optional(7)         // battery
            .number("((?:,d+)+)?")               // parameters
            .any()
            .compile();