Android Question USB GPS External Dongle(GPS/GLONASS U-blox7)

Alhootti

Active Member
Hi Guys
I have this dongle need some one to guide me how to use it in order to sync time to my app through it.
im using anderiod TVBox with USB port.

Thanks advance
 

Alhootti

Active Member

Attachments

  • Screenshot_20240730-111626.png
    Screenshot_20240730-111626.png
    42.7 KB · Views: 70
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
you would need a driver from the manufacturer for the device. i don't think
you will find it. plus even if you do find it, you would have to know how
to use it.

the library you refer to uses a device's built-in gps. it will give you
the same time as that supplied by your external device. the satellites supply
the time, not the gps device. you can get the time from the satellites using the
library.

if your device doesn't have a built-in gps, then you would either have to
purchase a different external gps (one for which there was an android driver
OR use the NTP (network time protocol) to sync whatever it is you're trying
to sync. there is an example of NTP here on the forum. if you find another
external gps and its android driver, you will have to interface the two with
inline java or with javaobject wrapping some .jar which the device manufacturer
has supplied.
if the external device was standalone and/or supported bluetooth or wifi, that
would even be better. usb is doable, but you need software and knowledge to use it.
look for non-usb
 
Upvote 0

Alhootti

Active Member
Thank you Drgottjr for your value replay.
If i used the NTP (network time protocol) deferentially i need internet connection, isn't it?
so this is big issue what i facing it really.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
android tv would have to be networked, yes.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
so you should be able to use ntp protocol. i know i've seen an example here. search. worst case, you can use Google Public NTP is a free, global time service that you can use to synchronize to Google's atomic clocks. google that. according to the ai, android tv can use it (directly). i'm guessing that means you don't even have to develop an app to make it work.
 
Last edited:
Upvote 0

Alhootti

Active Member
Thank you dear. but my problem is im using this TV BOX somewhere there is no internet connection totally.
so that way i need solution without internet connection.
 
Upvote 0

emexes

Expert
Licensed User
GPS Dongle

GPS/GLONASS U-blox7​

from anderiod TVBox using USB serial terminal

I have an older GPS dongle that looks very similar, albeit it is 70 km away at the moment (other side of Melbourne)

It shows up as a regular serial port when plugged into the USB port of my Windows laptop. I wrote a PowerBasic program for it, and I'd expect B4J would work too.

If the dongle works with your Android TV similarly as it does with Windows, then you should be able to use a Serial Terminal program to listen to it, and optionally send commands (AT commands, from memory, but I'll look for a manual now to be sure).
 
Upvote 0

emexes

Expert
Licensed User
Last edited:
Upvote 0

emexes

Expert
Licensed User
I'll look for a manual now

I found this:

https://content.u-blox.com/sites/de...tionProtocolSpec_(GPS.G7-SW-12001)_Public.pdf

but I don't remember the commands looking like CFG-* so maybe my dongle wasn't based on UBLOX chip.

I'm pretty certain that it just emitted default GPS messages without any command required, though, like a normal NMEA gps device. So try using a Serial Terminal app, see what you get.

The time field is human-readable and pretty obvious, so this should be no problem:
My mean concern is only Time.
so i want sync Time to GPS using this External GPS Dongle.
assuming that time accurate to 1/10th of a second is good enough.

Remember that GPS time doesn't account for leap-seconds, and thus is (currently) 18 seconds ahead of UTC.
 
Upvote 0

emexes

Expert
Licensed User
What is your proposal ?

I didn't have a proposal.

But if I were in your shoes, and given the ubiquity and cost-effectiveness of VK-172 devices, I'd try getting that going first.

Why do you need it anyway? TV's don't move much. Android TV would have network connection, thus also access to internet, including access to NTP servers, plus approximate geolocation by IP, or by finding "nearest" NTP servers (although I guess VPN makes that unreliable).
 
Upvote 0
Top