Convert key data to string or json?

I'm connecting to a bluetooth peripheral and I have a key in my adverstising dictionary that I need to convert to a string. I cannot for the life of me figure out how to take the key and convert it to a string. See below. I'm using objective-c. Thanks!


kCBAdvDataManufacturerData = {length = 34, bytes = 0x03000030 64000007 8c861e47 5e581200 ... 5888c626 f1088712 };



Replies

That gives me nothing that I can see. I'm trying to connect a raspberry pi 4. I think I have it connected in the bluetooth of the device. Now I am running the bluetooth scan for peripherals in my app and trying to find it. I have two devices that I cannot tell what they are so I need to read the manufacturer data and I can't. I've been able to take the nsinlinedata before and convert it to json but that was years ago and cannot find my code.

What is the complete string you get ? Not with ellipsis.


manufacturer should be the first bytes…


Could the key be

CBAdvertisementDataLocalNameKey

https://stackoverflow.com/questions/33060931/how-do-i-get-a-hold-of-kcbadvdatamanufacturerdata-in-corebluetooth-swift


What do you get if you print these data ?

let data = advertisementData.description

If not successful, could look at this discussion on how internal strcut are named (hope that's useful here)

h ttps://github.com/don/cordova-plugin-ble-central/issues/350