Skip to main content
AKetc
Associate III
November 12, 2019
Question

Exchange strings between Server and Node

  • November 12, 2019
  • 6 replies
  • 985 views

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

This topic has been closed for replies.

6 replies

Stecklo
Senior
November 12, 2019

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
AKetcAuthor
Associate III
November 12, 2019

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
November 12, 2019

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
AKetcAuthor
Associate III
November 13, 2019

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

AKetc
AKetcAuthor
Associate III
November 13, 2019

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

Stecklo
Senior
November 13, 2019

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