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.

CC2651R3: Connection establishment fails with GATT ERROR 133

Expert 1760 points
Part Number: CC2651R3
Other Parts Discussed in Thread: SYSCONFIG

Hi guys,

I use BLE SDK 5.40. When I try connecting my device with nRF mobile app, it disconnects immediately throwing Error 133 - GATT ERROR.

I changed the LFClock source to LF RCOSC instead of LF XCOSC in Device configuration and tried ( as per the answer in the below link -> https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1026856/cc2640r2f-error-on-connecting-error-133-0x85-gatt-error ). Then I'm able to Connect it successfully.

May I know what is the reason behind ?

Thanks.

  • Hey Ddnr,

    What hardware are you using? Is it a custom board?

    As stated in this related post, GATT ERROR 133 is a generic error. Can you provide sniffer logs of the connection? I assume the device you are running on is an Android device. Is that correct?

  • Hi Ammar,

    Yes, I'm working on a custom board based on CC2651R3.

    I use an Android device to connect to our product.

    I didn't get what sniffer logs you mean?

    Do you mean the Connection logs from nRF app?

  • Hey Ddnr,

    I didn't get what sniffer logs you mean?

    Any Bluetooth LE sniffer logs, preferably an Ellisys or Frontline sniffer log.

    Do you mean the Connection logs from nRF app?

    This could potentially shed some light on the issue, but it may not get us too far in finding a root cause.

    Yes, I'm working on a custom board based on CC2651R3.

    When using a custom board, have you set the correct sleep clock accuracy? If it diverges from TI's reference design, then you may need to explicitly configure it in the BLE5-stack. You can do this by calling HCI_EXT_SetSCACmd() and pass in the PPM value. This could be the reason the device immediately disconnects upon a connection.

  • Hi Ammar,

    I only have TI packet sniffer as of now. But I will try to provide later on.

    Is it possible to set SCA directly in sysconfig?

    I think SCA is the issue.  But SCA is only need to be set if we run the BLE without 32kHz crystal ( using internal RC) ?

    Please find the nrf app logs below:

    ""

    nRF Connect, 2022-04-22
    Simple Peripheral (F0:F8:F2:2C:20:2E)
    I 09:35:13.209 [Server] Server started
    V 09:35:13.221 Unknown Service (f0001130-0451-4000-b000-000000000000)
    - Unknown Characteristic [N R WNR] (f0001132-0451-4000-b000-000000000000)
       Client Characteristic Configuration (0x2902)
    - Unknown Characteristic [R W] (f0001131-0451-4000-b000-000000000000)
    V 09:35:13.578 Connecting to F0:F8:F2:2C:20:2E...
    D 09:35:13.578 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 09:35:19.394 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I 09:35:19.394 [Server] Device disconnected
    D 09:35:19.439 [Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E 09:35:19.439 Error 133 (0x85): GATT ERROR
    I 09:35:19.439 Disconnected
    D 09:35:26.277 gatt.close()
    D 09:35:26.285 wait(200)
    V 09:35:26.487 Connecting to F0:F8:F2:2C:20:2E...
    D 09:35:26.488 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D 09:35:29.529 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 09:35:29.529 [Server] Device with address F0:F8:F2:2C:20:2E connected
    D 09:35:29.620 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D 09:35:29.682 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I 09:35:29.682 Connected to F0:F8:F2:2C:20:2E
    V 09:35:29.685 Requesting new MTU...
    D 09:35:29.685 gatt.requestMtu(517)
    W 09:35:29.820 Connection parameters update failed with status 30 (interval: 48.75ms, latency: 0, timeout: 5000ms)
    E 09:35:29.822 Error 30 (0x1e): HCI ERROR INVALID LMP PARAM
    I 09:35:31.371 Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
    I 09:35:31.467 MTU changed to: 65
    V 09:35:31.500 Discovering services...
    D 09:35:31.500 gatt.discoverServices()
    D 09:35:31.519 [Callback] Services discovered with status: 0
    I 09:35:31.519 Services discovered
    V 09:35:31.542 Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R W] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    - Resolvable Private Address Only [R] (0x2AC9)
    Generic Attribute (0x1801)
    Device Information (0x180A)
    - System ID [R] (0x2A23)
    - Model Number String [R] (0x2A24)
    - Serial Number String [R] (0x2A25)
    - Firmware Revision String [R] (0x2A26)
    - Hardware Revision String [R] (0x2A27)
    - Software Revision String [R] (0x2A28)
    - Manufacturer Name String [R] (0x2A29)
    - IEEE 11073-20601 Regulatory Certification Data List [R] (0x2A2A)
    - PnP ID [R] (0x2A50)
    Unknown Service (0000fde8-0000-1000-8000-00805f9b34fb)
    - Unknown Characteristic [I W] (02a6c0d2-0451-4000-b000-fb3210111989)
       Client Characteristic Configuration (0x2902)
       Characteristic User Description (0x2901)
    D 09:35:31.542 gatt.setCharacteristicNotification(02a6c0d2-0451-4000-b000-fb3210111989, true)
    I 09:35:35.761 Connection parameters updated (interval: 991.25ms, latency: 0, timeout: 6000ms)
    V 09:36:27.529 [Server] Cancelling server connection...
    D 09:36:27.529 server.cancelConnection(device)
    V 09:36:27.562 Disconnecting...
    D 09:36:27.562 gatt.disconnect()
    D 09:36:27.598 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I 09:36:27.598 Disconnected
    D 09:36:29.307 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    I 09:36:29.307 [Server] Device disconnected
    D 09:36:29.389 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
      ""

  • Hello,

    If you are using the device without an external crystal, then yes the change you made is necessary to use  LF RCOSC . You do not need to set the SCA cmd if you are using the internal crystal.

    For more info, take a look at www.ti.com/.../swra499c