How to read/write data via BLE in Mbed OS 6?

I have an Android smartphone and a Discovery L475VG IoT development board. I am trying send/receive data (both directions) via BLE. I have consulted a good bit of documentation (although much of it is out of date for Mbed OS 6) and I have been trying to analyze what’s going on in the GattServer characteristicUpdate and characteristicWrite example codes. See https://github.com/ARMmbed/mbed-os-example-ble

The two example codes work for what they’re supposed to demonstrate, but they seem to go about implementing reads and writes differently, or maybe I am just not following what’s going on?

If it isn’t obvious, I am not super familiar with the BLE stack as a whole, and particularly not the mbed implementation of it. I previously made an Arduino-based system that accomplished the same goal I’m trying to here, but I am having trouble figuring out more complicated, lower-level library that mbed provides.

The read() and write() functions, which seem like the obvious things I would need, appear to be private functions, so I assume there is more to it than that and, naturally, mbed Studio doesn’t just let me call them from main().

Can someone point me in the right direction of where to start?

Can I Get Reply from any of the person,

Question
How to read/write [data via BLE in Mbed OS 6 ?

Advance Thanks!](Denodo Data Virtualization | Introduction to Denodo Platform)

Not sure why you raise the question here. You do not seem to be using a Sparkfun board and Sparkfun is NOT using Mbed6.

Most people are using the Sparkfun V2.x library, which includes Mbed5. It is used in an Arduino IDE environment and ArduinoBLE is used for BLE communication. Mbed5 in V2.x has the complete MBED-Cordio BLE stack, but ArduinoBLE is maybe using 1% of that MBED Cordio stack. Only to connect to the Apollo3-BLE driver that is in the Sparkfun V2.x library.

If you want to program directly on MBED CORDIO BLE I think you are better off on https://forums.mbed.com.

Maybe just a little help, out of interest I did create programs in the Arduino IDE environment which work directly with the Cordio BLE stack that is part of MBED in V2.x. (NOT using ArduinoBLE) The Cordio BLE stack is VERY complete and comprehensive, and I share your frustration about the lack of clarity in getting started and understanding the different calls and how it all works together. The different examples are standalone and do not provided examples of a working solution. I still know little about the Cordio BLE-stack, but I created a Client / server (or central/peripheral) programs. You can send data from a server/peripheral (e.g. from BME280) and receive that on a client / central, which can be another Sparkfun Apollo3 board or a BLEAK implementation on Ubuntu. The latter needs much more work. you can find this on https://github.com/paulvha/apollo3/tree/master/MBED-BLE

You may ask your question here:https://forums.mbed.com/c/mbed-os/6