Macros

#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_CONNECTION_CLOSE
plugin ble connection close [connection-handle:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_CONN_OPEN
plugin ble gap conn-open [address:-1] [address-type:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_DISCOVER
plugin ble gap discover [discovery-mode:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_ADV_PARAMS
plugin ble gap set-adv-params [min-interval:2] [max-interval:2] [channel-map:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_BT5_MODE
plugin ble gap set-bt5-mode [advertisement-handle:1] [discoverable-mode:1] [connectable-mode:1] [max-events:2] [address-type:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_CONN_PARAMS
plugin ble gap set-conn-params [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_MODE
plugin ble gap set-mode [discoverable-mode:1] [connectable-mode:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_UPDATE_CONN_PARAMS
plugin ble gap update-conn-params [connection-handle:2] [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_CHARACTERISTICS
plugin ble gatt discover-characteristics [connection-handle:1] [serice-handle:4]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_PRIMARY_SERVICES
plugin ble gatt discover-primary-services [connection-handle:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_SET_CHARACTERISTIC_NOTIFICATION
plugin ble gatt set-characteristic-notification [connection-handle:1] [characteristic-handle:2] [flags:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_WRITE_CHARACTERISTIC
plugin ble gatt write-characteristic [connection-handle:1] [characteristic-handle:2] [value-len:1] [value-data:-1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GET_ADDRESS
plugin ble get address
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_HELLO
plugin ble hello
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_ALL_BONDINGS
plugin ble sm delete-all-bondings
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_BONDING
plugin ble sm delete-bonding [boning-handle:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_INCREASE_SECURITY
plugin ble sm increase-security [connection-handle:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_LIST_ALL_BONDINGS
plugin ble sm list-all-bondings
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_SET_BONDABLE_MODE
plugin ble sm set-bondable-mode [bondable-mode:1]
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SYSTEM_SET_TX_POWER
plugin ble system set-tx-power [tx-power:2]

Detailed Description

The BLE plugin contributes CLI commands to the application framework to be used for initiating actions at the BLE stack.

Macro Definition Documentation

#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_CONNECTION_CLOSE

plugin ble connection close [connection-handle:1]

  • Close BLE connection
    • connection-handle - INT8U - the connection handle which should be closed
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_CONN_OPEN

plugin ble gap conn-open [address:-1] [address-type:1]

  • Open a GAP connection
    • address - OCTET_STRING - The BLE address of the target device
    • address-type - INT8U - The address type: 0=public, 1=random, 2=public resolved by the stack, 3=public resolved by the stack, 16=classic bluetooth
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_DISCOVER

plugin ble gap discover [discovery-mode:1]

  • Start a GAP discovery procedure
    • discovery-mode - INT8U - The GAP discovery mode: 0=only limited discoverable devices, 1=limited and generic discoverable devices, 2=all devices
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_ADV_PARAMS

plugin ble gap set-adv-params [min-interval:2] [max-interval:2] [channel-map:1]

  • Set the GAP advertisement parameters
    • min-interval - INT16U - minimum connection interval
    • max-interval - INT16U - maximum connection interval
    • channel-map - INT8U - Channel map indicating which of three channels will be used
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_BT5_MODE

plugin ble gap set-bt5-mode [advertisement-handle:1] [discoverable-mode:1] [connectable-mode:1] [max-events:2] [address-type:1]

  • Set the BT5 GAP mode
    • advertisement-handle - INT8U - The handle index of advertisement
    • discoverable-mode - INT8U - The GAP discoverable mode: 0=non discoverable, 1=limited discoverable, 2=general discoverable, 3=broadcast, 4=user data
    • connectable-mode - INT8U - The GAP connectable mode: 0=non connectable, 1=directed connectable, 2=undirected connectable, 3=scannable non connectable
    • max-events - INT16U - The maximum number of events
    • address-type - INT8U - Address type: 0=public, 1=random, 2=public identity, 3=random identity, 16=classic bluetooth
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_CONN_PARAMS

plugin ble gap set-conn-params [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]

  • Set the GAP connection parameters
    • min-interval - INT16U - minimum connection event interval
    • max-interval - INT16U - maximum connection event interval
    • slave-latency - INT16U - number of connection intervals the slave can skip
    • supervision-timeout - INT16U - time before the connection is dropped
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_MODE

plugin ble gap set-mode [discoverable-mode:1] [connectable-mode:1]

  • Set the GAP mode
    • discoverable-mode - INT8U - The GAP discoverable mode: 0=non discoverable, 1=limited discoverable, 2=general discoverable, 3=broadcast, 4=user data
    • connectable-mode - INT8U - The GAP connectable mode: 0=non connectable, 1=directed connectable, 2=undirected connectable, 3=scannable non connectable
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_UPDATE_CONN_PARAMS

plugin ble gap update-conn-params [connection-handle:2] [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]

  • Set the GAP connection parameters for connection
    • connection-handle - INT16U - connection handle
    • min-interval - INT16U - minimum connection event interval
    • max-interval - INT16U - maximum connection event interval
    • slave-latency - INT16U - number of connection intervals the slave can skip
    • supervision-timeout - INT16U - time before the connection is dropped
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_CHARACTERISTICS

plugin ble gatt discover-characteristics [connection-handle:1] [serice-handle:4]

  • GATT discovery of characteristics
    • connection-handle - INT8U - the connection handle on which discovery should be performed
    • serice-handle - INT32U - the service handle on which discovery should be performed
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_PRIMARY_SERVICES

plugin ble gatt discover-primary-services [connection-handle:1]

  • GATT discovery of primary services
    • connection-handle - INT8U - the connection handle on which discovery should be performed
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_SET_CHARACTERISTIC_NOTIFICATION

plugin ble gatt set-characteristic-notification [connection-handle:1] [characteristic-handle:2] [flags:1]

  • GATT set characteristic notification
    • connection-handle - INT8U - the connection handle for which the notification should be set
    • characteristic-handle - INT16U - the characteristic handle to set notification for
    • flags - INT8U - 0=disable, 1=notification, 2=indication
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_WRITE_CHARACTERISTIC

plugin ble gatt write-characteristic [connection-handle:1] [characteristic-handle:2] [value-len:1] [value-data:-1]

  • GATT write characteristic value
    • connection-handle - INT8U - the connection handle
    • characteristic-handle - INT16U - the characteristic handle
    • value-len - INT8U - the lenght of data
    • value-data - OCTET_STRING - data to write
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GET_ADDRESS

plugin ble get address

  • Read the Bluetooth address
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_HELLO

plugin ble hello

  • Can be used to check that Bluetooth stack is functional
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_ALL_BONDINGS

plugin ble sm delete-all-bondings

  • Delete all bondings
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_BONDING

plugin ble sm delete-bonding [boning-handle:1]

  • Delete bonding
    • boning-handle - INT8U - the bonding handle to be deleted
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_INCREASE_SECURITY

plugin ble sm increase-security [connection-handle:1]

  • Increase the security level
    • connection-handle - INT8U - the connection handle for which we want to increase the security level
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_LIST_ALL_BONDINGS

plugin ble sm list-all-bondings

  • Send a command to get all the current bondings
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_SET_BONDABLE_MODE

plugin ble sm set-bondable-mode [bondable-mode:1]

  • Set the bondable mode
    • bondable-mode - INT8U - The bondable mode: 0=new bondings not accepted, 1=bondings allowed
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SYSTEM_SET_TX_POWER

plugin ble system set-tx-power [tx-power:2]

  • Set the TX power
    • tx-power - INT16S - tx power to be set in 0.1dBm steps