Re: умные bluetooth весы
Добавлено: Ср май 09, 2018 9:17 pm
А какой ответ на primary в gatttool?
Код: Выделить всё
pi@dmsserver:~$ gatttool -b A4:C1:38:C7:0C:A3 -I
[A4:C1:38:C7:0C:A3][LE]> connect
Attempting to connect to A4:C1:38:C7:0C:A3
Error: connect error: Device or resource busy (16)
[A4:C1:38:C7:0C:A3][LE]>
Код: Выделить всё
pi@dmsserver:~$ sudo gatttool -b F1:BC:2A:03:DD:89 -I
[F1:BC:2A:03:DD:89][LE]> connect
Attempting to connect to F1:BC:2A:03:DD:89
Error: connect error: Connection refused (111)
[F1:BC:2A:03:DD:89][LE]>
Код: Выделить всё
[50209.911177] Bluetooth: HCI request failed to create LE connection: status 0x0c
Код: Выделить всё
lsusb
Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0451:16ae Texas Instruments, Inc.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
pi@dmsserver:~$
Код: Выделить всё
pi@dmsserver:~$ dmesg |grep Bluetooth
[ 23.599306] Bluetooth: Core ver 2.22
[ 23.599333] Bluetooth: HCI device and connection manager initialized
[ 23.599337] Bluetooth: HCI socket layer initialized
[ 23.599340] Bluetooth: L2CAP socket layer initialized
[ 23.599347] Bluetooth: SCO socket layer initialized
[ 35.827795] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 35.827797] Bluetooth: BNEP filters: protocol multicast
[ 35.827801] Bluetooth: BNEP socket layer initialized
[ 84.978237] Bluetooth: RFCOMM TTY layer initialized
[ 84.978243] Bluetooth: RFCOMM socket layer initialized
[ 84.978250] Bluetooth: RFCOMM ver 1.11
Код: Выделить всё
pi@dmsserver:~$ sudo gatttool -b F1:BC:2A:03:DD:89 -I
[F1:BC:2A:03:DD:89][LE]> primary
Command Failed: Disconnected
[F1:BC:2A:03:DD:89][LE]> connect
Attempting to connect to F1:BC:2A:03:DD:89
[F1:BC:2A:03:DD:89][LE]> primary
Command Failed: Disconnected
Error: connect error: Connection refused (111)
[F1:BC:2A:03:DD:89][LE]>
Код: Выделить всё
pi@dmsserver:~$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Ср 2018-05-09 23:36:49 +05; 23min ago
Docs: man:bluetoothd(8)
Main PID: 779 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─779 /usr/lib/bluetooth/bluetoothd
май 09 23:36:51 dmsserver bluetoothd[779]: Not enough free handles to register s
май 09 23:36:51 dmsserver bluetoothd[779]: Not enough free handles to register s
май 09 23:36:51 dmsserver bluetoothd[779]: Current Time Service could not be reg
май 09 23:36:51 dmsserver bluetoothd[779]: gatt-time-server: Input/output error
май 09 23:36:51 dmsserver bluetoothd[779]: Not enough free handles to register s
май 09 23:36:51 dmsserver bluetoothd[779]: Not enough free handles to register s
май 09 23:36:51 dmsserver bluetoothd[779]: Sap driver initialization failed.
май 09 23:36:51 dmsserver bluetoothd[779]: sap-server: Operation not permitted (
май 09 23:37:39 dmsserver bluetoothd[779]: Endpoint registered: sender=:1.63 pat
май 09 23:37:39 dmsserver bluetoothd[779]: Endpoint registered: sender=:1.63 pat
...skipping...
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
Active: active (running) since Ср 2018-05-09 23:36:49 +05; 23min ago