Hi again.
Trying to modify ianperrin’s MMM-NetworkScanner to check wether the toothbrush is connected or not!
after pairing the brush in Raspbian it is autodetected without any delay , both availability and absensence are shown instantly.
the plan is to detect the brush and then show a timer starting at 00:00 on the mirror, counting as long as the brush is connected. lets say: scan every 3 sec. if detect show the timer and start counting, if the brush is not detected anymore stop counting until redetection, is the brush not detected for more than 20 sec reset the timer to 00:00 and dont show it anymore
As i mentioned, i m a noob in coding.
i have found the command to check if an bluetoothdevice is connected : ‘hcitool con’
but wasn’t able to use this command in the Networkscanner, i guess because of the space between ‘hcitool’ and ‘con’
using the command manually looks as follows:(first with brush off, then with brush on)
pi@raspberrypi:~/MagicMirror $ hcitool con
Connections:
pi@raspberrypi:~/MagicMirror $ hcitool con
Connections:
< Unknown E0:E5:CF:FC:4D:8C handle 64 state 1 lm MASTER
pi@raspberrypi:~/MagicMirror $
unsure how i can integrate this command into the MMM-Networkscanner??? and check the MAC !!! help please
Note from admin: Please use Markdown on code snippets for easier reading!