I am advertising both iBeacons and plain advertisements. I have an interval of 100 milliseconds setup, where I switch between each type of advertisement. It works very well most of the time. Every once in a while, I will get one of the following errors when I try to start advertising one of the advertisement types:
bleno.startAdvertisingIBeacon Error: Command Disallowed
at Gap.onHciLeAdvertiseEnableSet (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/gap.js:201:15)
at emitOne (events.js:115:13)
at Hci.emit (events.js:210:7)
at Hci.processCmdCompleteEvent (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/hci.js:669:10)
at Hci.onSocketData (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/hci.js:540:12)
at emitOne (events.js:115:13)
at BluetoothHciSocket.emit (events.js:210:7)
or
bleno.startAdvertising Error: Command Disallowed
at Gap.onHciLeAdvertiseEnableSet (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/gap.js:201:15)
at emitOne (events.js:115:13)
at Hci.emit (events.js:210:7)
at Hci.processCmdCompleteEvent (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/hci.js:669:10)
at Hci.onSocketData (/home/pi/development/portal-blue/door-device/node_modules/bleno/lib/hci-socket/hci.js:540:12)
at emitOne (events.js:115:13)
at BluetoothHciSocket.emit (events.js:210:7)
I understand that you cannot advertise both at the same time, which is why I always call bleno.stopAdvertising before starting to advertise the other advertisement. I start up the advertising in the callback of the bleno.stopAdvertising call, which I would think waits until the system is ready for any other type of advertisement to begin, but that doesn't seem to be the case.
Usually the errors happen once or twice and my interval then continues to work properly. At least once though, the errors get into some kind of infinite loop and don't stop occurring until I completely cycle the bluetooth interface.
Hi there,
I am advertising both iBeacons and plain advertisements. I have an interval of 100 milliseconds setup, where I switch between each type of advertisement. It works very well most of the time. Every once in a while, I will get one of the following errors when I try to start advertising one of the advertisement types:
or
I understand that you cannot advertise both at the same time, which is why I always call
bleno.stopAdvertising
before starting to advertise the other advertisement. I start up the advertising in the callback of thebleno.stopAdvertising
call, which I would think waits until the system is ready for any other type of advertisement to begin, but that doesn't seem to be the case.Usually the errors happen once or twice and my interval then continues to work properly. At least once though, the errors get into some kind of infinite loop and don't stop occurring until I completely cycle the bluetooth interface.