Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tstampfel opened this issue Jul 27, 2022 · 1 comment
Open

Comments

@tstampfel
Copy link

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

@Jarvie789
Copy link

M1 Ventura does the same, but it broadcasts and truncates names beyond 8 English characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants