Hi,
The codeless project has a service and three characteristics. Two of these characteristics have the READ and WRITE property. I am using this project to send messages to a smartphone. So, with the ble device being the peripheral, the smartphone can READ the characteristic. Now, I want to make use of the WRITE property. So, if I write something onto one of the characteristics from the smartphone, then it should trigger a function call to maybe send something serially in the ble chip. Can you guide me in achieving this?
Mainly how to know whether WRITE operation has been made by the smartphone?
谢谢!
Device:
Hi krishnanag,
I am sorry for the mess, it's my mistake. I looking for your question and I will respond you until tomorrow morning.
Thanks, PM_Dialog
Hi krishnanag,
Please check the user_catch_rest_hndl() function in the user_codeless.c file in order to understand how the application handles the received messages. The CUSTS1_VAL_WRITE_IND, informs the application that the profile service role task has been disabled after a disconnection. When you write the first characteristic (INBOUND), the code will enter the CUST1_IDX_INBOUND_VAL case. So, if you check the code, you will see that you are able to write something onto one of the characteristics from the smartphone and then print it from UART. So, you should write ATr+PRINT= into the value of the characteristic from your smart phone.
Thanks, PM_Dialog
谢谢!