Do you see "location update"?
No. It only goes "network online" and "network offline", nothing else. I do have a GPS fix, I checked that.
I also tried the same client on an i9300 with the stock Samsung android 4.3. It doesn't throw the toast, but for the rest it behaves exactly the same: "network online" and "network offline" and no attempt to upload data.
If you don't see location updates, it means that your problem is with location, not with network. Have you read troubleshooting guide?
The only troubleshooting guide I can find is for the server. I had already checked the server logs and ports etc: they show no trace of the client ever connecting, but if I 'wget http://myserverIP:5055' they do show an error, which means that the port is open and portforwarding works as it should.
Now, if the problem is with location on the phone itself, is there any way to narrow it down? I have SatStat on the phone and it does show a bunch of locked satellites and a fix.
Please look again more carefully on the documentation page:
Thank you. Taking this step by step:
The phone is set to only use GPS for location, not wifi and cellular towers for reasons of privacy. The location entry in Settings shows recent location requests from TWRP and SatStat, but not from the Traccar client. So it has permission to access the GPS, but it seems it's not asking for any data.
SatStat has two settings "notify me when an application gets my location from GPS" and "notify me when an application is searching for my location". They were previously off. I turned them on and I get no notification that traccar is even asking for location.
What is the procedure logic of the client? Will it ask for location independently of the network, or does it first verify that it has network and only then asks for location?
I have something different under point 5(d).
App asks for location independently of the network.
I have something different under point 5(d).
I don't understand. What I quoted is a copy/paste from the troubleshooting guide. Where do you have something different and what does it say?
App asks for location independently of the network.
Is there any way to get logs from the app, to see what it is doing?
I have
On Android check that GPS location provider is enabled in system settings
You said you have
On Android check that network location provider is enabled in system settings
Ah, you're right. I copy/pasted from 4d although I was actually looking at 5d. Nevertheless, my question remains: what and where is this? I don't have any "GPS location provider" (or "network location provider" for that matter) in my settings. All I have is "Location on/off" and then a submenu for the type of location service (GPS/cell tower/wifi).
In any case, it doesn't matter. If other apps (TWRP, SatStat, OsmAnd+) are getting GPS data, then GPS is working and providing data as it should. Hence, the problem is elsewhere.
Is there any way to get logs from the app, to see what it is doing?
You can get logs using ADB, but I'm not sure if there would be anything useful there.
OK, I set the LineageOS phone to sleep after 30 minutes of inactivity, put it outside with SatStat visible and run logcat over wifi. Once it got a GPS fix I switched the tracking service off and back on again. As you expected, there was nothing useful in the log. I see "TrackingService: service destroy" and "TrackingService: service create" when I switch the service off and on and, a few milliseconds after "create", one "TrackingController: read". Then, for the next ten minutes, no logs from TrackingService and no logs from GnssLocationProvider either.
Eventually I found the problem: the tracker was set to use medium accuracy. Changing this to high accuracy got it working. From this I conclude that the levels of accuracy are mutually exclusive, i.e. if set to cell/wifi, the client will not use GPS. This is a bit counter-intuitive; the behaviour I expected was high: force GPS use, medium: use cell towers and GPS if available, low: use any available source. In other words, the lower accuracies should include the higher ones if available, while the higher accuracies should not rely exclusively on lower-accuracy sources.
As an aside on this issue, please consider an RFE for more logging. Also, at some point the server log said "WARN: One of the protocols is disabled due to port conflict". It would be nice if this included the actual port number.
If accuracy in the app is set to high check point 5 - check
the problem: the tracker was set to use medium accuracy
Yes, of course you're right, but I don't see the joy in rubbing it in. It might be worth more commenting on what I wrote above about the accuracy levels being counter-intuitive and not logical. Choosing low or medium accuracy should not mean "I don't want any high-accuracy results"; it should mean "I am willing to accept low-accuracy results if nothing better is available". That's how people mean it and there is no reason to exclude GPS from medium and low accuracy. Following common sense, each accuracy level should allow, but not require, all the levels above it and exclude all the levels below it.
Also, I note that in the release notes, the accuracy levels are vaguely defined as a balance between accuracy and battery life, where high accuracy definitely uses GPS, while medium and low "usually" use cell towers and wifi or only cell towers. I understand "usually" as non-exclusive of GPS, because otherwise the word would be redundant.
Every time I turn service status to on, a toast comes up saying "provider doesn't exist: network" and no attempt is made to upload data to the server. This is traccar client 5.16 running on LineageOS14.1-20181117-NIGHTLY-i9300 (android 7.1). This happens with wifi and mobile data on, wifi on and mobile data off and wifi off and mobile data on. As I switch wifi and mobile data on and off, the client status shows "network online" and "network offline" accordingly, so it does see the network. Status shows no attempt to send any data, i.e. no try and no failure.