C++ API MblMwBtleConnection Question

Hello.
I would like to know more about the initialization of 'MblMwBtleConnection'.
You are providing examples of:
int main(int argc, char **argv) {
MblMwBtleConnection btle_conn = { write_gatt_char, read_gatt_char, enable_char_notify };
MblMwMetaWearBoard* board = mbl_mw_metawearboard_create(&btle_conn);
}
Please give me a more detailed example of MblMwBtleConnection initialization.
MblMwBtleConnection btle_conn = { write_gatt_char, read_gatt_char, enable_char_notify };
This single line code did not make me understand the initialization.
Please give me a detailed example.
Thank you. bye.

Comments

  • www.mbientlab.com/developers

  • @Laura said:
    www.mbientlab.com/developers

    I was read the document on the link.
    I could find the above example code in the document.
    I didn't understand the example code, so please give me a detailed answer.

  • Same question here

  • @horang2 which example are you working from? The C++ API only manages the MetaWear device protocol, the connection itself must be established using BLE hooks on the platform you are working with. The parameters for setting up the connection provide call backs for the API to interact with (read, write, receive notifications) the device over the externally established BLE connection. The platform must implement those callbacks (write_gatt_char, read_gatt_char, enable_char_notify).

Sign In or Register to comment.