yashsingh1/xdaforums huggingface dataset:
[Acer Iconia A500] liu2002:
Does anybody run the code:

su root
stty -F /dev/ttyUSB0 ispeed 4800 && cat < /dev/ttyUSB0

I ran it and it works like gps status in windows. GPS can get the data but how to let the system to know these data.
[Acer Iconia A500] lordstrife:
I drive with my tablet and gps all the time and it works great!

I mean how fast do you need it to be?
[Acer Iconia A500] Vereynn:
Hem, finally vindication for not having thrown out my Pharos USB GPS receiver with its Bluetooth cradle for my old WinMo phone :D
[Acer Iconia A500] herbert1:
Can do a

hexdump -c /dev/ttyUSB0

and show us what kind of data you have

I suppose standard NMEA sentences (GGA / RMC / ...). In that case we can perhaps do something...

If you could also do a

stty -a -F /dev/ttyUSB0

it would also give us more informations
[Acer Iconia A500] liu2002:
I am sorry that I thought my thread had been abandoned. So I didn't see your reply. Now I use galaxy 1.05 and I try to run the code you give to me. However this rom can not recogize my gps, the acer original rom (HB3.0 can). So I can not test the code. Or I should PM M-dj to add the support for the PL2303(usb to serial) and this can let the pad to find my gps.
[Acer Iconia A500] herbert1:
Here is a quick and dirty adapted version of BlueGPS4droid in order to read NMEA data from a file/device.

Instead of giving the name of a bluetooth device you have to give the path of a file.

Don't know if it will work: since I don't have any usb Gps, I cannot test.

However it's working with plain files, so I hope it will also work with /dev/ttyUSB0.

You should be able to see on the logcat if it recognizes NMEA sentences or not.

If you can post a copy of the logcat it could be useful for me.

If it's working, I will put the code in a new repository (forked from BlueGps4Droid), clean the code, re-inject other languages and advanced functionalities we have inblueGPS4droid, etc.

How to use it :

0) plug the GPS usb device

1) allow GPS use, if possible (don't know if you can)

2) enable mock locations in "Settings/Applications/Development/Allow mock locations" (It's important !)

3) start UsbGps

4) choose a NMEA device (device path: ako /dev/ttyUSB0 - it has to be readable ! )

5) eventually activate "auto-enable location provider" in "location provider options" (useful if you cannot enable "Use GPS satellites" option (in step 1)

6) start the service using the start checkbox

7) look if something happens in the logcat...
[Acer Iconia A500] Nova5:
Do you have an android phone? ShareGPS from the market will turn your phone into a Bluetooth GPS device, then use the aformentioned BlueGPS4Droid to connect to the phone for its GPS. Also ensure you have enabled Mock Locations on your tablet, and set up a internet share from your phone if the tablet doesn't have it itself.

I used this on a trip recently and it works great. My Inc2 shared its GPS and Internet link with the Iconia. I really like the ability to use the Inc2's superior GPS through the tablet with its 10 inch screen. We all know the Iconia has a lower than Subpar GPS implementation.

I looked around for a way to use the LT40 from Delorme on the Iconia and couldn't find anything good.
[Acer Iconia A500] liu2002:
According your steps, gps running, but it seemed not get the data. No gps searching notification icon flashed and in the log data I don't see any thing. The information in my pm is not correct. I use the wrong device folder. But changed back to \dev\ttyUSB0, I can connect but no data.
[Acer Iconia A500] josinpaul:
I beg to differ.my Ionia gets GPS connection under 7 seconds.try this it worked for me

http://xdaforums.com/showthread.php?p=17668407
[Acer Iconia A500] Johnny0906:
I support it!
[Acer Iconia A500] herbert1:
I don't have any usb GPS, so I cannot test anything myself! If you want something I will need a little more informations.

So here are some little things you can do to provide more details.

First you can verify if you receive something from your usb GPS:

Connect your android device to you computer and open a command shell on your android device using

adb shell

Then you can use

hexdump -c /dev/ttyUSB0

to display what the gps is sending (replace /dev/ttyUSB0 with your usb gps dev). You should see standard nmea sentences...

If you don't see valid nmea sentences you can use

stty -a -F /dev/ttyUSB0

to obtain more informations on your dev.

You can also verify read/write access rights of the device

ls -l /dev/ttyUSB0

We need at least read access. If we don't then you will need to root the android device in order to be able to change the access rights on the dev.

If the hexdump command works well then you can run usbGps and use the

logcat

command to obtain more informations on what happens in the the usbGps app (it would help me a lot!).

Also if usbGps doesn't work it should display a notification (not very useful but it can help a little).

