Git Product home page Git Product logo

android-gpsd-forwarder's People

Contributors

poussinou avatar tiagoshibata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

android-gpsd-forwarder's Issues

Application name is misleading -- not a gpsd client.

A gpsd client is something that connects to a gpsd server in order to RECEIVE/CONSUME location data. In the case of Android, that would imply a HAL, which would allow Android to become a client of gpsd. This is a feeder application, not a gpsd client. Strictly speaking, gpsd becomes a CLIENT of THIS.

Gpsd now includes an Android HAL, as well as a demo client written in C.

resources.arsc is a malware of type Android.Trojan.Neucore.gTVTY

Hello,
I have Bitdefender antivirus installed on my smartphone, which alerted me that GPSd-Client is a malware. Si, I opened a ticket with my antivirus support for this and they required me to send them the apk. When trying to download it on my computer, I receive the following message: "On-access scanning has detected a threat. The file has been removed.C: \ Users ... \ Temp \ PBbyfq4e.apk.part => resources.arsc is a malware of type Android.Trojan.Neucore.gTVTY".

Could you please confirm that this is a false alert and that the apk doen't contain any malware ?
TIA

not installable from Google Play

We are going to use this app in a open project https://rmap.cc/ https://github.com/r-map using udp packets from ESP32 micro controller boards for geolocalization of environmental data.
We have to propose the use of the app in schools at students and teachers; the app is installable from Fdroid but we have tried to install it from Google Play from some different phone (old and new) and it was not possible (not supported device); this will be a problem for a large number of users.
It's possible it need a rebuild?

Thanks for your work!

Feature request - GPS timer in milliseconds

@tiagoshibata , thank you for that app. It works very well.

I'm in no position to ask for new features to you. But, please, at least let me express a request.

It would be possible to implement a timer function? Where given a input in milliseconds, the application adjust the interval of how often it receive data from GPS. For example, if said interval is set to 4000, GPSd should receive NMEA strings each 4 seconds.

The motivation for that request is just to enable a way to adjust GPS polling for a slow paced walking device. Think of a walking person who takes 4-6 seconds to get a significant location movement to be polled - I'm currently using your application for warwalking, and take control of said interval can be invaluable.

Best regards.

mDNS support (Initial proof of concept implementation provided in my fork)

Hello I have forked your app to add mdns support because i needed it for my use case. This means you don't have to know the IP address of the gpsd UDP server as long as that UDP server is advertising a mDNS service discovery record with the service type _gpsd_.udp. and the service name equal to its hostname.

image

For example this is the avahi-daemon service unit XML file that I created on my server to advertise the GPSd service so the android app can discover it:

/etc/avahi/services/gpsd.service

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<!-- See avahi.service(5) for more information about this configuration file -->

<service-group>

  <!-- its important that we only include the %h here (hostname) because 
       the android app checks for this to match the hostname -->
  <name replace-wildcards="yes">%h</name>

  <service protocol="any">
    <type>_gpsd._udp</type>
    <port>4200</port>
  </service>


</service-group>

ℹ️ INFO

I designed it like this (even tho it seemed wrong to me) because I wasn't able to figure out how to grab the machines hostname from the android NsdServiceManager. It looks like it only gives the service info, not the actual xyz.local domain names. So my hack was to make the service name equal to the domain name.

⚠️ WARNING

I encountered GPSd issues when I was testing this, the problem is when you ask GPSd to listen on udp://*:4200 it interprets that * as 0.0.0.0 not :: in other words it only listens on IPv4, however sometimes the mDNS discovery on android would return the ipv6 address and it didn't appear to work properly when I configured the avahi-daemon to only respond with ipv4.
.
My fix was to introduce a simple UDP forwarder app written in a language i know so I can control how it listens on the UDP port and get it to listen properly on both ipv4 and ipv6. So my forwarder listens on port 4200 and then forwards to 127.0.0.1:4201 which is the exact address gpsd is listening on. I wasn't able to get it to work reliably any other way 😩

If you are interested in merging this contribution let me know and I might be willing to help you clean it up. Otherwise feel free to pull from my fork:

ForestJohnson@fdc1598

add initial mdns support for _gpsd_.udp. service

Run as Autostart

Any thoughts about the possibility to configure it to run automatically and start streaming to a configured address on phone startup?

Thanks

On Issue with Android 10?

I have a Pixel3A and afterupdating to Android10, it stopped working. Application runs fine and shows same output but data never reaches the destination

Open app by tapping on notification

Hello there. Just wanted to say thank you very much for developing this app, it suits my use case perfectly since I need to send raw GPS data via UDP to a remote server, and the app I used previously (Share GPS) seems to crash on Android 11, and it doesn't look like it will be fixed because it was last updated in 2016. Your app, on other hand, seems to work great, even though I haven't used it much so far, but at least I haven't seen any crashes yet.

