USB GPS as a Service

New feature requests for the GPS-Connector app.
Neue Funktionen bzw. Feature Anfragen zur GPS-Connector App.
abagos
Beiträge: 2
Registriert: Fr 15. Jan 2021, 14:39

USB GPS as a Service

Beitrag 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.
Mazuch
Administrator
Beiträge: 41
Registriert: Mi 11. Nov 2020, 17:54
Kontaktdaten:

Re: USB GPS as a Service

Beitrag 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
There is no code so big, twisted, or complex that maintenance can't make it worse. (Gerald M. Weinberg)
abagos
Beiträge: 2
Registriert: Fr 15. Jan 2021, 14:39

Re: USB GPS as a Service

Beitrag 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.
Mazuch
Administrator
Beiträge: 41
Registriert: Mi 11. Nov 2020, 17:54
Kontaktdaten:

Re: USB GPS as a Service

Beitrag 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
There is no code so big, twisted, or complex that maintenance can't make it worse. (Gerald M. Weinberg)
Shalva77
Beiträge: 4
Registriert: So 7. Aug 2022, 11:16

Re: USB GPS as a Service

Beitrag 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.
Mazuch
Administrator
Beiträge: 41
Registriert: Mi 11. Nov 2020, 17:54
Kontaktdaten:

Re: USB GPS as a Service

Beitrag 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
There is no code so big, twisted, or complex that maintenance can't make it worse. (Gerald M. Weinberg)
Shalva77
Beiträge: 4
Registriert: So 7. Aug 2022, 11:16

Re: USB GPS as a Service

Beitrag 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) 27489 mal betrachtet
Mazuch
Administrator
Beiträge: 41
Registriert: Mi 11. Nov 2020, 17:54
Kontaktdaten:

Re: USB GPS as a Service

Beitrag 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
There is no code so big, twisted, or complex that maintenance can't make it worse. (Gerald M. Weinberg)
Shalva77
Beiträge: 4
Registriert: So 7. Aug 2022, 11:16

Re: USB GPS as a Service

Beitrag von Shalva77 »

I sent the log by email
Mazuch
Administrator
Beiträge: 41
Registriert: Mi 11. Nov 2020, 17:54
Kontaktdaten:

Re: USB GPS as a Service

Beitrag 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
There is no code so big, twisted, or complex that maintenance can't make it worse. (Gerald M. Weinberg)
Antworten