USB GPS

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

USB GPS

Post by idorel77 »

Hello,

i have android 5.1 vers. 1.4, and this gps http://www.ebay.com.au/itm/NEW-BU-353S4 ... 0958094412
and not working.

On other board with android KK 4.4.2 working with this driver https://github.com/dipcore/gps-glonass-android-driver

with this settings on build.prop:

Code: Select all

ro.kernel.android.gps=ttyUSB0
ro.kernel.android.gps.speed=4800
Can you give me some tips to make this working on C2?

Thanks.

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

Can you read out the NMEA raw data from "/dev/ttyUSB0"?

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Yes, and also do a 'logcat|grep gps', to see if the driver is starting up. Does the location symbol in the upper status bar comming up? Check if location property is set to 'device only'.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

On 'logcat|grep gps' i have no data or messages.

The location simbol is on status bar and i have set 'device only'

I think the device is not mapped on any /dev/tty*

Maybe i need something to add in kernel?

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Please connect your GPS to your host PC and lets look what driver is loaded or to get the vid and pid. Maybe that driver eg PL2303 is on C2 as module and need to be loaded with insmod.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

Yap i remember this is the driver i need. How to do that ?

Thanks.

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

Connect the GPS module to a Linux PC and show us the result of "lsmod" and "lsusb".
Once we know the driver name, we can include it in the next release.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

The result of lsmod:

Code: Select all

Module                  Size  Used by
pl2303                 19183  0 
usbserial              45277  1 pl2303
snd_ens1371            29928  2 
gameport               19986  1 snd_ens1371
snd_ac97_codec        135016  1 snd_ens1371
ac97_bus               12730  1 snd_ac97_codec
snd_pcm               107140  2 snd_ens1371,snd_ac97_codec
coretemp               17728  0 
crct10dif_pclmul       14250  0 
crc32_pclmul           13160  0 
snd_seq_midi           13324  0 
vmw_balloon            13593  0 
snd_rawmidi            30465  2 snd_ens1371,snd_seq_midi
aesni_intel            55720  0 
uvcvideo               82247  0 
ablk_helper            13597  1 aesni_intel
cryptd                 20530  2 aesni_intel,ablk_helper
lrw                    13323  1 aesni_intel
gf128mul               14951  1 lrw
glue_helper            14095  1 aesni_intel
aes_x86_64             17131  1 aesni_intel
videobuf2_core         40972  1 uvcvideo
videodev              139761  2 uvcvideo,videobuf2_core
snd_seq_midi_event     14899  1 snd_seq_midi
videobuf2_vmalloc      13216  1 uvcvideo
videobuf2_memops       13362  1 videobuf2_vmalloc
snd_seq                66061  2 snd_seq_midi,snd_seq_midi_event
psmouse               113413  0 
serio_raw              13462  0 
snd_timer              30038  2 snd_pcm,snd_seq
snd_seq_device         14497  3 snd_seq_midi,snd_rawmidi,snd_seq
snd                    77986  12 snd_ens1371,snd_ac97_codec,snd_pcm,snd_seq_midi,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore              12680  1 snd
snd_page_alloc         18798  1 snd_pcm
vmwgfx                185498  3 
bnep                   19884  2 
rfcomm                 74748  0 
bluetooth             411194  10 bnep,rfcomm
ttm                    98443  1 vmwgfx
parport_pc             32866  0 
mac_hid                13253  0 
ppdev                  17711  0 
drm                   308868  4 vmwgfx,ttm
shpchp                 37201  0 
i2c_piix4              22299  0 
vmw_vmci               68525  0 
lp                     17799  0 
parport                42481  3 parport_pc,ppdev,lp
hid_generic            12548  0 
usbhid                 53111  0 
hid                   106605  2 hid_generic,usbhid
floppy                 70207  0 
ahci                   34239  0 
e1000                 152064  0 
libahci                32825  1 ahci
mptspi                 22921  2 
mptscsih               44751  1 mptspi
mptbase               103162  2 mptspi,mptscsih
pata_acpi              13038  0 
lsusb

Code: Select all

Bus 001 Device 002: ID 0e0f:000b VMware, Inc. 
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Can i do something now or i have to wait for next release?

