fixed bt hid

This commit is contained in:
Devaev Maxim 2021-05-17 09:30:13 +03:00
parent cf4c81caf7
commit 2c7e71adef
2 changed files with 2 additions and 3 deletions

View File

@ -38,7 +38,7 @@ url="https://github.com/pikvm/kvmd"
license=(GPL) license=(GPL)
arch=(any) arch=(any)
depends=( depends=(
"python>=3.9.3-1.1" "python>=3.9.5-2"
"python<3.10" "python<3.10"
python-yaml python-yaml
"python-aiohttp>=3.7.4.post0-1.1" "python-aiohttp>=3.7.4.post0-1.1"

View File

@ -151,8 +151,7 @@ class BtServer: # pylint: disable=too-many-instance-attributes
@contextlib.contextmanager @contextlib.contextmanager
def __listen(self, role: _RoleT, addr: str, port: int) -> Generator[socket.socket, None, None]: def __listen(self, role: _RoleT, addr: str, port: int) -> Generator[socket.socket, None, None]:
get_logger(0).info("Listening [%s]:%d for %s ...", addr, port, role) get_logger(0).info("Listening [%s]:%d for %s ...", addr, port, role)
# with socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, socket.BTPROTO_L2CAP) as sock: with socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, socket.BTPROTO_L2CAP) as sock:
with socket.socket(31, socket.SOCK_SEQPACKET, 0) as sock:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.settimeout(self.__socket_timeout) sock.settimeout(self.__socket_timeout)
sock.bind((addr, port)) sock.bind((addr, port))