Freematics ONE firmware for full traccar support with OBD data?

Anton Tananaev4 years ago

Couldn't you just comment out that ACK check?

Vladimir S4 years ago

There is no change when i comment this part, i think there are more checks..

  /// if (event == EVENT_ACK) {
    ///  Serial.println(F("ACK"));
    ///  return true; // no reply for ACK
    ///}
Vladimir S4 years ago

I have updated code, it is sending data but traccar is not showing any information about device.. no updates.. i have created device with ID and state is unknown. Can't find any example of freematics telelogger v5 data to compare.

2021-02-14 09:44:50  INFO: [c7a0dc23: freematics < 85.237.234.87] HEX: 4d305a5234583023303a3230343339312c31313a3134303232312c31303a383434353030302c413a34392e3231353932302c423a31382e3733373735352c433a3431302c443a302c453a3230382c32343a313235322c32303a303b303b302c38323a34372a4235
2021-02-14 09:44:50  INFO: [c7a0dc23: freematics < 85.237.234.87] DEHEX: M0ZR4X0#0:204391,11:140221,10:8445000,A:49.215920,B:18.737755,C:410,D:0,E:208,24:1252,20:0;0;0,82:47*B5
Anton Tananaev4 years ago

What is the device id? Looks like the issue is with identification now.

Vladimir S4 years ago

This is device ID M0ZR4X0, i will change it when i resolve this issue.

I have tried to update to look like this, but without success..

2021-02-14 11:31:48  INFO: [c7a0dc23: freematics < 85.237.234.76] DEHEX: ID=M0ZR4X0,0:1750254,11:140221,10:10314700,A:49.215903,B:18.737435,C:414,D:0,E:17,24:1253,20:-7;-7;-6*17
Anton Tananaev4 years ago

Can you please post log of the full connection session. It should send id first and then location data.

Vladimir S4 years ago

here it is..it took some time to get GPS data..

2021-02-14 18:17:03  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#DF=4208,SSI=-63,EV=1,TS=31273*D0
2021-02-14 18:17:04  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:32778,24:1248,20:0;1;0,82:43*1E
2021-02-14 18:17:07  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:35926,24:1249,20:0;0;0*E5
2021-02-14 18:17:09  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:37970,24:1249,20:0;0;0*E6
2021-02-14 18:17:12  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:40015,24:1249,20:0;0;0*D6
2021-02-14 18:17:14  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:42060,24:1253,20:0;0;0*D3
2021-02-14 18:17:16  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:44105,24:1253,20:0;0;0*D5
2021-02-14 18:17:21  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:49171,24:1253,20:0;0;0,82:44*15
2021-02-14 18:17:26  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:54234,24:1253,20:0;0;0,82:43*10
2021-02-14 18:17:31  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:59324,24:1254,20:0;0;0*DF
2021-02-14 18:17:36  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:64390,24:1254,20:0;0;0*DE
2021-02-14 18:17:46  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:74485,24:1255,20:0;0;0,82:44*1D
2021-02-14 18:17:56  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:84486,24:1255,20:0;0;0*E7
2021-02-14 18:18:06  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:94581,24:1253,20:0;0;0*E2
2021-02-14 18:18:16  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:104585,11:140221,10:17181600,A:49.216786,B:18.738129,C:751,D:0,E:0,24:1254,20:0;0;0*58
2021-02-14 18:18:26  INFO: [c7a0dc23: freematics < 85.237.234.122] DEHEX: M0ZR4X0#0:114595,11:140221,10:17182600,A:49.216548,B:18.738114,C:734,D:0,E:0,24:1253,20:0;0;0*51
Anton Tananaev4 years ago
Vladimir S4 years ago

How can i test this?

Vladimir S4 years ago

Great, i have build it from source..now it works!! only one warn here..

2021-02-14 21:08:30  WARN: [9e76b2f5] error - NullPointerException (FreematicsProtocolDecoder:168 < *:196 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)
Anton Tananaev4 years ago

Please provide full session log.

Vladimir S4 years ago

Hi..here it is..then it continues normally..

2021-02-14 22:44:11  INFO: [9e76b2f5: freematics < 85.237.234.44] DEHEX: M0ZR4X0#DF=4208,SSI=-71,EV=1,TS=20866,ID=M0ZR4X0*9E
2021-02-14 22:44:11  WARN: [9e76b2f5] error - NullPointerException (FreematicsProtocolDecoder:168 < *:196 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)
2021-02-14 22:44:12  INFO: [9e76b2f5: freematics < 85.237.234.44] DEHEX: M0ZR4X0#0:22371,24:1249,20:0;0;0,82:54*B
2021-02-14 22:44:12  INFO: [9e76b2f5] id: M0ZR4X0, time: 2021-02-14 22:44:12, lat: 0.00000, lon: 0.00000, course: 0.0

I have two questions, is there any way to use last known location? When gps data is not received it updates status but with lat and lon as 0.0000...then position sometimes jump when there is no gps data.

Another one, how can i add for example timestamp as attribute? It is first 0:xxxxx as number.. is there any way to add it or there must be code change? How it works when i add another custom PID to read with device?

Anton Tananaev4 years ago

Fix for the exception here:

https://github.com/traccar/traccar/commit/89ef9d436cb1ba56ea1f9b63e20afdc665186f9b

Time should already be handled. It's this part:

10:204391,11:140221
Vladimir S4 years ago

Thanks a lot..fix works..

Vladimir S4 years ago

Please another issue.. when server receives some different data..i think these are some events or ping from device. Server write them as gps positions 0.00000 and. location jumps from real position to 0.0000000.. Here are examples.. It looks like timestamp, battery, acceleration with some special at end after *.

2021-02-15 10:08:03  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:566624,24:1246,20:0;0;0*D
2021-02-15 10:08:03  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:08:03, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:08:31  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:594628,24:1249,20:0;0;0*15
2021-02-15 10:08:31  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:08:31, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:08:59  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:622633,24:1248,20:0;0;0*8
2021-02-15 10:08:59  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:08:59, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:09:27  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:650638,24:1248,20:0;0;0*E
2021-02-15 10:09:27  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:09:27, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:09:52  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:675678,24:1249,20:-1;0;-1*76
2021-02-15 10:09:52  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:09:52, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:11:04  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:747638,24:1249,20:0;1;0*17
2021-02-15 10:11:04  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:11:04, lat: 0.00000, lon: 0.00000, course: 0.0
--
2021-02-15 10:11:32  INFO: [e78fabf3: freematics < 85.237.234.87] DEHEX: XXXXXXX#0:775697,24:1250,20:0;0;0*14
2021-02-15 10:11:32  INFO: [e78fabf3] id: XXXXXXX, time: 2021-02-15 10:11:32, lat: 0.00000, lon: 0.00000, course: 0.0