Thanks a lot.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Take a look at the folder /system/lib/modules, if there is a module pl2303.ko. If yes, you can do a 'insmod /system/lib/modules/pl2303.ko'. But if not, it must be included in the next release, as odroid mentioned. Unfortunatly I can't check with my C2 because it is dead.

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

We will check it.

@joerg,
I've sent you a PM. Please check it.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

Hi, i don't have this file: /system/lib/modules/pl2303.ko

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Here are some serial modules I compiled now:
modules.zip
(356.19 KiB) Downloaded 245 times
Copy pl2303.ko with adb to /system/lib/modules and change the rights:

Code: Select all

adb remount
adb push pl2303.ko /system/lib/modules/
adb shell chmod 755 /system/lib/modules/pl2303.ko
Connect your gps and insmod. I hope it works.

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

Also try this V1.5 update and let us know the result.
http://odroid.com/dokuwiki/doku.php?id= ... ew_updates

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

Thanks a lot i will try.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I have installed the V1.5 update,I have find module pl2303.ko but gps don't work.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

Is the same for me also. I used 2 different gps.

On 'logcat|grep gps' i have no data. But i think is maped on ttyS1. On other android was maped on ttyUSB0, i don't know is important this...

Thanks

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

Did you run "insmod pl2303.ko"?

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I run "insmod /system/lib/modules/pl2303.ko" and get "not found"

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

You needed to run "su" command first with a grant of super-user before the insmod command.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

i did with su and no error for me but the gps stil not working :S
wat can be wrong?

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I run su and then pl2303.ko but gps stil don't work...

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

Can you see /dev/ttyUSB0 or /dev/ttyACM0 after doing insmod?
If yes, run "cat /dev/ttyUSB0" or "cat /dev/ttyACM0" to check the NMEA stream.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I run cat /dev/ttyACM0 and got this.
Image

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Then check, if in your build.prop file on /system the setting is as:

Code: Select all

ro.kernel.android.gps=/dev/ttyACM0
ro.kernel.android.gps.speed=9600
And in ueventd.odroidc2.rc:

Code: Select all

# GPS
/dev/ttyACM*   0666    gps             gps
With my ublox7-gps, the baudrate can also be 115200, maybe with yours also.
If you change something at this files, please check that the rights stay at 644. If the rights not 644, it can end in a boot loop. After that reboot.

Then check in Android settings, if location is enabled and is device only.

Do you have the location symbol in status bar?
Without an application that uses location, there won't be a location symbol, means that the driver is not loaded. Check out GPSTest.

With the nmea messages I saw, your gps has no fix. Take a long cable and put it outside the window, after a while it should have a location fix.

Last, if you have a location symbol in status bar, then you can see the messages in logcat, do a 'logcat|grep gps'. There should be something.

You can copy the logs to a code block here, it's better than a screen shot.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

Thanks joerg

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

For me not working. I try it everything above.
I will try to reinstall the android and i will try again.

What is the safe way to modify file system like build.prop or ueventd.odroidc2.rc ?

Thanks a lot.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I don't know if works for me, I have not tried it yet.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

ok, I reset the *tablet* . -> restart...

cat /dev/tty + TAB -> show all tty -> no ttyUSB0 or ttyACM0

insmod /system/lib/modules/pl2303.ko -> ok no error

cat /dev/tty + TAB -> show all tty -> then show up - ttyUSB0 (my gps)

# logcat|grep gps

Code: Select all

