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

0 confidence on detected bluetooth #417

Open
D3nkNugZ opened this issue Sep 14, 2022 · 1 comment
Open

0 confidence on detected bluetooth #417

D3nkNugZ opened this issue Sep 14, 2022 · 1 comment

Comments

@D3nkNugZ
Copy link

D3nkNugZ commented Sep 14, 2022

Im trying to setup a picroft/presence detection combo and have installed everything as per instructions, added my phones MAC address to the known addresses file, connected up to my MQTT broker and listened in home assistant and sent another test MAC address to confirm that all worked.

when running monitor.sh I'm met with:

> starting monitor.sh (v. 0.2.200)...
> removing web request caches
mkfifo: cannot create fifo 'packet_pipe': File exists
> xx:xx:xx:xx:xx:xx confidence topic: monitor/mycroft/matts_phone (has not previously connected to hci0)
> xx:xx:xx:xx:xx:xx confidence topic: monitor/mycroft/kitchen_ipad (has not previously connected to hci0)
[+] 0.2.200 15-09-2022 01:47:00 am [CMD-MQTT]	monitor/mycroft/matts_phone { ... confidence : 0 ... } 
[+] 0.2.200 15-09-2022 01:47:00 am [CMD-NAME]	xx:xx:xx:xx:xx:xx matts_phone  Samsung Electronics CoLtd
[+] 0.2.200 15-09-2022 01:47:10 am [CMD-MQTT]	monitor/mycroft/kitchen_ipad { ... confidence : 0 ... } 
[+] 0.2.200 15-09-2022 01:47:10 am [CMD-NAME]	xx:xx:xx:xx:xx:xx kitchen-ipad  Apple Inc

then it proceeds to cycle those with the odd random mac addresses timing out as it goes along.

The thing that confuses me about this is when running monitor.sh with -a -b arguments I can see other bluetooth devices around the house. For a test I added one of the detected 100 confidence device's MAC address to the known_static_addresses list and fired up monitor.sh....
It just joined the list with my phone and tablet and sat there on 0.
I even saw it pop up with 100% confidence directly before it came back to 0 and stayed there.

Inspection of the logs says basically the same as the script output except with these 2 lines scattered amongst the log

Sep 15 01:15:40 mycroft bash[476]: ./support/btle: line 356: printf: write error: Broken pipe
Sep 15 01:15:40 mycroft bash[476]: ./support/btle: line 399: printf: write error: Broken pipe

and while I'm having a wahh it might be worth to know everything seems to be happening quite slow, however I could just be an impatient bugger and I could understand it being a series of timeouts.

I'm using the default behaviour file and everything else is as default as default can be.
So I'm basically stumped at this stage. let me know if there's anything I missed information-wise :)

System information:

Linux mycroft 5.10.103-v7l+ #1529 SMP armv7l GNU/Linux
Hardware:RPI 4, with fancy pants power supply.
@rayzorben
Copy link

Experiencing the same thing. Followed the instructions to a T, added the known_static_device of my phone. It works, although the confidence will switch between 0 and 100 sitting 5 feet away from my RPI4.

Following the advice of the tuning, I run monitor.sh and I expect to see something like as documented.

0.1.xxx 03:25:39 pm [CMD-RAND] [passed filter] data: 00:11:22:33:44:55 pdu: ADV_NONCONN_IND rssi: -73 dBm flags: 0x1b man: Apple, Inc. delay: 4

I don't see ANY pass/failure RAND lines being output. I only see DEL-RAND expired after x seconds messages.

Similarly, I get the same mkfifo and broken pipe errors mentioned above.

Would love for this to work.

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

2 participants