2025-01-15 03:35 AM
Hi,
I am currently getting familiar with the STM32WB15 microcontrollers using two WB1M-WPAN1 boards.
On the server/peripheral side, everything works correctly (the declaration of services and characteristics in the .ioc file is very convenient), and I based my implementation on the HR_p2p_sensor example.
I have the following services and characteristics:
On the client/central side, my goal is to interact with the server's services, but I am struggling to find the proper way to add the services/characteristics I want to read.
Based on the explanations in AN5289, I modified P2P_SERVICE_UUID and P2P_NOTIFY_CHAR_UUID with the UUIDs I need in the SVCCTL_EvtAckStatus_t Event_Handler(void *Event) function in p2p_client_app.c (case ACI_ATT_READ_BY_GROUP_TYPE_RESP_VSEVT_CODE and ACI_ATT_READ_BY_TYPE_RESP_VSEVT_CODE).
(I also needed to modify the expected attribute size in the case ACI_GATT_NOTIFICATION_VSEVT_CODE with
pr->Attribute_Value_Length == (/*2*/ 10)).
This works for 1 service, but I don't think it is the proper way to add several services. Could you please guide me on how to do this correctly?
I also have a question about handling 16-bit UUIDs. Currently, there is a UUID_128BIT_FORMAT define that allows handling one or the other format, but I need to be able to read both.
Thank you for your help, and feel free to ask if you need any additional information.
Best regards,
Morgan