frawau / aioblescan

Python only library to scan and decode advertised BLE info. Uses asyncio. Can decode Ruuvi Tag. Can broadcast EddyStone packets.
MIT License
125 stars 62 forks source link

Add extended scan #34

Closed Ernst79 closed 3 years ago

Ernst79 commented 3 years ago

Hi,

I'm the developer of the ble_monitor integration for home assistant. We make use of your excellent aioblescan package to get the raw ble data.

In the past, we received issues from users with an Intel NUC (RTL8822CE also), who received errors like: LE Set Scan Enable -> Command disallowed, see e.g. this topic. https://github.com/custom-components/ble_monitor/issues/61

At that time, there was a pull request by @vicamo for the aioblescan repository that had a solution for this issue. https://github.com/frawau/aioblescan/pull/30

He decided to close the PR in the end, so it never got into aioblescan unfortunately. @Magalex2x14 decided to make a local copy of aioblescan in the ble_monitor repository about a year ago in which he applied more or less the fix from #30, which we use since.

I think it would be good that this solution is implemented in aioblescan itself, so we can remove our local forked version and use yours. It's tested by many people during last year :-)

I didn't check main.py, you might need to add a parameter to send_scan_request(self, isactivescan=False) (isactivescan is added as parameter)

frawau commented 3 years ago

OK I will merge this and test If things are A-OK I will release. But I do not have a NUC to test your specific issue

Ernst79 commented 3 years ago

I don’t have a intel NUC either, let’s first test that the old functionality keep working like before. If all works ok, I’ll move BLE monitor back to your aioblescan and I’ll ask the NUC users.

frawau commented 3 years ago

I've updated thinks please do check if things are fine on your side and let me know. I will also ask people who submitted plugins to check. Unless I get a problem report, I will push the new version to PyPi on Wed May 19 around !2:00 GMT

Ernst79 commented 3 years ago

Ok, will do.

Ernst79 commented 3 years ago

Any idea when you will make the 2.8 release?

frawau commented 3 years ago

Working on it...

frawau commented 3 years ago

Alright, I released it. Please do check it out.

Ernst79 commented 3 years ago

Thanks, it works perfect, will keep it running for a few days locally and will then make ble monitor to use aioblescan

thanks again for the aioblescan package!