Xexun DDX04 - Failed process to get geolocation location, based on mac address and signal strength.

Andri Putra2 years ago

Hi,

Here a result of my API Device Status for Xexun DDX04 Devices

[
    {
        "id": 10798,
        "attributes": {
            "index": 223,
            "rssi": 21,
            "charge": false,
            "batteryLevel": 18,
            "distance": 0,
            "totalDistance": 11584684.23,
            "motion": false
        },
        "deviceId": 48,
        "protocol": "xexun2",
        "serverTime": "2023-05-09T08:42:16.263+00:00",
        "deviceTime": "2023-05-09T08:42:00.000+00:00",
        "fixTime": "2023-05-04T05:33:00.000+00:00",
        "outdated": false,
        "valid": true,
        "latitude": 1.1135616302490234,
        "longitude": 104.0654296875,
        "altitude": 0,
        "speed": 0,
        "course": 0,
        "address": null,
        "accuracy": 0,
        "network": {
            "radioType": "gsm",
            "considerIp": false,
            "wifiAccessPoints": [
                {
                    "macAddress": "ac:84:c6:81:0c:31",
                    "signalStrength": 210
                },
                {
                    "macAddress": "74:83:c2:3a:c3:c0",
                    "signalStrength": 204
                },
                {
                    "macAddress": "9c:9d:7e:28:0a:7b",
                    "signalStrength": 200
                },
                {
                    "macAddress": "28:d1:27:6f:40:02",
                    "signalStrength": 187
                },
                {
                    "macAddress": "1e:7d:22:40:47:2a",
                    "signalStrength": 186
                },
                {
                    "macAddress": "74:83:c2:3a:c3:d3",
                    "signalStrength": 184
                },
                {
                    "macAddress": "74:83:c2:3a:c1:ff",
                    "signalStrength": 181
                }
            ]
        }
    }
]

I have failed to get location if i use wifi positional geolocation.

after I checked the API in the network -> WifiAccessPoints -> section

the format of the signalStrength data obtained is not in accordance with the provisions of google maps, the format of the signalStrength obtained should be -dbm.

so I tried to process the raw data using postman and post data to google maps api, by converting signalstreng to dbm format, and I managed to find my location point.

            "wifiAccessPoints": [
                {
                    "macAddress": "ac:84:c6:81:0c:31",
                    "signalStrength": -83      // = 127 - 210= -83
                },
                {
                    "macAddress": "74:83:c2:3a:c3:c0",
                    "signalStrength": -77  // = 127- 204 = -77
                },

     and so on.....

how do i do that in traccar's backend? please help, I really appreciate it.

Anton Tananaev2 years ago
Andri Putra2 years ago

Hi Thanks for help,

Unfortunately, the signal strength data is still not in accordance with the standard format.

same as before

"network": {
"radioType": "gsm",
"considerIp": false,
"wifiAccessPoints": [
{
"macAddress": "a0:36:bc:4a:2f:88",
"signalStrength": 228
},
{
"macAddress": "74:83:c2:3a:c3:d3",
"signalStrength": 210
},
{
"macAddress": "74:83:c2:3a:c3:c0",
"signalStrength": 187
},

I looked using the ddx04 debugger, I saw the MAC address and the signal strength is correct.

00> [0628132108:080][37463299|1][MotionAlarm_timing_Task|451]State 0C, Run 0|0, Static 60|0, Thwarted 60|5, Fall 0|5
00> +CWLAP:(-30,"a0:36:bc:4a:2f:88")
00> +CWLAP:(-71,"74:83:c2:3a:c3:d3")
00> +CWLAP:(-72,"74:83:c2:3a:c3:c0")
00> +CWLAP:(-74,"50:2c:c6:99:aa:b0")
00> +CWLAP:(-74,"9c:9d:7e:28:0a:7b")

signal strength format is still wrong, so the network geolocation process is error. I believe if format signal strength true, the geolocation can work normaly.

2023-06-28 13:31:30  INFO: [T54b54e56: xexun2 < 182.2.5.140] faaf0014000d8639210374632990006ad44a0100673d649bc55815803282020aa036bc4a2f88df7483c23ac3d3d09c9d7e280a7bb6502cc699aab0b51e7d2240472ab228d1276f4002af7483c23ac1ffaf5c546d626fe0a8fcbcd165c8e5a7fcbcd165c8e4a400000003421000000000000040a51e80000000000000faaf
2023-06-28 13:31:30  INFO: [T54b54e56: xexun2 > 182.2.5.140] faaf0014000d86392103746329900001fffe01faaf
2023-06-28 13:31:31  WARN: Geolocation network error - HTTP 404 Not Found - NotFoundException (...)

Thank you for your support.

Anton Tananaev2 years ago

Looks like I fixed cell info, but not wifi. Try this:

https://github.com/traccar/traccar/commit/3952b3445d96d91f87d6a427ba10a86907cb0fea