Herbert

PS: the name of the device should really be something like /dev/ttyUSB0 with "/" not "\", so if you try to use "\dev\ttyUSB0" as your device name il will not work and it's normal.
[Acer Iconia A500] ziggy34:
I did this also, can finally use the GPS on the tablet.
[Acer Iconia A500] liu2002:
The Hexdump:

The Logcat:

I hope these will be useful.
[Acer Iconia A500] liu2002:
I don't know what I have done, but know it works!!!! The default setting and I changed nothing. Just after I send the screen shots. And I test again reboot pad and it stop working and this is the logcat.

And I think it maybe related with the command I run before.

first time I ran stty, hexdump,logcat

second only logcat

so the stty or hexdump let the gps ran and maybe usbgps app can not trigger the gps just read the data from the port.

Finally I found the key step is this command

stty -F /dev/ttyUSB0 ispeed 4800 cat < /dev/ttyUSB0

After this, run your application, whoo! perfect! less then 1 second every thing you need is on the screen.
[Acer Iconia A500] liu2002:
Now my solution now is using gscript:

stty -F /dev/ttyUSB0 ispeed 4800

However I don't know why the first time I run this script it shows that "can not perform...." I don't remember the detail error message is. And second time still run it and fine. Then start usbgps and it works fine. Can you add the fuction to let the gps start just like the stty command?
[Acer Iconia A500] herbert1:
stty -F /dev/ttyUSB0 ispeed 4800 defines the speed used for the usb GPS for sending data to the tablet. I would have supposed that the usb connection would auto-configure itself, but it seems that it's not the case...

I don't know why it doesn't work the 1st time (and so you have to do it twice). Perhaps the usb needs some time to init when you plug it.
[Acer Iconia A500] liu2002:
I plug and wait, then start usb gps, and after while the notification message shows 5 times connection error. Then I run the script and 1st time error then try again and it works(gps led flashs) and start the usbgps again. And use gps status to test. Finally fix without 1 second.

So I think the connection can not be configed automaticly and the script error maybe caused by other such as superuser. I don't care about it. Now if there is no other way to intergrated the connection config function into your application, I think apha3 is still the best and thank you very much indeed. you are the first one to let usbgps to android tablet!
[Acer Iconia A500] presslab:
Hi Herbert,

Could you post the diff or the source for your USB version? I would like to get this working with GPSD over the network and I think it would be easiest to start with this version.

Thanks.
[Acer Iconia A500] herbert1:
I've created a new repository (forked from BlueGps4Droid) on github:

https://github.com/HvB/UsbGps4Droid

I should have done it before, however this wasn't very high in my priority list...

When I will find some time, I'll clean the code, re-inject other languages and other advanced functionalities we have in BlueGPS4droid.

Herbert
[Acer Iconia A500] presslab:
Fantastic, thanks! I'll let you know how I get on with the GPSD client.
[Acer Iconia A500] anbos:
Hi Herbert!

If you can help me please!

I have a tablet with Android 1.6 and USB GPS dongle DN-100 by usglobalsat.

This is a peace of dmesg when it attached:

usb 1-2.3: new full speed USB device using ehci_hcd and address 6

usb 1-2.3: New USB device found, idVendor=067b, idProduct=2303

usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

usb 1-2.3: Product: USB-Serial Controller D

usb 1-2.3: Manufacturer: Prolific Technology Inc.

usb 1-2.3: configuration #1 chosen from 1 choice

pl2303 1-2.3:1.0: pl2303 converter detected

usb 1-2.3: pl2303 converter now attached to ttyUSB5

If run the code:

su root

stty -F /dev/ttyUSB5 ispeed 38400 && cat < /dev/ttyUSB5

see standard NMEA sentences (GGA / RMC / ...) (speed 38400 from user manual)

But you aplication USBGPS4DROID dont install in my tablet (I think it to another version Android)

Any idea?
[Acer Iconia A500] herbert1:
Google has changed the API used to start Android services between Donuts (Android 1.6) version and Eclair (Android 2.0).

As bluetooth API has been introduced in the SDK with Eclair, BlueGPS4Droid was initially made for Eclair.

When I've made the USB version, I've kept the Eclair target.

Since I've made a BlueGPS version specifically for Cupcake and Donuts, I can also try do so for UsbGPS... (but as stated before I won't be able to test it, so...).

You will find the sources and the APK on github : https://github.com/HvB/UsbGps4Droid - https://github.com/HvB/UsbGps4Droid/downloads

Herbert

If you're happy with this work, you can use the thanks button... :)
[Acer Iconia A500] herbert1:
Thanks for testing...