The only thing with the app that bugs me is that I can't quickly open it by tapping on the notification that appears when the data stream is active. I'd appreciate it if such a feature were implemented in future releases. Thank you very much again!

Location verification on server failed

Hi folks,
Thank you so much for providing and maintaining this repository!

I stumbled of this repo and jumped straight into a PoC setup. This is where I am stuck right now.

The app is running on Android. I called gpsd on the public accessible server like this.

sudo gpsd -N upd://*:65535

I can verify that the server receives location data like this.

nc -vlup 65535 2>&1;

Here is an example output.

$GPGSV,4,1,14,01,00,000,30,02,44,137,29,03,77,275,24,04,30,191,22,1*61

$GPGSV,4,2,14,17,43,281,22,19,30,307,21,21,36,136,20,28,23,071,29,1*67

$GPGSV,4,3,14,31,18,102,20,32,15,043,23,06,04,303,,09,07,206,,1*67

$GPGSV,4,4,14,12,02,357,,22,02,268,,1*6F

$GLGSV,2,1,08,69,57,223,19,85,11,323,19,67,14,043,22,68,64,042,20,1*79

$GLGSV,2,2,08,77,10,043,,76,11,358,,84,70,306,,83,38,151,,1*72

$GAGSV,3,1,10,02,02,008,,07,26,047,,10,26,303,,11,01,305,,7*7A

$GAGSV,3,2,10,12,52,299,,19,41,189,,24,00,000,,25,07,323,,7*7C

$GAGSV,3,3,10,26,18,129,,33,66,139,,7*7E

$GBGSV,3,1,10,06,32,056,22,16,29,049,26,20,36,232,23,02,02,101,,1*71

$GBGSV,3,2,10,09,36,073,,24,04,009,,25,07,060,,27,14,158,,1*7F

$GBGSV,3,3,10,29,44,296,,30,54,198,,1*73

$GNGSA,A,3,02,03,04,17,19,21,28,31,32,,,,1.1,0.7,0.8,1*3F

$GNGSA,A,3,67,68,69,85,,,,,,,,,1.1,0.7,0.8,2*30

$GNGSA,A,3,06,16,20,,,,,,,,,,1.1,0.7,0.8,4*38

$GNVTG,,T,,M,0.0,N,0.0,K,A*3D

$GNDTM,P90,,0000.000025,S,00000.000000,E,0.972,W84*55

$GNRMC,101854.00,A,5215.953038,N,01026.370460,E,0.0,,010923,0.0,E,A,V*7B

$GNGNS,101854.00,5215.953038,N,01026.370460,E,AANANN,16,0.7,90.5,46.0,,,V*1E

$GNGGA,101854.00,5215.953038,N,01026.370460,E,1,12,0.7,90.5,M,46.0,M,,*45

Anyhow, the data the server receives from the phone (I tested Android 9 and 11) seems not enough to get location information.

This is what gps clients on the server response on the data provided by the phone.

$ gpspipe -w
{"class":"VERSION","release":"3.22","rev":"3.22","proto_major":3,"proto_minor":14}
{"class":"DEVICES","devices":[]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}
$ gpsmon
tcp://localhost:2947          JSON slave driver>
(82) {"class":"VERSION","release":"3.22","rev":"3.22","proto_major":3,"proto_minor":14}
(32) {"class":"DEVICES","devices":[]}
(122) {"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":false,"timing":false,"split24":false,"pps":true}
$ cgps
{"class":"VERSION","release":"3.22","rev":"3.22","proto_major":3,"proto_minor":14}
{"class":"DEVICES","devices":[]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}

I appreciate any hint that helps me fix my setup! Cheers!

Possible to start service via ADB / Shell

Hello and happy New Year! I am trying to start the service using a script so it's possible to to use GPSd inside my chroot without interacting with device directly. When running am start-foreground-service --user 0 -n io.github.tiagoshibata.gpsdclient/.GpsdForwarderService the app immediately produces an ANR. Do you know of a way I can start the service using adb shell or command line?

Here is a snippet from logcat

01-02 20:23:55.183 E/AndroidRuntime(11063): java.lang.RuntimeException: Unable to start service io.github.tiagoshibata.gpsdclient.GpsdForwarderService@78802ee with Intent { cmp=io.github.tiagoshibata.gpsdclient/.GpsdForwarderService }: java.lang.RuntimeException: GpsdClientService requires parameters io.github.tiagoshibata.GPSD_SERVER_ADDRESS and io.github.tiagoshibata.GPSD_SERVER_PORT

i can't init service in host

gpsd -N -n udp://*:2581
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.