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

Not able to write 14 Bytes into Queued Writes module

Hi Nordic,

Please provide the way to debug not able to write 14 Bytes data into Queued Writes module, my application not get any nrf_ble_qwr_on_ble_evt.

[Project Informaiton]
nrf52832 (S132 SoftDevice v6.1.1) + MCU (CXD5602), UART interface to connect between each other.

[Design description]
My application designs both ble_peripheral, and ble_central in one.
I integrate "write-queued-characteristic-with-less-than-20-bytes" solutions into my application.

[sdk_config.h]
#define NRF_BLE_QWR_ENABLED 1
#define NRF_BLE_QWR_MAX_ATTR 1

[Issue description]
Not able write more than 13 Bytes data (while write 14 Bytes, My application stuck) into My applcation with nrf_connect android application
In nrf_connect android application shows log in "Log 2020-01-17 11_37_48.txt"

[Central][Log in nrf_connect android application]
1). write 13 Bytes, result: PASS
V 11:37:05.688 Writing request to characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e
D 11:37:05.688 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e, value=0x31323334353637383930313233)
I 11:37:06.088 Data written to 6e400002-b5a3-f393-e0a9-e50e24dcca9e, value: (0x) 31-32-33-34-35-36-37-38-39-30-31-32-33, "1234567890123"
A 11:37:06.088 "1234567890123" sent

2). write 14 Bytes, result: NG
V 11:37:28.334 Writing request to characteristic 6e400002-b5a3-f393-e0a9-e50e24dcca9e
D 11:37:28.334 gatt.writeCharacteristic(6e400002-b5a3-f393-e0a9-e50e24dcca9e, value=0x3132333435363738393031323334)
D 11:37:32.522 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 11:37:32.522 [Server] Device disconnected
E 11:37:32.538 Error 133 (0x85): GATT ERROR

[Peripheral][Log in my application with nrf52832]
1). write 13 Bytes, result: PASS
[2020-01-17 11:36:49] ble_spresense_handler_on_le_connect_status_change, ble_state_s.ble_connect_handle = 0x0001
[2020-01-17 11:36:49] [BLE_GATT] Connect status ADDR:6D:E1:DE:BF:A7:C3, status:Connected, ble_state->ble_connect_handle = 0x0001
[2020-01-17 11:36:49] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 16
[2020-01-17 11:36:49] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 35
[2020-01-17 11:36:49] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 36
[2020-01-17 11:36:49] Debug : RESP_OK => PHY update request.
[2020-01-17 11:36:49] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 33
[2020-01-17 11:36:50] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 34
[2020-01-17 11:36:50] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 18
[2020-01-17 11:36:51] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 18
[2020-01-17 11:36:55] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 18
[2020-01-17 11:37:07] Debug : RESP_OK => nrf_ble_qwr_on_ble_evt, p_ble_evt->header.evt_id = 81
[2020-01-17 11:37:07] Debug : RESP_OK => BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST
[2020-01-17 11:37:07] Debug : RESP_OK => on_rw_authorize_request, p_auth_req->request.write.op = 0x1
[2020-01-17 11:37:07] Debug : RESP_OK => nrf_ble_qwrs_on_qwr_evt, p_evt->evt_type = 2
[2020-01-17 11:37:07] Debug : RESP_OK => BLE_QWRS_NEW_DATA_RCVD
[2020-01-17 11:37:07] Debug : RESP_OK => 31323334353637383930313233


2). write 14 Bytes, result: NG
My application not show any evt in nrf_ble_qwr_on_ble_evt fuction, I guess while handle 14 Bytes data write request in softdevice has exception.
Please Nordic help to provide me the way to do next debug

[Attached files]
sdk_config.h (#define NRF_BLE_QWR_ENABLED 1 #define NRF_BLE_QWR_MAX_ATTR 1)
nrf_ble_qwr.c
nrf_ble_qwr.h
nrf_ble_qwrs.c
nrf_ble_qwrs.h
ble_wrap_15.c (my application)

Many thanks.
Caspar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
nRF Connect, 2020-01-17
SONY_BLE (E6:E7:6E:CF:B4:C1)
I 11:36:46.645 [Server] Server started
V 11:36:46.669 Heart Rate (0x180D)
- Heart Rate Measurement [N] (0x2A37)
···Client Characteristic Configuration (0x2902)
- Body Sensor Location [R] (0x2A38)
- Heart Rate Control Point [W] (0x2A39)
Unknown Service (00003802-0000-1000-8000-00805f9b34fb)
- Unknown Characteristic [I N R W] (00004a02-0000-1000-8000-00805f9b34fb)
···Client Characteristic Configuration (0x2902)
···Unknown Descriptor (0000aab0-0000-1000-8000-aabbccddeeff)
···Characteristic Presentation Format (0x2904)
- Unknown Characteristic [I R W WNR] (0000aaa2-0000-1000-8000-aabbccddeeff)
···Client Characteristic Configuration (0x2902)
User Data (0x181C)
- First Name [R W] (0x2A8A)
- Last Name [R W] (0x2A90)
- Gender [R W] (0x2A8C)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

sdk_config.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* Copyright (c) 2016 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

nrf_ble_qwr.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* Copyright (c) 2016 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

nrf_ble_qwrs.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX