Jump to content

Help Request: USB-Interfaced GPS, Based on PL-2303 Serial Converter (For Car PC)


Recommended Posts

Guest wilkinsxg
Posted

Hi Folks,

I'm working on a new CarPC installation based around the Vega. My previous installations have been based on the O2 Joggler, but the Vega offers a much bigger screen and better OS, making it a great upgrade.

I'm planning something along the lines of this: http://www.slipperybrick.com/2011/01/hp-sl...icle-dashboard/

I have a Vega dock on order, which I'm going to modify and integrate into a replacement head-unit fascia.

The biggest problem I'm facing at the moment is the lack of built-in GPS in the Vega.

I've already had a bluetooth GPS device working successfully using the excellent guide provided by trevor432990 - however I'm looking for a more permanent car installation, where the GPS device is automatically connected when the tablet is dropped into the dock. This would ideally be achieved by connecting a USB GPS device through the dock's USB ports, such that I just drop the tablet into the modified dock, and the GPS is immediately connected without faffing with bluetooth. No need to keep a separate bluetooth device charged either.

Thanks to Paul's (and no doubt other's) fantastic work on the custom ROMs and the USB host mode, I've been able to use USB keyboards and other devices with the Vega. 3G is relatively straight forward. However GPS has so far failed to work.

My research into this topic has led me into the realms of compiling kernels and porting drivers, which is far beyond my Linux experience. As such, I'm asking here in the hope that someone far more knowledgeable than I can tell me if I'm attempting something impracticable, or if there's actually a way of achieving this.

I have a couple of USB GPS dongles - all using the Prolific PL-2303 chip.

My general understanding is that:

- Linux kernels 2.4.10 and higher have built-in drivers for the PL-2303 chip (Source: Prolific Website)

- Android, by extension, also has this support (Source: Prolific Website)

- If recognised, the device would appear under '/dev/ttyUSB0' (Source: Various Google Groups Threads)

- Android's source of NMEA data can be set to the new serial port by adding 'ro.kernel.android.gps ttyUSB0' to 'system.prop' (Source: Various Google Groups Threads)

- Once the above is done, the 'Use GPS Satellites' option will become available under 'Settings > Location & Security' (Source: Wishful Thinking)

What's stopping me at the moment is that the serial device isn't appearing under '/dev/ttyUSB0' - presumably because the driver is not available in the Vega's version of Android.

It may be a case of asking Paul very nicely (or by bribery with beer money) to drop an extra module or two into the next Modaco ROM, or it may be something much more complicated.

If anyone can offer advice or assistance I'd be most grateful.

Guest trevor432990
Posted

Why are you trying to use a USB GPS device apart from the fact you already have one/two? If you dislike the thought of having a separate bluetooth connected device (which could be hard-wired within the car to be permanently on-charge) why not use a tethered mobile phone which has GPS instead? :(

Guest wilkinsxg
Posted
Why are you trying to use a USB GPS device apart from the fact you already have one/two?

Ideally I'd like the tablet to behave exactly as though it has integrated GPS hardware. Since it is a car installation I don't wish to be turning on the device (which I'd hoped to hide in the dash), re-establishing bluetooth connections and initializing the 'Bluetooth GPS Provider' app every time I get in and start the car. As mentioned, I do already have a bluetooth GPS unit as well - but it needs to be turned on manually every time. If USB support is ultimately not practical, I could alternatively set up a relay to start the device upon ignition.

why not use a tethered mobile phone which has GPS instead?

I wasn't aware that a mobile phone's GPS hardware could be shared in this way, and hadn't even considered it - thanks for bringing it to my attention.

Having looked into it, I've found an app that might work for this:

http://www.androidtablets.net/forum/androi...our-tablet.html

However I'd need to buy (and switch to using) an Android phone - and it (presumably) comes back to the issue of requiring a certain amount of setup for every journey - as well as having another device in the car to mount up and power.

Ultimately I don't know what is involved in getting a USB solution to work, which I why I'm asking here. If it's not practical, then I'll need to look at other options, most likely using Bluetooth GPS.

Guest trevor432990
Posted

If you have a GPS enabled phone (of any OS) currently then the likelihood is it can be tethered to the Vega for navigation purposes but whether you'll ever get a fully plug-and-play system the way you describe it is unlikely. Let's face it you've still got to program in your destination so what's a few extra clicks to get things setup beforehand. :(

Guest rpmccormick
Posted

I was working on the same thing. Although I agree USB would be better, you could use a profile app so that when you plug in your phone in the car, it automatically turns on bluetooth, provides GPS to the tablet, and provides mobile internet to the tablet. All you should have to do is get in to your car, power/wake the tablet, and plug your phone in to charge.

If you do get USB working, please let me know.

Guest the_corvus
Posted

1) install bumble kernel

2) boot in host mode

3) with connecbot or any terminal do: insmod /system/lib/modules/pl2303.ko

