cancel
Showing results for 
Search instead for 
Did you mean: 

BLE p2p-Router project with generic temperature measurement characteristic doesn't work.

NWeiß.1
Associate II

Hi,

I'm working with the BLE p2p-Router project and added the discovering of a Health Thermometer service. It works ..., but the discovering of the descriptor of the termometer measurement characteristic gives an unexpected answer. I use the start & end handle of the discovered characteristic to start the discovering of the descriptor and the answer is equal to the end handle of the characteristic. Perhaps ok, but the UUID that is given with the "ACI_ATT_FIND_INFO_RESP_VSEVT_CODE" event is also equal to the characteristic UUID. I would expectthe UUID 0x2902. If i discover the same server module with a similar project of another manufacturer i get the correct UUID of this descriptor.

I'm asking, because i can't activate the indication of the temperature measurement with my application (i use the aci_gatt_write_char_desc() with the handle i received during discovering)

Thanks for your help

Nicolai

7 REPLIES 7
NWeiß.1
Associate II

Some additional info.

I load the stm32wb5x_BLE_Stack_full_fw.bin of FW v1.13.0 to the copro and build my project based from the FW v1.13.0 too. I use the STM32WB55 Nucleo board.

If i build the health thermometer project and load it to the board i discover the correct UUIDs with my "Router" project on a SiLabs board. Could it be a fault at the STM BLE stack, or what am i doing wrong.

I use the aci_gatt_disc_all_promary:services(connection_handle), aci_gatt_disc_all_char_of_service(connection_hanlde,service_start_handle,service_end_handle) and aci_gatt_disc_all_char_desc(connection_handle, char_start_handle, char_end_handle) and get the corresponding answers with success, but at the descriptor discovering i got a wrong UUID (the UUID of the corresponding characteristic) and the handle is equal to the end_handle of the characteristic.

Thanks in advance

Remy ISSALYS
ST Employee

Hello,

Can you tell us what changes did you make in BLE_p2pRouter project ?

Best Regards

NWeiß.1
Associate II

Hi Remy,

sorry for my late response. I'm in contact with customer service, so i have to serve 2 way now.

I needed to make a lot of changes, because i want to connect a module with a generic service. I changed advertising handling and the discovering. But this works, the only thing that doesn't work is the change of the indication at the client side of ma module. I use the same api function used in the router project but get allways the error 0x91 (failed). Not very meaningfull. I do not use a the task handling to send the indication change, i call the function at event handling of the ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE. Could that be the problem? I have this problem also with the customer specific UUIDs if i connect the USB dongle with the p2pServer project.

Perhaps this infomation will help?!

Thanks for your help

Best Regards

Nicolai

NWeiß.1
Associate II

Info update,

the mistake was on my side, i used the wrong descriptor handle.

During discovering the characters of a service i get "Handle_Value_Pair_Data" and i used the wrong handle to discover the descriptors. The description of the API events (at STM32WB Bluetooth® Low Energy (BLE) wireless interface) is not clear for me, so i used the same as at the router project, although the description in the code says the first 2 bytes (octets) are the start_handle. if i use this handle discovering of the descriptor is wrong, but if i use the second handle at byte pos 3+4 of the "Handle_Value_Pair_Data" the discovering returns the correct handle for the descriptor. For whatever reason. I can't find a specification of the "Handle_Value_Pair_Data".

Perhaps someone can help me.

Thanks in advance

Nicolai

Remy ISSALYS
ST Employee

Hello,

I think the first 2 bytes are the connection_handle and the next 2 bytes are the start_handle.

Best Regards

NWeiß.1
Associate II

Hi,

I talked about the "Handle_Value_Pair_Data" and the description in the code says:

2 bytes start handle, 1 byte char properties, 2 bytes handle and 2 or 16 bytes data (means uuid).

The second handle is not described in detail, but i found a description at the Bluetooth core specification: This handle should be the client characteristic configuration handle.

I don't know, why i didn't get the end handle of the characteristic, because i need it to discover the descriptors of a characteristic (The API gives the start- & end handle at service discovering, so its easy to discover char of a service)

The p2p_router example does not initialise the end handle if discovering of descriptors of a char is started. The value is greater than the start handle by chance, cheers to the stack :o)

If i do it the same way i get several descriptors, looks like the ones of characteristics following the one i discover?! Strange behaviour. I will continue with my evaluation.

Best Regards

Nicolai

Remy ISSALYS
ST Employee

Hello,

The ACI_ATT_READ_BY_TYPE_RESP_EVENT event contains the handles and values of the attributes that have been read and has the following structure:

0693W00000LxaJGQAZ.pngThe length (e.g Handle_Value_Pair_Length) corresponds to the size of each element of the attribute data list (e.g Handle_Value_Pair_Data).

Each element of the list have the following structure:

0693W00000LxaLbQAJ.pngFor example for Generic Access Service, we have the following values:

Handle_Value_Pair_Length = 7

Handle_Value_Pair_Data =

[0x06,0x00,0x0A,0x07,0x00,0x00,0x2A,0x08,0x00,0x02,0x09,0x00,0x01,0x2A,0x0A,0x00,0x02,0x0B,0x00,0x04,0x2A]

Interpretation of these data:

> Characteristic 1:

0x06,0x00,0x0A,0x07,0x00,0x00,0x2A

0x0006 : Characteristic handle

0x0A : Characteristic properties => Read,Write

0x0007 : Characteristic value handle

0x2A00 : Characteristic UUID => Device Name

> Characteristic 2:

0x08,0x00,0x02,0x09,0x00,0x01,0x2A

0x0008 : Characteristic handle

0x02 : Characteristic properties => Read

0x0009 : Characteristic value handle

0x2A01 : Characteristic UUID => Appearance

> Characteristic 3:

0x0A,0x00,0x02,0x0B,0x00,0x04,0x2A

0x000A : Characteristic handle

0x02 : Characteristic properties => Read

0x000B : Characteristic value handle

0x2A04 : Characteristic UUID => Peripheral Preferred Connection Parameters

Best Regards