The pairing itself seems to work, but it seems that there are issues with the information exchange between the mouse and the BT dongle (ASUS BT-500)
I dumped the pairing process with
hcidump -x -w <file> to a file and opened the dump in wireshark
The pairing process is running, crypto is set up etc. But then, when the ATT_READ_BY_GROUP_TYPE_REQ PDU is issued, i think the fun begins:
Code:
Frame 79: 16 bytes on wire (128 bits), 16 bytes captured (128 bits)
Encapsulation type: Bluetooth H4 with linux header (99)
Arrival Time: Feb 18, 2025 17:47:03.295977000 CET
UTC Arrival Time: Feb 18, 2025 16:47:03.295977000 UTC
Epoch Arrival Time: 1739897223.295977000
[Time shift for this packet: 0.000000000 seconds]
[Time delta from previous captured frame: 0.017431000 seconds]
[Time delta from previous displayed frame: 0.017431000 seconds]
[Time since reference or first frame: 14.876260000 seconds]
Frame Number: 79
Frame Length: 16 bytes (128 bits)
Capture Length: 16 bytes (128 bits)
[Frame is marked: False]
[Frame is ignored: False]
Point-to-Point Direction: Received (1)
[Protocols in frame: bluetooth:hci_h4:bthci_acl:btl2cap:btatt]
Bluetooth
[Source: xxxx (xxxx)]
[Destination: 00:00:00_00:00:00 (00:00:00:00:00:00)]
Bluetooth HCI H4
[Direction: Rcvd (0x01)]
HCI Packet Type: ACL Data (0x02)
Bluetooth HCI ACL Packet
.... 0000 0001 0000 = Connection Handle: 0x010
..10 .... .... .... = PB Flag: First Automatically Flushable Packet (2)
00.. .... .... .... = BC Flag: Point-To-Point (0)
Data Total Length: 11
Data
[Connect in frame: 74]
[Source BD_ADDR: xxx (xxxx)]
[Source Device Name: MX Master]
[Source Role: Unknown (0)]
[Destination BD_ADDR: 00:00:00_00:00:00 (00:00:00:00:00:00)]
[Destination Device Name: ]
[Destination Role: Unknown (0)]
[Current Mode: Unknown (-1)]
Bluetooth L2CAP Protocol
Length: 7
CID: Attribute Protocol (0x0004)
Bluetooth Attribute Protocol
Opcode: Read By Group Type Request (0x10)
0... .... = Authentication Signature: False
.0.. .... = Command: False
..01 0000 = Method: Read By Group Type Request (0x10)
Starting Handle: 0x0001
Ending Handle: 0xffff
UUID: Primary Service (0x2800)
According to the
Bluetooth Corespec (Page 1498) the ATT_READ_BY_GROUP_TYPE_REQ PDU should set it's UUID to "Primary Service", "Starting Handle: 0x0001" and "End Handle: 0xffff". This is what happens in the request above. But, according to the Spec, the Server (in this case the mouse) should return either "ATT_READ_BY_GROUP_TYPE_RSP" or "ATT_-ERROR_RSP PDU". But i can not find either of this responses in the dump.
The Spec also mentions that:
The ATT_READ_BY_GROUP_TYPE_-
REQ PDU shall be issued again with the Starting Handle set to one greater
than the last End Group Handle in the ATT_READ_BY_GROUP_TYPE_RSP
PDU.
This sub-procedure is complete when the ATT_ERROR_RSP PDU is received
and the Error Code parameter is set to Attribute Not Found (0x0A) or when the
End Group Handle in the Read by Type Group Response is 0xFFFF.
According to the dump, the ATT_READ_BY_GROUP_TYPE_REQ PDU is issued again, but not with the incremented handles, but the same values for "Starting Handle" and "Ending Handle", which leads me to the idea, that it is issued again, because no response has been received
Going on, the client invokes a ATT_FIND_INFORMATION_REQ:
Code:
Frame 78: 14 bytes on wire (112 bits), 14 bytes captured (112 bits)
Encapsulation type: Bluetooth H4 with linux header (99)
Arrival Time: Feb 18, 2025 17:47:03.278546000 CET
UTC Arrival Time: Feb 18, 2025 16:47:03.278546000 UTC
Epoch Arrival Time: 1739897223.278546000
[Time shift for this packet: 0.000000000 seconds]
[Time delta from previous captured frame: 0.000701000 seconds]
[Time delta from previous displayed frame: 8.381085000 seconds]
[Time since reference or first frame: 14.858829000 seconds]
Frame Number: 78
Frame Length: 14 bytes (112 bits)
Capture Length: 14 bytes (112 bits)
[Frame is marked: False]
[Frame is ignored: False]
Point-to-Point Direction: Sent (0)
[Protocols in frame: bluetooth:hci_h4:bthci_acl:btl2cap:btatt]
Bluetooth
[Source: 00:00:00_00:00:00 (00:00:00:00:00:00)]
[Destination: xxx (xxx)]
Bluetooth HCI H4
[Direction: Sent (0x00)]
HCI Packet Type: ACL Data (0x02)
Bluetooth HCI ACL Packet
.... 0000 0001 0000 = Connection Handle: 0x010
..00 .... .... .... = PB Flag: First Non-automatically Flushable Packet (0)
00.. .... .... .... = BC Flag: Point-To-Point (0)
Data Total Length: 9
Data
[Connect in frame: 74]
[Source BD_ADDR: 00:00:00_00:00:00 (00:00:00:00:00:00)]
[Source Device Name: ]
[Source Role: Unknown (0)]
[Destination BD_ADDR: xxx (xxx)]
[Destination Device Name: MX Master]
[Destination Role: Unknown (0)]
[Current Mode: Unknown (-1)]
Bluetooth L2CAP Protocol
Length: 5
CID: Attribute Protocol (0x0004)
Bluetooth Attribute Protocol
Opcode: Find Information Request (0x04)
0... .... = Authentication Signature: False
.0.. .... = Command: False
..00 0100 = Method: Find Information Request (0x04)
Starting Handle: 0x0001
Ending Handle: 0xffff
According to specification on Page 1505 the request should contain:
The ATT_FIND_INFORMATION_REQ PDU shall be used with the Starting
Handle set to the handle of the specified characteristic value + 1 and the
Ending Handle set to the ending handle of the specified characteristic.
But the values are again "0x0001" and "0xffff". Maybe, because there is no "ATT_READ_BY_GROUP_TYPE_RSP", the client has no idea what to query (and how to set "Starting Handle" and "End Handle")