From: Adam Pigg <adam@piggz.co.uk>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: GATT issue, possible bluez bug?
Date: Wed, 23 Mar 2022 13:36:49 +0000 [thread overview]
Message-ID: <CANFkB1zMOYTD8ZsDHczHqce9ipgyu9-fEeXEZqTzuf=T4UufLQ@mail.gmail.com> (raw)
In-Reply-To: <CANFkB1w2UUq7W0EqEdskebhKcEtkZ-33q-Co5VF_WKf7dHsJtg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 10032 bytes --]
Hi Luiz
On Wed, 23 Mar 2022 at 09:11, Adam Pigg <adam@piggz.co.uk> wrote:
>
> Hi Luiz
>
> Good that you clearly know more about this than me!...
>
> On Tue, 22 Mar 2022 at 23:44, Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi Adam,
> >
> > On Tue, Mar 22, 2022 at 4:35 PM Luiz Augusto von Dentz
> > <luiz.dentz@gmail.com> wrote:
> > >
> > > Hi Adam,
> > >
> > > On Tue, Mar 22, 2022 at 4:09 PM Adam Pigg <adam@piggz.co.uk> wrote:
> > > >
> > > > Thanks Luiz
> > > >
> > > > On Tue, 22 Mar 2022 at 21:35, Luiz Augusto von Dentz
> > > > <luiz.dentz@gmail.com> wrote:
> > > > >
> > > > > Hi Adam,
> > > > >
> > > > > On Tue, Mar 22, 2022 at 3:40 AM Adam Pigg <adam@piggz.co.uk> wrote:
> > > > > >
> > > > > > Hi Luiz
> > > > > >
> > > > > >
> > > > > > On Tue, 22 Mar 2022 at 07:55, Adam Pigg <adam@piggz.co.uk> wrote:
> > > > > > >
> > > > > > > Hi Luiz
> > > > > > >
> > > > > > > On Tue, 22 Mar 2022 at 00:44, Luiz Augusto von Dentz
> > > > > > > <luiz.dentz@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Hi Adam,
> > > > > > > >
> > > > > > > > On Mon, Mar 21, 2022 at 4:03 PM Adam Pigg <adam@piggz.co.uk> wrote:
> > > > > > > > >
> > > > > > > > > Hi
> > > > > > > > >
> > > > > > > > > A bit of background, I write a linux desktop/mobile app called
> > > > > > > > > Amazfish which interfaces with several watches over BLE using their
> > > > > > > > > GATT services. To do this, I use the bluez dbus api (technically a
> > > > > > > > > thin wrapper around it I wrote called qble
> > > > > > > > > https://github.com/piggz/qble)
> > > > > > > > >
> > > > > > > > > All has been good so far, I support several generations of
> > > > > > > > > Huami/Amazfit watches, as well as the open source Pinetime and
> > > > > > > > > Bangle.js. For the Amazfit watches, i have implementations for older
> > > > > > > > > devies such as the Bip, and newer ones such as the GTS.
> > > > > > > > >
> > > > > > > > > Much of the reverse engineering comes from the Android Gadget Bridge
> > > > > > > > > project, which supports many more devices.
> > > > > > > > >
> > > > > > > > > My community of users donated to buy me a newer device called a GTR2,
> > > > > > > > > which, according to the GB devs uses the same protocol as the slightly
> > > > > > > > > older GTS, and the packet captures I have from Android would support
> > > > > > > > > this.
> > > > > > > > >
> > > > > > > > > But this is where my trouble starts with Bluez, my existing
> > > > > > > > > implementation doesnt work at all. Normally, after a connection, I
> > > > > > > > > would wait for the ServicesResolved signal, which happens pretty fast
> > > > > > > > > on all other devices, but on the GTR2, it takes about 30 seconds, by
> > > > > > > > > which time, the watch has disconnected. (i get a disconnected signal
> > > > > > > > > immediately after the ServicesResolved signal)
> > > > > > > > >
> > > > > > > > > To rule out my code, I have tried several things:
> > > > > > > > > Gatttool
> > > > > > > > > With gattool, i can connect, get the services, enable a notification,
> > > > > > > > > write a value and get the expected results seemingly fine
> > > > > > > > >
> > > > > > > > > Python-gatt (using the bluez dbus api)
> > > > > > > > > Im unable to iterate the services, like my app, it takes 30 seconds to
> > > > > > > > > get the signal and then swiftly disconnects
> > > > > > > > >
> > > > > > > > > Gattlib (https://github.com/labapart/gattlib)
> > > > > > > > > Gattlib is interesting as it appears to have "borrowed" much of its
> > > > > > > > > code directly from bluez. When built against the system bluez, if the
> > > > > > > > > version is > 5.42, it will use the dbus api. When I do this, again im
> > > > > > > > > unable to list services on the watch. However, if I edit the build to
> > > > > > > > > force it to use its internal gatt implementation, which appears to be
> > > > > > > > > the same one used by gatttool, then, it IS able to interrogate the
> > > > > > > > > watch.
> > > > > > > > >
> > > > > > > > > I have attached 3 files
> > > > > > > > > 1. test python program which should print services, and associated btmon
> > > > > > > > > 2. btmon output while using gatttool
> > > > > > > > > 3. btmon output running gattlib discover example
> > > > > > > > >
> > > > > > > > > Note, other than discovery, I havnt been able to get gattlib to
> > > > > > > > > read/write/notify!
> > > > > > > > >
> > > > > > > > > It seems as though I may be triggering a bug in the bluez dbus api?
> > > > > > > > > Can anyone suggest anything?
> > > > > > > >
> > > > > > > > What version are you using? I would first try with the latest to see
> > > > > > > > if that something already fixed.
> > > > > > > >
> > > > > > > >
> > > > > > > Im using 5.63 already, which is the latest tag (on opensuse tumbleweed)
> > > > > > >
> > > > > > > I'll also try bluetoothctl and attach logs using that, though I
> > > > > > > suspect it will behave the same as the python library and my own
> > > > > > > library.
> > > > > > >
> > > > > >
> > > > > > Attached is the output of btmon while using bluetoothctl
> > > > > >
> > > > > > bluetoothctl behaves the same as my lib and python, it is unable to
> > > > > > list services, and after a while, emits the ServicesResolved and
> > > > > > disconnected messages at the same time. Im sure it should be able to
> > > > > > list the services immediately after connect just like gatttool can.
> > > > >
> > > > > Looks like there is multiple rounds of MTU Exchange, not sure if that
> > > > > is actually a problem but the spec does say it shall only be sent once
> > > > > per client:
> > > > >
> > > > > BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 3, Part F
> > > > > page 1424:
> > > > >
> > > > > This request shall only be sent once during a connection by the client.
> > > > >
> > > > > There is also no response to frame #30:
> > > > > < ACL Data TX: Handle 3585 flags 0x00 dlen 7
> > > > >
> > > > > #30 [hci0] 26.641557
> > > > > ATT: Read Request (0x0a) len 2
> > > > > Handle: 0x0018
> > > > >
> > > > > So after 30 seconds (ATT timeout) without receiving any response it disconnects:
> > > > >
> > > >
> > > > So, the verdict is that the watch isnt acting to spec right?
> > > >
> > > > Why does gatttool work ok, is it a completely different implementation?
> > > >
> > > > I understand if wouldnt be to spec, but would it be possible to make
> > > > bluez more resilient to devices not acting to spec? Android and iOS
> > > > work just fine in this regard, so could bluez handle mis-behaving
> > > > devices more flexibly?
> > >
> > > That I can't really explain, perhaps it is timing related, something
> > > with Exchange MTU since it appears to stop the device from responding
> > > when it happens a second time.
> > >
> > > > Do you have any suggestions for things I could try? I looked for
> > > > similar lines in the working gatttool log, and it doesnt have anything
> > > > like that, seems to send flags 0x00 dlen 9 (instead of 7?) ... how is
> > > > it behaving differently?
> > >
> > > Not sure really, does Android/iOS Exchange the MTU? Maybe we need a
> > > timer to start it later or perhaps the problem first response to
> > > exchange MTU does actually use the final_mtu which makes the watch to
> > > trigger yet another exchange to have both rx and tx MTU the same so
> > > try with the following change:
> > >
> > > diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c
> > > index 2adb4afbf..d326782bf 100644
> > > --- a/src/shared/gatt-server.c
> > > +++ b/src/shared/gatt-server.c
> > > @@ -1499,7 +1499,7 @@ static void exchange_mtu_cb(struct bt_att_chan
> > > *chan, uint8_t opcode,
> > > final_mtu = MAX(MIN(client_rx_mtu, server->mtu), BT_ATT_DEFAULT_LE_MTU);
> > >
> > > /* Respond with the server MTU */
> > > - put_le16(server->mtu, rsp_pdu);
> > > + put_le16(final_mtu, rsp_pdu);
> > > bt_att_chan_send_rsp(chan, BT_ATT_OP_MTU_RSP, rsp_pdu, 2);
> > >
> > > /* Set MTU to be the minimum */
> >
> > Hmm Im not sure if this will work since the peripheral seems to
> > respond different values 252 vs 247, also the spec does say that:
> >
> > 'The Server Rx MTU parameter shall be set to the *maximum size* of the
> > Attribute protocol PDU that the server can receive.
> > The server and client shall set ATT_MTU to the *minimum of the Client Rx MTU
> > and the Server Rx MTU*. The size is the same to ensure that a client can
> > correctly detect the final packet of a long attribute read.'
> >
> > So my interpretation is that the minimum is calculated after the
> > Exchange is complete so it doesn't require the Server MTU to be
> > limited by the Client MTU, anyway if Android and iOS does apply the
> > minimum logic before responding we can do the same.
> >
>
> Maybe it will help if I attach an android packet capture....
>
> The attachedhttps://marc.info/?l=linux-bluetooth&m=164799909020040&w=2
> log can be opened in Wireshark, and to my untrained eye, it looks like
> the MTU negotiation is at packets 451 and 452, and 247 is used?
>
> Ill try and get the proposed patch built and see how it behaves
Attached if the btmon and bluetoothctl. It doesnt seem to be there quite yet.
There was one point before i applied the patch where bluetoothctl
seemed to list the attributes quickly, but i havnt been able to
reproduce that again with or without the patch.
Thanks
>
> Thanks
>
> > >
> > > >
> > > > > < HCI Command: Disconnect (0x01|0x0006) plen 3
> > > > >
> > > > > #48 [hci0] 58.673128
> > > > > Handle: 3585
> > > > > Reason: Remote User Terminated Connection (0x13)
> > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > > > --
> > > > > > > > Luiz Augusto von Dentz
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Luiz Augusto von Dentz
> > >
> > >
> > >
> > > --
> > > Luiz Augusto von Dentz
> >
> >
> >
> > --
> > Luiz Augusto von Dentz
[-- Attachment #2: btmon_new_bluez_bluetoothctl.txt --]
[-- Type: text/plain, Size: 26687 bytes --]
[bluetooth]# connect F8:C3:D1:B0:5A:3A
Attempting to connect to F8:C3:D1:B0:5A:3A
[CHG] Device F8:C3:D1:B0:5A:3A Connected: yes
Connection successful
[Amazfit GTR 2]# menu gatt
Menu gatt:
Available commands:
-------------------
list-attributes [dev/local] List attributes
select-attribute <attribute/UUID> Select attribute
attribute-info [attribute/UUID] Select attribute
read [offset] Read attribute value
write <data=xx xx ...> [offset] [type] Write attribute value
acquire-write Acquire Write file descriptor
release-write Release Write file descriptor
acquire-notify Acquire Notify file descriptor
release-notify Release Notify file descriptor
notify <on/off> Notify attribute value
clone [dev/attribute/UUID] Clone a device or attribute
register-application [UUID ...] Register profile to connect
unregister-application Unregister profile
register-service <UUID> [handle] Register application service.
unregister-service <UUID/object> Unregister application service
register-includes <UUID> [handle] Register as Included service in.
unregister-includes <Service-UUID><Inc-UUID> Unregister Included service.
register-characteristic <UUID> <Flags=read,write,notify...> [handle] Register application characteristic
unregister-characteristic <UUID/object> Unregister application characteristic
register-descriptor <UUID> <Flags=read,write...> [handle] Register application descriptor
unregister-descriptor <UUID/object> Unregister application descriptor
back Return to main menu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print environment variables
[Amazfit GTR 2]# select-attribute 00000009-0000-3512-2118-0009af100700
[Amazfit GTR 2]# notify on
No attribute selected
[CHG] Device F8:C3:D1:B0:5A:3A ServicesResolved: yes
[CHG] Device F8:C3:D1:B0:5A:3A Paired: yes
[CHG] Device F8:C3:D1:B0:5A:3A ServicesResolved: no
[CHG] Device F8:C3:D1:B0:5A:3A Connected: no
----------
btmon:
piggz@adam-laptop ~ $ sudo btmon
Bluetooth monitor ver 5.63
= Note: Linux version 5.16.14-1-default (x86_64) 0.537725
= Note: Bluetooth subsystem version 2.22 0.537729
= New Index: DC:53:60:51:00:C6 (Primary,USB,hci0) [hci0] 0.537730
= Open Index: DC:53:60:51:00:C6 [hci0] 0.537730
= Index Info: DC:53:60:51:00:C6 (Intel Corp.) [hci0] 0.537731
@ MGMT Open: bluetoothd (privileged) version 1.21 {0x0001} 0.537732
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #1 [hci0] 9.719672
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 60.000 msec (0x0060)
Own address type: Public (0x00)
Filter policy: Accept all advertisement (0x00)
> HCI Event: Command Complete (0x0e) plen 4 #2 [hci0] 9.833744
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #3 [hci0] 9.833768
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 #4 [hci0] 9.834745
LE Set Scan Enable (0x08|0x000c) ncmd 2
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 29 #5 [hci0] 9.893808
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: 4E:4A:CC:0C:78:46 (Resolvable)
Data length: 17
Flags: 0x1a
LE General Discoverable Mode
Simultaneous LE and BR/EDR (Controller)
Simultaneous LE and BR/EDR (Host)
TX power: 12 dBm
Company: Apple, Inc. (76)
Type: Unknown (16)
Data: 501cf52e89
RSSI: -79 dBm (0xb1)
> HCI Event: LE Meta Event (0x3e) plen 28 #6 [hci0] 10.019799
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: 58:66:E9:A5:2D:DB (Resolvable)
Data length: 16
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
Service Data (UUID 0xfe2c): 0000
TX power: -10 dBm
Service Data (UUID 0xfe03):
RSSI: -82 dBm (0xae)
> HCI Event: LE Meta Event (0x3e) plen 43 #7 [hci0] 10.058806
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: EF:51:CD:3C:7E:8F (Static)
Data length: 31
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
Company: Anhui Huami Information Technology Co., Ltd. (343)
Data: 02ffffffffffffffffffffffffffffffff03ef51cd3c7e8f
RSSI: -72 dBm (0xb8)
> HCI Event: LE Meta Event (0x3e) plen 40 #8 [hci0] 10.079812
LE Advertising Report (0x02)
Num reports: 1
Event type: Scannable undirected - ADV_SCAN_IND (0x02)
Address type: Random (0x01)
Address: 79:F9:F9:87:54:DA (Resolvable)
Data length: 28
16-bit Service UUIDs (complete): 1 entry
Google (0xfe9f)
Service Data (UUID 0xfe9f): 0000000000000000000000000000000000000000
RSSI: -79 dBm (0xb1)
> HCI Event: LE Meta Event (0x3e) plen 20 #9 [hci0] 10.480812
LE Advertising Report (0x02)
Num reports: 1
Event type: Non connectable undirected - ADV_NONCONN_IND (0x03)
Address type: Random (0x01)
Address: C8:38:3A:F0:5A:7F (Static)
Data length: 8
Company: Apple, Inc. (76)
Type: Unknown (18)
Data: 0001
RSSI: -87 dBm (0xa9)
> HCI Event: LE Meta Event (0x3e) plen 43 #10 [hci0] 11.205858
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: F8:C3:D1:B0:5A:3A (Static)
Data length: 31
Flags: 0x02
LE General Discoverable Mode
Company: Anhui Huami Information Technology Co., Ltd. (343)
Data: 02ffffffffffffffffffffffffffffffff03f8c3d1b05a3a
RSSI: -57 dBm (0xc7)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11 [hci0] 11.205957
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 #12 [hci0] 11.258813
LE Set Scan Enable (0x08|0x000c) ncmd 2
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 #13 [hci0] 11.258884
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Filter policy: Accept list is not used (0x00)
Peer address type: Random (0x01)
Peer address: F8:C3:D1:B0:5A:3A (Static)
Own address type: Public (0x00)
Min connection interval: 30.00 msec (0x0018)
Max connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4 #14 [hci0] 11.259812
LE Create Connection (0x08|0x000d) ncmd 2
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19 #15 [hci0] 12.060874
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 3585
Role: Central (0x00)
Peer address type: Random (0x01)
Peer address: F8:C3:D1:B0:5A:3A (Static)
Connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Central clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 44 {0x0001} [hci0] 12.060941
LE Address: F8:C3:D1:B0:5A:3A (Static)
Flags: 0x00000008
Connection Locally Initiated
Data length: 31
Flags: 0x02
LE General Discoverable Mode
Company: Anhui Huami Information Technology Co., Ltd. (343)
Data: 02ffffffffffffffffffffffffffffffff03f8c3d1b05a3a
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 #16 [hci0] 12.061170
Handle: 3585
> HCI Event: Command Status (0x0f) plen 4 #17 [hci0] 12.061869
LE Read Remote Used Features (0x08|0x0016) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 12 #18 [hci0] 12.107883
LE Read Remote Used Features (0x04)
Status: Success (0x00)
Handle: 3585
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
LE Encryption
< HCI Command: LE Start Encryption (0x08|0x0019) plen 28 #19 [hci0] 12.107977
Handle: 3585
Random number: 0x200e8e7861b656fa
Encrypted diversifier: 0xa313
Long term key: 70ff87784e4a4394af70214bedf33a1d
> HCI Event: Command Status (0x0f) plen 4 #20 [hci0] 12.108868
LE Start Encryption (0x08|0x0019) ncmd 1
Status: Success (0x00)
> HCI Event: Encryption Change (0x08) plen 4 #21 [hci0] 12.506947
Status: Success (0x00)
Handle: 3585
Encryption: Enabled with AES-CCM (0x01)
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #22 [hci0] 12.507730
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
> ACL Data RX: Handle 3585 flags 0x02 dlen 7 #23 [hci0] 12.556081
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 247
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #24 [hci0] 12.556256
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 247
> HCI Event: Number of Completed Packets (0x13) plen 5 #25 [hci0] 12.557869
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #26 [hci0] 12.606870
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 7 #27 [hci0] 12.655972
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 252
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #28 [hci0] 12.656235
ATT: Read Request (0x0a) len 2
Handle: 0x0032
> HCI Event: Number of Completed Packets (0x13) plen 5 #29 [hci0] 12.705870
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 12 #30 [hci0] 12.755936
ATT: Read Response (0x0b) len 7
Value: 01570140000101
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #31 [hci0] 12.756045
ATT: Read Request (0x0a) len 2
Handle: 0x0016
> HCI Event: Number of Completed Packets (0x13) plen 5 #32 [hci0] 12.805900
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 19 #33 [hci0] 12.856058
ATT: Read Response (0x0b) len 14
Value: 416d617a66697420475452203200
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #34 [hci0] 12.856400
ATT: Read Request (0x0a) len 2
Handle: 0x0018
> HCI Event: Number of Completed Packets (0x13) plen 5 #35 [hci0] 12.905890
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 7 #36 [hci0] 15.256110
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 247
< ACL Data TX: Handle 3585 flags 0x00 dlen 7 #37 [hci0] 15.256346
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 247
> HCI Event: Number of Completed Packets (0x13) plen 5 #38 [hci0] 15.306998
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #39 [hci0] 16.006117
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Characteristic (0x2803)
< ACL Data TX: Handle 3585 flags 0x00 dlen 27 #40 [hci0] 16.006335
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 #41 [hci0] 16.006347
< ACL Data TX: Handle 3585 flags 0x01 dlen 8 #42 [hci0] 16.006351
ATT: Read By Type Response (0x09) len 57
Attribute data length: 7
Attribute data list: 8 entries
Handle: 0x0002
Value: 020300002a
Handle: 0x0004
Value: 020500012a
Handle: 0x0006
Value: 020700a62a
Handle: 0x0009
Value: 200a00052a
Handle: 0x000c
Value: 0a0d00292b
Handle: 0x000e
Value: 020f002a2b
Handle: 0x0010
Value: 0211003a2b
Handle: 0x0013
Value: 021400502a
> HCI Event: Number of Completed Packets (0x13) plen 5 #43 [hci0] 16.057055
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #44 [hci0] 16.058037
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #45 [hci0] 16.059032
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #46 [hci0] 16.106108
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0014-0xffff
Attribute type: Characteristic (0x2803)
< ACL Data TX: Handle 3585 flags 0x00 dlen 9 #47 [hci0] 16.106365
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x0014
Error: Attribute Not Found (0x0a)
> HCI Event: Number of Completed Packets (0x13) plen 5 #48 [hci0] 16.157103
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #49 [hci0] 16.206140
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Device Name (0x2a00)
< ACL Data TX: Handle 3585 flags 0x00 dlen 18 #50 [hci0] 16.206737
ATT: Read By Type Response (0x09) len 13
Attribute data length: 12
Attribute data list: 1 entry
Handle: 0x0003
Value: 426c75655a20352e3633
> HCI Event: Number of Completed Packets (0x13) plen 5 #51 [hci0] 16.257082
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #52 [hci0] 19.438030
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Characteristic (0x2803)
< ACL Data TX: Handle 3585 flags 0x00 dlen 27 #53 [hci0] 19.438239
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 #54 [hci0] 19.438255
< ACL Data TX: Handle 3585 flags 0x01 dlen 8 #55 [hci0] 19.438260
ATT: Read By Type Response (0x09) len 57
Attribute data length: 7
Attribute data list: 8 entries
Handle: 0x0002
Value: 020300002a
Handle: 0x0004
Value: 020500012a
Handle: 0x0006
Value: 020700a62a
Handle: 0x0009
Value: 200a00052a
Handle: 0x000c
Value: 0a0d00292b
Handle: 0x000e
Value: 020f002a2b
Handle: 0x0010
Value: 0211003a2b
Handle: 0x0013
Value: 021400502a
> HCI Event: Number of Completed Packets (0x13) plen 5 #56 [hci0] 19.457169
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #57 [hci0] 19.458229
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #58 [hci0] 19.459252
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #59 [hci0] 19.506287
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0014-0xffff
Attribute type: Characteristic (0x2803)
< ACL Data TX: Handle 3585 flags 0x00 dlen 9 #60 [hci0] 19.506388
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x0014
Error: Attribute Not Found (0x0a)
> HCI Event: Number of Completed Packets (0x13) plen 5 #61 [hci0] 19.557245
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 11 #62 [hci0] 19.606321
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Device Name (0x2a00)
< ACL Data TX: Handle 3585 flags 0x00 dlen 18 #63 [hci0] 19.606726
ATT: Read By Type Response (0x09) len 13
Attribute data length: 12
Attribute data list: 1 entry
Handle: 0x0003
Value: 426c75655a20352e3633
> HCI Event: Number of Completed Packets (0x13) plen 5 #64 [hci0] 19.657210
Num handles: 1
Handle: 3585
Count: 1
< HCI Command: Disconnect (0x01|0x0006) plen 3 #65 [hci0] 44.885194
Handle: 3585
Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4 #66 [hci0] 45.006315
Disconnect (0x01|0x0006) ncmd 1
Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4 #67 [hci0] 45.008258
Status: Success (0x00)
Handle: 3585
Reason: Connection Terminated By Local Host (0x16)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 45.008311
LE Address: F8:C3:D1:B0:5A:3A (Static)
Reason: Connection terminated by local host (0x02)
next prev parent reply other threads:[~2022-03-23 13:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 18:44 GATT issue, possible bluez bug? Adam Pigg
2022-03-22 0:43 ` Luiz Augusto von Dentz
2022-03-22 6:04 ` Luiz Augusto von Dentz
2022-03-22 7:55 ` Adam Pigg
2022-03-22 10:40 ` Adam Pigg
2022-03-22 21:35 ` Luiz Augusto von Dentz
2022-03-22 23:09 ` Adam Pigg
2022-03-22 23:35 ` Luiz Augusto von Dentz
2022-03-22 23:43 ` Luiz Augusto von Dentz
2022-03-23 9:11 ` Adam Pigg
2022-03-23 13:36 ` Adam Pigg [this message]
2022-03-23 14:46 ` Adam Pigg
2022-03-23 19:45 ` Luiz Augusto von Dentz
2022-03-23 19:52 ` Luiz Augusto von Dentz
2022-03-23 19:57 ` Adam Pigg
2022-03-28 16:37 ` Adam Pigg
2022-04-01 20:12 ` Adam Pigg
2022-04-01 21:49 ` Luiz Augusto von Dentz
2022-04-02 8:26 ` Adam Pigg
2022-04-02 9:14 ` Adam Pigg
2022-04-04 19:07 ` Adam Pigg
2022-04-04 20:12 ` Luiz Augusto von Dentz
2022-04-04 20:24 ` Adam Pigg
2022-04-04 20:29 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANFkB1zMOYTD8ZsDHczHqce9ipgyu9-fEeXEZqTzuf=T4UufLQ@mail.gmail.com' \
--to=adam@piggz.co.uk \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.