2019-11-12 01:56 AM
Hi everyone,
I have built two custom boards (One server and and one node) and my application requires that the server and client communicate with each other and exchange the following parameters.
A name in string
Date day and time.
The server will send above information to client and client will store it. The client will ring when the time received from sever arrives. That would be through RTC alarm.
The questions are
1. How to send the information from the server to client?
2. How to store use that information on the client side to ring RTC alarm?
3. How to retrieve mac address of the node(client) and store it in server?
Any help would be highly appreciated.
Warm Regards
2019-11-12 03:16 AM
Notifications or indications are used to transfer data from server to client. Server creates characteristic with notify/indicate property. Then client subscribes for notifications. After that every time characteristic value is changed on server side, the client gets an interrupt.
2019-11-12 05:21 AM
Alright thanks. How to use that information on client side to modify rtc alarm value time or use that info and store it in a variable in my main.c?
2019-11-12 05:30 AM
I've never implemented BLE client on stm32wb, but I think it should be prety clear. I assume upon notification recieved on client side BLE stack calls some IRQ handler with a pointer to the new characteristic value. If ou have the value you can save it and whatever you want. So all you need now is to go through AN5270 and find that handler.
2019-11-12 08:44 PM
Alright thanks for the help. I'll see if it helps me.
2019-11-13 01:56 AM
@Community member Not able to find the IRQ handler, could you please help me out?
2019-11-13 03:54 AM
Looks like you are not trying to put any effort into this. Look into
<CubeFW_WB>\Projects\P-NUCLEO-WB55.USBDongle\Applications\BLE\BLE_p2pClient\STM32_WPAN\App\p2p_client_app.c
the SVCCTL_EvtAckStatus_t Event_Handler(void *Event) is what you are looking for