-
Notifications
You must be signed in to change notification settings - Fork 52
Description
So I have updated my mac air (M1) to Monterey recently, but even before that I noticed even when I run simple code it wont advertise more than 8 character name.
Up to and 8 characters works fine. above 8 characters and Bluetooth LE defaults to computer name.
Not sure if anyone else has encountered this issue.
Here is the code I tried to run on my mac.
import bleno from '@abandonware/bleno'
const deviceName = '123456789'
var serviceUuids = ['fffffffffffffffffffffffffffffff0']
bleno.on('stateChange', function (state) {
console.log('on -> stateChange: ' + state)
if (state === 'poweredOn') {
bleno.startAdvertising(deviceName, serviceUuids, function (err) {
if (err) {
console.log(err)
}
})
} else {
bleno.stopAdvertising()
}
})