noble icon indicating copy to clipboard operation
noble copied to clipboard

In the latest mac system (maOS Monterey, 12.0.1), mac montrery Not Discovering Peripherals

Open lwj06 opened this issue 4 years ago • 25 comments

In the latest mac system (maOS Monterey, 12.0.1), there is no response to the discover method image If use an lower version of the macOS, I can discover services and connect bluetooth equipment

lwj06 avatar Oct 20 '21 06:10 lwj06

Some here for me.

itiwll avatar Oct 20 '21 07:10 itiwll

I can confirm, unfortunately.

ebaauw avatar Oct 28 '21 17:10 ebaauw

same here, still had the Bluetooth enabled for iTerm in the security preferences pane

bitkill avatar Oct 30 '21 18:10 bitkill

any news about this problem?

bubez81 avatar Nov 20 '21 11:11 bubez81

Hello, had anyone luck to solve this issue? We are in the same trouble with our application. Thanks.

pavelkrcil avatar Dec 03 '21 10:12 pavelkrcil

Same here, was also not able to find any workaround.

onderweg avatar Dec 03 '21 11:12 onderweg

Same here:

yackermann avatar Dec 13 '21 09:12 yackermann

This seems to work but still testing ...

noble.startScanning(["be15beef6186407e83810bd89c4d8df4"], false);

So if you know the service id of what you are looking for it it seem to work. Using this form:

noble.startScanning(serviceUUIDs, allowDuplicates[, callback(error)]); // particular UUIDs

davidnixon avatar Dec 15 '21 16:12 davidnixon

I feel like it has something to do with this comment about scanning in the background https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518986-scanforperipherals "your app must explicitly scan for one or more services by specifying them in the serviceUUIDs parameter"

davidnixon avatar Dec 15 '21 17:12 davidnixon

This seems to work

Doesn't seem to do anything for me, under macOS 12.1.

ebaauw avatar Dec 15 '21 18:12 ebaauw

This seems to work but still testing ...

noble.startScanning(["be15beef6186407e83810bd89c4d8df4"], false);

So if you know the service id of what you are looking for it it seem to work. Using this form:

noble.startScanning(serviceUUIDs, allowDuplicates[, callback(error)]); // particular UUIDs

I can't get this to work either. On macOS 12.1, node 16.13.1, Xcode installed and node added to the system bluetooth permissions.

bwp91 avatar Dec 15 '21 18:12 bwp91

This bit "be15beef6186407e83810bd89c4d8df4" is the service uuid for an Anki Overdrive car. So you need to know the service id of whatever you are trying to discover. Currently looking for a way to find service uuid of other devices ...

davidnixon avatar Dec 15 '21 19:12 davidnixon

This bit "be15beef6186407e83810bd89c4d8df4" is the service uuid for an Anki Overdrive car. So you need to know the service id of whatever you are trying to discover. Currently looking for a way to find service uuid of other devices ...

And I suppose this service actually needs to be advertised by the device. The devices I use Noble for don't advertise any services, so this workaround wouldn't help me, even if I got it to work. Tried several short and one long UUID advertised by my other devices, but no luck.

Currently looking for a way to find service uuid of other devices ...

I'm using nRF Connect by Nordic Semiconductor on my iPad to discover and probe BLE devices. You could also run Noble on another platform (Raspberry Pi) and write a small programme to list the received advertisements.

ebaauw avatar Dec 15 '21 19:12 ebaauw

This seems to work but still testing ...

noble.startScanning(["be15beef6186407e83810bd89c4d8df4"], false);

So if you know the service id of what you are looking for it it seem to work. Using this form:

noble.startScanning(serviceUUIDs, allowDuplicates[, callback(error)]); // particular UUIDs

Works for me on MacOS 12.0.1. I'm able to discover and connect to the device with the specified (and advertised) service uuid. There seems to be another problem though, as I am now unable to write values to BLE Characteristics (throws an error "null").

MacOS 12.0.1 Node v14.17.6 @abandonware/noble 1.9.2-15

sidecutter avatar Dec 17 '21 10:12 sidecutter

I hope everyone will report this issue to Apple using the Feedback Assistant app as well.

dlech avatar Dec 29 '21 16:12 dlech

Interestingly, discovery works via Chrome. But there are still some problems with the connection.

I am using the library via node-poweredup. https://github.com/nathankellenicki/node-poweredup/issues/148

alin256 avatar Jan 09 '22 16:01 alin256

I believe this SO post sheds some light on this bug. Apparently it's fixed in macOS 12.3 yet to be released:

macOS 12.3 Release Date With regards to iOS 15.4 we have predicted that it won't arrive until April 2022. This is based on the amount of time Apple spent developing the iOS 14.5 beta in 2021. Of course we could see macOS 12.3 sooner than iOS 14.5, but it seems likely that they will all arrive in tandem. So an April launch looks likely, but there is a chance we could see the new features in March.

via MacWorld

suda avatar Feb 03 '22 19:02 suda

I've confirmed discovery works on MacOS 12.3.

bw1213 avatar Mar 22 '22 04:03 bw1213

I've confirmed discovery works on MacOS 12.3.

@bw1213 can you explain what you did exactly? Im using MacOS 12.3.1 + node 16 and it does not discover any devices. It simpy never calls the discover callback

AllanOricil avatar Apr 10 '22 19:04 AllanOricil

It works for me too on 12.3.1

This is the workaround I add earlier which limits the scan to just the advertised service uuids in the array. This still works for me and I do not need to change it. earlier workaround

 noble.startScanning(
              ["be15beef6186407e83810bd89c4d8df4"],
              false,
              (error) => {
                if (error) debug(error);
              }
            );

If you do not know the service uuids then of course you cannot specify them. This code now works for me in 12.3.1. This code did not work back in December but it does look like something in 12.3.1 has fixed it. now works again without specifying service uuids

 noble.startScanning(
              [],
              false,
              (error) => {
                if (error) debug(error);
              }
            );

davidnixon avatar Apr 11 '22 17:04 davidnixon

Probably this should be closed now.

davidnixon avatar Apr 26 '22 12:04 davidnixon

Has anyone tried the latest beta, not working for me

donavanbecker avatar May 15 '22 13:05 donavanbecker

I can also confirm discovery works on Monterey 12.3.

onderweg avatar May 19 '22 09:05 onderweg

What about 12.4 or 12.5? anyone having issues?

donavanbecker avatar May 19 '22 09:05 donavanbecker

no issues anymore for me with 12.4

Apollon77 avatar May 29 '22 18:05 Apollon77