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.

Connect to CC2564B with gatt (autoConnect = false)

Other Parts Discussed in Thread: MSP430F5438A

Hi TI,

I can connect to the CC2564B with SPPLE_Demo_Lite project on MSP430F5438A only with GATT (autoconnect = true) on Android but at the same time I can connect to your KeyFobDemo trinket with CC254x both with autoconnect = true and autoconnect = false. I try to load KeyFobDemo project to MSP430, but nothing is changed. Is this problem occurs because of the different chips? 

During the connection with autoconnect = false, I see that the some data passes through UART, but no any callback functions have been called.

trinket

  • Hi,

    I'm not sure I understood the question. Can you please elaborate? Also, I would recommend that you check the SPPLE_Demo_Lite instructions at: processors.wiki.ti.com/.../CC256x_TI_Bluetooth_Stack_SPPLEDemo_Lite_App

    Regards,
    Gigi Joseph.
  • My question is: Why I can connect to the CC2564B via BLE only with (autoconnect = true) in GATT connect function in Android Stack?
  • Hi,

    Can you share the android code snippet that you have?
    Do you have some logs that you can share? An android snoop log would do for now.

    Regards,
    Gigi Joseph.
  • www.dropbox.com/.../btsnoop_hci.log

    nRF Master Control Panel, 2015-04-24
    cardberryRed (D0:39:72:CD:83:6C)
    V 15:04:51.555 Connecting to D0:39:72:CD:83:6C...
    D 15:04:51.568 gatt = device.connectGatt(autoConnect = false)
    D 15:04:53.518 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D 15:04:57.633 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D 15:04:57.655 gatt.refresh()
    D 15:05:14.923 gatt.close()
    V 15:05:14.942 Connecting to D0:39:72:CD:83:6C...
    D 15:05:14.953 gatt = device.connectGatt(autoConnect = true)
    D 15:05:15.184 [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
    D 15:05:15.218 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    I 15:05:15.232 Connected to D0:39:72:CD:83:6C
    V 15:05:15.845 Discovering Services...
    D 15:05:15.875 gatt.discoverServices()
    D 15:05:16.792 [Callback] Services discovered with status: 0
    I 15:05:16.823 Services Discovered
    V 15:05:16.847 Generic Attribute (0x1801)
    Generic Access (0x1800)
    - Device Name [R] (0x2A00)
    - Appearance [R] (0x2A01)
    Unknown Service (14839ac4-7d7e-415c-9a42-167340cf2339)
    - Unknown Characteristic [N] (0734594a-a8e7-4b1a-a6b1-cd5243059a57)
       Client Characteristic Configuration (0x2902)
    - Unknown Characteristic [R W WNR] (ba04c4b2-892b-43be-b69c-5d13f2195392)
    - Unknown Characteristic [W] (8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3)
    - Unknown Characteristic [N R] (e06d5efb-4f4a-45c0-9eb1-371ae5a14ad4)
       Client Characteristic Configuration (0x2902)

    From
  • Hi,

    I don't see anything wrong with the snoop logs...

    There is an attempt from the Host to establish a BR/EDR L2CAP connection on PSM: 0x001f (ATT). This is not supported by the remote device (CC256x) and it correctly rejects the connection (Frame# 1461). The Host then disconnects the ACL Link (Frame# 1463)

    Afterwards, it establishes a BLE connection (Frame#1470) which is accepted by the remote. And after the SMP/ Service discovery, the host disconnects (Frame# 1534) which is accepted by CC256x.

    AFAIK, BluetoothDevice.connectGatt() has a fourth parameter "int transport" - you should try that with "TRANSPORT_LE". By default it is set as: TRANSPORT_AUTO and android, for some weird reason, is trying a BR/EDR connection if the remote device is "DEVICE_TYPE_DUAL".

    Regards,
    Gigi Joseph.