Plugin Commands: BLE#
The BLE plugin contributes CLI commands to the application framework to be used for initiating actions at the BLE stack.
Macros#
plugin ble connection close [connection-handle:1]
plugin ble gap conn-open [address:-1] [address-type:1]
plugin ble gap discover [discovery-mode:1]
plugin ble gap set-adv-params [min-interval:2] [max-interval:2] [channel-map:1]
plugin ble gap set-bt5-mode [advertisement-handle:1] [discoverable-mode:1] [connectable-mode:1] [max-events:2] [address-type:1]
plugin ble gap set-conn-params [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]
plugin ble gap set-mode [discoverable-mode:1] [connectable-mode:1]
plugin ble gap update-conn-params [connection-handle:2] [min-interval:2] [max-interval:2] [slave-latency:2] [supervision-timeout:2]
plugin ble gatt discover-characteristics [connection-handle:1] [serice-handle:4]
plugin ble gatt discover-primary-services [connection-handle:1]
plugin ble gatt set-characteristic-notification [connection-handle:1] [characteristic-handle:2] [flags:1]
plugin ble gatt write-characteristic [connection-handle:1] [characteristic-handle:2] [value-len:1] [value-data:-1]
plugin ble get address
plugin ble hello
plugin ble sm configure [flags:1] [io_capability:1]
plugin ble sm confirm-passkey [connection:1] [confirm:1]
plugin ble sm delete-all-bondings
plugin ble sm delete-bonding [bonding-handle:1]
plugin ble sm enter-passkey [connection:1] [passkey:4]
plugin ble sm increase-security [connection-handle:1]
plugin ble sm list-all-bondings
plugin ble sm set-bondable-mode [bondable-mode:1]
plugin ble system set-tx-power [tx-power:2]
Macro Definition Documentation#
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_CONNECTION_CLOSE#
#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
1460
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_CONN_OPEN#
#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
1467
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_DISCOVER#
#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
1473
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_ADV_PARAMS#
#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
1481
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_BT5_MODE#
#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
1491
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_CONN_PARAMS#
#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
1500
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_SET_MODE#
#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
1507
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GAP_UPDATE_CONN_PARAMS#
#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
1517
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_CHARACTERISTICS#
#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
1524
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_DISCOVER_PRIMARY_SERVICES#
#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
1530
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_SET_CHARACTERISTIC_NOTIFICATION#
#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
1538
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GATT_WRITE_CHARACTERISTIC#
#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
1547
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GET_ADDRESS#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_GET_ADDRESS
plugin ble get address
Read the Bluetooth address
1552
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_HELLO#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_HELLO
plugin ble hello
Can be used to check that Bluetooth stack is functional
1557
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_CONFIGURE#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_CONFIGURE
plugin ble sm configure [flags:1] [io_capability:1]
Configure security requirements and I/O capabilities of the system; See https://docs.silabs.com/bluetooth/latest/sm for more information
flags - INT8U - Security requirement bitmask.
io_capability - INT8U - I/O Capabilities
1564
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_CONFIRM_PASSKEY#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_CONFIRM_PASSKEY
plugin ble sm confirm-passkey [connection:1] [confirm:1]
Accept or reject the reported passkey confirm value; See https://docs.silabs.com/bluetooth/latest/sm for more information
connection - INT8U - Connection handle
confirm - INT8U - Confirm = 1, Reject = 0
1571
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_ALL_BONDINGS#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_ALL_BONDINGS
plugin ble sm delete-all-bondings
Delete all bondings; See https://docs.silabs.com/bluetooth/latest/sm for more information
1576
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_BONDING#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_DELETE_BONDING
plugin ble sm delete-bonding [bonding-handle:1]
Delete bonding; See https://docs.silabs.com/bluetooth/latest/sm for more information
bonding-handle - INT8U - the bonding handle to be deleted
1582
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_ENTER_PASSKEY#
#define EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_ENTER_PASSKEY
plugin ble sm enter-passkey [connection:1] [passkey:4]
Enter a passkey after receiving a passkey request event; See https://docs.silabs.com/bluetooth/latest/sm for more information
connection - INT8U - Connection handle
passkey - INT32U - Passkey
1589
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_INCREASE_SECURITY#
#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; See https://docs.silabs.com/bluetooth/latest/sm for more information
connection-handle - INT8U - the connection handle for which we want to increase the security level
1595
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_LIST_ALL_BONDINGS#
#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; See https://docs.silabs.com/bluetooth/latest/sm for more information
1600
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SM_SET_BONDABLE_MODE#
#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; See https://docs.silabs.com/bluetooth/latest/sm for more information
bondable-mode - INT8U - The bondable mode: 0=new bondings not accepted, 1=bondings allowed
1606
of file ./app/framework/test/headers/cli.doc
EMBER_AF_DOXYGEN_CLI_COMMAND_PLUGIN_BLE_PLUGIN_BLE_SYSTEM_SET_TX_POWER#
#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
1612
of file ./app/framework/test/headers/cli.doc