Hey Matthias,
Thanks for getting back to me.
I've got an ESP32-based device I am trying to emulate, which is why I am looking for this admittedly odd behavior.
From a packet capture with the device in question, I see the following:
No. Time Source Destination Protocol Length VLAN TZSP Info
1 0.000000 controller host HCI_EVT 53 Rcvd LE Meta (LE Extended Advertising Report)
2 0.000868 controller host HCI_EVT 28 Rcvd LE Meta (LE Extended Advertising Report)
3 6.038913 controller host HCI_EVT 53 Rcvd LE Meta (LE Extended Advertising Report)
4 7.048878 controller host HCI_EVT 33 Rcvd LE Meta (LE Enhanced Connection Complete [v1])
5 7.070540 localhost () e2:cc:83:7b:41:da () ATT 11 Sent Exchange MTU Request, Client Rx MTU: 517
6 7.072923 e2:cc:83:7b:41:da () localhost () SMP 10 Rcvd Security Request: AuthReq: Bonding, SecureConnection
7 7.072969 localhost () e2:cc:83:7b:41:da () SMP 15 Sent Pairing Request: AuthReq: Bonding, SecureConnection | Initiator Key(s): LTK, CSRK, Linkkey | Responder Key(s): LTK, IRK, CSRK, Linkkey
8 7.116927 e2:cc:83:7b:41:da () localhost () ATT 11 Rcvd Exchange MTU Response, Server Rx MTU: 252
9 7.117208 localhost () e2:cc:83:7b:41:da () ATT 15 Sent Read By Type Request, Server Supported Features, Handles: 0x0001..0xffff
10 7.250923 e2:cc:83:7b:41:da () localhost () SMP 15 Rcvd Pairing Response: AuthReq: Bonding, SecureConnection | Initiator Key(s): <none> | Responder Key(s): <none>
11 7.250928 e2:cc:83:7b:41:da () localhost () ATT 13 Rcvd Error Response - Attribute Not Found, Handle: 0x0001 (Unknown)
12 7.258361 localhost () e2:cc:83:7b:41:da () SMP 73 Sent Pairing Public Key
13 7.258582 localhost () e2:cc:83:7b:41:da () ATT 15 Sent Read By Type Request, Database Hash, Handles: 0x0001..0xffff
14 7.340928 e2:cc:83:7b:41:da () localhost () HCI_ACL 31 Rcvd [Reassembled in #16]
15 7.340934 e2:cc:83:7b:41:da () localhost () HCI_ACL 31 Rcvd [Continuation to #14] [Reassembled in #16]
16 7.340934 e2:cc:83:7b:41:da () localhost () SMP 19 Rcvd Pairing Public Key
17 7.342924 e2:cc:83:7b:41:da () localhost () SMP 25 Rcvd Pairing Confirm
18 7.342927 e2:cc:83:7b:41:da () localhost () ATT 28 Rcvd Read By Type Response, Attribute List Length: 1
19 7.345220 localhost () e2:cc:83:7b:41:da () SMP 25 Sent Pairing Random
20 7.345624 localhost () e2:cc:83:7b:41:da () ATT 15 Sent Read By Type Request, Database Hash, Handles: 0x0009..0xffff
21 7.386914 e2:cc:83:7b:41:da () localhost () SMP 25 Rcvd Pairing Random
22 7.430921 e2:cc:83:7b:41:da () localhost () ATT 13 Rcvd Error Response - Attribute Not Found, Handle: 0x0009 (Unknown)
23 7.443811 localhost () e2:cc:83:7b:41:da () ATT 12 Sent Write Request, Handle: 0x0006 (Unknown)
24 7.520936 e2:cc:83:7b:41:da () localhost () ATT 9 Rcvd Write Response, Handle: 0x0006 (Unknown)
25 7.521270 localhost () e2:cc:83:7b:41:da () ATT 13 Sent Write Request, Handle: 0x0004 (Unknown)
26 7.745914 e2:cc:83:7b:41:da () localhost () ATT 9 Rcvd Write Response, Handle: 0x0004 (Unknown)
27 7.746342 localhost () e2:cc:83:7b:41:da () ATT 11 Sent Read Request, Handle: 0x000b (Unknown)
28 7.836069 e2:cc:83:7b:41:da () localhost () ATT 21 Rcvd Read Response, Handle: 0x000b (Unknown)
29 7.836689 localhost () e2:cc:83:7b:41:da () ATT 11 Sent Read Request, Handle: 0x000d (Unknown)
30 7.925952 e2:cc:83:7b:41:da () localhost () ATT 11 Rcvd Read Response, Handle: 0x000d (Unknown)
31 7.926378 localhost () e2:cc:83:7b:41:da () ATT 11 Sent Read Request, Handle: 0x000f (Unknown)
32 8.015946 e2:cc:83:7b:41:da () localhost () ATT 17 Rcvd Read Response, Handle: 0x000f (Unknown)
Which seems to indicate it won't respond with any attributes until bonded (from the fact it replies with attribute not found for 0x0001 in packet 11, although I could be mistaken). Also, it seems to send a security request immediately upon connection which is interesting. I assume this is something I could do myself inside one of BTstack's callbacks?
Appreciate the help!
Joe