[Huawei Ascend P1] popcorn1122:
Guys I have made some discovery on stock B229 GPS

By default GPS SSL verify is set to ON with Verify Peer Certificate.

The google CA certificate is *.google.com and domain is supl.google.com. That is the reason the peer verification fails. Check it below..

Code of logs:

06:57:47.169 SUPL_I: Create SUPL
06:57:47.169 SUPL_D: CB: glcb_supl_Allocate(17296)
06:57:47.173 SUPL: FQDN: supl.google.com:7275
06:57:47.173 SUPL: connect_status_update : GPS_HAL_SUPL_STATE_NO_CONNECTED
06:57:47.173 SUPL: connect_status_update : call glgps_hal_getaddrinfo
06:57:47.176 Using getaddrinfo() to lookup DNS name supl.google.com.
06:57:47.202 $155895I 4751 A2 detected!
06:57:47.211 SUPL: connect_status_update : GPS_HAL_SUPL_STATE_RESOLVING
06:57:47.212 SUPL: Trying to connect to (supl.google.com) 74.125.200.192:7275
06:57:47.212 SUPL: Device Name
06:57:47.212 SUPL: m_device_name is null or not found.
06:57:47.300 SUPL: connect_status_update : GPS_HAL_SUPL_STATE_CONNECTING
06:57:47.300 SUPL: entering connect_ssl_start()
06:57:47.300 SUPL: SuplForNTTDocomo 0
06:57:47.300 SUPL: m_eSSLMethod : 0
06:57:47.301 SUPL: arp-supl-ssl-verify is (1) (SSL_VERIFY_NONE 0, SSL_VERIFY_PEER 1, SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2, SSL_VERIFY_CLIENT_ONCE 4)
06:57:47.301 SUPL: Security Warning: Server's certificate will not be verified.
06:57:47.301 SUPL: entering GpsHalSuplSSLHandShake()
06:57:47.533 checkSSLPeerCert: peer cert's common name=*.google.com
06:57:47.533 checkSSLPeerCert: peer's domain name=supl.google.com
06:57:47.533 checkSSLPeerCert: returns NOK
06:57:47.533 SUPL: (connect_ssl_failed)
06:57:47.533 SUPL: Auto SLP: h-slp.mnc020.mcc404.pub.3gppnetwork.org:7275
06:57:47.533 SUPL: (connect_ssl_failed): Key=(h-slp.mnc020.mcc404.pub.3gppnetwork.org)

Similarly see the supl.nokia.com

supl.nokia.com domain has certificate with full domain name as supl.nokia.com so it does not fail the peer verification...

07:46:28.516 SUPL_I: Create SUPL
07:46:28.516 SUPL_D: CB: glcb_supl_Allocate(17296)
07:46:28.516 SUPL_D: Allocating memory for SUPL, requested: 17296, available 52000
07:46:28.521 SUPL: UseAutoSlp 0
07:46:28.521 SUPL: FQDN: supl.nokia.com:7275
007:46:28.521 SUPL: connect_status_update : call glgps_hal_getaddrinfo
07:46:28.521 timer SUPL-connection Arm 20000 ms
07:46:28.522 Using getaddrinfo() to lookup DNS name supl.nokia.com.
07:46:28.522 SUPL_D: CB: glcb_supl_ReqLocationId()
07:46:34.097 SUPL: connect_status_update : GPS_HAL_SUPL_STATE_CONNECTING
07:46:34.116 SUPL: entering connect_ssl_start()
07:46:34.116 SUPL: SuplForNTTDocomo 0
07:46:34.116 SUPL: m_eSSLMethod : 0
07:46:34.118 SUPL: arp-supl-ssl-verify is (1) (SSL_VERIFY_NONE 0, SSL_VERIFY_PEER 1, SSL_VERIFY_FAIL_IF_NO_PEER_CERT 2, SSL_VERIFY_CLIENT_ONCE 4)
07:46:34.118 SUPL: Security Warning: Server's certificate will not be verified.
07:46:34.118 SUPL: entering GpsHalSuplSSLHandShake()
07:46:35.273 checkSSLPeerCert: peer cert's common name=supl.nokia.com
07:46:35.273 checkSSLPeerCert: peer's domain name=supl.nokia.com
07:46:35.273 checkSSLPeerCert: returns OK
07:46:35.274 SUPL: supl SSL desc: RC4-MD5 SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=MD5

Also check the lto.dat which is manually put is also not recognised by the broadcom driver:

07:46:29.577 $069515I NVRAM UnitId 245
07:46:29.577 Closed NVRAM file
07:46:29.578 $069516I NVRAM reading complete.
07:46:29.578 $069517I Start reading LTO ...
07:46:29.578 $069517D LTO under license to 'brcmdev', license #11
07:46:29.578 $069517D LTO_LICENSEE=brcmdev
07:46:29.578 LTO file [/mnt/sdcard/gps/lto.dat] opened for reading (fd=17)
07:46:29.605 $069544I LTO error code 17.1611
07:46:29.605 $069544I GPS LTO age 0.1d (8190s)
07:46:29.621 $069560I LTO error code 8.979
07:46:29.628 Closed LTO file (fd=17)
07:46:29.628 $069567I LTO reading complete 0.82292
07:46:29.628 $069567I Start reading CBEE file at LMS:79 GPS:1767 181006535(ms)
07:46:29.628 CBEE file [./gps/cbee.cbee] open failed No such file or directory!
07:46:29.628 $069567I CBEE file reading complete.
07:46:29.628 $069567W Warning: Using default vertical accuracy (0.000000)