traccar / traccar

Traccar GPS Tracking System
https://www.traccar.org
Apache License 2.0
4.96k stars 2.51k forks source link

Onboard Suntech ST310U Device #5283

Closed engenhariasantrack closed 3 months ago

engenhariasantrack commented 3 months ago

I am trying to implement the feature by myself. But before starting coding on the project I'd like to understand completely how that device works. Firstly, I've written a Java code to read the data sent by the server using Sockets. That approach is not working fine.

public void printRawValue(InputStream inputStream) throws IOException {
        int byteValue;
        while ((byteValue = inputStream.read()) != -1) {
            System.out.printf("%02X ", byteValue); // Format as hex string with 2 digits
        }
        System.out.println(); // Add a newline after printing all bytes
}

The output from the above code is:

02 00 3C 10 51 18 35 85 40 28 91 3F 18 03 0D 01 1F 25 04 09 2C 14 25 82 18 2A 03 41 56 00 00 00 00 62 85 F5 00 00 75 CF 0C 61 00 01 1B A5 00 00 1E 4E 04 00 00 B5 4B 02 D4 05 FF C0 0
4 09 01 03 02 00 3C 10 51 18 35 85 40 28 91 3F 18 03 0D 01 1F 07 04 09 2C 14 25 82 17 2A 03 41 57 00 00 00 00 62 85 F5 00 00 75 CF 0C 61 00 01 1B A4 00 00 1E 4E 04 00 00 B5 4B 02 D4 05 FF C0 04 09 01 03

That output doesn't like what I've seen on the Reporting Guide documentation. Yes, the message should be a Report. Also, I don't know whether the Data is on Zip or String format. The documentation says: (Sorry for the print) Screen Shot 2024-03-12 at 23 04 08

Clearly, the result I've seen isn't related to the documentation. What I'd like to ask is either help to fix my code so that I could work to onboard the device or someone else onboard that device.

Please, find the documentation I am seeing attached: Universal_Reporting_Guide_1.102(LATAM)[982].pdf

tananaev commented 3 months ago

For discussion you should use the forum.