ble8 2.0.0.0
|
Functions | |
void | ble8_cfg_setup (ble8_cfg_t *cfg) |
Config Object Initialization function. | |
BLE8_RETVAL | ble8_init (ble8_t *ctx, ble8_cfg_t *cfg) |
Initialization function. | |
void | ble8_reset (ble8_t *ctx) |
Reset function. | |
void | ble8_generic_write (ble8_t *ctx, char *data_buf, uint16_t len) |
Generic write function. | |
int32_t | ble8_generic_read (ble8_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. | |
uint8_t | ble8_response_ready (ble8_t *ctx) |
Response Ready function. | |
void | ble8_send_command (ble8_t *ctx, char *command, uint8_t term_char) |
Transmit function. | |
void | ble8_fact_rst_cmd (ble8_t *ctx) |
Factory Reset command. | |
void | ble8_store_cnfg_cmd (ble8_t *ctx) |
Store Current Configuration command. | |
void | ble8_get_local_addr_cmd (ble8_t *ctx) |
Get Local Address command. | |
void | ble8_set_start_mode_cmd (ble8_t *ctx, uint8_t start_mode) |
Module Start Mode Setting command. | |
void | ble8_get_start_mode_cmd (ble8_t *ctx) |
Get Module Start Mode command. | |
void | ble8_enter_mode_cmd (ble8_t *ctx, uint8_t mode) |
Enter Data Mode command. | |
void | ble8_set_echo_cmd (ble8_t *ctx, uint8_t echo_en) |
Echo On/Off command. | |
void | ble8_get_echo_cmd (ble8_t *ctx) |
Get Echo Setting command. | |
void | ble8_set_local_name_cmd (ble8_t *ctx, char *local_name) |
Local Name Setting command. | |
void | ble8_get_local_name_cmd (ble8_t *ctx) |
Get Local Name command. | |
void | ble8_set_low_energy_role_cmd (ble8_t *ctx, uint8_t le_role) |
Bluetooth Low Energy Role Setting command. | |
void | ble8_get_low_energy_role_cmd (ble8_t *ctx) |
Get Bluetooth Low Energy Role command. | |
void | ble8_get_list_peers_cmd (ble8_t *ctx) |
Get Peer List command. | |
void | ble8_get_server_cnfg_cmd (ble8_t *ctx) |
Get Server Configuration command. | |
void | ble8_set_default_cmd (ble8_t *ctx) |
Default Configuration command. | |
void | ble8_set_sec_mode_cmd (ble8_t *ctx, uint8_t sec_mode) |
Security Mode Setting command. | |
void | ble8_get_sec_mode_cmd (ble8_t *ctx) |
Get Security Mode command. | |
void | ble8_pairing_en_cmd (ble8_t *ctx, uint8_t pairing_mode) |
Pairing Mode Setting command. | |
void | ble8_check_pairing_cmd (ble8_t *ctx) |
Get Pairing Mode command. | |
void | ble8_connectability_en_cmd (ble8_t *ctx, uint8_t conn_mode) |
Connectability Mode Setting command. | |
void | ble8_check_connectability_cmd (ble8_t *ctx) |
Get Connectability Mode command. | |
void | ble8_discoverability_en_cmd (ble8_t *ctx, uint8_t discover_mode) |
Discoverability Mode Setting command. | |
void | ble8_check_discoverability_cmd (ble8_t *ctx) |
Get Discoverability Mode command. | |
void | ble8_get_info (ble8_t *ctx) |
Get Info command. | |
uint8_t | ble8_sps_central_pairing (ble8_t *ctx, uint8_t *local_addr) |
SPS Pairing As Central Device command. | |
void | ble8_sps_peripheral_pairing (ble8_t *ctx) |
SPS Pairing As Peripheral Device command. | |
void | ble8_set_cts_pin (ble8_t *ctx, uint8_t state) |
CTS Pin Setting function. | |
void | ble8_set_dsr_pin (ble8_t *ctx, uint8_t state) |
Set DSR Pin function. | |
uint8_t | ble8_get_dtr_pin (ble8_t *ctx) |
Check DTR Pin function. | |
uint8_t | ble8_get_rts_pin (ble8_t *ctx) |
Check RTS Pin function. | |
void ble8_cfg_setup | ( | ble8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void ble8_check_connectability_cmd | ( | ble8_t * | ctx | ) |
Get Connectability Mode command.
ctx | Click object. |
@description This command reads the GAP connectability mode.
void ble8_check_discoverability_cmd | ( | ble8_t * | ctx | ) |
Get Discoverability Mode command.
ctx | Click object. |
@description This command reads the GAP discoverability mode.
void ble8_check_pairing_cmd | ( | ble8_t * | ctx | ) |
Get Pairing Mode command.
ctx | Click object. |
@description This command reads the pairing mode.
void ble8_connectability_en_cmd | ( | ble8_t * | ctx, |
uint8_t | conn_mode ) |
Connectability Mode Setting command.
ctx | Click object. |
conn_mode | 1 - GAP non-connectable mode; 2 - GAP connectable mode ( default ) |
@description This command sets the GAP connectability mode.
void ble8_discoverability_en_cmd | ( | ble8_t * | ctx, |
uint8_t | discover_mode ) |
Discoverability Mode Setting command.
ctx | Click object. |
discover_mode | 1 - GAP non-discoverable mode 2 - GAP limited discoverable mode 3 - GAP general discoverable mode ( default ) |
@description This command sets the GAP discoverability mode.
void ble8_enter_mode_cmd | ( | ble8_t * | ctx, |
uint8_t | mode ) |
Enter Data Mode command.
ctx | Click object. |
mode | 0 - Command mode ( default ) 1 - Data mode 2 - Extended data mode 3 - PPP mode |
@description This command requests the module to move to the new mode.
void ble8_fact_rst_cmd | ( | ble8_t * | ctx | ) |
Factory Reset command.
ctx | Click object. |
@description This command reset a module to factory defined defaults.
int32_t ble8_generic_read | ( | ble8_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len ) |
Generic read function.
ble8 | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void ble8_generic_write | ( | ble8_t * | ctx, |
char * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ble8 | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
uint8_t ble8_get_dtr_pin | ( | ble8_t * | ctx | ) |
Check DTR Pin function.
ctx | Click object. |
@description This function returns the state of the DTR pin ( UART data terminal ready signal).
void ble8_get_echo_cmd | ( | ble8_t * | ctx | ) |
Get Echo Setting command.
ctx | Click object. |
@description This command reads current echo setting.
void ble8_get_info | ( | ble8_t * | ctx | ) |
Get Info command.
ctx | Click object. |
@description This command reads the all device and serial interface informations.
void ble8_get_list_peers_cmd | ( | ble8_t * | ctx | ) |
Get Peer List command.
ctx | Click object. |
@description This command reads the connected peers (peer handle).
void ble8_get_local_addr_cmd | ( | ble8_t * | ctx | ) |
Get Local Address command.
@description This command reads the local address of the bluetooth module.
void ble8_get_local_name_cmd | ( | ble8_t * | ctx | ) |
Get Local Name command.
ctx | Click object. |
@description This command reads the local Bluetooth device name.
void ble8_get_low_energy_role_cmd | ( | ble8_t * | ctx | ) |
Get Bluetooth Low Energy Role command.
ctx | Click object. |
@description This command reads the Bluetooth low energy role.
uint8_t ble8_get_rts_pin | ( | ble8_t * | ctx | ) |
Check RTS Pin function.
@description This function returns the state of the RTS pin ( UART ready to send control signal ).
void ble8_get_sec_mode_cmd | ( | ble8_t * | ctx | ) |
Get Security Mode command.
ctx | Click object. |
@description This command reads the security mode.
void ble8_get_server_cnfg_cmd | ( | ble8_t * | ctx | ) |
Get Server Configuration command.
ctx | Click object. |
@description This command reads server configuration.
The module will return a type of server: 0 - Disabled, 1 - TCP, 2 - UDP, 3 - SPP, 4 - DUN, 5 - UUID, 6 - SPS (supported by ANNA-B1), 7 - Reserved, 8 - ATP.
void ble8_get_start_mode_cmd | ( | ble8_t * | ctx | ) |
Get Module Start Mode command.
ctx | Click object. |
@description This command reads the module start mode.
BLE8_RETVAL ble8_init | ( | ble8_t * | ctx, |
ble8_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void ble8_pairing_en_cmd | ( | ble8_t * | ctx, |
uint8_t | pairing_mode ) |
Pairing Mode Setting command.
ctx | Click object. |
pairing_mode | 1 - GAP non-pairing mode; 2 - GAP pairing mode ( default ) |
@description This command sets the pairing mode.
void ble8_reset | ( | ble8_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function allows user to reset a module.
uint8_t ble8_response_ready | ( | ble8_t * | ctx | ) |
Response Ready function.
ctx | Click object. |
@description This function checks does response ready or not.
void ble8_send_command | ( | ble8_t * | ctx, |
char * | command, | ||
uint8_t | term_char ) |
Transmit function.
ctx | Click object. |
tx_data | Data to be transmitted |
term_char | Command termination character |
@description This function allows user to transmit data and send commands to the module.
void ble8_set_cts_pin | ( | ble8_t * | ctx, |
uint8_t | state ) |
CTS Pin Setting function.
ctx | Click object. |
state | 0 - Low, 1 (or other value different from 0) - High |
@description This function sets the CTS pin to the desired state
( UART clear to send control signal ).
void ble8_set_default_cmd | ( | ble8_t * | ctx | ) |
Default Configuration command.
ctx | Click object. |
@description This command resets the profile to the last stored configuration.
void ble8_set_dsr_pin | ( | ble8_t * | ctx, |
uint8_t | state ) |
Set DSR Pin function.
ctx | Click object. |
state | 0 - Low, 1 ( or other value different from 0 ) - High |
@description This function sets the DSR pin to the desired state ( UART data set ready signal ).
void ble8_set_echo_cmd | ( | ble8_t * | ctx, |
uint8_t | echo_en ) |
Echo On/Off command.
ctx | Click object. |
echo_en | 0 - Unit does not echo the characters in Command Mode 1 - Unit echoes the characters in Command Mode ( default ) |
@description This command configures whether or not the unit echoes the characters received from the DTE in Command Mode.
void ble8_set_local_name_cmd | ( | ble8_t * | ctx, |
char * | local_name ) |
Local Name Setting command.
ctx | Click object. |
local_name | Local name string to be set (maximum 29 characters) |
@description This command sets the local Bluetooth device name.
void ble8_set_low_energy_role_cmd | ( | ble8_t * | ctx, |
uint8_t | le_role ) |
Bluetooth Low Energy Role Setting command.
ctx | Click object. |
le_role | 0 - Disabled 1 - Bluetooth low energy Central 2 - Bluetooth low energy Peripheral ( default ) 3 - Bluetooth low energy Simultaneous Peripheral and Central |
@description This command sets the Bluetooth low energy role.
void ble8_set_sec_mode_cmd | ( | ble8_t * | ctx, |
uint8_t | sec_mode ) |
Security Mode Setting command.
ctx | Click object. |
sec_mode | 1 - Security Disabled ( default ) 2 - Security Enabled - Just Works 3 - Security Enabled - Display Only 4 - Security Enabled - Display Yes/No 5 - Security Enabled - Keyboard Only 6 - Security Enabled - Out of band |
@description This command sets the security mode.
For the settings to take effect on ANNA-B1, use the commands &W and +CPWROFF to store the configuration to start up database and reboot the module. ANNA-B1 does not support Out of band and will fall back to Just Works pairing.
void ble8_set_start_mode_cmd | ( | ble8_t * | ctx, |
uint8_t | start_mode ) |
Module Start Mode Setting command.
ctx | Click object. |
start_mode | 0 - Command mode ( default ) 1 - Data mode 2 - Extended data mode 3 - PPP mode |
@description This command sets the module start mode.
uint8_t ble8_sps_central_pairing | ( | ble8_t * | ctx, |
uint8_t * | local_addr ) |
SPS Pairing As Central Device command.
ctx | Click object. |
local_addr | Local address string of the target Bluetooth device ( peer ) [ 12 characters ] |
@description This command executes a SPS pairing as central device, sets data start mode and reboot a module.
void ble8_sps_peripheral_pairing | ( | ble8_t * | ctx | ) |
SPS Pairing As Peripheral Device command.
ctx | Click object. |
@description This command allows SPS pairing as peripheral device, sets data start mode and reboot a module.
void ble8_store_cnfg_cmd | ( | ble8_t * | ctx | ) |
Store Current Configuration command.
ctx | Click object. |
@description This command commits all the settings to be stored in start up database.