noble.stateis defined: https://github.com/noble/noble/issues/869#issuecomment-474327454
Hi! I have tried to make a simple advertiser with Bleno.startAdvertisingIBeacon, but I cannot get state to change from undefined to "poweredon". Why can this be? Can anyone explain to me what is supposed to trigger a StateChange setting the value to "poweredOn"?
My source code: https://pastebin.com/se103tJp
I want to add that I have remembered to do:
sudo service bluetooth stop
sudo hciconfig hci0 up
I am using a Rasberry Pi 4b with integrated bluetooth (no dongle)
I started with bleno years ago and pretty quickly determined it wasn’t going to meet my needs and not going to support secure encrypted connections.
My project uses a swift IOS app (now on the app store) to securely connect to a Raspberry Pi running Node.JS over Bluetooth LE. The only way I could get an iPhone to pair and bind (over BLE) with a Raspberry Pi is by using blutoothd version 5.50 (now included in the Raspberry Pi OS). I wrote a node.js class blePeripheral that is based on my fork of Shougun’s node-bus (I had to make some mods to one of his c functions to get it to support the dbus getMangedObjects call from Bluez) that allows the Raspberry Pi to respond as a Bluetooth Low Energy Peripheral. It fully supports secure encrypted characteristics and binding with IOS devices. Here is a video of the binding process with an iPhone.
Can anyone explain why my iphone would try to pair to my bleno peripheral? I've distilled it down to a simple service with one read characteristic, and when I try to interrogate it with any of the iPhone BLE tools, the iPhone tries to pair, which triggers some attempt at crypto that fails.
While bleno might not have everything I need to make a secure peripheral, I'd sure like to make it work for prototyping.