D/libmbm-gps( 3129): odroid_gps_get_hardware_interface
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps-xtra
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps-xtra
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=agps
D/libmbm-gps( 3129): odroid_gps_get_extension, querying agps
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps-ni
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps-ni
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps-debug
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps-debug
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=agps_ril
D/libmbm-gps( 3129): odroid_gps_get_extension, querying agps_ril
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps_geofencing
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps_geofencing
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps_measurement
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps_measurement
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gps_navigation_message
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gps_navigation_message
D/libmbm-gps( 3129): odroid_gps_get_extension: enter name=gnss_configuration
D/libmbm-gps( 3129): odroid_gps_get_extension, querying gnss_configuration
W/GpsLocationProvider( 3129): Could not open GPS configuration file /etc/gps.conf
E/GpsLocationProvider( 3129): no AGPS interface in set_agps_server
D/libmbm-gps( 3129): nmea_reader_set_callbacks: sending latest fix to new callback
D/libmbm-gps( 3129): nmea_reader_set_callbacks: sending latest sv_status to new callback
D/libmbm-gps( 3129): nmea_reader_set_callbacks: sending latest nmea sentence to new callback
E/GpsLocationProvider( 3129): no AGPS interface in set_agps_server
W/LocationManagerService( 3129): Dropping incomplete location: Location[gps 0.000000,0.000000 acc=??? t=?!? et=?!? {Bundle[{}]}]
#cat /dev/ttyUSB0

Code: Select all

 %?cc?C(BCCCK
            ?o?G??wNgb׆Cj?Cb*!sB?*
                                  	??G?C?;??+??)?KB?jb)J
                                                             j???Bw???,CkB(B?w??u??gb?G?jbB(KJCu??gb?k?%??BB?JCC
??r?C(BB
        kJK)B??sB?*
                   	??G?C?;??+??)?KB?jb)J
                                             j?%?cc?C(BCCCK??o?G??wNgb׆Cj?Cb+!sB?*
                                                                                  	??G?C?;??+??)?KB?jb)J
                                                                                                             j?%?cc?C(BCCCK
                                                                                                                           ?o?G??wNgb׆Cj?Cb+!sB?*
           	??G?C?;??+??)?KB?jb)J
                                     j?%?CBB?JCC

J
 B?+!?
      ??r?C(BB
              kJK)B??sB?*
                         	??G?C?;??+
?)?KB?jb)J
          j?%Ĉ??r?C(BCCCK?H{r???wNgb׆Cj?Cb*!sB?*
                                                	??G?C?;??+
?)?KB?jb)J
          j???Bw????B?Jkc*!?w?CC?JkB?CKb*!??kBB?kj#?%?CBB?JCC

J
 B?)!???r?C(BB
              kJK)B??sB?*
                         	??G?C?;??+
(BjH}B?sJCB??G?C?;??+
?)?KB?jb)J
          j?%ĆBB?JCC

J
 B?*!???r?C(BB,kJK)B??sB?*
                          	??G?C?;??+
?)?KB?jB,J?J
            ?%ĆBB?JCC

J
 B?*!???r?C(BB,kJK)B??sB?*
                          	??G?C?;??+
(Bj????Ή*
         ??G?C?;??+??)?KB?jB,J?J
                                H?B?b???w?G???b???Bg?????CKj)!??kBB?kjC?%??BB?JCC
^C
on ueventd.odroidc2.rc

Code: Select all

 # GPS                                                                              
/dev/ttyACM*   0666    gps             gps                                         
/dev/ttyUSB*   0666    gps             gps 
Efter restart the board, the dev from ttyUSB0 is not there, only if i run again ''insmod /system/lib/modules/pl2303.ko''

I did not modified build.prop , yet (help me with safe command)

What should i do next?

thanks.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

Joerg you had right,
I check everything you shed and were ok, I left the gps antenna longer time than before outside the window and worked fine(after 3 minutes).
I was expecting to have a location fix sooner as a used to from other devices I have and thought my gps didn't work.
Can I do something to have a quicker location fix?
Thanks again for your help !!!

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

I don't know if your gps has a battery on board, my yes has a battery. If you are not using long time, it is also known that needs longer to fix. Depend on, if it makes a cold start or a warm start. Take a look to the data sheet of yours, there must be written something about the fix times.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

@idorel77
Something wrong with the baud rate. Pls check in datasheet of your gps how the baud rate must be. My gps for example has auto baud rate, so when I put 115200 in build.prop the gps adapts to it. But this setting in build.prop is for the driver. When you do a 'cat' then the baudrate is not taken from build.prop. You can do a 'stty -F /dev/ttyUSB0 115200' on command line, also with other baud rates, to find the correct. You are correct when you get nmea messages like Adamouky. If you have the correct baud rate, edit build.prop with a editor like Jota Text Editor. When you edit the build.prop on the C2 itself nothing bad will happen with the rights. If you are commune with a command line editor like vi, you can use this also.
Before you can edit, you must remount the system partition:

Code: Select all

mount -o remount, rw /
And in file 'init.odroidc2.rc' you can insert one line to make pl2303.ko autostart:

Code: Select all

    chown media system /sys/class/amhdmitx/amhdmitx0/aud_ch                  
    chmod 0664 /sys/class/amhdmitx/amhdmitx0/aud_ch                          
    insmod  /system/lib/modules/aml_thermal.ko                               
    
    insmod  /system/lib/modules/pl2303.ko   
Last, you need to restart the C2.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

It is working now. Thanks a lot for help.

The only problem is, like @Adamouky, it need few minutes to connect, and this on my car.
With the same gps on other board with android 4.4.3 the gps connected instant.

Maybe i need some extra settings?

Thanks.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

I can't find any data sheet.
I have this gps antenna : http://www.hardkernel.com/main/products ... 2502154078
Any ideas to make it faster?
Thanks

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

O.K. tomorrow I will take my gps from the car to check if there is any difference between C1 and C2.

Adamouky
Posts: 42
Joined: Tue Apr 05, 2016 3:49 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Adamouky »

Thanks man

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

Hi @joreg , did you find something?

I have also this Serial GPS http://www.perthold.de/BINARY/gps-st22.pdf

Is there any posibility to connect for example on uart port? or on IO pins?

Thanks.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

This should work. Connect as follow:
3.3V Header.1 to GPS.4
GND Header.6 to GPS.3
Txd Header.8 to GPS.1
Rxd Header.10 to GPS.2
Then depending of your model connect a lithium cell to Vbak.
You would need to edit uevent.odroidc2.rc to set the rights for /dev/ttyS1 to gps:gps and also build.prop.
I was a little bit busy to check my gps with C2, but I will do today.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

I checked my ublox7 device now with C2. It took about 38s to get a location fix. It is the Vk-172, bought via AliExpress. Before I was already sure that the time of fix depends on the gps device, signal strength, but not on the gps driver or C2.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

I don't say this is from driver or C2 . I asked only if i can make somthing. I think can use a file to fix this delay but i don't know how. I will search.

P.S. i connected gps serial to pin 8(tx) and pin 10(rx), modify like you said uevent.odroidc2.rc , build.prop and i have data on ttyS1 :)
I will go in my car to test this.

Thanks.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Yes, I know. Search a good position for your gps sensor. App GpsTest will give you some information about signal strength. Good luck.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

For me, took 2 min to get a location fix.

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

O.k., but do you have observed the signal strength? As datasheet says, it should be faster.

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

What i know is with the same gps on udoo board with android 4.4.3 get a location fix much faster, it is like when android loaded the gps is connected ....i don't need to wait to connect...

Squal75fr
Posts: 38
Joined: Fri Jul 10, 2015 5:33 am
languages_spoken: English, French
ODROIDs: Odroid U3 & C2
Location: France - Paris
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Squal75fr »

Hi all,
I have an issue with my GPS. Same model as idorel77 (a BU-353S4-SiRF-Star-IV-USB).
I followed the exact process step by step but with no success.
What I done:

Code: Select all

# su
# insmod /system/lib/modules/pl2303.ko
# mount -o remount, rw /

I inserted this line in file 'init.odroidc2.rc' :

Code: Select all

insmod /system/lib/modules/pl2303.ko (in the correct place as described above) 
I changed build.prop with those values:

Code: Select all

ro.kernel.android.gps=ttyUSB0
ro.kernel.android.gps.speed=4800
no fix even after 10 minutes.

Additionnal test and log I done:

Code: Select all

# insmod /system/lib/modules/pl2303.ko
[   59.295180@1] usbcore: registered new interface driver pl2303
[   59.295666@1] usbserial: USB Serial support registered for pl2303
[   59.301358@1] pl2303 1-1.1:1.0: pl2303 converter detected
[   59.309213@0] usb 1-1.1: pl2303 converter now attached to ttyUSB0

Code: Select all

# cat /dev/tty + tab   --> ttyUB0 found

