Open corgan2222 opened 3 years ago
running on a pi zero
Linux raspizero2 5.10.17+
Drivers: ii bluetooth 5.50-1.2~deb10u1+rpt2 all Bluetooth support (metapackage) ii bluez 5.50-1.2~deb10u1+rpt2 armhf Bluetooth tools and daemons ii bluez-firmware 1.2-4+rpt8 all Firmware for Bluetooth devices ii bluez-hcidump 5.50-1.2~deb10u1+rpt2 armhf Analyses Bluetooth HCI packets ii libbluetooth-dev:armhf 5.50-1.2~deb10u1+rpt2 armhf Development files for using the BlueZ Linux Bluetooth library ii libbluetooth3:armhf 5.50-1.2~deb10u1+rpt2 armhf Library to use the BlueZ Linux Bluetooth stack ii lxplug-bluetooth 0.21 armhf Bluetooth plugin for lxpanel ii pi-bluetooth 0.1.16 all Raspberry Pi 3 bluetooth ii pulseaudio-module-bluetooth 12.2-4+deb10u1+rpi3 armhf Bluetooth module for PulseAudio sound server
Had the same problems for a long time. Found a solution by mirovdm/le_autoconnect_timeout.md in github "This tool changes default HCI_LE_AUTOCONN_TIMEOUT for Bluetooth adapter on Linux" And it works fine !
Hello @jeeck-jan, could you provide a link where I can find some more information on this?
https://gist.github.com/mironovdm/cb7f47e8d898e9a3977fc888d990e8a9 [https://github.githubassets.com/images/modules/gists/gist-og-image.png]https://gist.github.com/mironovdm/cb7f47e8d898e9a3977fc888d990e8a9 Change LE autoconnect timeout · GitHubhttps://gist.github.com/mironovdm/cb7f47e8d898e9a3977fc888d990e8a9 Clone via HTTPS Clone with Git or checkout with SVN using the repository’s web address. gist.github.com greetings,
Jan Eeckhout
Van: oyooyo @.> Verzonden: woensdag 14 december 2022 18:58 Aan: oyooyo/keyble @.> CC: jeeck-jan @.>; Mention @.> Onderwerp: Re: [oyooyo/keyble] UnhandledPromiseRejectionWarning and other errors (#34)
Hello @jeeck-janhttps://github.com/jeeck-jan, could you provide a link where I can find some more information on this?
— Reply to this email directly, view it on GitHubhttps://github.com/oyooyo/keyble/issues/34#issuecomment-1351864536, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOBJH3PVJPPRJEUNT6S5NM3WNIDEVANCNFSM45FDLIMA. You are receiving this because you were mentioned.Message ID: @.***>
@jeeck-jan Thanks!
Some advice to make keyble software function fast and sure : for raspberry pi
1 enable bluetooth in /boot config.txt #dtoverlay=disable-bt
2 enable hciuart : sudo systemctl start hciuart
3 trust doorlock : sudo bluetoothctl trust xx:xx:xx:xx:xx (doorlock mac adresss), this is not so easy, do it in loop in python or
manually in bluetoothctl (several times till successful); you only have to do this one's : stays in raspi's memory : this speeds up
connection
4 adjust le connect timeout : see above (you can do this one's at every pi reboot )
5 do not change settings for --status_update_time : if to short your commands will be overruled by the status command, and
the doorlock will not move. (and you don't know what's happening)
6 I change the setting for timeout --timeout to 20, if you don't get a reaction after 10 seconds, you won't get any. This setting
is not realy necessary : I always have reaction in less than 10 seconds.
7 this is very important : before sending a command : stop bluetooth (sudo systemctl stop bluetooth), and then start bluetooth
(sudo systemctl start bluetooth), then send your command
That's it.
For me 100% successfull commands, time between command and moving the lock = 4 to 6 seconds (medium 5s)
Have fun !
I tried now for months to get this running stable, but every few minutes it stopped working. And i can't really reproduce the problem. Its such a strange behavior.
I restart bluetooth, the restart the keyble-mqtt service. And some seconds later i get this error.
Then i repeat this, restart BT and keyble i got a different error from noble
And now, if I repeat this one more time, restart bt and keyble, I get this smp error, but keyble does the job and turn the key. At first i was worried about the snp error, but now its a hint that the communication is working.
This behavior is completely random. ATM i have a cron job running, which restarts BT and keyble every 5min, but even with this, the chance that the look opens if needed are <50%.
Is there anything i can do to help?