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

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

Open
lwj06 opened this issue Oct 20, 2021 · 25 comments

Comments

@lwj06
Copy link

lwj06 commented Oct 20, 2021

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

@itiwll
Copy link

itiwll commented Oct 20, 2021

Some here for me.

@lwj06 lwj06 changed the title In the latest mac system (maOS Monterey, 12.0.1), there is no response to the discover method In the latest mac system (maOS Monterey, 12.0.1), mac montrery Not Discovering Peripherals Oct 22, 2021
@ebaauw
Copy link

ebaauw commented Oct 28, 2021

I can confirm, unfortunately.

@bitkill
Copy link

bitkill commented Oct 30, 2021

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

@bubez81
Copy link

bubez81 commented Nov 20, 2021

any news about this problem?

@pavelkrcil
Copy link

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

@onderweg
Copy link

onderweg commented Dec 3, 2021

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

@yackermann
Copy link

Same here:

@davidnixon
Copy link

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
Copy link

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"

@ebaauw
Copy link

ebaauw commented Dec 15, 2021

This seems to work

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

@bwp91
Copy link

bwp91 commented Dec 15, 2021

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.

@davidnixon
Copy link

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 ...

@ebaauw
Copy link

ebaauw commented Dec 15, 2021

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.

@sidecutter
Copy link

sidecutter commented Dec 17, 2021

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

@dlech
Copy link

dlech commented Dec 29, 2021

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

@alin256
Copy link

alin256 commented Jan 9, 2022

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

I am using the library via node-poweredup.
nathankellenicki/node-poweredup#148

@suda
Copy link

suda commented Feb 3, 2022

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

@bw1213
Copy link

bw1213 commented Mar 22, 2022

I've confirmed discovery works on MacOS 12.3.

@AllanOricil
Copy link

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

@davidnixon
Copy link

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
Copy link

Probably this should be closed now.

@donavanbecker
Copy link

Has anyone tried the latest beta, not working for me

@onderweg
Copy link

I can also confirm discovery works on Monterey 12.3.

@donavanbecker
Copy link

What about 12.4 or 12.5? anyone having issues?

@Apollon77
Copy link

no issues anymore for me with 12.4

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