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

Raspberry pi does not discover devices #441

Open
nigeldun opened this issue Nov 6, 2024 · 2 comments
Open

Raspberry pi does not discover devices #441

nigeldun opened this issue Nov 6, 2024 · 2 comments

Comments

@nigeldun
Copy link

nigeldun commented Nov 6, 2024

Using .Net8. Raspberry Pi running stellarmate. Latest bluez and bluez-firmware installed.

Code that runs fine on Windows 11 finding my device doesn’t discover device when run on the Pi.

Running bluetoothctl on the Pi and doing scan on does report my device along with a number of others. However neither discoverdevice nor discoverdeviceasync report the device though bluetoothctl running at the same time shows the scan.

This is bluetooth classic and the device doesn’t require a pin.

I’ve noticed the bluetoothctl scan can take a while to pickup my device, while a quick look at what i think is the code makes me think that it only allows 5 secs for scan. I have tried running a scan multiple times in the hope it shows up but no luck.

@nigeldun
Copy link
Author

Has anyone got this library working with classic on linux?

I can get the rpi to connect to my bt device and the utilities see the devices advertising their presence but for some reason the library discoverdevice doesn’t.

@nigeldun
Copy link
Author

Looks like it might be down to the timeout defaults for when looking for connections in the standard raspberry pi bluez setup. At least now Ive moved to trying BT LE thats what Ive found. Also having the wifi enabled is a bit problematic but that might be due to interference making the timeouts need to be longer, which I found later. Might be a cause of this failure but Im unable to test currently as Ive converted over to BT LE

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

1 participant