|
IOT-ESP32
|
Interfaces for BLE communication. More...
Data Structures | |
| struct | ble_config_t |
| Configuration of BLE operation. More... | |
| struct | queue_entry_t |
| class | SecureClient |
Enumerations | |
| enum | authstate_t |
| States associated with BLE authorization of a connection. More... | |
| enum | ble_char_len_t |
| Possible GATT characteristic value types. More... | |
| enum | ble_device_config_t |
| The mode for managing devices. More... | |
| enum | ble_state_t |
| Flags representing the current/desired state of our BLE tasks. More... | |
| enum | scan_filter_t |
| Setting to specify HCI scan type. More... | |
Functions | |
| void | ble_add_static_device (device_id_t) |
| Used to pre-define a device in STATIC config. More... | |
| void | ble_enable_bas () |
| configure device GATT service to use as BAS More... | |
| void | ble_init (ble_device_config_t config_mode=DEFAULT_BLE_SCAN_MODE) |
| Initialize BLE services. More... | |
| void | ble_parse_sensor_payload (sensor_data_entry_t *, uint8_t *) |
| Parse value from GATT and populate a payload entry. More... | |
| uint8_t | ble_request_attr_update (device_t *, uint8_t) |
| Request the BLE device to provide update immediately. More... | |
| void | ble_sensor_network_queue (BLEAddress *, uint32_t *) |
| Callback handler (bt_queue_handler_t) More... | |
| void | ble_set_notify_cb (ble_notify_cb_t) |
| Set a callback handler for BLE notifications. More... | |
| void | ble_set_svc_uuid (ble_svc_uuid_t, NimBLEUUID) |
| Update the BLE UUID's we expect from a device. More... | |
| void | bt_scan_enable () |
| Unlock BLE scanning task. More... | |
| void | bt_set_auth_handler (bt_conn_handler_t) |
| Register callback for GAP 'on_auth' event. More... | |
| void | bt_set_connect_handler (bt_conn_handler_t) |
| Register callback for GAP 'on_connect' event. More... | |
| void | bt_set_device_config_cb (bt_device_config_cb_t) |
| Register callback for using external service for device information. More... | |
| void | bt_set_device_init_cb (bt_device_init_cb_t) |
| Register callback for creating devices in another service. More... | |
| void | bt_set_device_mgmt_init (bt_device_mgmt_init_t) |
| Register callback on BLE device mgmt task init. More... | |
| void | bt_set_disconnect_handler (bt_conn_handler_t) |
| Register callback for GAP 'on_disconnect' event. More... | |
| void | bt_set_queue_handler (bt_queue_handler_t) |
| Register the task to process the GATT payload queue. More... | |
| void | bt_set_scan_mgr_init (bt_device_mgmt_init_t) |
| Register callback on BLE scan mgr task init. More... | |
Interfaces for BLE communication.
| enum ble_char_len_t |
Possible GATT characteristic value types.
| enum authstate_t |
States associated with BLE authorization of a connection.
| enum ble_state_t |
Flags representing the current/desired state of our BLE tasks.
| enum scan_filter_t |
Setting to specify HCI scan type.
Type of BLE scanning to use, which generally will correspond to DEVICE_DYNAMIC vs DEVICE_STATIC operation
| enum ble_device_config_t |
The mode for managing devices.
| void ble_parse_sensor_payload | ( | sensor_data_entry_t * | , |
| uint8_t * | |||
| ) |
Parse value from GATT and populate a payload entry.
| entry | ptr to payload entry to populate |
| ble_data | ptr to GATT value |
| void bt_set_queue_handler | ( | bt_queue_handler_t | ) |
Register the task to process the GATT payload queue.
If there's a BLE service to accept incoming GATT payloads, there must be a consumer of the queue to process them
| handler | bt_queue_handler_t |
| void bt_set_connect_handler | ( | bt_conn_handler_t | ) |
Register callback for GAP 'on_connect' event.
| handler | bt_conn_handler_t |
| void bt_set_disconnect_handler | ( | bt_conn_handler_t | ) |
Register callback for GAP 'on_disconnect' event.
| handler | bt_connt_handler_t |
| void bt_set_auth_handler | ( | bt_conn_handler_t | ) |
Register callback for GAP 'on_auth' event.
| handler | bt_connt_handler_t |
| void bt_set_device_config_cb | ( | bt_device_config_cb_t | ) |
Register callback for using external service for device information.
| handler | bt_device_config_cb_t |
| void bt_set_device_init_cb | ( | bt_device_init_cb_t | ) |
Register callback for creating devices in another service.
| handler | bt_device_init_cb_t |
| void bt_set_scan_mgr_init | ( | bt_device_mgmt_init_t | ) |
Register callback on BLE scan mgr task init.
| handler | (bt_device_mgmt_init_t) |
| void bt_set_device_mgmt_init | ( | bt_device_mgmt_init_t | ) |
Register callback on BLE device mgmt task init.
| handler | (bt_device_mgmt_init_t) |
| void bt_scan_enable | ( | ) |
Unlock BLE scanning task.
Used for task synchronization across peripherals
| void ble_init | ( | ble_device_config_t | config_mode = DEFAULT_BLE_SCAN_MODE | ) |
Initialize BLE services.
| device_mod | ble_device_config_t Either SCAN_FILTER_NO_FILTER or SCAN_FILTER_WHITELIST to control scanning behavior of new advertisements. If not specified, the default is determined by the value of NO_DYNAMIC_DEVICES and will most likely be what you want. |
| void ble_add_static_device | ( | device_id_t | ) |
Used to pre-define a device in STATIC config.
Chances are you'll only use this via device_load_static_lic()
| device_id | The device to create |
| uint8_t ble_request_attr_update | ( | device_t * | , |
| uint8_t | |||
| ) |
Request the BLE device to provide update immediately.
| device | |
| sensor_index | The devices index of the requested sensor type |
| void ble_sensor_network_queue | ( | BLEAddress * | , |
| uint32_t * | |||
| ) |
Callback handler (bt_queue_handler_t)
Handles incoming BLE payloads in their native format and delivers them to the outgoing network after construct the appropriate device_data_t structure
| *addr | BLEAddress from GATT payload |
| *data | uint32_t value from GATT |
| void ble_set_svc_uuid | ( | ble_svc_uuid_t | , |
| NimBLEUUID | |||
| ) |
Update the BLE UUID's we expect from a device.
| svc_uuid | The type of UUID |
| uuid | The new value |
| void ble_set_notify_cb | ( | ble_notify_cb_t | ) |
Set a callback handler for BLE notifications.
This is the handler that gets registered when we subscribe() to characteristic updates.
| handler | (ble_notify_cb_t) |
| void ble_enable_bas | ( | ) |
configure device GATT service to use as BAS
Configure a subscription to devices BLE BAS service with network handler