Seite 1 von 2

USB GPS as a Service

Verfasst: Fr 15. Jan 2021, 17:27
von abagos
Hello, would it be possible to have the GPS running as a service with the mock location operation so that it can be used without having the application on the screen (to be used by other applications like navigation)? The service must start automatically without any user interaction.
Thank you,
Alex.

Re: USB GPS as a Service

Verfasst: Fr 15. Jan 2021, 17:42
von Mazuch
Hi Alex,

the GPS-Connector app already start a background service which is handling the communication to your external antenna.
Just have a look on the status bar of your smartphone - you see the current GNSS status (quality) icon there, even if the app is not visible.
So you must call "menu - exit app" to really stop the app and the background service.
Simply kicking the app out of the recently opened apps list doesn't stop the GPS-Connector.

On Android there is no way to start an app automatically without root access to the phone.
But: If you connect your external antenna via USB cable, the app is started automatically by android.
You will be asked the first time you use your external device ...

Greetz,
Markus

Re: USB GPS as a Service

Verfasst: Sa 16. Jan 2021, 10:53
von abagos
Hello Markus,
Thank you for your prompt response. I will check again how it works. It is an Android Headunit I have in my car in which the onboard gps failed. I do have root access, so I will try to find the background service in order to start it automatically. In my first try it seemed that it worked only when the application was visible.
Best regards,
Slex.

Re: USB GPS as a Service

Verfasst: Mi 28. Apr 2021, 14:54
von Mazuch
App updates:

Since version V1.0.0.18 you can start the app automatically on device reboot. (without re-connect the USB cable)
With the latest release version you can exit the app by action button in the status notification.

Cheers,
Markus

Re: USB GPS as a Service

Verfasst: So 7. Aug 2022, 11:25
von Shalva77
Hello. Thank you for your program! It works fine, but after rebooting the head unit, I need to reconnect the usb gps all the time. I have an Android 5.1.1 arm7a head unit and gps U-Blox 7.

Re: USB GPS as a Service

Verfasst: So 7. Aug 2022, 12:16
von Mazuch
Hi Shalva,

what USB vendor did you select in the app? ublox or generic?
Just asking, because the auto-reconnect only works for known vendors.

Markus

Re: USB GPS as a Service

Verfasst: Mo 8. Aug 2022, 17:24
von Shalva77
im use UBlox vendor in app and usb gps like this one:
Снимок экрана 2022-08-08 в 18.23.43.png
Снимок экрана 2022-08-08 в 18.23.43.png (232.09 KiB) 20476 mal betrachtet

Re: USB GPS as a Service

Verfasst: Mo 8. Aug 2022, 19:46
von Mazuch
Hmm ... should work ...
Could you please send a log-file to gps-connector@pilablu.de ?
I need the logfile with successful reboot to see what's going on.

Please check this if you don't know how to create a log:
viewtopic.php?f=3&t=13

Thanks
Markus

Re: USB GPS as a Service

Verfasst: Di 9. Aug 2022, 12:06
von Shalva77
I sent the log by email

Re: USB GPS as a Service

Verfasst: Di 9. Aug 2022, 21:33
von Mazuch
In the log-file you can see that the USB device doesn't provide a bulk (read) interface.
Please check this lines: "Invalid USB bulk interface" and "claim endpoint 0xFF failed".
That's the reason why the app can't connect to the USB device.

Do you really only have this problem after rebooting?
For me it looks like a general problem of your device! :?

If you want to you can send a log-file with successful connection, so i can compare the USB interfaces.

Cheers
Markus