For other solutions, I don't have any definitive idea.

First I don't have any USB GPS. So actually my own interest in USB GPS solution is quite limited ;)

I've done BlueGPS4Droid because I had an android phone (with a bad internal GPS) and a bluetooth GPS.

I couldn't understand why I couldn't use it with an android device, while it was so easy with my old windows phones :eek:

It was possible, I was more interested in this than others, so I've made one (BlueGPS4Droid).

Then, some people asked for an usb version. As the same time some guys have started to work on the G-Tab, trying to add an internal GPS. Seeing what's they have done, I understood that I could easily modify my application and read data from a device (for example an USB GPS). It was easy, so I've done it...

If somebody think he can use it, great !

What I think, is that we should be able to use any GPS (usb, bluetooth, network, internal, etc.). On linux it's easy (we have gpsd...), but I don't understand why Google made it si difficult on Android. What I propose with my app is just a hack, to allows us to have something that Google should have given us from the beginning.

The kernel modules should give us a better integration than what I've made, however you must find the version compiled for your device and your kernel, you have to root you're device in order to install them, etc.

So it's not for every user. My apps can be installed on every device, there's nothing specific to one device, one kernel, aso.

Since Android is open-source, some manufacturers have made the work for their devices (Archos for some of their tablets - for bluetooth GPS / Parrot for some of their android auto-radios - for USB GPS, etc.). However neither has shared their work :mad: , so nobody can reuse it !

That's why open source solutions are better for everybody, if someone finds a solution the others can adapt it for their own needs and everyone is happy :D
[Acer Iconia A500] anbos:
Hi Herbert!

I install you aplication on my tablet! But cant to chek with other navigation application because very bad weather in my town (clouds and snow every day) - cant find any sattelite. So write about some later.

But some question for you:

1. Can you add to options "set baudrate" - think it be usefull not only for me

2. Sometimes i see two Sign GPS one of this with ! in red circle - that it is ?

I agree witn you word " apps can be installed on every device, there's nothing specific to one device, one kernel, aso.", but not all depends from us.

I more electronics engeneer than programmer so if you need some help

may be i can help you.

My email: anbos@mail.com

I am from Russia and may be find any usefull information for you device in russia forums .

Think if we have another discussion on this forum they close us

With regards

Andrey
[Acer Iconia A500] liu2002:
I have already use this app and this really worked and can find stars,but the only problem is should run the script I have posted in previous post.

su root

stty -F /dev/ttyUSB0 ispeed 4800

After the script you can use the app. I test it use the gps status and get many within 10s. And also use it to navigate in g-map. Though with this problem but I fell the usb-gps app is all I want to be.
[Acer Iconia A500] herbert1:
I could add an option for that.

However it would require a rooted device with busybox and superuser installed...

But it should not be a pb, if thé device is rooted. :)
[Acer Iconia A500] anbos:
I could add an option for that.

However it would require a rooted device with busybox and superuser installed...

But it should not be a pb, if thé device is rooted. :)

Yes i have rooted tablet with busybox v1.16 :)
[Acer Iconia A500] anbos:
Hi Herbert!

Is an option to change the connection speed in Public Repositories for

Cupcake version ?
[Acer Iconia A500] herbert1:
Not yet.

Will be soon...when I'll have some time (and the one I have for this project is rather limited).

Herbert
[Acer Iconia A500] herbert1:
The new versions (APK and sources) are available on github :) : https://github.com/HvB/UsbGps4Droid - https://github.com/HvB/UsbGps4Droid/downloads

UsbGPS4Droid alpha4 (2012-03-24)

- Add an option in order to change the connection speed. This requires a rooted device with busybox and superuser privileges.

- Bug fix (Ticket #9: Handle NMEA timestamps without fractional seconds ) (thanks to Jeffrey Hutzelman)

- Update copyright informations

UsbGPS4Cupcake alpha4 (2012-03-24)

- UsbGps4Droid version adapted for Cupcake and Donuts – Do not use with Eclair, Froyo or Gingerbread !!!

- Based on BlueGps4Cupcake version 1.2.2 and UsbGPS4Droid version alpha4.
[Acer Iconia A500] AngelOfGrief:
Hi, just a little followup on UsbGPS4Droid_alpha3.apk. I was not able to run it successfully until I enabled GPS functionality in build.prop. Or, one can just enter setprop gps.enable true from command prompt to make it work.

Thanks for the prog btw. Will try alpha4 now! Have you by any chance added 'start on boot' option?
[Acer Iconia A500] herbert1:
Just a little question ? I guess we can use the GPS device for input and output, so why do you only change the input speed ?
[Acer Iconia A500] netglitch:
I wish I could hit the Thank button for your post but I don't see one anywhere. Maybe I'm too new. In anycase thank-you. Before I came across your project I was using serial communication to get NMEA strings off the GPS. Makes it difficult for me to run multiple services dependent on location data due to I/O blocking. Your solution using mock providers is much superior.
[Acer Iconia A500] herbert1:
Hi,

Someone stated that I should call "busybox stty -F ..." instead of "stty -F ...", because, if busybox is installed, stty isn't a standalone binary.

For me it makes sense.

Are some of you using something else (than busybox) and, as I cannot test myself, can you confirm that it's working ?

Herbert
[Acer Iconia A500] AngelOfGrief:
On my box both are working, but why don't you try it yourself anyway?
[Acer Iconia A500] KiLLWarez:
Anyone tried to connect USB GPS on ICS?

I want to connect MTK GPS bridged to USB with CP2102.
[Acer Iconia A500] herbert1:
blueGPS is working on ICS and Jelly Beans (galaxy nexus) , so I think USB GPS should work on ICS.

Herbert
[Acer Iconia A500] KiLLWarez:
Successfully connected MTK GPS device bridged to USB with CP2102 to today famous Mele A1000. It was flashed to ICS, then added CP210x module to kernel, then set speed manually in your app. After that my nav app found sattelites in seconds. herbert1, thank you for your app!
[Acer Iconia A500] zero2008:
Could you please explain how to add the cp210x module to the kernel! As I'm trying to get a cp2104 to work with a MK802..

Many thanks

Zero
[Acer Iconia A500] herbert1:
Thanks for the feedback

Herbert
[Acer Iconia A500] af3556:
G'Day presslab; how'd you get on with a gpsd client?
[Acer Iconia A500] presslab:
My modified version is here, it is working just great.

https://docs.google.com/open?id=0B8FzJlhz-BzBSDNZMzlRcm5mMTg
[Acer Iconia A500] dcplaya:
I am currently trying to get a USB GPS (GlobalSat BU-353) working correctly on a Pandaboard running Jellybean. It looks like you guys have it working in JB so I am hoping it will work for me.

The device cant seem to connect. There is no /dev/ttyUSB0 listed in the /dev folder. Anyone have any idea what I need to do?
[Acer Iconia A500] herbert1:
I've some good news: Globalsat, which used BlueGps4Droid to build its GPL Android version of GPSinfo, is willing to help us and has sent me a couple GPS (a BT-338 to replace mine which is dying and a BU-353 ) :cool:

So when I'll receive the OTG usb cable I just bought, I hope I'll be able to work more seriously on UsbGps4Droid (till now I didn't have any USB GPS so develop UsbGps4droid wasn't very easy ! :silly: ).

If everything goes well, I hope to build a version which won't need root access or custom drivers. :fingers-crossed:

Herbert
[Acer Iconia A500] dcplaya:
This is amazing news! It wont be processor specific will it (As in TI or Samsung or Qualcomm)? I dont know if it was before
[Acer Iconia A500] Bishop Sad Clown:
feedback on cube u30gt-h, Jelly Bean Rooted and R/W enabled

Hi,

UsbGPS seem to be ok... some GPS soft see the GPS service is started ( on ttyUSB0 - BU-353 device ) but any data are used with differents softs and I have a recurent message:

=· (

Cheers...

@++
[Acer Iconia A500] herbert1:
Hi,

Currently I don't have a lot of time. However my first experiments with the Android USB API are promising.

So I hope to release the new version based on the USB API in the coming weeks.

Herbert

PS : Bishop Sad Clown, the message explains that the app is not able to read correctly the tty. It should be readable for everyone (generally not the case by default) and properly configured ( normally 4800 baud, 8 bits no parity 1 stop bit for a BU-353)
[Acer Iconia A500] herbert1:
Here a preliminary version of UsbGps4Droid built using Android SDK USB Host API. It will need at least Android 3.1 ( version 12 - Honeycomb MR1) and a device with USB host support (the source code is in usb_api branch on the Github UsbGps4Droid repository).

I've tested it with a Globalsat BU-353 on a Galaxy Nexus (International GSM version) and on an Asus transformer Prime. It works on both devices. I'm using stock unmodified firmware on both devices (Android 4.1.1 - build JRO03C).

A priori no particular driver kernel is needed nor root access :D

Herbert
[Acer Iconia A500] Bishop Sad Clown:
Thx for this search way but after several breaking head days I didn't find anything =· ( ... But I keep hope, and I'm still searching... My head is litle, yes but it's robust =· þ

thx for your interest and good job !

=· )

@++
[Acer Iconia A500] userdownload:
bu 353

Hi Herbert

First of all many thanks for jour work.

But after having installed your application on my Cube U30gt, i have plugged my Bu 353 till i got sattelites (led blinking) ,

Your appli was ont able to detect my GPS .

i ami running Android 4.11

Coule y ou help me please

Jpm
[Acer Iconia A500] herbert1:
Yea, it's still experimental.

If you have a BU-353, it should start UsbGps when you plug it in. Can you confirm that ?

You should see the usb device, if it finds one, in if the first option ("Choose USB GPS"). On mine it's something like "/dev/bus/usb/001/045".

If you start UsbGps manually, then the app will also ask you to confirm access permission to the USB device.

The app assume also that the GPS is configures to use NMEA protocol (not SIRF binary), 4800 baud (device speed), 8 bits parity none and 1 stop bit. This is the default configuration for BU-353, however this can be modified. Can you verify that using a laptop and something like SiRFDemo ?

As your tablet don't have any internal GPS it's also possible that you have to enable "Replace internal GPS" option and "Auto-enable location provider" option in UsbGps "Location provider option". On devices without GPS Location provider is sometime disabled by manufacturers.

If you could give more details on what happens and dump some logcat, this could also help to understand what happens...

Herbert
[Acer Iconia A500] Bishop Sad Clown:
today, after several weeks of search, I had forget any kind of hope to use my BU-353 on my cube tablet... It so sad but nothing to do, still the same error message... ='( ThX Herbert1 for your past aid and good work on the UsbGPS apk

Cheers...

@++
[Acer Iconia A500] og444:
cp2104 support

I'm also need help with that: I have a samaung galaxy s3 with paranoid Android JB on it, and i can't succeed connecting to the usb host a device with cp2104 chip on it.

It seems it doesn't attaching the device to the ttyUSB port.

Please help.:crying:

thank you

Ofir
[Acer Iconia A500] userdownload:
USB GPS with BU-353

"USB GPS" does not start when in plug my bu 353 , opening manualy "USB GPS" i dont see any any device in " Choose Usb GPS".

"replace internal gps" option and "auto enable location" are selected in "USB GPS" .My BU-353 is configured to use NMEA (i tried with sirfdemo ) . As you said my tablet as no internal gps and the manufactuer disable "GPS Location provider" as i am a new user of android could you tell me where to find "logcat"

many thanks for your help @
[Acer Iconia A500] herbert1:
It looks like the tablet doesn't recognize the BU-353... It's weird

If you have the Android sdk, you can iew the logcat via the command "adb logcat" (http://developer.android.com/tools/help/adb.html#commandsummary) or using the device monitor (http://developer.android.com/tools/help/monitor.html)

Herbert

---------- Post added at 01:46 AM ---------- Previous post was at 01:13 AM ----------

Have you tried to load the cp210x driver ? If you need to get it or compile it, you should perhaps ask on the S3 and/or paranoid forums.

Since you're using JB, you could also try the new version (for Honeycomb, ICS and JB - http://xdaforums.com/showpost.php?p=32851757&postcount=58) which uses the Android USB Host API. It's still an early alpha version, but normally it won't need root access or manual manipulation. So it should be simpler to use...

On the Galasy S3, both solution will require to use a micro usb OTG cable (basic micro usb cables won't work). Is there some led blinking on your USB GPS ?

Herbert
[Acer Iconia A500] sdegtyarev:
Hello.

Will it work with /dev/ttyACM0 Microchip usb-serial converter?
[Acer Iconia A500] sdegtyarev:
I will answer to myself.

No. It's not working.

herbert1 could you add to devices list /dev/ttyACM0?

It works as usual GPS device:
[Acer Iconia A500] herbert1:
This is just an early preliminary version. Actually it assumes 4800 bps GPS (default speed for Globalsat BU-353) . The next version will have the speed option reactivated and even (if I can manage it) an auto configure option.

If you can reconfigure your GPS to use 4800bps instead of 19200bps there is a chance it will work.

Or you can wait for the next version and try again : since your gps is recognized, normally the next version should be able to managed it

Herbert.
[Acer Iconia A500] sdegtyarev:
Hello Herbert.

Thank you a lot!

It looks like I have no possibility to lock speed on 4800 so I will wait for next release.

Is sources on github actual?
[Acer Iconia A500] sdegtyarev:
Hello Herbert.

Finally I have a possibility to lock speed for current session but no success with usbgps.

Could you please update you github repositories with the latest sources?

UPDATE: new information available. No more segfaults. Correct device in "Choose USB GPS". But NMEA log is empty. How to check device is working?