4) connect your usb gps

5) you will get /dev/ttyUSB0

If you do cat /dev/ttyUSB0 you will get data, but i dont know any way to tell Android how to detect gps.

Corvus.

Hi Folks,

I'm working on a new CarPC installation based around the Vega. My previous installations have been based on the O2 Joggler, but the Vega offers a much bigger screen and better OS, making it a great upgrade.

I'm planning something along the lines of this: http://www.slipperybrick.com/2011/01/hp-sl...icle-dashboard/

I have a Vega dock on order, which I'm going to modify and integrate into a replacement head-unit fascia.

The biggest problem I'm facing at the moment is the lack of built-in GPS in the Vega.

I've already had a bluetooth GPS device working successfully using the excellent guide provided by trevor432990 - however I'm looking for a more permanent car installation, where the GPS device is automatically connected when the tablet is dropped into the dock. This would ideally be achieved by connecting a USB GPS device through the dock's USB ports, such that I just drop the tablet into the modified dock, and the GPS is immediately connected without faffing with bluetooth. No need to keep a separate bluetooth device charged either.

Thanks to Paul's (and no doubt other's) fantastic work on the custom ROMs and the USB host mode, I've been able to use USB keyboards and other devices with the Vega. 3G is relatively straight forward. However GPS has so far failed to work.

My research into this topic has led me into the realms of compiling kernels and porting drivers, which is far beyond my Linux experience. As such, I'm asking here in the hope that someone far more knowledgeable than I can tell me if I'm attempting something impracticable, or if there's actually a way of achieving this.

I have a couple of USB GPS dongles - all using the Prolific PL-2303 chip.

My general understanding is that:

- Linux kernels 2.4.10 and higher have built-in drivers for the PL-2303 chip (Source: Prolific Website)

- Android, by extension, also has this support (Source: Prolific Website)

- If recognised, the device would appear under '/dev/ttyUSB0' (Source: Various Google Groups Threads)

- Android's source of NMEA data can be set to the new serial port by adding 'ro.kernel.android.gps ttyUSB0' to 'system.prop' (Source: Various Google Groups Threads)

- Once the above is done, the 'Use GPS Satellites' option will become available under 'Settings > Location & Security' (Source: Wishful Thinking)

What's stopping me at the moment is that the serial device isn't appearing under '/dev/ttyUSB0' - presumably because the driver is not available in the Vega's version of Android.

It may be a case of asking Paul very nicely (or by bribery with beer money) to drop an extra module or two into the next Modaco ROM, or it may be something much more complicated.

If anyone can offer advice or assistance I'd be most grateful.

Guest wilkinsxg
Posted
you could use a profile app so that when you plug in your phone in the car, it automatically turns on bluetooth, provides GPS to the tablet, and provides mobile internet to the tablet.

Thanks rpmccormick - I was thinking along the same lines when my attempts to get USB GPS working failed. Now that I have the dock, I'm looking into having the dock automatically detected by the Vega, such that it boots into navigation or some other app as soon as it's plugged in.

If you do cat /dev/ttyUSB0 you will get data, but i dont know any way to tell Android how to detect gps.

You sir, are a star. I will attempt this at the weekend.

My previous searching suggests adding 'ro.kernel.android.gps ttyUSB0' to 'system.prop' will point Android to use that serial port as the NMEA data source. I imagine further steps will be required to enable this fully, but I'll give it a go and find out.

