SunTech ST-940 Support

César Nava Soto6 years ago

Hi. Doubt. Does Traccar support the ST-940 device from SunTech ?. I think it's compatible with the ST-910 (which is supported), but I'm not sure.

Anton Tananaev6 years ago

It is supported, as far as I know.

César Nava Soto6 years ago

Hi. I am testing an ST-940 device, and Traccar sends the following error (NumberFormatException):

2018-05-04 21:13:57 DEBUG: [B1BC1E94: 5011 < 201.130.59.148] HEX: 53543931303b456d657267656e63793b3930373531303138363b3535323b32303138303530343b32313a31343a30333b306666333465353336313b2b31392e3330313237363b2d3039392e3139303433333b3030302e3030303b3030302e30303b303b32383436323b36303b303b313b30323b3333343b30353b2d3234303b32303035313b3235353b303b3130300d
2018-05-04 21:13:57  WARN: [B1BC1E94] error - For input string: "0ff34e5361" - NumberFormatException (... < SuntechProtocolDecoder:100 < *:377 < ExtendedObjectDecoder:58 < ...)
2018-05-04 21:13:57  INFO: [B1BC1E94] disconnected
2018-05-04 21:14:03  INFO: [AEEDA760] connected
2018-05-04 21:14:03 DEBUG: [AEEDA760: 5011 < 201.130.59.148] HEX: 53543931303b416c6976653b3930373531303138360d

I decode the chain, and it is as follows:

ST910;Emergency;907510186;552;20180504;21:14:03;0ff34e5361;+19.301276;-099.190433;000.000;000.00;0;28462;60;0;1;02;334;05;-240;20051;255;0;100

¿Pueden, por favor, ayudarme?, ¿Cual sera el problema?.

Anton Tananaev6 years ago
César Nava Soto6 years ago

Hi.

Sorry. I did not understand well. Do I have to modify the source code ?, Or any configuration file with extension .protocolType?

Anton Tananaev6 years ago

Configuration suntech.protocolType parameter.

César Nava Soto6 years ago

O. K., thanks.

Is that a configuration file?, What path is it in?, What is its structure?, How can I modify the ST-910 configuration to make it compatible with the ST-940?

Anton Tananaev6 years ago

It's a parameter in Traccar configuration file.

César Nava Soto6 years ago

Hi.

I do not see that parameter in the configuration files. I guess I have to add it, what is its structure?, What should it contain?

Anton Tananaev6 years ago

You have to add it. I think the value should be 1, but you need to check with device vendor.

César Nava Soto6 years ago

Hi.

I add the parameter, restart the services, and keep sending the same error:

2018-05-04 23:17:29 DEBUG: [259FB0A8: 5011 < 201.130.59.148] HEX: 53543931303b4c6f636174696f6e3b3930373531303138363b3535323b32303138303530343b32333a31353a34353b336166353465353333313b2b31392e3330313833333b2d3039392e3139303635373b3030302e3234363b3030302e30303b313b32383436323b38303b313b303b303432333b30323b3333343b30353b2d3231353b32303035313b313b343b3130300d
2018-05-04 23:17:29  WARN: [259FB0A8] error - For input string: "3af54e5331" - NumberFormatException (... < SuntechProtocolDecoder:100 < *:377 < ExtendedObjectDecoder:58 < ...)
2018-05-04 23:17:29  INFO: [259FB0A8] disconnected
2018-05-04 23:17:36  INFO: [4B90D528] connected
2018-05-04 23:17:36 DEBUG: [4B90D528: 5011 < 201.130.59.148] HEX: 53543931303b416c6976653b3930373531303138360d

Decoded string:

ST910;Location;907510186;552;20180504;23:15:45;3af54e5331;+19.301833;-099.190657;000.246;000.00;1;28462;80;1;0;0423;02;334;05;-215;20051;1;4;100
Anton Tananaev6 years ago

I've just tested it on latest code and it works fine for me.

César Nava Soto6 years ago

Hi.

I download the latest code from the GitHub repository, try compiling with NetBeans 8.2, its send the following result, and do not create any JARs:

Failed tests:   testDecode(org.traccar.protocol.SuntechProtocolDecoderTest): latitude expected:<37.47877> but was:<126.88969>

Tests run: 323, Failures: 1, Errors: 0, Skipped: 8
Anton Tananaev6 years ago

You can disable test cases if they are failing for you.

César Nava Soto6 years ago

Hi.

It Keep sending the same error. I try another server (to rule out a configuration problem), and send a similar error:

2018-05-06 17:44:24 DEBUG: [09BB0A07: 5011 < 201.130.58.53] HEX: 53543931303b456d657267656e63793b3930373531303138363b3535323b32303138303530363b32323a34343a32343b343230373465363130323b2b31392e3334363931313b2d3039392e3037393537353b3030302e3030303b3030302e30303b303b32383436323b39303b313b313b30323b3333343b30353b2d3337383b32303036353b3235353b303b34310d
2018-05-06 17:44:24  WARN: [09BB0A07] error - Character N is neither a decimal digit number, decimal point, nor "e" notation exponential mark. - NumberFormatException (... < DistanceHandler:60 < BaseDataHandler:29 < ... < ExtendedObjectDecoder:74 < ...)

Decoded string:

ST910;Emergency;907510186;552;20180506;22:44:24;42074e6102;+19.346911;-099.079575;000.000;000.00;0;28462;90;1;1;02;334;05;-378;20065;255;0;41

I try both <entry key='suntech.protocolType'>1</entry> and 0