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

H5_decode error in nRF Connect

Hi, 

I had a problem while testing using the app_app_uart.

I added custom service and set tx buffer size to 70.

I tested  using nRF Connect.

And, i got error message like below.

If i set buffer size to 75, the error is not occurred.

I want to minimize buffer size.

Is not possible small buffer size in ble_app_uart?

  • MIN_CONN_INTERVAL : 7.5
  • MAX_CONN_INTERVAL : 12

	memset(&add_char_params, 0, sizeof(add_char_params));
	add_char_params.uuid = BLE_UUID_BRAIN_DATA_NIRS;
	add_char_params.max_len = 70;
	add_char_params.init_len = 70;
	add_char_params.p_init_value = init_data_buffer;
	add_char_params.is_var_len = true;
	add_char_params.char_props.notify = p_brain_init->nirsd_noti_state;
	add_char_params.cccd_write_access = p_brain_init->nirsd_cccd_wr_sec;
	add_char_params.char_props.read = 1;
	add_char_params.read_access = p_brain_init->nirsd_rd_sec;
	
	err_code = characteristic_add(p_brain->service_handle, &add_char_params, &(p_brain->brain_nirs_data_handles));
	if (err_code != NRF_SUCCESS)
	{
		return err_code;
	}

  • mcu : nRF52832
  • sdk : 17.0.0
  • softdevice : 7.0.1
  • Hi,

    Could you attach the log output from the nRF52 device?

  • Hi, 
    This is the log.

    2020-09-24T00:39:25.738Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.737Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.738Z INFO Attribute value changed, handle: 0x13, value (0x): 77-37-22-7F-FF-FE-7F-FF-FF-7F-FF-FE-7F-FF-FF-7F-FF-FF-DB-9F-F0-80-00-00-03-49-93-7F-FF-FE-7F-FF-FF-7F-FF-FE
    2020-09-24T00:39:25.770Z DEBUG 66063/ 0 <-  [02 39 00 00 00 00 00 00 00 13 00 01 24 00 7f ff ff 7f ff ff 6c 72 16 8e 50 84 80 00 00 cc 7c 44 7f ff ff 7f ff fe 7f ff ff 7f ff ff 7f ff ff 7f ff fe ] type:     VENDOR_SPECIFIC reliable:yes seq#:4 ack#:5 payload_length:32 data_integrity:1 header_checksum:e3 err_code:0x0
    2020-09-24T00:39:25.770Z DEBUG    66066 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:5 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.771Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.770Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.771Z INFO Attribute value changed, handle: 0x13, value (0x): 7F-FF-FF-7F-FF-FF-6C-72-16-8E-50-84-80-00-00-CC-7C-44-7F-FF-FF-7F-FF-FE-7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FE
    2020-09-24T00:39:25.804Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.803Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.804Z INFO Attribute value changed, handle: 0x13, value (0x): 80-00-00-A7-D9-76-7F-FF-FF-7F-FF-FE-7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FE-80-00-00-C8-06-02-7F-FF-FF-7F-FF-FE
    2020-09-24T00:39:25.804Z DEBUG 66064/ 0 <-  [02 39 00 00 00 00 00 00 00 13 00 01 24 00 80 00 00 a7 d9 76 7f ff ff 7f ff fe 7f ff ff 7f ff ff 7f ff ff 7f ff fe 80 00 00 c8 06 02 7f ff ff 7f ff fe ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:5 payload_length:32 data_integrity:1 header_checksum:e2 err_code:0x0
    2020-09-24T00:39:25.804Z DEBUG    66067 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.837Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.836Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.837Z INFO Attribute value changed, handle: 0x13, value (0x): 7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FF-80-00-00-80-00-00-7F-FF-FF-7F-FF-FE-7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FE
    2020-09-24T00:39:25.837Z DEBUG 66065/ 0 <-  [02 39 00 00 00 00 00 00 00 13 00 01 24 00 7f ff ff 7f ff ff 7f ff ff 7f ff ff 80 00 00 80 00 00 7f ff ff 7f ff fe 7f ff ff 7f ff ff 7f ff ff 7f ff fe ] type:     VENDOR_SPECIFIC reliable:yes seq#:6 ack#:5 payload_length:32 data_integrity:1 header_checksum:e1 err_code:0x0
    2020-09-24T00:39:25.837Z DEBUG    66068 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:7 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.837Z DEBUG    66069 ->  [00 9c 00 00 01 01 00 17 00 00 00 02 00 01 01 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:5 ack#:7 payload_length:10 data_integrity:1 header_checksum:f4 err_code:0x0
    2020-09-24T00:39:25.870Z DEBUG 66066/ 0 <-  [02 39 00 00 00 00 00 00 00 13 00 01 24 00 80 00 00 80 00 00 7f ff ff 7f ff fe 7f ff ff 7f ff ff 7f ff ff 7f ff fe 8c ca 25 80 00 00 4d f6 41 7f ff fe ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:5 payload_length:32 data_integrity:1 header_checksum:e0 err_code:0x0
    2020-09-24T00:39:25.870Z DEBUG    66070 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.870Z DEBUG 66067/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:6 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.870Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.870Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.870Z INFO Attribute value changed, handle: 0x13, value (0x): 80-00-00-80-00-00-7F-FF-FF-7F-FF-FE-7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FE-8C-CA-25-80-00-00-4D-F6-41-7F-FF-FE
    2020-09-24T00:39:25.903Z DEBUG 66068/ 0 <-  [01 9c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:6 payload_length:6 data_integrity:1 header_checksum:a2 err_code:0x0
    2020-09-24T00:39:25.903Z DEBUG    66071 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.936Z DEBUG 66069/ 0 <-  [02 39 00 00 00 00 00 00 00 13 00 01 24 00 7f ff ff 7f ff ff 7f ff ff 7f ff ff 32 1f e3 80 00 00 a8 2b c4 27 78 3c 7f ff ff 7f ff ff 7f ff ff 7f ff fe ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:6 payload_length:32 data_integrity:1 header_checksum:de err_code:0x0
    2020-09-24T00:39:25.936Z DEBUG    66072 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:25.936Z DEBUG GATTC_EVT_HVX time:2020-09-24T00:39:25.936Z connHandle:0 gattStatus:0 gattStatusName:success errorHandle:0 handle:19 type:1 len:36
    2020-09-24T00:39:25.936Z INFO Attribute value changed, handle: 0x13, value (0x): 7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FF-32-1F-E3-80-00-00-A8-2B-C4-27-78-3C-7F-FF-FF-7F-FF-FF-7F-FF-FF-7F-FF-FE
    2020-09-24T00:39:26.371Z DEBUG 66070/ 0 <-  [N/A] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:6 payload_length:f570 data_integrity:78 header_checksum:b6 err_code:0x802c
    2020-09-24T00:39:26.371Z ERROR h5_decode error, code: 0x802c, H5 error count: 1. raw packet: c0 f2 2e 03 dd 02 39 00 00 00 00 00 00 00 13 00 01 24 00 7f ff ff bd c6 f0 80 00 00 ba d8 c0 
    2020-09-24T00:39:26.771Z DEBUG 66071/ 1 <-  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2020-09-24T00:39:26.771Z DEBUG State change: STATE_ACTIVE -> STATE_RESET
    2020-09-24T00:39:26.771Z DEBUG    66073 ->  [N/A] type:          RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    2020-09-24T00:39:26.775Z INFO Reset performed on adapter COM3

  • Hi,

    This log is frmo the nRF Connect for Desktop app, not the nRF log. To see the nRF log you need to check that the nRF log module is enabled on sdk_config.c and if using UART backend see the output on a UART terminal or use RTT backend with RTT terminal. You can also see the nRF log output in a window in SES when you run your code on debug mode.

    Can you check what you have defined NRF_SDH_BLE_VS_UUID_COUNT to in your code?

    Do you see the same problem when using the ble_app_uart example or only when you have made the changes you made to add the custom service?

Related