Guest warriorscot
Posted

I thought there was a compatible GPS for USB Im sure I remember reading on this forum about one but it would have been quite a while ago.

Guest the_corvus
Posted
My previous searching suggests adding 'ro.kernel.android.gps ttyUSB0' to 'system.prop' will point Android to use that serial port as the NMEA data source. I imagine further steps will be required to enable this fully, but I'll give it a go and find out.

I tried this... no way...

I added it and doesnt work, if i do getprop once added, i get ttyUSB0, but we have 2 problems, once is that this property is added before ttyUSB0 is created and i dont know if this can be a problem.

The other is that android uses libgps.so to speak with gps hardware directly. In vega we have 3 libgps, one generic, one for huawei and one for ericsson. Huawei one donesnt show any error, but doesnt work, generic one try to search for a gps, but doesnt find any (maybe because problem explained before???), you can see error in logcat. Ericsson one, i just dont test it.

My try now is to compile kernel with pl2303 inside, so, if we start with gps dongle, maybe we can get it working before android loads libgps and find it... i will try this weekend and make a post.

I have other ideas too, but app development is needed and i'm not skilled in this...

Corvus.

Guest sugar0
Posted
Ideally I'd like the tablet to behave exactly as though it has integrated GPS hardware. Since it is a car installation I don't wish to be turning on the device (which I'd hoped to hide in the dash), re-establishing bluetooth connections and initializing the 'Bluetooth GPS Provider' app every time I get in and start the car. As mentioned, I do already have a bluetooth GPS unit as well - but it needs to be turned on manually every time. If USB support is ultimately not practical, I could alternatively set up a relay to start the device upon ignition.

I wasn't aware that a mobile phone's GPS hardware could be shared in this way, and hadn't even considered it - thanks for bringing it to my attention.

Having looked into it, I've found an app that might work for this:

http://www.androidtablets.net/forum/androi...our-tablet.html

However I'd need to buy (and switch to using) an Android phone - and it (presumably) comes back to the issue of requiring a certain amount of setup for every journey - as well as having another device in the car to mount up and power.

Ultimately I don't know what is involved in getting a USB solution to work, which I why I'm asking here. If it's not practical, then I'll need to look at other options, most likely using Bluetooth GPS.

That trick doesnt work for me with my DESIRE

Guest wilkinsxg
Posted
My try now is to compile kernel with pl2303 inside, so, if we start with gps dongle, maybe we can get it working before android loads libgps and find it... i will try this weekend and make a post.

I have other ideas too, but app development is needed and i'm not skilled in this...

Thank you for sharing your findings Corvus.

App development is something I've recently been getting involved in, so I may be able to assist there.

Parsing NMEA data in Java (or any other language) is fairly trivial - getting the NMEA data from the serial port is another matter.

It appears that a library such as RXTX (which has been ported to Android) could be used in an app to access this. I'll give it a go.

http://embeddedfreak.wordpress.com/java-serial-port-trail/

http://v-lad.org/projects/gnu.io.android/

Guest the_corvus
Posted
Thank you for sharing your findings Corvus.

App development is something I've recently been getting involved in, so I may be able to assist there.

Parsing NMEA data in Java (or any other language) is fairly trivial - getting the NMEA data from the serial port is another matter.

It appears that a library such as RXTX (which has been ported to Android) could be used in an app to access this. I'll give it a go.

http://embeddedfreak.wordpress.com/java-serial-port-trail/

http://v-lad.org/projects/gnu.io.android/

Ok, thats good...

The other aproach is using the same method that BT GPS programs use.

In Android exist mock locations, designed for development. A developer can give an app fake gps data using mock locations, to test that works correctly.

Apps that allow using bluthooth gps, link to gps bluetooth port, and creates a local serial port for communicate to gps, (same point that we are, that have a serial port with gps data). Then send this gps data to mock locations so any app using gps use this mock locations thinking that are fake data, but they are real. Almos all apps that use gps data can work this way.

I see that some of this apps are gpl and has its code in sourceforge... so if someone can take this code and compile to link a serial port with mock locations, i think we could use our gps usb.

Anyway i will continue working to get usb gps working with libgps.

Corvus.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.