![]() |
Synergy Software Package User's Manual
|
RTOS-integrated BLE Interface Framework example. Implementation of RL78G1D BLE Driver. It implements the following interfaces: More...
Modules | |
| BLE Alert Notification Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Alert Notification Profile Framework example. Implementation of RL78G1D BLE Alert Notification Profile Interface Driver. It implements the following interfaces: | |
| BLE Blood Pressure Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Blood Pressure Profile Framework example. Implementation of RL78G1D BLE Blood Pressure Profile Interface Driver. It implements the following interfaces: | |
| BLE Find Me Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Find Me Profile Framework example. Implementation of RL78G1D BLE Find Me Profile Interface Driver. It implements the following interfaces: | |
| BLE HID Over GATT Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE HID Over GATT Profile Framework example. Implementation of RL78G1D BLE HID Over GATT Profile Interface Driver. It implements the following interfaces: | |
| BLE Heart Rate Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Heart Rate Profile Framework example. Implementation of RL78G1D BLE Heart Rate Profile Interface Driver. It implements the following interfaces: | |
| BLE Health Thermometer Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Health Thermometer Profile Framework example. Implementation of RL78G1D BLE Health Thermometer Profile Interface Driver. It implements the following interfaces: | |
| BLE On-Board Profile Framework Interface on RL78G1D | |
| RTOS-integrated BLE On-Board Profile Framework example. Implementation of RL78G1D BLE On-Board Profile Interface Driver. It implements the following interfaces: | |
| BLE Phone Alert Status Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Phone Alert Status Profile Framework example. Implementation of RL78G1D BLE Phone Alert Status Profile Interface Driver. It implements the following interfaces: | |
| BLE Proximity Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Proximity Profile Framework example. Implementation of RL78G1D BLE Proximity Profile Interface Driver. It implements the following interfaces: | |
| BLE Scan Parameters Service Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Scan Parameters Service Profile Framework example. Implementation of RL78G1D BLE Scan Parameters Service Profile Interface Driver. It implements the following interfaces: | |
| BLE Time Information Profile Interface Framework on RL78G1D | |
| RTOS-integrated BLE Time Information Profile Framework example. Implementation of RL78G1D BLE Time Information Profile Interface Driver. It implements the following interfaces: | |
Functions | |
| ssp_err_t | ble_rl78g1d_open (sf_ble_ctrl_t *const p_ctrl, sf_ble_cfg_t const *const p_cfg, sf_ble_rl78g1d_driver_t *p_driver_data) |
| Initializes RL78G1D Module as per user configuration, updates the control structure with instance specific information. More... | |
| uint8_t | sf_rble_exit_status (void) |
| Returns status whether RL78G1D driver thread should exit or continue. More... | |
| void | copy_driver_data (sf_ble_rl78g1d_driver_t *p_driver_data, sf_ble_cfg_t const *p_cfg, sf_ble_provisioning_t const *p_prov) |
| Copies user provisioning information or configuration in driver buffer for later use. More... | |
| ssp_err_t | close_rl78g1d (sf_ble_ctrl_t *const p_ctrl) |
| Un-Initialize BLE Module, stop RBLE Thread, release thread resources which are in use. More... | |
| ssp_err_t | rl78g1d_set_provision (sf_ble_provisioning_t const *p_prov) |
| Configures the BLE Module as per user provided Provisioning configuration. More... | |
| ssp_err_t | rl78g1d_read_rssi (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t *p_rssi) |
| Read RSSI information of the connection handle passed. More... | |
| ssp_err_t | rl78g1d_start_scan (sf_ble_rl78g1d_driver_t *p_driver_data, sf_ble_scan_t *p_scan, uint8_t *p_cnt, sf_ble_scan_info_t *p_scan_info) |
| Starts scanning of available BLE devices and returns the list of available BLE devices. More... | |
| ssp_err_t | rl78g1d_broadcast_enable (sf_ble_rl78g1d_driver_t *p_driver_data, sf_ble_adv_info_t const *p_adv_info) |
| Enables the advertisement of BLE Module so that other devices can find it. More... | |
| ssp_err_t | rl78g1d_broadcast_disable (void) |
| Disable advertisement of BLE Module so that it does not get discovered. More... | |
| ssp_err_t | rl78g1d_add_to_white_list (uint8_t const *p_bd_addr) |
| Adds the BLE device address to white list so that it gets scanned by the Module. More... | |
| ssp_err_t | rl78g1d_del_from_white_list (uint8_t const *p_bd_addr) |
| Deletes BLE device address from white list, so that it does not get discovered. More... | |
| ssp_err_t | rl78g1d_get_info (sf_ble_ctrl_t *const p_ctrl, sf_ble_chipset_info_t *p_chipset) |
| Gets the BLE module information and put that information in user buffer. More... | |
| ssp_err_t | ble_rl78g1d_connect (sf_ble_ctrl_t *const p_ctrl, sf_ble_connection_t const *const p_conn, sf_ble_conn_handle_t *p_handle, sf_ble_rl78g1d_driver_t *p_driver_data) |
| Connect to a remote BLE device using the information provided by user. More... | |
| ssp_err_t | rl78g1d_disconnect (sf_ble_conn_handle_t *p_handle) |
| Initiates Disconnection procedure from remote BLE device. More... | |
| ssp_err_t | rl78g1d_set_tx_power (sf_ble_conn_handle_t *const p_handle, sf_ble_set_tx_pwr_info_t *p_tx_power_info) |
| Sets the transmit power for the procedure specified by the connection handle. More... | |
| ssp_err_t | rl78g1d_bonding (sf_ble_rl78g1d_driver_t *p_driver_data, uint8_t const *p_bd_addr, sf_ble_bonding_start_t *p_bonding_start) |
| Initiates bonding procedure with Remote BLE device with configuration provided by user. More... | |
| ssp_err_t | rl78g1d_start_encryption (sf_ble_sm_enc_info_t const *p_enc_info) |
| Starts encryption over the BLE link using information received during Bonding procedure. More... | |
| ssp_err_t | rl78g1d_bonding_resp (sf_ble_conn_handle_t *p_handle, sf_ble_rl78g1d_driver_t *p_driver_data, sf_ble_bonding_response_t *p_bonding_resp) |
| Responds to bonding request from remote device with the security information provided by user. More... | |
| ssp_err_t | rl78g1d_authorization (sf_ble_conn_handle_t *p_handle) |
| Indicates that the specified remote device has been authorized by user. More... | |
| void | rl78g1d_gatt_event_callback (RBLE_GATT_EVENT *p_event) |
| GATT Event callback. More... | |
| ssp_err_t | rl78g1d_enable_gatt (void) |
| Enable the GATT in RBLE stack. More... | |
| ssp_err_t | rl78g1d_gatt_service_discovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_service_discovery_req_t const *const p_sf_ble_svc_dscv_req, sf_ble_service_discovery_rsp_t *const p_sf_ble_svc_dscv_rsp, uint32_t *const p_rsp_cnt) |
| GATT Service discovery. More... | |
| ssp_err_t | rl78g1d_gatt_char_discovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_discovery_req_t const *const p_sf_ble_char_dscv_req, sf_ble_char_discovery_rsp_t *const p_sf_ble_char_dscv_rsp, uint32_t *const p_rsp_cnt) |
| Perform characteristics discovery used by GATT client. More... | |
| ssp_err_t | rl78g1d_gatt_char_desc_discovery (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t start_handle, uint16_t end_handle, sf_ble_char_desc_discovery_rsp_t *const p_sf_ble_chardesc_dscv_rsp, uint32_t *const p_rsp_cnt) |
| Perform characteristics descriptor discovery used by GATT client. More... | |
| ssp_err_t | rl78g1d_gatt_char_read (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_read_req_t const *const p_char_read_req, sf_ble_char_read_rsp_t *const p_char_read_rsp) |
| Perform read characteristic used by GATT client. More... | |
| ssp_err_t | rl78g1d_gatt_char_write (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_char_write_req_t const *const p_char_write_req) |
| Perform write characteristic used by GATT client. More... | |
| ssp_err_t | rl78g1d_gatt_char_execute_write (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, sf_ble_execute_write_t execute_flag) |
| Perform execute write on all pending write operations, used by GATT client. More... | |
| ssp_err_t | rl78g1d_gatt_char_write_local (sf_ble_ctrl_t *const p_ctrl, uint16_t char_handle, uint16_t data_length, uint8_t *const p_data) |
| Perform local characteristic write used by GATT server. More... | |
| ssp_err_t | rl78g1d_gatt_send_notify (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t char_handle) |
| Send notification to GATT client, used by GATT server. More... | |
| ssp_err_t | rl78g1d_gatt_send_indicate (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t char_handle) |
| Send indication to GATT client, used by GATT server. More... | |
| ssp_err_t | rl78g1d_gatt_write_response (sf_ble_ctrl_t *const p_ctrl, sf_ble_conn_handle_t *p_handle, uint16_t handle, sf_ble_attribute_error_code_t error_code) |
| Send response to write operation received by GATT client, used by GATT server. More... | |
RTOS-integrated BLE Interface Framework example. Implementation of RL78G1D BLE Driver. It implements the following interfaces:
SF_BLE Framework Interface API on RL78G1D.
| ssp_err_t ble_rl78g1d_connect | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_connection_t const *const | p_conn, | ||
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_rl78g1d_driver_t * | p_driver_data | ||
| ) |
Connect to a remote BLE device using the information provided by user.
| [in] | p_ctrl | Pointer to control structure which contains driver information |
| [in] | p_conn | Pointer to connection information |
| [out] | p_handle | Pointer to connection handle |
| [in] | p_driver_data | Pointer to driver data where data is to be copied |
| SSP_SUCCESS | Connect success |
| SSP_ERR_BLE_FAILED | Failed to connect |
| SSP_ERR_NOT_OPEN | Device Not Opened |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t ble_rl78g1d_open | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_cfg_t const *const | p_cfg, | ||
| sf_ble_rl78g1d_driver_t * | p_driver_data | ||
| ) |
Initializes RL78G1D Module as per user configuration, updates the control structure with instance specific information.
| [in,out] | p_ctrl | Pointer to user-provided storage for the control block. |
| [in] | p_cfg | Pointer to BLE configuration structure |
| [in] | p_driver_data | Pointer to driver data where data is to be copied |
| SSP_SUCCESS | Module initialization successful |
| SSP_ERR_BLE_FAILED | Failed to initialize |
| SSP_ERR_ALREADY_OPEN | Device is already open |
| SSP_ERR_IN_USE | Module in use |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_INTERNAL | GATT Initialization failure |
Copying user configuration to driver buffer for later use
| ssp_err_t close_rl78g1d | ( | sf_ble_ctrl_t *const | p_ctrl | ) |
Un-Initialize BLE Module, stop RBLE Thread, release thread resources which are in use.
Closes and Stops communication with RL78G1D BLE chip
| [in] | p_ctrl | Pointer to control structure which contains driver related information |
| SSP_SUCCESS | Suspend the driver functionality. |
| SSP_ERR_BLE_FAILED | Close failure |
| void copy_driver_data | ( | sf_ble_rl78g1d_driver_t * | p_driver_data, |
| sf_ble_cfg_t const * | p_cfg, | ||
| sf_ble_provisioning_t const * | p_prov | ||
| ) |
Copies user provisioning information or configuration in driver buffer for later use.
Copies the value of BLE configuration and provisioning information into the driver buffer.
| [in] | p_driver_data | Pointer to driver data where data is to be copied |
| [in] | p_cfg | User pointer configuration which is to be copied to driver buffer |
| [in] | p_prov | Pointer BLE provisioning data |
| ssp_err_t rl78g1d_add_to_white_list | ( | uint8_t const * | p_bd_addr | ) |
Adds the BLE device address to white list so that it gets scanned by the Module.
Bluetooth address of peer device is added to the whiteList of Module
| [in] | p_bd_addr | Pointer to bluetooth address to be added to white list |
| SSP_SUCCESS | Whitelist add success |
| SSP_ERR_BLE_FAILED | Failed to add in white list |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_authorization | ( | sf_ble_conn_handle_t * | p_handle | ) |
Indicates that the specified remote device has been authorized by user.
| [in] | p_handle | Pointer to BLE handle |
| SSP_SUCCESS | Authorization success |
| SSP_ERR_BLE_FAILED | Authorization Failed |
Pointer to BLE connection handle
| ssp_err_t rl78g1d_bonding | ( | sf_ble_rl78g1d_driver_t * | p_driver_data, |
| uint8_t const * | p_bd_addr, | ||
| sf_ble_bonding_start_t * | p_bonding_start | ||
| ) |
Initiates bonding procedure with Remote BLE device with configuration provided by user.
Starts the bonding procedure with peer device
| [in] | p_driver_data | Pointer to private driver data structure |
| [in] | p_bd_addr | Pointer to ble device address from which bonding is to be started |
| [in] | p_bonding_start | Pointer to Bonding Start information structure |
| SSP_SUCCESS | Bonding start success |
| SSP_ERR_BLE_FAILED | Bonding start failure |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_bonding_resp | ( | sf_ble_conn_handle_t * | p_handle, |
| sf_ble_rl78g1d_driver_t * | p_driver_data, | ||
| sf_ble_bonding_response_t * | p_bonding_resp | ||
| ) |
Responds to bonding request from remote device with the security information provided by user.
| [in] | p_handle | Pointer to BLE handle |
| [in] | p_driver_data | Pointer to driver data which contains chip related information |
| [in] | p_bonding_resp | Bonding Response structure |
| SSP_SUCCESS | Bonding response success |
| SSP_ERR_BLE_FAILED | Failed getting bonding response |
| SSP_ERR_TIMEOUT | BLE event timeout |
Pointer to BLE connection handle
| ssp_err_t rl78g1d_broadcast_disable | ( | void | ) |
Disable advertisement of BLE Module so that it does not get discovered.
Disable advertisement of BLE Module.
| SSP_SUCCESS | Stop the broadcast of device successfully |
| SSP_ERR_BLE_FAILED | Failed to broadcast disable |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_broadcast_enable | ( | sf_ble_rl78g1d_driver_t * | p_driver_data, |
| sf_ble_adv_info_t const * | p_adv_info | ||
| ) |
Enables the advertisement of BLE Module so that other devices can find it.
Starts advertisement of BLE Module.
| [in] | p_driver_data | Driver data which contains chip related information |
| [in] | p_adv_info | Pointer to user supplied broadcast configuration |
| SSP_SUCCESS | Start the broadcast of device successfully |
| SSP_ERR_BLE_FAILED | Failed to broadcast enable |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_INVALID_MODE | Invalid arguments/parameters |
Advertisement Data length
Advertisement Data
| ssp_err_t rl78g1d_del_from_white_list | ( | uint8_t const * | p_bd_addr | ) |
Deletes BLE device address from white list, so that it does not get discovered.
Bluetooth address of peer device is deleted from the whiteList of Module
| [in] | p_bd_addr | Pointer to BLE address to be removed from white list |
| SSP_SUCCESS | Whitelist delete success |
| SSP_ERR_BLE_FAILED | Failed to delete from white list |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_disconnect | ( | sf_ble_conn_handle_t * | p_handle | ) |
Initiates Disconnection procedure from remote BLE device.
BLE device is disconnected from the peer device
| [in] | p_handle | Pointer to BLE handle |
| SSP_SUCCESS | Disconnect success |
| SSP_ERR_BLE_FAILED | Disconnect failed |
| SSP_ERR_TIMEOUT | BLE event timeout |
Pointer to BLE connection handle
| ssp_err_t rl78g1d_enable_gatt | ( | void | ) |
Enable the GATT in RBLE stack.
| SSP_SUCCESS | Enable the gatt successfully |
| SSP_ERR_INTERNAL | Failed to enable the gatt |
Create semaphore for rble operation complete
| ssp_err_t rl78g1d_gatt_char_desc_discovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | start_handle, | ||
| uint16_t | end_handle, | ||
| sf_ble_char_desc_discovery_rsp_t *const | p_sf_ble_chardesc_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
Perform characteristics descriptor discovery used by GATT client.
Perform Characteristic descriptor discovery of remote BLE device and pass all discovered characteristics descriptor to user
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | start_handle | Start handle from set of handle ranges to be used in discovery |
| [in] | end_handle | End handle from set of handle ranges to be used in discovery |
| [out] | p_sf_ble_chardesc_dscv_rsp | Pointer to characteristics descriptor discovery response |
| [in,out] | p_rsp_cnt | Input Size specifying maximum number of characteristics descriptor discovery results which can be stored in response, output specifying number of characteristics descriptor discovery results stored in response |
| SSP_SUCCESS | Characteristics descriptor discovery successful |
| SSP_ERR_BLE_FAILED | Characteristics descriptor discovery failed |
Pointer to BLE connection handle
Connection handle
API call
Wait for discovery to complete
Update response count
| ssp_err_t rl78g1d_gatt_char_discovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_discovery_req_t const *const | p_sf_ble_char_dscv_req, | ||
| sf_ble_char_discovery_rsp_t *const | p_sf_ble_char_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
Perform characteristics discovery used by GATT client.
Perform Characteristic discovery of remote BLE device and pass all discovered characteristics to user
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | Pointer to Connection handle |
| [in] | p_sf_ble_char_dscv_req | Pointer to characteristics discovery request |
| [out] | p_sf_ble_char_dscv_rsp | Pointer to characteristics discovery response |
| [in,out] | p_rsp_cnt | Input Size specifying maximum number of characteristics discovery results which can be stored in response, output specifying number of characteristics discovery results stored in response |
| SSP_SUCCESS | Characteristics discovery successful |
| SSP_ERR_BLE_FAILED | Characteristics discovery failed |
| SSP_ERR_NOT_OPEN | Device Not Opened |
Pointer to BLE connection handle
Connection handle
API call
Wait for discovery to complete
Update response count
| ssp_err_t rl78g1d_gatt_char_execute_write | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_execute_write_t | execute_flag | ||
| ) |
Perform execute write on all pending write operations, used by GATT client.
This API writes any characteristics handle which are pending in previous write
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | execute_flag | Flag specifying whether to execute or cancel pending writes |
| SSP_SUCCESS | Execute write successful |
| SSP_ERR_BLE_FAILED | Execute write failed |
Pointer to BLE connection handle
Connection handle
API Call
Wait for execute write to complete
| ssp_err_t rl78g1d_gatt_char_read | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_read_req_t const *const | p_char_read_req, | ||
| sf_ble_char_read_rsp_t *const | p_char_read_rsp | ||
| ) |
Perform read characteristic used by GATT client.
GATT client reads the characteristics value of specific characteristics handle of the connected peer device
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | p_char_read_req | Pointer to characteristic read request |
| [out] | p_char_read_rsp | Pointer to characteristic read response |
| SSP_SUCCESS | Characteristic read successful |
| SSP_ERR_BLE_FAILED | Characteristic read failed |
Characteristic handle
Characteristic handle size
Characteristic handle count
Characteristic UUID length
Characteristic UUID
Characteristic UUID length
Characteristic UUID
Characteristic UUID count
Characteristic value offset
Characteristic handle
Characteristic handle size
Characteristic handle count
Characteristic descriptor handle
Characteristic descriptor handle size
Characteristic descriptor handle count
Characteristic descriptor value offset
Characteristic descriptor handle
Characteristic descriptor handle size
Characteristic descriptor handle count
| ssp_err_t rl78g1d_gatt_char_write | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_char_write_req_t const *const | p_char_write_req | ||
| ) |
Perform write characteristic used by GATT client.
Write GATT characteristics data in characteristics handle of remote BLE device
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | p_char_write_req | Pointer to characteristic write request |
| SSP_SUCCESS | Characteristic write successful |
| SSP_ERR_BLE_FAILED | Characteristic write failed |
| ssp_err_t rl78g1d_gatt_char_write_local | ( | sf_ble_ctrl_t *const | p_ctrl, |
| uint16_t | char_handle, | ||
| uint16_t | data_length, | ||
| uint8_t *const | p_data | ||
| ) |
Perform local characteristic write used by GATT server.
Update local GATT database with user provided data.
| [in] | p_ctrl | Pointer to control structure |
| [in] | char_handle | Characteristic handle |
| [in] | data_length | Length of data to write |
| [in] | p_data | Pointer to data |
| SSP_SUCCESS | Local characteristic write successful |
| SSP_ERR_BLE_FAILED | Local characteristic write failed |
Characteristic value handle
Characteristic value length
Characteristic value
API Call
Wait for local write to complete
| void rl78g1d_gatt_event_callback | ( | RBLE_GATT_EVENT * | p_event | ) |
GATT Event callback.
| [in] | p_event | Event details |
| None |
All Primary service discovery with 16 bit UUID complete
All Primary service discovery with 128 bit UUID complete
Primary service discovery by UUID complete
Included service discovery complete
All characteristics discovery with 16 bit UUID complete
All characteristics discovery with 128 bit UUID complete
Characteristics discovery by UUID (16 bit) complete
Characteristics discovery by UUID (128 bit) complete
Switch case is broken into different functions in order to reduce the cyclomatic complexity (<=10) of the function
| ssp_err_t rl78g1d_gatt_send_indicate | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | char_handle | ||
| ) |
Send indication to GATT client, used by GATT server.
Send the data of CCCD indication to remote GATT client.
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | Pointer to Connection handle |
| [in] | char_handle | Characteristic handle whose value will be indicated |
| SSP_SUCCESS | Send Indication successful |
| SSP_ERR_BLE_FAILED | Send Indication failed |
Connection handle
Characteristic handle
API Call
Wait for indication send to complete
| ssp_err_t rl78g1d_gatt_send_notify | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | char_handle | ||
| ) |
Send notification to GATT client, used by GATT server.
Send the data of CCCD notification to remote GATT client.
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | char_handle | Characteristic handle whose value will be notified |
| SSP_SUCCESS | Send notification successful |
| SSP_ERR_BLE_FAILED | Send notification failed |
Pointer to BLE connection handle
Connection handle
Characteristic handle
API Call
| ssp_err_t rl78g1d_gatt_service_discovery | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| sf_ble_service_discovery_req_t const *const | p_sf_ble_svc_dscv_req, | ||
| sf_ble_service_discovery_rsp_t *const | p_sf_ble_svc_dscv_rsp, | ||
| uint32_t *const | p_rsp_cnt | ||
| ) |
GATT Service discovery.
Perform GATT service discovery of remote BLE device and pass all discovered Services to user
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | pointer to Connection handle |
| [in] | p_sf_ble_svc_dscv_req | Pointer to service discovery request |
| [out] | p_sf_ble_svc_dscv_rsp | Pointer to service discovery response |
| [in] | p_rsp_cnt | Input Size specifying maximum number of service discovery results which can be stored in response, output specifying number of service discovery results stored in response |
| SSP_SUCCESS | Service discovery successful |
| SSP_ERR_BLE_FAILED | Service discovery failed |
| SSP_ERR_NOT_OPEN | Device Not Opened |
Pointer to BLE connection handle
Connection handle
API call
Wait for discovery to complete
Update response count
| ssp_err_t rl78g1d_gatt_write_response | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t | handle, | ||
| sf_ble_attribute_error_code_t | error_code | ||
| ) |
Send response to write operation received by GATT client, used by GATT server.
| [in] | p_ctrl | Pointer to control structure |
| [in] | p_handle | Pointer to Connection handle |
| [in] | handle | Characteristic handle used for write operation |
| [in] | error_code | Characteristic write operation error code to be sent in response |
| SSP_SUCCESS | Send write response successful |
| SSP_ERR_BLE_FAILED | Send write response failed |
Pointer to BLE connection handle
Connection handle
Characteristic handle
API Call
| ssp_err_t rl78g1d_get_info | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_chipset_info_t * | p_chipset | ||
| ) |
Gets the BLE module information and put that information in user buffer.
Reads information from RL78G1D device and updates user buffer
| [in] | p_ctrl | Pointer to control structure which contains driver information |
| [in] | p_chipset | Pointer to user buffer which will be filled with BLE information |
| SSP_SUCCESS | Successfully get the BLE information |
| SSP_ERR_BLE_FAILED | Failed to get information from chipset |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_read_rssi | ( | sf_ble_ctrl_t *const | p_ctrl, |
| sf_ble_conn_handle_t * | p_handle, | ||
| uint16_t * | p_rssi | ||
| ) |
Read RSSI information of the connection handle passed.
Reads the RSSI information of BLE module for the connection handle passed
| [in] | p_ctrl | Pointer to control structure which contains driver information |
| [in] | p_handle | Pointer to BLE handle |
| [in] | p_rssi | Pointer to user buffer in which rssi is read |
| SSP_SUCCESS | Successfully read rssi |
| SSP_ERR_BLE_FAILED | Failed to read rssi value |
| SSP_ERR_TIMEOUT | BLE event timeout |
Pointer to BLE connection handle
| ssp_err_t rl78g1d_set_provision | ( | sf_ble_provisioning_t const * | p_prov | ) |
Configures the BLE Module as per user provided Provisioning configuration.
Sets bonding and security modes as provisioned.
| [in] | p_prov | Pointer to user provisioning information |
| SSP_SUCCESS | Successfully provisioned the device. |
| SSP_ERR_BLE_FAILED | Failed to set provision |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_UNSUPPORTED | Unsupported feature |
Bonding mode
Variable to store temporary Bonding mode
| ssp_err_t rl78g1d_set_tx_power | ( | sf_ble_conn_handle_t *const | p_handle, |
| sf_ble_set_tx_pwr_info_t * | p_tx_power_info | ||
| ) |
Sets the transmit power for the procedure specified by the connection handle.
| [in] | p_handle | Pointer to BLE handle |
| [in] | p_tx_power_info | Pointer to TX power information |
| SSP_SUCCESS | TX power set successfully |
| SSP_ERR_BLE_FAILED | TX power set failed |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_INVALID_ARGUMENT | Invalid transmit power level parameter not supported by device |
Pointer to BLE connection handle
| ssp_err_t rl78g1d_start_encryption | ( | sf_ble_sm_enc_info_t const * | p_enc_info | ) |
Starts encryption over the BLE link using information received during Bonding procedure.
| [in] | p_enc_info | BLE Start Encryption information |
| SSP_SUCCESS | Successfully when encryption start over the BLE link |
| SSP_ERR_BLE_FAILED | Failed to start encryption |
| SSP_ERR_TIMEOUT | BLE event timeout |
| ssp_err_t rl78g1d_start_scan | ( | sf_ble_rl78g1d_driver_t * | p_driver_data, |
| sf_ble_scan_t * | p_scan, | ||
| uint8_t * | p_cnt, | ||
| sf_ble_scan_info_t * | p_scan_info | ||
| ) |
Starts scanning of available BLE devices and returns the list of available BLE devices.
Starts Scanning of BLE devices either in Passive or Active mode with user provided scan configuration
| [in] | p_driver_data | Pointer to driver data where data is to be copied |
| [in,out] | p_scan | Pointer to user supplied scan buffer |
| [in,out] | p_cnt | Pointer to count variable which is to be updated with number of BLE devices scanned |
| [in] | p_scan_info | Pointer to scan information structure |
| SSP_SUCCESS | Successful scan of available BLE devices |
| SSP_ERR_BLE_FAILED | Failed to scan |
| SSP_ERR_TIMEOUT | BLE event timeout |
| SSP_ERR_INVALID_MODE | Invalid arguments/parameters |
In order to start observation or to start passive scan go for observation procedure. Passive scan is only supported through observation procedure
| uint8_t sf_rble_exit_status | ( | void | ) |
Returns status whether RL78G1D driver thread should exit or continue.
| SF_BLE_TRUE | RBLE Thread should exit |
| SF_BLE_FALSE | RBLE Thread should continue execution |