# GPS via usb on the touchpad?



## mgazza (Jun 16, 2012)

Hi All,
I have been installing android on my touchpad more or less since the project began, and I now feel that it is stable enough to replace the infotainment system in my car.
I have bought the y-cable and USB OTG cable so I can hook up all the usb goodies already hidden about the car.
I have just plugged in the touchpad and most things seam to work. The only thing that isn't working existing GPS module(Pharos GPS-500 SIRF III USB dongle)
Navigation is a must for me and this is the only thing stopping me from throwing the TP in my car.
any ideas of how to get this to work? the device works out of the box in windows xp









cheers,


----------



## fsx100 (Jun 11, 2012)

Bluetooth GPS.

Works for me......

Sent from my cm_tenderloin using Tapatalk


----------



## mgazza (Jun 16, 2012)

yes I could indeed buy the bluetooth add-on for the [background=rgb(245, 245, 245)]Pharos [/background]gps-500 but id sooner not.
a quick google produces this but i have no idea how to install drivers on linux.
http://www.slatedroid.com/topic/27852-generic-usb-serial-gps-hal-driver/


----------



## fsx100 (Jun 11, 2012)

No. "bluetooth gps" from the market/ play store.

Thats all you need to get it working....

Sent from my cm_tenderloin using Tapatalk


----------



## mgazza (Jun 16, 2012)

just tried this app and indeed it tries to connect to a bluetooth gps device. only thing is its serial over usb that i need not serial over bluetooth surely this has to be simpler?


----------



## mgazza (Jun 16, 2012)

ok just installed "usb device info" and under linux it shows the device 

Device Info 
Device Path: /sys/bus/usb/devices/1-1/
Device Class: Use class information in the Interface Descriptors (0x0)
Vendor ID: 067b
Vendor Name (reported): Prolific Technology Inc.
Vendor Name (from DB): Prolific Technology, Inc.
Product ID: aaa0
Product Name (reported): USB-Serial Controller D
Product Name (from DB): Prolific Pharos
Additional Info 
USB Version: 1.10
Speed: 12
Protocol: 00
Maximum Power: 100mA
Serial Number: 12345678

so that must mean that linux knows what it is. so now do i just need to install gps hal driver ?


----------



## fsx100 (Jun 11, 2012)

I have NO idea what you have done. The steps are relatively simple, and straightforward:

BUY a Bluetooth GPS module

Pair Module with your Android device.

Install "Bluetooth GPS" from Play/Market

Turn on GPS Module, then run "Bluetooth GPS" to capture the data.

ENABLE "Mock locations", to capture the external GPS data from the module. THATS IT.

To any GPS enabled app, its now using the data from your External GPS Module, as if it were built into your device (Phone/Touchpad/Nook Color etc).


----------



## mgazza (Jun 16, 2012)

fsx100 said:


> I have NO idea what you have done. The steps are relatively simple, and straightforward:
> 
> BUY a Bluetooth GPS module
> 
> ...


so what your saying is I have to shell out for a bluetooth gps device. and there's no possible way to use the usb serial one I already own.


----------



## cessna784 (Oct 29, 2011)

I been using bluetooth gps. I had no issues with CM7 and bluetooth gps but when i upgraded to ice cream bluetooth was crappy with gps.


----------



## mgazza (Jun 16, 2012)

I'm not having any problems with bluetooth gps. I just dont want to use bluetooth gps when i have a better SIRF III device on hand which just needs to talk via usb.
I have made some progress.
I have found that the interface is a Prolific chip.
I have found drivers on the net which will load this device.
now I need to know how to install this driver.
apparently they are stored in system/lib/modules/ ; now i can't cp because system is read-only so i need to remount system -rw, thats where im stuck currently.


----------



## mgazza (Jun 16, 2012)

ok mounting system is pretty easy
mount -o remount,rw /system
then 
cp ftdi_sio.ko /system/lib/modules/
cp pl2303.ko /system/lib/modules/
reboot

when its back up opened "usb device info"... SUCCESS, it reports the gps device available to android 

Device Info
Device Path: /dev/bus/usb/001/003
Device Class: Use class information in the Interface Descriptors (0x0)
Vendor ID: 067b
Vendor Name: Prolific Technology, Inc.
Product ID: 03eb
Product Name: not in db
Interfaces
Interface #0
Class: Vendor Specific (0xff)
Endpoint: #0
Address : 129 (10000001)
Number : 1
Direction : Inbound (0x80)
Type : Intrrupt (0x3)
Poll Interval : 1
Max Packet Size: 10
Attributes : 000000011
Endpoint: #1
Address : 2 (000000010)
Number : 2
Direction : Outbound (0x0)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 64
Attributes : 000000010
Endpoint: #2
Address : 131 (10000011)
Number : 3
Direction : Inbound (0x80)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 64
Attributes : 000000010

now how to get this to show as a ttyUsb ?

the script on the driver web site has this

# Modifying Init Scrtipts...

adb $SUN4I_DEVICE shell "busybox test -f /init.sun4i.orig || busybox cp /init.sun4i.rc /init.sun4i.orig"
adb $SUN4I_DEVICE shell "busybox sed \"s/insmod \/drv\/mali.ko/insmod \/drv\/mali.ko\n\n# USB serial converter drivers\n	insmod \/drv\/ftdi_sio.ko\n	insmod \/drv\/pl2303.ko\n	setprop ro.kernel.android.gps $SUN4I_GPS_DEVICE/\" /init.sun4i.orig > /init.sun4i.rc"

# Giving permisions to the serial usb devices (ttyUSB*...)

adb $SUN4I_DEVICE shell "busybox grep -q ttyUSB /ueventd.sun4i.rc || busybox cp /ueventd.sun4i.rc /ueventd.sun4i.orig"

adb $SUN4I_DEVICE shell "busybox test -f /ueventd.sun4i.orig && busybox sed \"s/\/dev\/block\/nande.*system$/\/dev\/block\/nande 0600	system	system\n\/dev\/ttyUSB0 0777	system	system\n\/dev\/ttyUSB1 0777	system	system\n\/dev\/ttyUSB2 0777	system	system\n\/dev\/ttyUSB3 0777	system	system/\" /ueventd.sun4i.orig > /ueventd.sun4i.rc"

im not sure what these do. but since im running locally i dont think i need any of the adb $SUN4I_DEVICE shell at the start.
any how it gives me cp: can't stat 'ueventd.sun4i.rc' :No such file or directory
so im not sure where to run this from


----------



## bryantjopplin (Oct 4, 2011)

Any progress?

Sent from my Galaxy Nexus using Tapatalk 2


----------



## mgazza (Jun 16, 2012)

Yes,
last night I converted the entire script (now I understand what it does) so that it would run from the terminal in android on the TP.
I got it to add lines to init.tenderloin.rc and ueventd.tenderloin.rc but upon rebooting these changes are lost.
so I now need to find out if I can commit these changes somehow.


----------



## mgazza (Jun 16, 2012)

Ok learning on the go here. seams that the .ko files wont run on the touchpad and i need ones compiling for the cpu on the touchpad. no idea how to do this so


----------

