cancel
Showing results for 
Search instead for 
Did you mean: 

Client writing a value to GATT write attribute

AM.12
Associate III

Hi,

can someone help me with how to write a value to the server from the client? which API to use

Thank you,

6 REPLIES 6
FBL
ST Employee

Hello @Community member​ 

Could you please precise the STM32 product you are using? STM32WB ..? Which type of server? Do you mean using host stack subsystem of Bluetooth? If so, I suggest to refer to STM32 Bluetooth Low Energy - stm32mcu

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AM.12
Associate III

STM32WB55CU6 custom board as client and ESP32 as server, Connection between client and server done, Now i need to write a value to server from client

AM.12
Associate III

I am using GAP connection and GATT attribute method

FBL
ST Employee

Hello @Community member​ 

You can refer to AN5289, section 6 Step by step design of a BLE application. Table 6. to choose the API

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AM.12
Associate III

Thank you,

I have followed this document to establish a connection, but in the document, I didn't understand how to write attribute value to the server from the client

Remy ISSALYS
ST Employee

Hello,

To write a value from your client to your server, in case of write without response you can use ACI_GATT_WRITE_WITHOUT_RESP command and in case of write with response you can use ACI_GATT_WRITE_CHAR_VALUE command. You can look BLE_p2pServer/BLE_p2pClient examples which allow to establish a connection and exchange information between two STM32WB boards.

Best Regards