abandonware / noble

A Node.js BLE (Bluetooth Low Energy) central module : Community maintained
https://libraries.io/npm/@abandonware%2Fnoble
MIT License
526 stars 161 forks source link

Bug with advertisement/scan response package on Linux #81

Open binloan opened 4 years ago

binloan commented 4 years ago

I built a script reading advertisements from surrounding BLE devices on my Mac. It works decent. However, once I switched over to Linux (RPi4) it broke. As it seems, the noble linux versions replaces the advertisement package manufacturer data frame with the scan response manufacturer data frame (if both contain either manufacturer data). This doesn't happen on the Mac. There I'm receiving two separate discover callbacks with either advertisement manufacturer data or scan response manufacturer data.

Is there any way to work around/fix this? Thanks.

binloan commented 4 years ago

I guess it's due to the fact that instead of merging both manufacturer data packets - noble just overwrites them : https://github.com/noble/noble/blob/c4cd18a7a429bb832f6c4ca793be3faf9af884e9/lib/hci-socket/gap.js#L233