cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-LP aci_gatt_clt_read_multiple_char_value() not working properly

LTrin.1
Associate II

Hello everyone

I'm trying to use aci_gatt_clt_read_multiple_char_value() function but it are returning error 0x82 (BLE_STATUS_INVALID_PARAMS).

aci_gatt_clt_read() function works as expected but I want to read multiple values for optimization purposes.

Code:

void refreshDeviceParameters()
{
	PRINTF("%s\r\n",__func__);
	Handle_Entry_t handle_entry[DEVICE_MAX_PARAMS];
 
	PRINTF("Handle entry: ");
	for(int i = 0; i < DEVICE_MAX_PARAMS; i++)
	{
		handle_entry[i].Handle = i;
		PRINTF("[0x%02X] = 0x%02X ", i, handle_entry[i].Handle);
	}
 
	PRINTF("\r\n");
 
	tBleStatus ret = aci_gatt_clt_read_multiple_char_value(connection_handle, (uint8_t) DEVICE_MAX_PARAMS, handle_entry);
 
	if (ret != BLE_STATUS_SUCCESS)
	{
		PRINTF("Error reading multiple char values 0x%02X\r\n", ret);
	}
}

Output:

refreshDeviceParameters
 
Handle entry: [0x00] = 0x00 [0x01] = 0x01 [0x02] = 0x02 [0x03] = 0x03 [0x04] = 0x04 [0x05] = 0x05 [0x06] = 0x06 [0x07] = 0x07 [0x08] = 0x08 [0x09] = 0x09 [0x0A] = 0x0A [0x0B] = 0x0B [0x0C] = 0x0C [0x0D] = 0x0D [0x0E] = 0x0E
 
Error reading multiple char values 0x82

Can anyone help me please?

Regards,

Leonardo

0 REPLIES 0