cancel
Showing results for 
Search instead for 
Did you mean: 

Exchange strings between Server and Node

AKetc
Associate III

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

6 REPLIES 6
Stecklo
Senior

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.

AKetc
Associate III

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? ​

Stecklo
Senior

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.

AKetc
Associate III

Alright thanks for the help. I'll see if it helps me.

AKetc
Associate III

@Community member​ Not able to find the IRQ handler, could you please help me out?

Stecklo
Senior

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