From: Jefferson Delfes <jefferson.delfes@xxxxxxxxxxxxx> Add new broadcaster command for running the Set Broadcaster operation from MGMT API. Also, add new observer command for running the Set Observer operation from MGMT API. --- tools/btmgmt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index b89bcac..4d9eab6 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -235,6 +235,8 @@ static const char *settings_str[] = { "br/edr", "hs", "le" , + "broadcaster", + "observer", }; static void print_settings(uint32_t settings) @@ -1111,6 +1113,16 @@ static void cmd_le(int mgmt_sk, uint16_t index, int argc, char **argv) cmd_setting(mgmt_sk, index, MGMT_OP_SET_LE, argc, argv); } +static void cmd_broadcaster(int mgmt_sk, uint16_t index, int argc, char **argv) +{ + cmd_setting(mgmt_sk, index, MGMT_OP_SET_BROADCASTER, argc, argv); +} + +static void cmd_observer(int mgmt_sk, uint16_t index, int argc, char **argv) +{ + cmd_setting(mgmt_sk, index, MGMT_OP_SET_OBSERVER, argc, argv); +} + static void class_rsp(int mgmt_sk, uint16_t op, uint16_t id, uint8_t status, void *rsp, uint16_t len, void *user_data) { @@ -1848,6 +1860,8 @@ static struct { { "rm-uuid", cmd_remove_uuid, "Remove UUID" }, { "clr-uuids", cmd_clr_uuids, "Clear UUIDs", }, { "did", cmd_did, "Set Device ID", }, + { "broadcaster",cmd_broadcaster,"Toggle Broadcaster Mode", }, + { "observer", cmd_observer, "Toggle Observer Mode", }, { NULL, NULL, 0 } }; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html