bluetooth mouse disconnects
There are 3 solutions for this problem. Maybe even combining 2 of them could fix your issue.
Solution 1
Edit the file /etc/bluetooth/input.conf
and set the parameter IdleTimeout=0
inside the [General]
block.
root@nwdesktop:~# vim /etc/bluetooth/input.conf
# Configuration file for the input service
# This section contains options which are not specific to any
# particular interface
[General]
# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
IdleTimeout=0
Restart the bluetooth service:
root@nwdesktop:~# /etc/init.d/bluetooth restart
* Stopping bluetooth [ OK ]
* Starting bluetooth [ OK ]
This will prevent disconnections due to timeout from your bluetooth mice and keyboards.
Solution 2
Create an udev rule that will avoid your mouse to autosuspend
root@nwdesktop:~# vi /etc/udev/rules.d/91-local.rules
ACTION=="add", SUBSYSTEM=="bluetooth", ATTR{product}=="Microsoft Bluetooth Mouse ", ATTR{power/control}="on"
root@nwdesktop:~# # udevadm control --reload-rules
Solution 3
This one does not makes me proud, but... Create a script with your hidd connect command:
user@nwdesktop:~# vi /home/user/recconect.sh
#!/bin/bash
sudo hidd --connect 30:59:B7:72:A5:A7
Now, add to your crontab:
root@nwdesktop:~# vi /etc/crontab
*/10 * * * * root /home/user/recconect.sh
Cheers.
The only thing that I had to do to enable (connect) wireless headphones Sony MDR-ZX550BN are in /etc/bluetooth/input.conf
add/uncomment line:
#Enable HID protocol handling in userspace input profile
#Defaults to false (HIDP handled in HIDP kernel module)
UserspaceHID=true
and naturally restart service /etc/init.d/bluetooth restart
P.S. I'm using Debian 8 Jessie