-
Notifications
You must be signed in to change notification settings - Fork 62
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
Cannot scan when device is bluetooth 5 #48
Comments
Are you saying that aioblescan doesn't work for you in its current form? This is strange. With extended scanning, messages from BT4.0 devices are received without any problems for backward compatibility, they just come in an extended format. If _use_ext_scan flag is set, then adapter supports extended scanning. Can you tell us more about your situation? What adapter, what kernel version, and what Linux distro you use? I'm one of the developers of a home automation system component using aioblescan. At the moment, I am not aware of any cases of such a problem. I personally use both the BT4.0 and BT5.0 adapters (RTL8761B chip) in one system at the same time, and aioblescan works excellent on it, initiating a legacy scan on first adapter and an extended scan on the second.
|
In addition, nothing prevents you from initiating a scan "manually", that is, by executing the But personally it would be more interesting to me to understand the reasons of the behavior described by you. |
Hello, |
Hello,
When device is bluetooth 5, the function self._use_ext_scan() return True.
Then HCI_Cmd_LE_Set_Extended_Scan_Enable is actived.
But the normal le scan is not actived and no beacon 4.0 message was received.
My suggestion is in send_scan_request to remove the else: and make always the 2 functions :
HCI_Cmd_LE_Set_Scan_Params and
HCI_Cmd_LE_Scan_Enable
Here is the patch
*** aioblescan.py 2022-03-01 17:36:54.794613192 +0000
--- aioblescan.py.old 2022-03-01 17:32:37.587643554 +0000
*************** class BLEScanRequester(asyncio.Protocol)
*** 1809,1821 ****
self._send_command_no_wait(command)
! command = HCI_Cmd_LE_Scan_Enable(True, False)
! return self._send_command_no_wait(command)
--- 1809,1822 ----
self._send_command_no_wait(command)
! command = HCI_Cmd_LE_Scan_Enable(True, False)
! return self._send_command_no_wait(command)
Regards.
The text was updated successfully, but these errors were encountered: