Skip to content

Bleno wont advertise on mack if name has more than 8 character.  #36

@tstampfel

Description

@tstampfel

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()
}
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions