NordicSemiconductor / Android-nRF-Connect

Documentation and issue tracker for nRF Connect for Android.
1.32k stars 312 forks source link

How is "Device type" determined by the scanner? #213

Closed chickenoodlestu closed 7 months ago

chickenoodlestu commented 7 months ago

Hi,

I'm working on an ESP32 based BLE project. I recently updated the firmware framework (which included changes to BLE code, at many layers in the stack) and noticed the "Device type" in the nRF Connect scanner changed from "LE only" to "UNKNOWN". I tried sniffing the advertising packets but didn't really notice anything different between before and after the change, so I'd like to know where this information is pulled from so I can investigate whether I need to make some adjustments.

philips77 commented 7 months ago

This comes from the following call: https://developer.android.com/reference/android/bluetooth/BluetoothDevice#getType() I have no idea where this is taken from, perhaps some flags in the header. For sure not the advertised data itself.