Is it correct that most BLE communication uses GATT server/client relationships or BLE mesh networks

I am developing a Zephyr OS runtime system to use BLE for communication between two nrf52840dk boards. I want a generic API for facilitating this BLE communication, which would look like this:
/* Send a message to conn */
void send(struct bt_conn *conn, void* data, u16_t len);

/* Callback when a message is received from conn */
void recv(struct bt_conn *conn, void* data, u16_t len);
/* Send a message to conn */
void send(struct bt_conn *conn, void* data, u16_t len);

/* Callback when a message is received from conn */
void recv(struct bt_conn *conn, void* data, u16_t len);
Currently, I have a GATT server and client setup where the server notifies the client of attribute changes to send messages and the client also writes to the server's attribute to send messages. In other words, I have two questions to ask: 1. Is it correct that most BLE communication uses GATT server/client relationships or BLE mesh networks? 2. Where can I find more information on creating a generic API like the one above, or does such an API already exist? @Middleware & OS
Solution:
GitHub
zephyr/samples/bluetooth/mesh_provisioner/README.rst at main · zeph...
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. - zephyrproject-rtos/zephyr
Jump to solution
4 Replies
Marvee Amasi
Marvee Amasi5mo ago
I don't think that will have a built in generic API exactly like the one you proposed
Sterling
Sterling5mo ago
Hmm, Any suggestions on how I can build a generic API like the one I proposed , maybe not exactly. @Marvee Amasi
Ming
Ming5mo ago
It may be interesting to look at Serial comms over BLE. Here is a page that talks about it: https://punchthrough.com/serial-over-ble/ This is an example implementation https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v13.0.0%2Fble_sdk_app_nus_eval.html
Alec Letourneau
Punch Through
Bluetooth Low Energy Serial: A Valid Design Strategy? | Punch Through
When developing a connected product for BLE, you may wonder, "Where is the serial profile?" No official Bluetooth profiles support a serial Rx/Tx pair.
Solution
Joseph Ogbonna
Joseph Ogbonna5mo ago
GitHub
zephyr/samples/bluetooth/mesh_provisioner/README.rst at main · zeph...
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. - zephyrproject-rtos/zephyr
Want results from more Discord servers?
Add your server