generic btle layer parsing stuff