question

Andre Leite avatar image
Andre Leite asked

Kindle Fire HD - Invalid Location - LCSAPI_W: Position estimate Invalid

Hello, I developed a simple test app to retrieve the current location on a Kindle Fire, but the listener methods never get called and it seems that the Kindle Fire HD Code (OS level) is not able to determine the proper location (LCSAPI_W: Position estimate Invalid / LBS_W: L447651W errorCode = unexpectedDataValue). I also tried other apps like Zillow and the same problem happens, no apps are able to acquire a location on my Kindle Fire HD 7". Has anyone ever faced a similar problem with the new Kindle HDs? These are the logs I am getting: ------- 12-13 12:24:48.652: I/LocationManagerService(212): Initial Provider - Provider=gps 12-13 12:24:48.652: D/LocationManagerService(212): provider is coarse network 12-13 12:24:48.660: D/gps_BRCM(212): libgps:check_and_request_setid: called request_setid AGPS_RIL_REQUEST_SETID_MSISDN 12-13 12:24:48.660: W/gps_BRCM(212): libgps:The phone may not have a SIM card. 12-13 12:24:48.660: D/gps_BRCM(212): libgps:check_and_request_setid: called request_setid AGPS_RIL_REQUEST_SETID_IMSI 12-13 12:24:48.660: W/gps_BRCM(212): libgps:The phone may not have a SIM card. 12-13 12:24:48.660: W/BRCM_gpsd(119): LCSAPI_W: LCS: Unhandle event: 108 12-13 12:24:48.660: W/BRCM_gpsd(119): LCSAPI_W: LCS: Unhandle event: 103 12-13 12:24:48.660: W/BRCM_gpsd(119): LCSAPI_W: LCS: AccuracyMeters(1000) 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: HalLbsWlanReqData: Got request to do wlan scan type 3 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: HalLbsWlanReqData: Are we in Periodic Scan? 0 12-13 12:24:48.660: W/BRCM_gpsd(119): LBS: call periodic HalLbsWlanScanStart(GLLBS_WLAN_PERIODIC) 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: Request connection 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: server= amzlbs.glpals.com 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: Trying to connect to 216.34.140.203:80 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: Connect errno = 115 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: Connect EINPROGRESS 12-13 12:24:48.660: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectReady done 12-13 12:24:48.668: D/BRCM_gpsd(119): LBS: (GpsHalLbsStartRequest) 12-13 12:24:48.668: D/BRCM_gpsd(119): LBS: ChkDoLbsSync Entry 12-13 12:24:48.668: D/BRCM_gpsd(119): LBS: LTO Status file failed to open! Path: /data/gps/ ltoStatus.txt Errno = 2 12-13 12:24:48.668: W/BRCM_gpsd(119): LCSAPI_W: Position estimate Invalid 12-13 12:24:48.785: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectionStatus 12-13 12:24:48.785: D/BRCM_gpsd(119): LBS: LBS tcp handshake finished 12-13 12:24:48.785: D/BRCM_gpsd(119): LBS: Connection has been established 12-13 12:24:48.785: D/BRCM_gpsd(119): LBS: HalLbsWlanReqData: Got request to do wlan scan type 0 12-13 12:24:48.785: D/BRCM_gpsd(119): LBS: HalLbsWlanReqData: Scan already pending ------------------- 12-13 12:28:43.754: D/dalvikvm(464): GC_CONCURRENT freed 389K, 5% free 11277K/11783K, paused 1ms+2ms 12-13 12:28:45.707: V/Sensors(212): accel data: -0.222737 0.067061 9.659114 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Process WLAN Scanned Results -- Entry 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: open /data/gps/wlandata 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Total bytes in scan results file = 596 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 0 BSSID XX:XX:XX:XX:B3:07 RSSI -40 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 1 BSSID XX:XX:XX:XX:B3:06 RSSI -26 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 2 BSSID XX:XX:XX:XX:00:B0 RSSI -78 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 3 BSSID XX:XX:XX:XX:3A:4D RSSI -87 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 4 BSSID XX:XX:XX:XX:3A:4D RSSI -87 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 5 BSSID XX:XX:XX:XX:00:B1 RSSI -78 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 6 BSSID XX:XX:XX:XX:4D:08 RSSI -93 12-13 12:28:46.582: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Report 7 APs 12-13 12:28:50.645: V/Sensors(212): accel data: -0.170046 0.033530 9.781260 12-13 12:28:51.559: D/dalvikvm(212): GC_CONCURRENT freed 939K, 15% free 14920K/17415K, paused 2ms+5ms 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Process WLAN Scanned Results -- Entry 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: open /data/gps/wlandata 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Total bytes in scan results file = 596 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 0 BSSID XX:XX:XX:XX:B3:07 RSSI -43 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 1 BSSID XX:XX:XX:XX:B3:06 RSSI -29 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 2 BSSID XX:XX:XX:XX:00:B0 RSSI -69 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 3 BSSID XX:XX:XX:XX:3A:4D RSSI -90 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 4 BSSID XX:XX:XX:XX:3A:4D RSSI -90 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 5 BSSID XX:XX:XX:XX:00:B1 RSSI -78 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: AP 6 BSSID XX:XX:XX:XX:4D:08 RSSI -93 12-13 12:28:52.598: D/BRCM_gpsd(119): LBS: HalLbsReadWlanData: Report 7 APs 12-13 12:28:53.606: W/BRCM_gpsd(119): LCSAPI_W: Position estimate Invalid ------------------- 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: Request connection 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: server= amzlbs.glpals.com 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: Trying to connect to 216.34.140.203:80 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: Connect errno = 115 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: Connect EINPROGRESS 12-13 12:40:18.066: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectReady done 12-13 12:40:18.191: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectionStatus 12-13 12:40:18.191: D/BRCM_gpsd(119): LBS: LBS tcp handshake finished 12-13 12:40:18.191: D/BRCM_gpsd(119): LBS: Connection has been established 12-13 12:40:18.191: D/BRCM_gpsd(119): LBS: sending data ... 12-13 12:40:18.238: D/dalvikvm(212): GC_CONCURRENT freed 907K, 20% free 14937K/18503K, paused 2ms+4ms 12-13 12:40:18.309: D/BRCM_gpsd(119): LBS: recv complte message 9 bytes 12-13 12:40:18.309: W/BRCM_gpsd(119): LBS_W: L446537W errorCode = unexpectedDataValue 12-13 12:40:18.309: D/BRCM_gpsd(119): LBS: (HalLbsOsConnectionClose) 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: Request connection 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: server= amzlbs.glpals.com 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: Trying to connect to 216.34.140.203:80 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: Connect errno = 115 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: Connect EINPROGRESS 12-13 12:40:19.066: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectReady done 12-13 12:40:19.277: D/BRCM_gpsd(119): LBS: GpsHalLbsConnectionStatus 12-13 12:40:19.277: D/BRCM_gpsd(119): LBS: LBS tcp handshake finished 12-13 12:40:19.277: D/BRCM_gpsd(119): LBS: Connection has been established 12-13 12:40:19.277: D/BRCM_gpsd(119): LBS: sending data ... 12-13 12:40:19.426: D/BRCM_gpsd(119): LBS: recv complte message 9 bytes 12-13 12:40:19.426: W/BRCM_gpsd(119): LBS_W: L447651W errorCode = unexpectedDataValue ------------------- This is the code I used: Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_COARSE); android.location.LocationManager androidLocationManager = (android.location.LocationManager)context.getSystemService(Context.LOCATION_SERVICE); String providerName = androidLocationManager.getBestProvider(criteria, true); //providerName = network LocationListener androidLocationListener = new LocationListener(){ @Override public void onLocationChanged(final Location location) { Log.d(tag, "onLocationChanged"); } @Override public void onProviderDisabled(String provider) { Log.d(tag, "onProviderDisabled"); } @Override public void onProviderEnabled(String provider) { Log.d(tag, "onProviderEnabled"); } @Override public void onStatusChanged(String provider, int status, Bundle extras) { Log.d(tag, "onStatusChanged"); } }; androidLocationManager.requestLocationUpdates(providerName, 1000L, 0.0f, androidLocationListener); Regards, Andre
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi Andre, Kindle Fire HD7 doesn't support GPS for Location Services. It supports only WiFi based. Just want to make sure that you are not trying for Location Services using GPS in HD7. Please refer below Kindle Fire specifications link for more information. https://developer.amazon.com/sdk/fire/specifications.html You may also want to refer the below forum link which has similar discussion. https://forums.developer.amazon.com/forums/thread.jspa?threadID=408 Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Leite avatar image
Andre Leite answered
Hi Samuel, I am aware that Kindle Fire HD7 does not support GPS. When I run the following code: Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_COARSE); android.location.LocationManager androidLocationManager = (android.location.LocationManager)context.getSystemService(Context.LOCATION_SERVICE); String providerName = androidLocationManager.getBestProvider(criteria, true); The providerName returned is "network" = LocationManager.NETWORK_PROVIDER and according to the android documentation ( http://developer.android.com/reference/android/location/LocationManager.html#NETWORK_PROVIDER) : "This provider determines location based on availability of cell tower and WiFi access points. Results are retrieved by means of a network lookup." After that I setup a listener and run the following code: androidLocationManager.requestLocationUpdates(providerName, 1000L, 0.0f, androidLocationListener); Where basically I am requesting location updates for the "network" provider, with a minimum time interval between location updates of 1 second. I was wondering if this could be a problem with my device, more specifically the System version I am using: 7.2.3_user_2330720, given the error messages that are being printed (as you can see in details in the first post or as a summary: LBS_W: L447651W errorCode = unexpectedDataValue / LCSAPI_W: Position estimate Invalid). Thanks for your prompt response. Regards, Andre
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi Andre, we are following up on your post. We will post on this thread once we got an update. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Leite avatar image
Andre Leite answered
Hi Samuel, While I was testing the same code this morning, I got a few valid locations (LCSAPI_W: Position estimate Valid), but although the locations were valid, they were the wrong ones. They pointed to a lat long that is 137 miles away from my current location. I understand that WiFi is not as accurate as a GPS, but it seems that 137 miles away might be wrong as well. I just a few valid locations and after that I went back to receiving the same error messages (LCSAPI_W: Position estimate Invalid). I continued to test the code and without any code changes, I can't get any valid locations anymore, which seems to indicate that the problem might be in the Kindle side (OS level). These are the logs that I captured when I received a valid location: 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: Request connection 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: server= amzlbs.glpals.com 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: Trying to connect to 64.210.203.203:80 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: Connect errno = 115 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: Connect EINPROGRESS 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: GpsHalLbsConnectReady done 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: (GpsHalLbsStartRequest) 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: ChkDoLbsSync Entry 12-14 08:14:24.081: D/BRCM_gpsd(113): LBS: LTO Status file failed to open! Path: /data/gps/ ltoStatus.txt Errno = 2 12-14 08:14:24.120: W/BRCM_gpsd(113): LCSAPI_W: Position estimate Invalid 12-14 08:14:24.206: D/BRCM_gpsd(113): LBS: GpsHalLbsConnectionStatus 12-14 08:14:24.206: D/BRCM_gpsd(113): LBS: LBS tcp handshake finished 12-14 08:14:24.206: D/BRCM_gpsd(113): LBS: Connection has been established 12-14 08:14:24.206: D/BRCM_gpsd(113): LBS: HalLbsWlanReqData: Got request to do wlan scan type 0 12-14 08:14:24.206: D/BRCM_gpsd(113): LBS: HalLbsWlanReqData: Scan already pending 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: Process WLAN Scanned Results -- Entry 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: open /data/gps/wlandata 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: Total bytes in scan results file = 679 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 0 BSSID XX:XX:XX:XX:B3:07 RSSI -40 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 1 BSSID XX:XX:XX:XX:B3:06 RSSI -19 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 2 BSSID XX:XX:XX:XX:00:B0 RSSI -72 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 3 BSSID XX:XX:XX:XX:3A:4D RSSI -90 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 4 BSSID XX:XX:XX:XX:3A:4D RSSI -90 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 5 BSSID XX:XX:XX:XX:00:B1 RSSI -75 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 6 BSSID XX:XX:XX:XX:59:43 RSSI -93 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: AP 7 BSSID XX:XX:XX:XX:3A:4E RSSI -96 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: HalLbsReadWlanData: Report 8 APs 12-14 08:14:25.128: D/BRCM_gpsd(113): LBS: sending data ... 12-14 08:14:25.511: D/BRCM_gpsd(113): LBS: recv complte message 23 bytes 12-14 08:14:25.511: W/BRCM_gpsd(113): LCSAPI_W: Position estimate Invalid 12-14 08:14:25.667: D/BRCM_gpsd(113): LBS: recv 4080 from 38194 bytes 12-14 08:14:25.847: D/BRCM_gpsd(113): LBS: recv 5440 from 38194 bytes 12-14 08:14:25.855: D/BRCM_gpsd(113): LBS: recv 10880 from 38194 bytes 12-14 08:14:25.855: D/BRCM_gpsd(113): LBS: recv 12240 from 38194 bytes 12-14 08:14:26.034: D/BRCM_gpsd(113): LBS: recv 17680 from 38194 bytes 12-14 08:14:26.034: D/BRCM_gpsd(113): LBS: recv 23120 from 38194 bytes 12-14 08:14:26.042: D/BRCM_gpsd(113): LBS: recv 24480 from 38194 bytes 12-14 08:14:26.222: D/BRCM_gpsd(113): LBS: recv 25840 from 38194 bytes 12-14 08:14:26.222: D/BRCM_gpsd(113): LBS: recv 31280 from 38194 bytes 12-14 08:14:26.222: D/BRCM_gpsd(113): LBS: recv 36720 from 38194 bytes 12-14 08:14:26.222: D/BRCM_gpsd(113): LBS: recv complte message 38194 bytes 12-14 08:14:26.230: D/BRCM_gpsd(113): LBS: recv complte message 9627 bytes 12-14 08:14:26.238: D/BRCM_gpsd(113): LBS: Sync done <0> 12-14 08:14:26.238: D/BRCM_gpsd(113): LBS: (HalLbsOsConnectionClose) 12-14 08:14:26.863: W/BRCM_gpsd(113): LCSAPI_W: Position estimate Valid 12-14 08:14:27.128: W/BRCM_gpsd(113): LCSAPI_W: Position estimate Valid 12-14 08:14:27.472: D/BRCM_gpsd(113): LBS: (GpsHalLbsStopRequest) 12-14 08:14:27.480: W/BRCM_gpsd(113): LCSAPI_W: LCS: Unhandle event: 108 12-14 08:14:27.480: W/BRCM_gpsd(113): LCSAPI_W: LCS: Unhandle event: 103 12-14 08:14:27.480: W/BRCM_gpsd(113): LCSAPI_W: LCS: AccuracyMeters(1000) 12-14 08:14:27.480: D/BRCM_gpsd(113): LBS: (GpsHalLbsStartRequest) 12-14 08:14:28.128: W/BRCM_gpsd(113): LCSAPI_W: Position estimate Invalid Regards, Andre
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi Andre, We have tested your code and it is working properly. It is more likely that we do not have your location details in our database. Please submit a contact us to Amazon Support team with your lat/lon, address, SSID and MAC address. One of our support engineer will assist you in adding your details. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DrHenley avatar image
DrHenley answered
You were picking up a wifi signal from a mobile hotspot. Google's location service had the same problem a while back but now they seem to be able to filter out the mobile wifi signals. When I first got my mifi, Google Maps always thought I was at home when it was on. I had to turn it off to get a lock. Now it doesn't matter.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Leite avatar image
Andre Leite answered
Hi Samuel, Although your answer makes sense, it brings major concerns. When you say: "It is more likely that we do not have your location details in our database." I wonder how reliable Amazon Location Based Services will work on a Kindle Fire HD using wi-fi. 99.99% of the time I am NOT able to acquire a valid location, and when I able to acquire a location, it is off by 137 miles. I have other Kindle Fire Devices in other locations (states) that have the exactly same issue. I can't accept that submitting my lat/lon, address, SSID, MAC to Amazon as a Correct Answer because when my app goes to production I can't ask my customers to provide this information for every wi-fi network they connect. So my question to you is, how reliable is the Amazon wi-fi location database and how often this database is updated? I am asking this question because currently 100% of the Kindle FIre HD devices I have are experiencing the same problem. If the Amazon wifi location database does not have a good coverage and is not updated frequently I would probably have to change the app and remove all location updates and let the user provide the exact address. It would be great to use LBS, but it is better to have a valid location, then no location or a location that is 137 miles off. Are there any plans to make the service more reliable and are there any dates when this should happen? @DrHenley, I am not using mifi, I am using a regular Comcast cable model+wireless router. Regards, -Andre
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi, Thanks for the feedback, there are location based services available. The new Kindle Fire and Kindle Fire HD models use Wi-Fi to determine the user’s location within a few blocks, and we are always looking at ways to improve the quality of the service. Thanks again.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andre Leite avatar image
Andre Leite answered
Thanks Samuel
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.