Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: GPS

  1. [translate]    #1
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default GPS

    I think, i made GPS working.
    Samsung did it again: modified the sources, now rild

    So the libsecgps linking wasnt hard:
    BOARD_GPS_LIBRARIES := libsecgps libsecril-client

    We need to use them at linking ( i think it's ugly but working ):
    Code:
    LOCAL_PATH:= $(call my-dir)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := libsecgps.so
    LOCAL_MODULE_CLASS := SHARED_LIBRARIES
    LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
    LOCAL_SHARED_LIBRARIES := libsecril-client
    LOCAL_SRC_FILES := $(LOCAL_MODULE)
    OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
    include $(BUILD_PREBUILT)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := libsecril-client.so
    LOCAL_MODULE_CLASS := SHARED_LIBRARIES
    LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
    LOCAL_SRC_FILES := $(LOCAL_MODULE)
    OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
    include $(BUILD_PREBUILT)
    If we boot this, log says libgps can't connect to RILD (4)

    After 2hours of investigation and help of strace:
    libsecril-client want to connect to RILD via 127.0.0.1:7777, but it's connection refused.
    Of course didn't publish this modifications.
    I take a look to android sources, rild didn't change after eclair, so i copied the following files from original firmware:
    /system/bin/rild
    /system/lib/librild.so
    /system/lib/libwpa_client.so

    It looks like, working....

    I try to get some libsecril-client or samsung's rild sources, maybe we can apply this patches, but now, i think, it's enough.

  2. [translate]    #2
    Administrator
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,730

    Default

    GSM/3G/EDGE & GPS samsung created on Qualcomm MSM6246 chip...
    so everything works via RIL

    ---------- Post added at 04:54 PM ---------- Previous post was at 04:53 PM ----------

    this
    Quote Originally Posted by criminal View Post
    LOCAL_PATH:= $(call my-dir)

    include $(CLEAR_VARS)
    LOCAL_MODULE := libsecgps.so
    LOCAL_MODULE_CLASS := SHARED_LIBRARIES
    LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
    you add as stand alone Android.mk file?
    Twitter | Devices: Samsung Spica i5700 - SamdroidMod 2.0.1 Froyo | Nexus One - Android 2.2 Froyo | Nexus S CyanogenMod 7.1
    If you like my stuff, buy me a beer!

  3. [translate]    #3
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    Quote Originally Posted by LeshaK View Post
    GSM/3G/EDGE & GPS samsung created on Qualcomm MSM6246 chip...
    so everything works via RIL

    ---------- Post added at 04:54 PM ---------- Previous post was at 04:53 PM ----------

    this

    you add as stand alone Android.mk file?
    With libraries... I'll fork vendor and request pull the changes...

  4. [translate]    #4
    Administrator
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,730

    Default

    Quote Originally Posted by criminal View Post
    I'll fork vendor and request pull the changes...
    thanks!
    Twitter | Devices: Samsung Spica i5700 - SamdroidMod 2.0.1 Froyo | Nexus One - Android 2.2 Froyo | Nexus S CyanogenMod 7.1
    If you like my stuff, buy me a beer!

  5. [translate]    #5
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    there's an utility which uses same libsecril-client.so like libsecgps:
    rilclient-test

    Our goal is to make it working, then we don't need original rild + libraries...

  6. [translate]    #6
    Member
    Join Date
    Jun 2010
    Location
    china
    Posts
    83

    Default

    Quote Originally Posted by criminal View Post
    log says libgps can't connect to RILD (4)
    what's more....if my memory right, sensors can start but can not work because of this too. so...
    Last edited by vflashbirdv; 09-23-2010 at 04:43 PM.

  7. [translate]    #7
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    Quote Originally Posted by vflashbirdv View Post
    what's more....if my memory right, sensors can start but can not work because of this too. so...
    Here's log from strace:
    07:36:55.214482 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
    07:36:55.215281 connect(3, {sa_family=AF_INET, sin_port=htons(7777), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
    07:36:55.216772 close(3) = 0
    07:36:55.221534 writev(4, [{"\6", 1}, {"RILClient\0", 10}, {"Connect_RILD: Connecting failed. Connection refused(111)\0", 57}], 3) = 68
    Try to make sensors work with change that 3of files

    In short:
    Samsung's rild opens port 7777 to communicate with clients, original (android) rild opens only socket.

    Samsung's devices (for example: gps) tries to communicate with RILD via port 7777 insted of socket.

    So:
    1. we try to midify Android source to open port 7777 like socket
    2. we make a new libsecril-client.so which communicate with RILD via socket.

    I've found only 1 page: http://samse.tistory.com/121 it rumors, there's a source somewhere at the internet with libsecril-client sources )))
    Last edited by criminal; 09-23-2010 at 05:00 PM.

  8. [translate]    #8
    Administrator
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,730

    Default

    after run GPS Status
    comunication between rild (original 2.1) & libsecgps?
    Code:
    10:00:26.458773 IP localhost.48841 > localhost.7777: P 240:244(4) ack 85 win 4367 <nop,nop,timestamp 65552 61858>
    	0x0000:  4500 0038 6f3f 4000 4006 cd7e 7f00 0001  E..8o?@.@.?~....
    	0x0010:  7f00 0001 bec9 1e61 a63e 599c a692 d695  ....??.a?>Y.?.?.
    	0x0020:  8018 110f fe2c 0000 0101 080a 0001 0010  ....?,..........
    	0x0030:  0000 f1a2 0000 00c4                      ..?...?
    10:00:26.459008 IP localhost.7777 > localhost.48841: . ack 244 win 4230 <nop,nop,timestamp 65552 65552>
    	0x0000:  4500 0034 f2de 4000 4006 49e3 7f00 0001  E..4??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d695 a63e 59a0  .....a?ɦ.?.?>Y?
    	0x0020:  8010 1086 0de1 0000 0101 080a 0001 0010  .....?..........
    	0x0030:  0001 0010                                ....
    10:00:26.459252 IP localhost.48841 > localhost.7777: P 244:440(196) ack 85 win 4367 <nop,nop,timestamp 65552 65552>
    	0x0000:  4500 00f8 6f40 4000 4006 ccbd 7f00 0001  E..?o@@.@.̽....
    	0x0010:  7f00 0001 bec9 1e61 a63e 59a0 a692 d695  ....??.a?>Y??.?.
    	0x0020:  8018 110f feec 0000 0101 080a 0001 0010  ....??..........
    	0x0030:  0001 0010 3b00 0000 0100 0000 b500 0000  ....;.......?...
    	0x0040:  0e04 b517 0001 0001 0000 0000 0000 0000  ..?.............
    	0x0050:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x0060:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x0070:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x0080:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x0090:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00a0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00b0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00c0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00d0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00e0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
    	0x00f0:  003c 96c8 0000 0000                      .<.?....
    10:00:26.459400 IP localhost.7777 > localhost.48841: . ack 440 win 4230 <nop,nop,timestamp 65552 65552>
    	0x0000:  4500 0034 f2df 4000 4006 49e2 7f00 0001  E..4??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d695 a63e 5a64  .....a?ɦ.?.?>Zd
    	0x0020:  8010 1086 0d1d 0000 0101 080a 0001 0010  ................
    	0x0030:  0001 0010                                ....
    10:00:26.476167 IP localhost.7777 > localhost.48841: P 85:89(4) ack 440 win 4230 <nop,nop,timestamp 65556 65552>
    	0x0000:  4500 0038 f2e0 4000 4006 49dd 7f00 0001  E..8??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d695 a63e 5a64  .....a?ɦ.?.?>Zd
    	0x0020:  8018 1086 fe2c 0000 0101 080a 0001 0014  ....?,..........
    	0x0030:  0001 0010 0000 0014                      ........
    10:00:26.476353 IP localhost.48841 > localhost.7777: . ack 89 win 4367 <nop,nop,timestamp 65556 65556>
    	0x0000:  4500 0034 6f41 4000 4006 cd80 7f00 0001  E..4oA@.@.?.....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a64 a692 d699  ....??.a?>Zd?.?.
    	0x0020:  8010 110f 0c88 0000 0101 080a 0001 0014  ................
    	0x0030:  0001 0014                                ....
    10:00:26.476613 IP localhost.7777 > localhost.48841: P 89:109(20) ack 440 win 4230 <nop,nop,timestamp 65556 65556>
    	0x0000:  4500 0048 f2e1 4000 4006 49cc 7f00 0001  E..H??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d699 a63e 5a64  .....a?ɦ.?.?>Zd
    	0x0020:  8018 1086 fe3c 0000 0101 080a 0001 0014  ....?<..........
    	0x0030:  0001 0014 0000 0000 0100 0000 0000 0000  ................
    	0x0040:  0400 0000 0e04 0400                      ........
    10:00:26.476759 IP localhost.48841 > localhost.7777: . ack 109 win 4367 <nop,nop,timestamp 65556 65556>
    	0x0000:  4500 0034 6f42 4000 4006 cd7f 7f00 0001  E..4oB@.@.?.....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a64 a692 d6ad  ....??.a?>Zd?.֭
    	0x0020:  8010 110f 0c74 0000 0101 080a 0001 0014  .....t..........
    	0x0030:  0001 0014                                ....
    10:00:26.478258 IP localhost.48841 > localhost.7777: P 440:444(4) ack 109 win 4367 <nop,nop,timestamp 65556 65556>
    	0x0000:  4500 0038 6f43 4000 4006 cd7a 7f00 0001  E..8oC@.@.?z....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a64 a692 d6ad  ....??.a?>Zd?.֭
    	0x0020:  8018 110f fe2c 0000 0101 080a 0001 0014  ....?,..........
    	0x0030:  0001 0014 0000 0010                      ........
    10:00:26.516043 IP localhost.7777 > localhost.48841: . ack 444 win 4230 <nop,nop,timestamp 65564 65556>
    	0x0000:  4500 0034 f2e2 4000 4006 49df 7f00 0001  E..4??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d6ad a63e 5a68  .....a?ɦ.֭?>Zh
    	0x0020:  8010 1086 0cf1 0000 0101 080a 0001 001c  .....?..........
    	0x0030:  0001 0014                                ....
    10:00:26.516286 IP localhost.48841 > localhost.7777: P 444:460(16) ack 109 win 4367 <nop,nop,timestamp 65564 65564>
    	0x0000:  4500 0044 6f44 4000 4006 cd6d 7f00 0001  E..DoD@.@.?m....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a68 a692 d6ad  ....??.a?>Zh?.֭
    	0x0020:  8018 110f fe38 0000 0101 080a 0001 001c  ....?8..........
    	0x0030:  0001 001c 3b00 0000 0100 0000 0300 0000  ....;...........
    	0x0040:  0e03 0300                                ....
    10:00:26.516440 IP localhost.7777 > localhost.48841: . ack 460 win 4230 <nop,nop,timestamp 65564 65564>
    	0x0000:  4500 0034 f2e3 4000 4006 49de 7f00 0001  E..4??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d6ad a63e 5a78  .....a?ɦ.֭?>Zx
    	0x0020:  8010 1086 0cd9 0000 0101 080a 0001 001c  .....?..........
    	0x0030:  0001 001c                                ....
    10:00:26.571710 IP localhost.7777 > localhost.48841: P 109:113(4) ack 460 win 4230 <nop,nop,timestamp 65575 65564>
    	0x0000:  4500 0038 f2e4 4000 4006 49d9 7f00 0001  E..8??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d6ad a63e 5a78  .....a?ɦ.֭?>Zx
    	0x0020:  8018 1086 fe2c 0000 0101 080a 0001 0027  ....?,.........'
    	0x0030:  0001 001c 0000 0014                      ........
    10:00:26.611032 IP localhost.48841 > localhost.7777: . ack 113 win 4367 <nop,nop,timestamp 65583 65575>
    	0x0000:  4500 0034 6f45 4000 4006 cd7c 7f00 0001  E..4oE@.@.?|....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a78 a692 d6b1  ....??.a?>Zx?.ֱ
    	0x0020:  8010 110f 0c2e 0000 0101 080a 0001 002f  .............../
    	0x0030:  0001 0027                                ...'
    10:00:26.611236 IP localhost.7777 > localhost.48841: P 113:133(20) ack 460 win 4230 <nop,nop,timestamp 65583 65583>
    	0x0000:  4500 0048 f2e5 4000 4006 49c8 7f00 0001  E..H??@.@.I?....
    	0x0010:  7f00 0001 1e61 bec9 a692 d6b1 a63e 5a78  .....a?ɦ.ֱ?>Zx
    	0x0020:  8018 1086 fe3c 0000 0101 080a 0001 002f  ....?<........./
    	0x0030:  0001 002f 0000 0000 0100 0000 0000 0000  .../............
    	0x0040:  0400 0000 0e03 0400                      ........
    10:00:26.611377 IP localhost.48841 > localhost.7777: . ack 133 win 4367 <nop,nop,timestamp 65583 65583>
    	0x0000:  4500 0034 6f46 4000 4006 cd7b 7f00 0001  E..4oF@.@.?{....
    	0x0010:  7f00 0001 bec9 1e61 a63e 5a78 a692 d6c5  ....??.a?>Zx?.??
    	0x0020:  8010 110f 0c12 0000 0101 080a 0001 002f  .............../
    	0x0030:  0001 002f                                .../


    ---------- Post added at 02:01 PM ---------- Previous post was at 11:03 AM ----------

    Code:
    D/libgps  ( 1966): Samsung GPS library ver.0.01
    D/libgps  ( 1966): init_location
    D/libgps  ( 1966): sec_gps_init: RILD connected.
    D/libgps  ( 1966): Starting GPS activity thread.
    D/libgps  ( 1966): GPS library initialized.
    D/libgps  ( 1966): ril_gps_open:
    D/libgps  ( 1966): send_ril_gps_option
    D/libgps  ( 1966): --- GPS options [mask 0x0017]---
    D/libgps  ( 1966):   session type 1
    D/libgps  ( 1966):   operation type 0
    D/libgps  ( 1966):   start mode 1
    D/libgps  ( 1966):   HSLP ''
    D/libgps  ( 1966):   APN ''
    D/libgps  ( 1966):   Username ''
    D/libgps  ( 1966):   Password ''
    D/libgps  ( 1966):   Auth type 0
    D/libgps  ( 1966):   QoS performance 60
    D/libgps  ( 1966):   QoS H_accuracy 150
    D/libgps  ( 1966):   QoS V_accuracy 200
    D/libgps  ( 1966): ril_request_alloc: cmd 04
    D/libgps  ( 1966): init_ril_request: ril_request 0xeffd0
    D/libgps  ( 1966): ril_request_alloc: alloc idx 0 cmd 04 wait 0x8080ae20
    D/libgps  ( 1966): send_ril_gps_request: cmd 0x04 plen 178
    D/libgps  ( 1966): ril_gps_wait_for_ril: req 0xeffd0 status 1 timeout 3000
    D/libgps  ( 1966): ril_gps_wait_for_ril: +++entering
    D/libgps  ( 1966): onRawReqComplete: oem_function_id 0x0E cmd 0x04 len 4
    D/libgps  ( 1966): find_ril_request: found. idx 0
    D/libgps  ( 1966): GPS activity thread started.
    D/libgps  ( 1966): process_response: req 0xeffd0 cmd 0x04 plen 1
    D/libgps  ( 1966): recv_ril_gps_option: status 0
    D/libgps  ( 1966): ril_wakeup: idx 0 cmd 0x04 wait 0x8080ae20
    D/libgps  ( 1966): ril_wakeup: ---
    D/libgps  ( 1966): ril_gps_wait_for_ril: ---leaving
    D/libgps  ( 1966): ril_request_free: idx 0 cmd 04
    D/libgps  ( 1966): start_nmea_reader
    and when gps init on boot

    ---------- Post added at 02:02 PM ---------- Previous post was at 02:01 PM ----------

    Quote Originally Posted by criminal View Post
    Samsung's rild opens port 7777 to communicate with clients, original (android) rild opens only socket.
    I think ril open socket rild for android & open port 7777 for samsung's clients
    Twitter | Devices: Samsung Spica i5700 - SamdroidMod 2.0.1 Froyo | Nexus One - Android 2.2 Froyo | Nexus S CyanogenMod 7.1
    If you like my stuff, buy me a beer!

  9. [translate]    #9
    Senior Member
    Join Date
    May 2010
    Location
    Hungary
    Posts
    726

    Default

    I hacked Samsung's libril.so into compiled rild: dh-harald's platform_hardware_ril at froyo - GitHub
    It looks like, rild is started, no need anything, just libril.so
    We can use for example own libwpa_client, etc.
    I'll make a clean build (i modified Android.mk without make clean), but i hope, it will workin'.
    I'll use it in this weekend for test

  10. [translate]    #10
    Senior Member
    Join Date
    Jun 2010
    Location
    Kiev
    Posts
    761

    Default

    man, you rock!

    maybe after froyo is done, we can have some of the features to eclair?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •