battery level

fanfan69 a year ago

hello everyone, I am testing an LTE-M module for a new tracker, I have a problem, traccar receives the coordinates but not the battery level??? I tested the same request on my PC and it works without problem, do you have any idea on this?

Anton Tananaev a year ago

How is it related to an LTE-M module? I think you're not providing full context here.

fanfan69 a year ago

the problem does not come from traccard strictly speaking but I tell myself that some people may have the same problem as me, here is my http request sent by the SIM7090g module: AT+SHCONF=URL, http://82.65.31.79:5055

Okay
AT+SHCONF=BODYLEN,1024

Okay
AT+SHCONF=HEADERLEN,350

Okay
AT+SHCONN

A.T.

Okay
AT+SHAHEAD=Content-Type,application/x-www-form-urlencoded

Okay
AT+SHAHEAD=Connection,keep-alive

Okay
AT+SHAHEAD=Cache-control,no-cache

Okay

AT+SHBOD=33.5000

Okay
at=45.1234&lon=4.5678&speed=00&batt=20

Okay
AT+SHREQ=GET,1

Okay
AT+SHDISC

Anton Tananaev a year ago

What do you get in the logs and then in the database?

fanfan69 a year ago
2024-12-20 22:55:06  INFO: [Tc39529fa] connected
2024-12-20 22:55:22  INFO: [Tc39529fa: osmand < 46.114.231.187] 474554202f4745543f69643d3036313031323636266c61743d34352e31323334266c6f6e3d342e353637380d20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a43616368652d636f6e74726f6c3a206e6f2d63616368650d0a0d0a
2024-12-20 22:55:22  INFO: [Tc39529fa] id: 06101266, time: 2024-12-20 22:55:22, lat: 45.12340, lon: 4.56780, course: 0.0
2024-12-20 22:55:22  INFO: [Tc39529fa: osmand > 46.114.231.187] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-12-20 22:55:22  INFO: [Tc39529fa] error - Connection reset - SocketException (...)
2024-12-20 22:55:22  INFO: [Tc39529fa] disconnected
2024-12-20 22:55:52  INFO: [T5d776a1d] connected
2024-12-20 22:56:07  INFO: [T5d776a1d: osmand < 46.114.231.187] 474554202f4745543f69643d3036313031323636266c61743d34352e31323334266c6f6e3d342e353637380d20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a43616368652d636f6e74726f6c3a206e6f2d63616368650d0a0d0a
2024-12-20 22:56:07  INFO: [T5d776a1d] id: 06101266, time: 2024-12-20 22:56:07, lat: 45.12340, lon: 4.56780, course: 0.0
2024-12-20 22:56:07  INFO: [T5d776a1d: osmand > 46.114.231.187] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-12-20 22:56:07  INFO: [T5d776a1d] error - Connection reset - SocketException (...)
2024-12-20 22:56:07  INFO: [T5d776a1d] disconnected
2024-12-20 22:56:38  INFO: [T2a0a6a7b] connected
2024-12-20 22:56:52  INFO: [T2a0a6a7b: osmand < 46.114.231.187] 474554202f4745543f69643d3036313031323636266c61743d34352e31323334266c6f6e3d342e353637380d20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a43616368652d636f6e74726f6c3a206e6f2d63616368650d0a0d0a
2024-12-20 22:56:52  INFO: [T2a0a6a7b] id: 06101266, time: 2024-12-20 22:56:52, lat: 45.12340, lon: 4.56780, course: 0.0
2024-12-20 22:56:52  INFO: [T2a0a6a7b: osmand > 46.114.231.187] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-12-20 22:56:52  INFO: [T2a0a6a7b] error - Connection reset - SocketException (...)
2024-12-20 22:56:52  INFO: [T2a0a6a7b] disconnected
2024-12-20 22:57:22  INFO: [T25e453d2] connected
2024-12-20 22:57:37  INFO: [T25e453d2: osmand < 46.114.231.187] 474554202f4745543f69643d3036313031323636266c61743d34352e31323334266c6f6e3d342e353637380d20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a43616368652d636f6e74726f6c3a206e6f2d63616368650d0a0d0a
2024-12-20 22:57:37  INFO: [T25e453d2] id: 06101266, time: 2024-12-20 22:57:37, lat: 45.12340, lon: 4.56780, course: 0.0
2024-12-20 22:57:37  INFO: [T25e453d2: osmand > 46.114.231.187] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-12-20 22:57:37  INFO: [T25e453d2] error - Connection reset - SocketException (...)
2024-12-20 22:57:37  INFO: [T25e453d2] disconnected
2024-12-20 23:35:57  INFO: [Td1e89cad] connected
2024-12-20 23:36:12  INFO: [Td1e89cad: osmand < 46.114.230.246] 474554202f4745543f69643d3036313031323636266c61743d34352e31323334266c6f6e3d342e353637380d20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a43616368652d636f6e74726f6c3a206e6f2d63616368650d0a0d0a
2024-12-20 23:36:12  INFO: [Td1e89cad] id: 06101266, time: 2024-12-20 23:36:12, lat: 45.12340, lon: 4.56780, course: 0.0
2024-12-20 23:36:12  INFO: [Td1e89cad: osmand > 46.114.230.246] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2024-12-20 23:36:12  INFO: [Td1e89cad] error - Connection reset - SocketException (...)
2024-12-20 23:36:12  INFO: [Td1e89cad] disconnected
Anton Tananaev a year ago

In the logs I see that you're not sending the batt value.

fanfan69 a year ago

yes I know, but if I send exactly the same request from my PC the log is the same but the battery level appears on the site to be sure I have modified the level each time.

Anton Tananaev a year ago

I'm sure it's not the same, but you can check logs to confirm that yourself.

fanfan69 a year ago

in all my logs the battery level is not present and yet it is displayed, here is another device: 2023-09-08 13:33:41 INFO: [T01172069] id: 861261024118354, time: 2023-09- 06 21:04:16, late: 45.74473, lon: 4.89129, run: 17.0

and here is the sending from my PC:

2025-01-02 15:46:32 INFO: [T514689d6: osmand < 192.168.0.254] 504f5354202f20485454502f312e310d0a486f73743a2038322e36352e33312e37393a353035350d0a636f6f6b69653a205048505345535349443d6e6f75366966616337303674616175646f656b313475326267302c5048505345535349443d6e6f75366966616337303674616175646f656b313475326267300d0a636f6e74656e742d6c656e6774683a2035330d0a0d0a69643d3036313031323636266c61743d34352e3132333430266c6f6e3d342e35363738302673706565643d303026626174743d3235
2025-01-02 15:46:37 INFO: [T514689d6] id: 06101266, time: 2025-01-02 15:46:35, lat: 45.12340, lon: 4.56780, course: 0.0
2025-01-02 15:46:37 INFO: [T514689d6: osmand > 192.168.0.254] 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
Anton Tananaev a year ago

It seems like you didn't do what I asked you to do. Make sure you check not only decoded data, which won't include battery either way, but also the HEX, of course.

fanfan69 a year ago

you are right the hex does not indicate the battery levels, I will review my sending script and the format in get and post because that is where the problem is located

fanfan69 a year ago

hello, it's a problem with the number of characters on the new simcom commands, thank you for reporting the hex.

fanfan69 a year ago

hello, my problem is resolved, the problem came from the new command "AT+SHBOD=<len_body>,<ti meout>" the number of characters was wrong, thank you for your help.