cordova-plugin-bluetoothle
cordova-plugin-bluetoothle copied to clipboard
How to get manufacture special data from advertising data?
Hi Sir,
in my ionic application, I set advertisingParams as:
var advertisingParams = {
services: ['1234'],
service: '1234',
name: "my_email_address",
mode: "balanced",
connectable: false,
timeout: 10000,
txPowerLevel: "medium",
manufacturerId: 0x004C,
manufacturerSpecificData: "my_special_data",
includeDeviceName: false
}
I the scanner side, I have tried to use atob() to get the value of manufacturerSpecificData from advertising data, but it doesn't work. I also tried use btoa("my_special_data") to generate data, but could not find the similar data in advertising data.
Could you pleas help, how to extract manufacturerSpecificData from advertising data?
Thanks
Try using string to bytes and bytes to encoded string ad then pass that to manufacturerSpecificData