This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Device disconnects while writing to control point characteristics of cycling power service.

Hi,

We are developing the cycle power services and facing the issues in using the control point characteristic. I am able to connect and observe all the characteristics in the 'nRF_connect' . But when tried to write the control point characteristics to request the procedure, it gets disconnected. The 'nRF_logger' reports...

[server] Device disconnected

Error 133 (0x85): GATT ERROR

Error 22 (0x16):  GATT CONN TERMINATE LOCAL HOST

Disconnected

We are using Soft Device S332 with sdk version 15.3.0 on nRF52-DK.

How can we solve the issue?

Regards,

Malti 

  • Hello,

    Do you have an on-air sniffer log?

    Is there any asserts in the nRF52 application? Check fault handler for error code, line number and file name. https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/an-introduction-to-error-handling-in-nrf5-projects 

    Best regards,
    Kenneth

  • Hi Kenneth,

    Please find the attached log file from the 'nRF_Logger' App.

    We have seen the error related details(error code, line number and file name) during development, But not seeing any details about this error, It just sends the message 'Disconnected' to serial terminal. Is there anything we need to enable/configure to get details about all the errors.

    nRF Connect, 2019-11-21
    Pddl (E7:87:A6:3B:10:2C)
    V	07:55:37.194	Connecting to E7:87:A6:3B:10:2C...
    D	07:55:37.195	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	07:55:37.590	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	07:55:37.592	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	07:55:37.592	Connected to E7:87:A6:3B:10:2C
    V	07:55:37.623	Discovering services...
    D	07:55:37.623	gatt.discoverServices()
    I	07:55:37.926	Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
    D	07:55:38.405	[Callback] Services discovered with status: 0
    I	07:55:38.405	Services discovered
    V	07:55:38.437	Generic Access (0x1800)
    - Device Name [R W] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    - Central Address Resolution [R] (0x2AA6)
    Generic Attribute (0x1801)
    Cycling Power (0x1818)
    - Cycling Power Measurement [N] (0x2A63)
     Client Characteristic Configuration (0x2902)
    - Cycling Power Feature [R] (0x2A65)
    - Sensor Location [R] (0x2A5D)
    - Cycling Power Control Point [I W] (0x2A66)
     Client Characteristic Configuration (0x2902)
    Battery Service (0x180F)
    - Battery Level [N R] (0x2A19)
     Client Characteristic Configuration (0x2902)
    Device Information (0x180A)
    - Manufacturer Name String [R] (0x2A29)
    D	07:55:38.438	gatt.setCharacteristicNotification(00002a63-0000-1000-8000-00805f9b34fb, true)
    D	07:55:38.443	gatt.setCharacteristicNotification(00002a66-0000-1000-8000-00805f9b34fb, true)
    D	07:55:38.445	gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
    I	07:55:38.457	Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
    I	07:55:43.290	Connection parameters updated (interval: 997.5ms, latency: 0, timeout: 4000ms)
    V	07:55:46.212	Enabling indications for 00002a66-0000-1000-8000-00805f9b34fb
    D	07:55:46.212	gatt.setCharacteristicNotification(00002a66-0000-1000-8000-00805f9b34fb, true)
    D	07:55:46.213	gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0200)
    I	07:55:47.579	Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-00
    A	07:55:47.579	"Indications enabled" sent
    V	07:55:47.595	Indications enabled for 00002a66-0000-1000-8000-00805f9b34fb
    V	07:55:57.879	Writing request to characteristic 00002a66-0000-1000-8000-00805f9b34fb
    D	07:55:57.879	gatt.writeCharacteristic(00002a66-0000-1000-8000-00805f9b34fb, value=0x0C)
    E	07:56:28.086	Error 133 (0x85): GATT ERROR
    D	07:56:28.105	[Callback] Connection state changed with status: 22 and new state: DISCONNECTED (0)
    E	07:56:28.105	Error 22 (0x16): GATT CONN TERMINATE LOCAL HOST
    I	07:56:28.106	Disconnected
    D	07:56:28.689	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    

    With Regards,

    Malti

  • Have you tried to search for 'Error 133 (0x85): GATT ERROR devzone' to see if there are any relevant issues that may apply here?

    I would really like an on-air sniffer log, if you don't have the possibility to do yourself, is there any way you can send me firmware I may run on an nRF52-DK to try to recreate your issue by using nRF Connect on a mobile phone?

  • Please find the attached firmware. Please note that you need to use it with soft device S332.

    ant_bpwr_tx_pca10040_s332.hex

    Thanks and Regards,

    Malti

Related