Nothing Good Comes Easy

A project log for SubPos Positioning System

A "dataless" Wi-Fi positioning system that can be used anywhere GPS can't.

BleckyBlecky 03/27/2015 at 13:590 Comments

I wrote a simple Android application to decode the SSID and display it, unfortunately I am having a slight issue. Some control characters are handled incorrectly by the ScanResult class.

Original string:


Android values:

It looks like the UTF-8 decoder in String is replacing these invalid byte sequences.

Update: the octets can be obtained from the object's "wifiSsid.octets" buffer:

Unfortunately his value is hidden and problematically so is WifiSsid:

* Ascii encoded SSID. This will replace SSID when we deprecate it. @hide
public WifiSsid wifiSsid;

We cannot just straight out use Java reflection as we get a classNotFoundException when trying to use the internal API during development as explained here.