Code: Select all

# logcat|grep gps
W/PackageManager( 3294): Failure retrieving resources for com.chartcross.gpstest: Resource ID #0x0
D/libmbm-gps( 3104): odroid_gps_get_hardware_interface
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps-xtra
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps-xtra
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=agps
D/libmbm-gps( 3104): odroid_gps_get_extension, querying agps
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps-ni
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps-ni
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps-debug
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps-debug
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=agps_ril
D/libmbm-gps( 3104): odroid_gps_get_extension, querying agps_ril
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps_geofencing
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps_geofencing
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps_measurement
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps_measurement
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gps_navigation_message
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gps_navigation_message
D/libmbm-gps( 3104): odroid_gps_get_extension: enter name=gnss_configuration
D/libmbm-gps( 3104): odroid_gps_get_extension, querying gnss_configuration
W/GpsLocationProvider( 3104): Could not open GPS configuration file /etc/gps.conf
E/GpsLocationProvider( 3104): no AGPS interface in set_agps_server
D/libmbm-gps( 3104): nmea_reader_set_callbacks: sending latest fix to new callback
D/libmbm-gps( 3104): nmea_reader_set_callbacks: sending latest sv_status to new callback
D/libmbm-gps( 3104): nmea_reader_set_callbacks: sending latest nmea sentence to new callback
E/GpsLocationProvider( 3104): no AGPS interface in set_agps_server
W/LocationManagerService( 3104): Dropping incomplete location: Location[gps 0,000000,0,000000 acc=??? t=?!? et=?!? {Bundle[{}]}]
D/libmbm-gps( 3104): odroid_gps_inject_time: enter
D/libmbm-gps( 3104): AT*E2GPSTIME=331948,1898
D/libmbm-gps( 3104): odroid_gps_inject_time: exit 0
^C

Code: Select all

# cat /dev/ttyUSB0  --> nothing ...
^C

Code: Select all

# adb remount
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
# adb push pl2303.ko /system/lib/modules/
error: device not found
# adb shell chmod 755 /system/lib/modules/pl2303.ko
error: device not found
This GPS device works fine on my U3+.
Your help would be really appreciate.
Thanks

User avatar
odroid
Site Admin
Posts: 35920
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1325 times
Been thanked: 915 times
Contact:

Re: USB GPS

Post by odroid »

There should be NMEA output from cat /dev/ttyUSB0 if the driver is compatible with your USB GPS.
Do you use the same driver on U3?

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

Please connect it to a linux host. With lsusb and dmesg you will find the driver you need for this gps.

Squal75fr
Posts: 38
Joined: Fri Jul 10, 2015 5:33 am
languages_spoken: English, French
ODROIDs: Odroid U3 & C2
Location: France - Paris
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Squal75fr »

My result:

Code: Select all

