Since some time I'm having trouble receiving GPS data from my ODB device (HS-4000G). Strange thing is I can retrieve gps data by sending a sms call. So I think the device is working properly. But there's no gps data in the traccar db. I can tell because there's no data shown when asking to show a route for example. Any idea how i can troubleshoot from here? In the logs I find this:
2021-02-18 00:52:17 INFO: [437a3924] connected 2021-02-18 00:52:21 INFO: [437a3924: huasheng < 184.108.40.206] HEX: c00000009faa020000000062a60001001347364b5f48312e305f56312e302e3400030013383633393231303331323931383738000400093332323536000200155756315a5a5a37485a464831323637353800050005010006000c766f6461666f6e650007000c766f6461666f6e65000800050000090018383933313434303330313737373436353639390d000a00156c6976652e766f6461666f6e652e636f6dc0 2021-02-18 00:52:21 INFO: [437a3924: huasheng > 220.127.116.11] HEX: c00100000dff030000000062a600c0 2021-02-18 00:52:40 WARN: [437a3924] error - De externe host heeft een verbinding verbroken - IOException (...) 2021-02-18 00:52:40 INFO: [437a3924] disconnected
Looks like device disconnected from the server. Possibly it didn't accept the server response for some reason.
from the log I can tell the connection is disconnected due to the "external host". But how can I troubleshoot my problem? The HS-4000G was always functioning fine. I have a spare HS-4000G and this one has the same logoutput. So I don't think the HS-4000G is broken. All my other devices (though handled by another protocol) are functioning fine. My config file hasn't been altered after 7-2020, and the last good GPS location from HS-4000G was from 01-2020. Is there anything I can try?
External host is your device.
Yes. That much I do know. What can I do to make things work again?
I know you have other devices working, but did you check your server for disk space, memory, etc?
I use HS-4000G and sometimes get those IOException errors directly after a specific device, but I check traccar web interface and the location is valid and logged correctly.
2021-02-23 07:21:16 INFO: [815becd6: huasheng > 18.104.22.168] HEX: c00100000cff01000000000f02c0 2021-02-23 07:21:16 INFO: [815becd6] id: *hidden*, time: 2021-02-23 07:21:15, lat: -38.20689, lon: 146.15625, course: 0.0 2021-02-23 07:21:16 WARN: [ffc9f193] error - Connection reset by peer - IOException (...) 2021-02-23 07:21:16 INFO: [ffc9f193] disconnected 2021-02-23 07:21:17 INFO: [e65d64e2] connected 2021-02-23 07:21:17 WARN: [e65d64e2] error - Connection reset by peer - IOException (...) 2021-02-23 07:21:17 INFO: [e65d64e2] disconnected
I also use force offline within my traccar.xml - not sure if this will help you.
and since 3.7 when Huasheng was first implemented I have always had to filter.
<entry key='filter.enable'>true</entry> <entry key='filter.zero'>true</entry> <entry key='filter.invalid'>true</entry>
Thanks for the response RichardG. The tree filters were already set in my config file. I tried the timeout setting, but no difference. Yesterday i set up an total new server on another computer just to find out if the problem had to do with the server side. Even tried an older server (4.10). But all experiments were delivering the exact same log readings as shown above.
There is an instruction on the Traccar website about devices not sending gps-coordinates:
"Device sends status information, but not GPS coordinates. Usually it happens with devices that use GPS103 protocol (port 5001). The solution is to send a command to the device to activate location reporting:
fix060s***n123456 (where 060s is the interval between messages,
*** tells the device to continue sending locations periodically and 123456 is the default password)."
Do you have experience with this command?
I don't have experience with that command. You could be unlucky and have two faulty HS-4000G devices? I have had maybe 2 failures of GPS chips (that have been reported to me) out of about 100-200.
Do you want to point it to my server and see if there's any difference?
Thanks RichardG for helping. I'm wondering if the devices might not be broken, though the gps-function is fine (when asking through sms). There's a problem in between the communication between Traccar server and the devices software. Huasheng Inc provided me with new firmware to try if that is helping, but communication between the device and the desktop computer is not stable as well. The whole thing with these devices is not feeling good. I'm thinking of replacing the device with an old smartphone of making my own gps-traccer with Arduino.
I've sold many of the HS-3000G and HS-4000G without the issues you've been experiencing. It's possible it could be device firmware and your firmware is different from mine. I can't check my firmware versions at the moment to compare for you.
My offer still stands of testing the data via my server (located in Australia). I'd recommend bench testing it instead of testing via the car (if you arent doing so already.)
You are also using port 5111 correct?
You have also double checked the data in your sim to make sure it's topped up? Removed from your device and tested in a phone by accessing the internet (3G/4G) w/ WiFi turned off?
Sorry for the basic questions, but they can get you sometimes.
Hi Richard. Many thanks for thinking with me and your offer. I think my data and port use are correct. If not the connection between device and server could not be made and no data was shown in the log at all. I think. Will check the SIM in a phone as you suggested, even though I think that's not the problem. I can't see any way to DM you to exchange info for testing on your server. I think that might be interesting to do so. BTW do you know if the SMS command g1,reset performs a reset (as the command says) or just a reboot (as the manual is saying).
I can't find any PM function on here either. Do you want to just drop me your email address via my websites contact page.
I'm in GMT-8 at the moment, and will be available for the next 12 hours. Hopefully I haven't missed you for the day.
I haven't used the SMS commands for either HS-3000G nor HS-4000G, only ever PAR set and Hyperterminal. Perhaps re-uploading the firmware performs a factory reset; it's been so long since I've had to do it, I cant really remember.