Hey everyone,
I'm running a GATT server over BLE with bluez 4.101 and have noticed a strange issue. The issue appears whenever I have the server running along with the wireless module and wpa_supplicant active but not connected to a network. When this happens, any connections to the BLE GATT server will be terminated every few seconds. What's odd is that this behavior doesn't occur when the module is active and connected to a wireless network, in which case it seems to function normally. The GATT connection is also steady whenever wpa_supplicant isn't running. GATT over legacy bluetooth doesn't seem to be affected. I've been testing with an ipad and will report back when I am able to test against an android phone over BLE. I'm currently running on a DM368 processor with a 2.6.32 linux kernel, and have backported the bluetooth modules from backports 3.12.2. The wireless module we're using is the LSR TiWi WL1271.
Some logs from hcidump:
GATT connect with wpa_supplicant running but not connected to network:
> HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 1025, role slave
bdaddr 6B:CA:2B:2A:19:57 (Random)
> ACL data: handle 1025 flags 0x02 dlen 7
ATT: MTU req (0x02)
client rx mtu 158
< ACL data: handle 1025 flags 0x00 dlen 7
ATT: MTU resp (0x03)
server rx mtu 672
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0010, end 0x0010
type-uuid 0x2803
< ACL data: handle 1025 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0010
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 2
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0008
type-uuid 0x2a00
< ACL data: handle 1025 flags 0x00 dlen 15
ATT: Read By Type resp (0x09)
length: 9
handle 0x0006, value 0x64 0x6d 0x33 0x36 0x35 0x2d 0x30
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1025 reason 0x08
Reason: Connection Timeout
GATT connect without wpa_supplicant running:
> HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x00
/ # > HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 1025, role slave
bdaddr 6B:CA:2B:2A:19:57 (Random)
> ACL data: handle 1025 flags 0x02 dlen 7
ATT: MTU req (0x02)
client rx mtu 158
< ACL data: handle 1025 flags 0x00 dlen 7
ATT: MTU resp (0x03)
server rx mtu 672
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0010, end 0x0010
type-uuid 0x2803
< ACL data: handle 1025 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0010
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 2
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0008
type-uuid 0x2a00
< ACL data: handle 1025 flags 0x00 dlen 15
ATT: Read By Type resp (0x09)
length: 9
handle 0x0006, value 0x64 0x6d 0x33 0x36 0x35 0x2d 0x30
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 1
GATT connect with wpa_supplicant running and connected to a network:
> HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 1025, role slave
bdaddr 70:46:F0:DB:FA:40 (Random)
> ACL data: handle 1025 flags 0x02 dlen 7
ATT: MTU req (0x02)
client rx mtu 158
< ACL data: handle 1025 flags 0x00 dlen 7
ATT: MTU resp (0x03)
server rx mtu 672
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0010, end 0x0010
type-uuid 0x2803
< ACL data: handle 1025 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0010
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 2
> ACL data: handle 1025 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0008
type-uuid 0x2a00
< ACL data: handle 1025 flags 0x00 dlen 22
ATT: Read By Type resp (0x09)
length: 16
handle 0x0006, value 0x43 0x4e 0x54 0x32 0x30 0x31 0x36 0x30 0x32 0x31 0x30 0x2d 0x30 0x31
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 1025 packets 1
Any ideas or suggestions?
Thanks for the assistance,
David