pascal@MacBookPro:~$ lsmod
Module                  Size  Used by
bnep                   20480  2 
rfcomm                 69632  8 
snd_hda_codec_hdmi     53248  4 
nls_iso8859_1          16384  1 
pl2303                 20480  0 
usbserial              49152  1 pl2303
uvcvideo               90112  0 
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_core         53248  1 uvcvideo
v4l2_common            16384  1 videobuf2_core
videodev              159744  3 uvcvideo,v4l2_common,videobuf2_core
media                  24576  2 uvcvideo,videodev
hid_appleir            16384  0 
btusb                  40960  0 
bluetooth             491520  22 bnep,btusb,rfcomm
bcm5974                20480  0 
joydev                 20480  0 
arc4                   16384  2 
brcmsmac              569344  0 
cordic                 16384  1 brcmsmac
brcmutil               16384  1 brcmsmac
b43                   421888  0 
mac80211              708608  2 b43,brcmsmac
cfg80211              524288  3 b43,brcmsmac,mac80211
ssb                    65536  1 b43
applesmc               20480  0 
input_polldev          16384  1 applesmc
intel_powerclamp       20480  0 
coretemp               16384  0 
kvm_intel             151552  0 
kvm                   479232  1 kvm_intel
crct10dif_pclmul       16384  0 
crc32_pclmul           16384  0 
ghash_clmulni_intel    16384  0 
aesni_intel           172032  0 
aes_x86_64             20480  1 aesni_intel
lrw                    16384  1 aesni_intel
gf128mul               16384  1 lrw
glue_helper            16384  1 aesni_intel
ablk_helper            16384  1 aesni_intel
cryptd                 20480  3 ghash_clmulni_intel,aesni_intel,ablk_helper
intel_ips              20480  0 
snd_hda_codec_cirrus    20480  1 
snd_hda_codec_generic    69632  1 snd_hda_codec_cirrus
snd_hda_intel          32768  5 
snd_hda_controller     32768  1 snd_hda_intel
snd_hda_codec         143360  5 snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller,snd_hda_codec_cirrus
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               106496  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_seq_midi           16384  0 
lpc_ich                24576  0 
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            32768  1 snd_seq_midi
nouveau              1368064  3 
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_pcm,snd_seq
snd                    86016  21 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_hda_codec_cirrus
bcma                   53248  2 b43,brcmsmac
mxm_wmi                16384  1 nouveau
wmi                    20480  2 mxm_wmi,nouveau
i915                 1048576  6 
ttm                    94208  1 nouveau
soundcore              16384  2 snd,snd_hda_codec
sbs                    16384  0 
sbshc                  16384  1 sbs
apple_gmux             16384  0 
drm_kms_helper        126976  2 i915,nouveau
video                  20480  3 i915,nouveau,apple_gmux
drm                   344064  8 ttm,i915,drm_kms_helper,nouveau
apple_bl               16384  1 apple_gmux
i2c_algo_bit           16384  2 i915,nouveau
shpchp                 40960  0 
mac_hid                16384  0 
parport_pc             32768  0 
ppdev                  20480  0 
lp                     20480  0 
parport                45056  3 lp,ppdev,parport_pc
hid_generic            16384  0 
hid_apple              16384  0 
usbhid                 53248  0 
uas                    24576  0 
hid                   110592  4 hid_generic,usbhid,hid_appleir,hid_apple
usb_storage            69632  1 uas
tg3                   167936  0 
ahci                   36864  3 
firewire_ohci          40960  0 
libahci                32768  1 ahci
firewire_core          69632  1 firewire_ohci
ptp                    20480  1 tg3
crc_itu_t              16384  1 firewire_core
pps_core               20480  1 ptp

Code: Select all

pascal@MacBookPro:~$ lsusb
Bus 002 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 004: ID 05ac:8242 Apple, Inc. Built-in IR Receiver
Bus 002 Device 003: ID 05ac:8507 Apple, Inc. Built-in iSight
Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 05ac:8403 Apple, Inc. Internal Memory Card Reader
Bus 001 Device 004: ID 05ac:0237 Apple, Inc. Internal Keyboard/Trackpad (ISO)
Bus 001 Device 008: ID 05ac:8218 Apple, Inc. Bluetooth Host Controller
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Thansk

User avatar
joerg
Posts: 1204
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 73 times
Been thanked: 144 times
Contact:

Re: USB GPS

Post by joerg »

So you started the correct driver. It is some how rare that you don't receive data. I can't test it here with a pl2303 based dongle, because mine old one has died. Maybe another one can assist here? Maybe idorel77, you can check it once more with your usb gps?

idorel77
Posts: 95
Joined: Fri May 06, 2016 12:01 am
languages_spoken: english, swedish, romanian
ODROIDs: C2, N2
Location: Romania
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by idorel77 »

I don't know what is wrong for @Squal75fr, i did the same steps.
My gps use pl2303 driver.
Is mapped on /dev/ttyUSB0 and rate speed 4800 and should be the same for @Squal75fr.

Do you have android ver 1.5 ?

Squal75fr
Posts: 38
Joined: Fri Jul 10, 2015 5:33 am
languages_spoken: English, French
ODROIDs: Odroid U3 & C2
Location: France - Paris
Has thanked: 0
Been thanked: 0
Contact:

Re: USB GPS

Post by Squal75fr »

I confirm v1.5.
I done a complete re installation with self img. But no better result :-(
joerg I sent you mp.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 3 guests