This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM368 WL1271 Bluetooth (GATT BLE) conflict with wireless

Other Parts Discussed in Thread: WL1271

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

  • Hi David,

    Can you please share the LE connection parameters (scan interval/window/ etc)?

    Regards,
    Gigi Joseph.
  • Thanks for the response Joseph, do you know offhand where I could locate those connection parameters?

    EDIT: nevermind, figured out how to find them I think:

    / # hciconfig hci0 inqparms
    hci0:   Type: BR/EDR  Bus: UART
            BD Address: 50:72:24:16:2B:A7  ACL MTU: 1021:4  SCO MTU: 180:4
            Inquiry interval: 4096 slots (2560.00 ms), window: 18 slots (11.25 ms)
    / # hciconfig hci0 pageparms
    hci0:   Type: BR/EDR  Bus: UART
            BD Address: 50:72:24:16:2B:A7  ACL MTU: 1021:4  SCO MTU: 180:4
            Page interval: 2048 slots (1280.00 ms), window: 18 slots (11.25 ms)


    Here's some info from my system that might be relevant that I could find:

    hci0:   Type: BR/EDR  Bus: UART
            BD Address: 50:72:24:16:2B:A7  ACL MTU: 1021:4  SCO MTU: 180:4
            UP RUNNING PSCAN ISCAN
            RX bytes:1262 acl:0 sco:0 events:69 errors:0
            TX bytes:2223 acl:0 sco:0 commands:69 errors:0
            Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
            Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
            Link policy: RSWITCH HOLD SNIFF
            Link mode: SLAVE ACCEPT
            Name: 'test123'
            Class: 0x100100
            Service Classes: Object Transfer
            Device Class: Computer, Uncategorized
            HCI Version: 4.0 (0x6)  Revision: 0x0
            LMP Version: 4.0 (0x6)  Subversion: 0x1f5d
            Manufacturer: Texas Instruments Inc. (13)

    /sys/devices/virtual/bluetooth/hci0 # cat address
    a7:2b:16:24:72:50
    /sys/devices/virtual/bluetooth/hci0 # cat bus
    UART
    /sys/devices/virtual/bluetooth/hci0 # cat class
    0x100100
    /sys/devices/virtual/bluetooth/hci0 # cat features
    0xfffe2dfedbff7b87
    /sys/devices/virtual/bluetooth/hci0 # cat hci_revision
    0
    /sys/devices/virtual/bluetooth/hci0 # cat hci_version
    6
    /sys/devices/virtual/bluetooth/hci0 # cat idle_timeout
    0
    /sys/devices/virtual/bluetooth/hci0 # cat manufacturer
    13
    /sys/devices/virtual/bluetooth/hci0 # cat sniff_max_interval
    800
    /sys/devices/virtual/bluetooth/hci0 # cat sniff_min_interval
    80
    /sys/devices/virtual/bluetooth/hci0 # cat type
    BR/EDR
    /sys/devices/virtual/bluetooth/hci0 # cat uevent
    DEVTYPE=host

  • Hi,

    It doesn't have information on what I'm looking for. It depends on which stack that you use?
    Can you share the full snoop logs (hcidump -x -w <file name>) - right from BT turn on? Please share it in snoop format itself

    Regards,
    Gigi Joseph.
  • btsnoop��ӗ�����-���{��ӗ��v�ӗ���
    ]�ӗ�ׅ	
    
    �ӗ���
    	�+$rP�ӗ����ӗ�$����ӗ�%�#
    
    �ӗ�K�#�ӗ�L����ӗ���$rP�l@�y����+�p��A�H@!������@�j !��2��=� ����@�P��xC� ��1���A�G@!��p@�j !��2��(�@�j 	!��2��!�@�j !��2���@�j !�� p���p��np���nr ����0��P�<p���2 �@`�ӗ���%		�ӗ��G%`�ӗ����ӗ�W�ӗ�}�ӗ�6l�ӗ�7�ӗ�]t�ӗ�^)F�ӗ���F�ӗ��; 
    
    �ӗ��� �ӗ��G �ӗ�Ҡ �ӗ��W �ӗ��� �ӗ��l �ӗ� � �ӗ�!u �ӗ�G� ����ӗ�Hy������=�ӗ�n��ӗ�o� �ӗ��� �ӗ���GG�ӗ��
    D�������������?���a������ӗ���R��ӗ�2VR�ӗ�3E�ӗ�YDE�ӗ�Y�X�ӗ��FX�ӗ����ӗ��c�ӗ���		�ӗ����ӗ�ϐ�ӗ���$$�ӗ��?  
    �ӗ�� �ӗ��@�ӗ������ӗ�)��dm365-0�ӗ���$$�ӗ�ߟ  
    	dm365-0�ӗ� �ӗ�V�ӗ�,�V�ӗ�-�m�ӗ�S�m�ӗ�T�$�ӗ�z�$���ӗ�{�R�	dm365-0
    ��ӗ���R���ӗ���CNT20160210-02�ӗ�*�ӗ��
     �ӗ�y
     $$�ӗ�[  
    	CNT20160210-02�ӗ�,� �ӗ��$�ӗ�$���ӗ��R�	CNT20160210-02
    
    ��ӗ�BR���ӗ�R�	CNT20160210-02
    ��ӗ��R�ә5�>��a�OH�ә��$��ә~���әk$(�ә	
    �әɺ�ә8}�$*�ә8��	CNT20160210-02�ә:��ә��$
    �ә����ә�m
    btsnoop��ӗyp��ӗy���-���{��ӗy���ӗz,
    ]�ӗz�	
    
    �ӗz,I
    	�+$rP�ӗz/'�ӗzSU���ӗzT#
    
    �ӗzzm#�ӗz{-���ӗz�o�$rP�l@�y����+�p��A�H@!������@�j !��2��=� ����@�P��xC� ��1���A�G@!��p@�j !��2��(�@�j 	!��2��!�@�j !��2���@�j !�� p���p��np���nr ����0��P�<p���2 �@`�ӗz�+%		�ӗ{�%`�ӗ{[�ӗ{=��ӗ{>i}�ӗ{d��ӗ{ex�ӗ{���ӗ{��F�ӗ{��F�ӗ{�� 
    
    �ӗ{�� �ӗ{ڰ �ӗ| �ӗ|� �ӗ|( �ӗ|(� �ӗ|O, �ӗ|O� �ӗ|v6 ����ӗ|v�������=�ӗ|�K�ӗ|�� �ӗ|�W �ӗ|�GG�ӗ|�^D�������������?���a������ӗ|�R��ӗ}`�R�ӗ}a=E�ӗ}��E�ӗ}��X�ӗ}��X�ӗ}�q�ӗ}���ӗ}�D		�ӗ}���ӗ}���ӗ~#�$$�ӗ~$�  
    �ӗ~J� �ӗ~�
    �ӗ~�D���ӗ�K_�dm365-0�ӗ��$$�ӗ��<  
    	dm365-0�ӗ�� �ӗ�.JV�ӗ�[>V�ӗ�\6m�ӗ��m���ӗ���R�	dm365-0
    ��ӗ�?R�ӗ��$�ӗ�E]$���ӗ���CNT20160210-02�ӗܾ��ӗ��
     �ӗ�3�
     $$�ӗ�4�  
    	CNT20160210-02�ӗ�[( �ӗ�5�$�ӗ�E�$���ӗ�FiR�	CNT20160210-02
    
    ��ӗ޿mR���ӗ�LJR�	CNT20160210-02
    ��ӗ�/�R�Ӟs��>_Z2x>HH�ӞuH)$��Ӟuoc��Ӟv2�$(�Ӟv=^	
    �Ӟw��Ӟ��C$*�Ӟ��L	CNT20160210-02�Ӟ��r�Ӟ��
    Thanks for the response,

    I'm using bluez 4.101, hciconfig should have the ability to bring up those settings right? Also I attached two snoop logs (extensions changed to .txt as e2e has file extension restrictions) one with a valid connection that doesn't disconnect, and another with wpa_supplicant running without a valid connection to a wireless network that does disconnect the BLE connection. I didn't see any that stood out in the logs myself, do you think it would be worth checking out with a USB ble sniffer on my workstation? Also, do you think it's possible that something on the WLAN side is causing the disconnects?

    Thanks,

    David

  • Hi David,

    I couldn't see the BLE link getting disconnected in either of the logs.
    How are you verifying if the link disconnected?

    Please also confirm if you're using the latest BT & WLAN service packs.

    Regards,
    Gigi Joseph.
  • Hey Gigi,

    Event 88 in the wpa_sup snoop file does indicate a disconnect, right?

    I'm using the latest BT firmware from LSR (480-0025-R3.0), I'll have to verify the versioning on my WLAN end.


    Thanks,

    David

  • Hi David,

    Yes, sorry I overlooked that.
    So, to confirm, you have an issue in wpa_supplicant not connected scenario?

    Please confirm the WLAN driver/firmware version. It should be R5.SP8 & 6.3.10.0.141
    I'm also not sure how recent is the BT SP. Please try the latest from: git.ti.com/.../initscripts

    Regards,
    Gigi Joseph.