|
ble_gatt_client
|
bluetooth main gatt client More...
#include <stdio.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>#include <unistd.h>#include <getopt.h>#include <limits.h>#include <errno.h>#include "bluetooth.h"#include "hci.h"#include "hci_lib.h"#include "l2cap.h"#include "uuid.h"#include "mainloop.h"#include "util.h"#include "att.h"#include "queue.h"#include "gatt-db.h"#include "gatt-client.h"Go to the source code of this file.
Data Structures | |
| struct | client |
Macros | |
| #define | ATT_CID 4 |
| #define | PRLOG(...) printf(__VA_ARGS__); print_prompt(); |
| #define | COLOR_OFF "\x1B[0m" |
| #define | COLOR_RED "\x1B[0;91m" |
| #define | COLOR_GREEN "\x1B[0;92m" |
| #define | COLOR_YELLOW "\x1B[0;93m" |
| #define | COLOR_BLUE "\x1B[0;94m" |
| #define | COLOR_MAGENTA "\x1B[0;95m" |
| #define | COLOR_BOLDGRAY "\x1B[1;30m" |
| #define | COLOR_BOLDWHITE "\x1B[1;36m" |
Typedefs | |
| typedef void(* | command_func_t )(struct client *cli, char *cmd_str) |
Functions | |
| static void | print_prompt (void) |
| static const char * | ecode_to_string (uint8_t ecode) |
| static void | att_disconnect_cb (int err, void *user_data) |
| static void | att_debug_cb (const char *str, void *user_data) |
| static void | gatt_debug_cb (const char *str, void *user_data) |
| static void | ready_cb (bool success, uint8_t att_ecode, void *user_data) |
| static void | service_changed_cb (uint16_t start_handle, uint16_t end_handle, void *user_data) |
| static void | log_service_event (struct gatt_db_attribute *attr, const char *str) |
| static void | service_added_cb (struct gatt_db_attribute *attr, void *user_data) |
| static void | service_removed_cb (struct gatt_db_attribute *attr, void *user_data) |
| static struct client * | client_create (int fd, uint16_t mtu) |
| static void | client_destroy (struct client *cli) |
| static void | print_uuid (const bt_uuid_t *uuid) |
| static void | print_incl (struct gatt_db_attribute *attr, void *user_data) |
| static void | print_desc (struct gatt_db_attribute *attr, void *user_data) |
| static void | print_chrc (struct gatt_db_attribute *attr, void *user_data) |
| static void | print_service (struct gatt_db_attribute *attr, void *user_data) |
| static void | print_services (struct client *cli) |
| static void | print_services_by_uuid (struct client *cli, const bt_uuid_t *uuid) |
| static void | print_services_by_handle (struct client *cli, uint16_t handle) |
| static void | services_usage (void) |
| static bool | parse_args (char *str, int expected_argc, char **argv, int *argc) |
| static void | cmd_services (struct client *cli, char *cmd_str) |
| static void | read_multiple_usage (void) |
| static void | read_multiple_cb (bool success, uint8_t att_ecode, const uint8_t *value, uint16_t length, void *user_data) |
| static void | cmd_read_multiple (struct client *cli, char *cmd_str) |
| static void | read_value_usage (void) |
| static void | read_cb (bool success, uint8_t att_ecode, const uint8_t *value, uint16_t length, void *user_data) |
| static void | cmd_read_value (struct client *cli, char *cmd_str) |
| static void | read_long_value_usage (void) |
| static void | cmd_read_long_value (struct client *cli, char *cmd_str) |
| static void | write_value_usage (void) |
| static void | write_cb (bool success, uint8_t att_ecode, void *user_data) |
| static void | cmd_write_value (struct client *cli, char *cmd_str) |
| static void | write_long_value_usage (void) |
| static void | write_long_cb (bool success, bool reliable_error, uint8_t att_ecode, void *user_data) |
| static void | cmd_write_long_value (struct client *cli, char *cmd_str) |
| static void | write_prepare_usage (void) |
| static void | cmd_write_prepare (struct client *cli, char *cmd_str) |
| static void | write_execute_usage (void) |
| static void | cmd_write_execute (struct client *cli, char *cmd_str) |
| static void | register_notify_usage (void) |
| static void | notify_cb (uint16_t value_handle, const uint8_t *value, uint16_t length, void *user_data) |
| static void | register_notify_cb (uint16_t att_ecode, void *user_data) |
| static void | cmd_register_notify (struct client *cli, char *cmd_str) |
| static void | unregister_notify_usage (void) |
| static void | cmd_unregister_notify (struct client *cli, char *cmd_str) |
| static void | set_security_usage (void) |
| static void | cmd_set_security (struct client *cli, char *cmd_str) |
| static void | cmd_get_security (struct client *cli, char *cmd_str) |
| static bool | convert_sign_key (char *optarg, uint8_t key[16]) |
| static void | set_sign_key_usage (void) |
| static bool | local_counter (uint32_t *sign_cnt, void *user_data) |
| static void | cmd_set_sign_key (struct client *cli, char *cmd_str) |
| static void | cmd_help (struct client *cli, char *cmd_str) |
| static void | cmd_quit (struct client *cli, char *cmd_str) |
| static void | prompt_read_cb (int fd, uint32_t events, void *user_data) |
| static void | signal_cb (int signum, void *user_data) |
| static int | l2cap_le_att_connect (bdaddr_t *src, bdaddr_t *dst, uint8_t dst_type, int sec) |
| static void | usage (void) |
| int | main (int argc, char *argv[]) |
Variables | |
| static bool | verbose = false |
| static struct option | write_value_options [] |
| static struct option | write_long_value_options [] |
| static struct option | write_prepare_options [] |
| struct { | |
| char * cmd | |
| command_func_t func | |
| char * doc | |
| } | command [] |
| static struct option | main_options [] |
bluetooth main gatt client
the original file is in bluez/tools and the name is btgatt-client.c
Definition in file btgattclient.c.
| #define ATT_CID 4 |
Definition at line 62 of file btgattclient.c.
Referenced by l2cap_le_att_connect().
| #define COLOR_BLUE "\x1B[0;94m" |
Definition at line 71 of file btgattclient.c.
Referenced by print_prompt().
| #define COLOR_BOLDGRAY "\x1B[1;30m" |
Definition at line 73 of file btgattclient.c.
Referenced by att_debug_cb().
| #define COLOR_BOLDWHITE "\x1B[1;36m" |
Definition at line 74 of file btgattclient.c.
Referenced by att_debug_cb().
| #define COLOR_GREEN "\x1B[0;92m" |
Definition at line 69 of file btgattclient.c.
Referenced by gatt_debug_cb(), and print_incl().
| #define COLOR_MAGENTA "\x1B[0;95m" |
Definition at line 72 of file btgattclient.c.
Referenced by print_desc().
| #define COLOR_OFF "\x1B[0m" |
Definition at line 67 of file btgattclient.c.
Referenced by att_debug_cb(), gatt_debug_cb(), print_chrc(), print_desc(), print_incl(), print_prompt(), and print_service().
| #define COLOR_RED "\x1B[0;91m" |
Definition at line 68 of file btgattclient.c.
Referenced by print_service().
| #define COLOR_YELLOW "\x1B[0;93m" |
Definition at line 70 of file btgattclient.c.
Referenced by print_chrc().
| #define PRLOG | ( | ... | ) | printf(__VA_ARGS__); print_prompt(); |
Definition at line 64 of file btgattclient.c.
Referenced by att_debug_cb(), cmd_register_notify(), gatt_debug_cb(), log_service_event(), notify_cb(), read_cb(), read_multiple_cb(), ready_cb(), register_notify_cb(), write_cb(), and write_long_cb().
| typedef void(* command_func_t)(struct client *cli, char *cmd_str) |
Definition at line 1653 of file btgattclient.c.
|
static |
print a prefix (user_data) followed by a message (str) example att: ATT op 0x02 (att: is the prefix)
| str | message to print |
| user_data | pointer to prefix |
Definition at line 177 of file btgattclient.c.
References COLOR_BOLDGRAY, COLOR_BOLDWHITE, COLOR_OFF, and PRLOG.
Referenced by client_create().
|
static |
disconnect callback, quit mainloop
| err | error code associated with disconnect |
| user_data | user data pointer (not used) |
Definition at line 163 of file btgattclient.c.
References mainloop_quit().
Referenced by client_create().
|
static |
create an gatt client attached to the fd l2cap socket
| fd | socket |
| mtu | selected pdu size |
Definition at line 251 of file btgattclient.c.
References client::att, att_debug_cb(), att_disconnect_cb(), bt_att_new(), bt_att_register_disconnect(), bt_att_set_close_on_unref(), bt_att_set_debug(), bt_att_unref(), bt_gatt_client_new(), bt_gatt_client_set_debug(), bt_gatt_client_set_ready_handler(), bt_gatt_client_set_service_changed(), client::db, client::fd, client::gatt, gatt_db_new(), gatt_db_register(), gatt_db_unref(), gatt_debug_cb(), new0, ready_cb(), service_added_cb(), service_changed_cb(), service_removed_cb(), and verbose.
Referenced by main().
|
static |
client structure cleanup
| cli | client pointer to destroy |
Definition at line 326 of file btgattclient.c.
References client::att, bt_att_unref(), bt_gatt_client_unref(), and client::gatt.
Referenced by main().
|
static |
get security command
| cli | pointer to the client stricture |
| cmd_str | get security command string |
Definition at line 1548 of file btgattclient.c.
References bt_gatt_client_get_security(), bt_gatt_client_is_ready(), and client::gatt.
|
static |
help command
| cli | pointer to client structure |
| cmd_str | help command string |
Definition at line 1695 of file btgattclient.c.
References cmd, command, and doc.
Referenced by prompt_read_cb().
|
static |
Definition at line 1648 of file btgattclient.c.
References mainloop_quit().
|
static |
read long value command
| cli | pointer to the client structure |
| cmd_str | command string for read long value |
Definition at line 799 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_read_long_value(), client::gatt, parse_args(), read_cb(), and read_long_value_usage().
|
static |
read multiple command
| cli | pointer to the client structure |
| cmd_str | command string for read multiple |
Definition at line 668 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_read_multiple(), client::gatt, parse_args(), read_multiple_cb(), and read_multiple_usage().
|
static |
read value command
| cli | pointer to the client structure |
| cmd_str | command string for read value |
Definition at line 757 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_read_value(), client::gatt, parse_args(), read_cb(), and read_value_usage().
|
static |
register notify command
| cli | pointer to the client structure |
| cmd_str | register notify command string |
Definition at line 1409 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_register_notify(), client::gatt, notify_cb(), parse_args(), PRLOG, register_notify_cb(), and register_notify_usage().
|
static |
command interpreter
| cli | pointer to the client structure |
| cmd_str | one of the possible command (help to get a list) <command> –help to have a help on that command |
Definition at line 575 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_string_to_uuid(), bt_uuid_to_uuid128(), client::gatt, parse_args(), print_services(), print_services_by_handle(), print_services_by_uuid(), and services_usage().
|
static |
set security command
| cli | pointer to the client structure |
| cmd_str | set security command string |
Definition at line 1506 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_set_security(), client::gatt, parse_args(), and set_security_usage().
|
static |
set sign key command
| cli | pointer to client structure |
| cmd_str | set sign key command string |
Definition at line 1621 of file btgattclient.c.
References client::att, bt_att_set_local_key(), convert_sign_key(), local_counter(), parse_args(), and set_sign_key_usage().
|
static |
un-register notify command
| cli | pointer to the client structure |
| cmd_str | un-register notify command string |
Definition at line 1458 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_unregister_notify(), client::gatt, parse_args(), and unregister_notify_usage().
|
static |
write execute command
| cli | pointer to the client structure |
| cmd_str | write execute command string |
Definition at line 1296 of file btgattclient.c.
References bt_gatt_client_cancel(), bt_gatt_client_is_ready(), bt_gatt_client_write_execute(), client::gatt, parse_args(), client::reliable_session_id, write_cb(), write_execute_usage(), and write_value_usage().
|
static |
write long value command
| cli | pointer to the client structure |
| cmd_str | command string for write long value |
Definition at line 1029 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_write_long_value(), client::gatt, parse_args(), write_long_cb(), write_long_value_options, write_long_value_usage(), and write_value_usage().
|
static |
write prepare command
| cli | pointer to the client structure |
| cmd_str | write prepare command string |
Definition at line 1154 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_prepare_write(), client::gatt, parse_args(), client::reliable_session_id, write_long_cb(), write_prepare_options, write_prepare_usage(), and write_value_usage().
|
static |
write value command
| cli | pointer to the client structure |
| cmd_str | command string for write value |
Definition at line 877 of file btgattclient.c.
References bt_gatt_client_is_ready(), bt_gatt_client_write_value(), bt_gatt_client_write_without_response(), client::gatt, parse_args(), write_cb(), write_value_options, and write_value_usage().
|
static |
convert sign key ascii to vector
| optarg | ascii key string |
| key | returned parsed vector |
Definition at line 1571 of file btgattclient.c.
Referenced by cmd_set_sign_key().
|
static |
convert error code to string
| ecode | error code (BT_ATT mostly) |
Definition at line 109 of file btgattclient.c.
References BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, BT_ATT_ERROR_ATTRIBUTE_NOT_LONG, BT_ATT_ERROR_AUTHENTICATION, BT_ATT_ERROR_AUTHORIZATION, BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION, BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE, BT_ATT_ERROR_INSUFFICIENT_RESOURCES, BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN, BT_ATT_ERROR_INVALID_HANDLE, BT_ATT_ERROR_INVALID_OFFSET, BT_ATT_ERROR_INVALID_PDU, BT_ATT_ERROR_PREPARE_QUEUE_FULL, BT_ATT_ERROR_READ_NOT_PERMITTED, BT_ATT_ERROR_REQUEST_NOT_SUPPORTED, BT_ATT_ERROR_UNLIKELY, BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE, BT_ATT_ERROR_WRITE_NOT_PERMITTED, BT_ERROR_ALREADY_IN_PROGRESS, BT_ERROR_CCC_IMPROPERLY_CONFIGURED, and BT_ERROR_OUT_OF_RANGE.
Referenced by read_cb(), write_cb(), and write_long_cb().
|
static |
print a prefix (user_data) followed by a message (str) example gatt: MTU exchange complete, with MTU: 23 (gatt: is the prefix)
| str | message to print |
| user_data | pointer to prefix |
Definition at line 190 of file btgattclient.c.
References COLOR_GREEN, COLOR_OFF, and PRLOG.
Referenced by client_create().
|
static |
create a bluetooth le l2cap socket and connect src to dst
| src | 6 bytes BD Address source address |
| dst | 6 bytes BD Address destination address |
| dst_type | destination type BDADDR_LE_PUBLIC or BDADDR_LE_RANDOM |
| sec | security level BT_SECURITY_LOW or BT_SECURITY_MEDIUM or BT_SECURITY_HIGH |
Definition at line 1787 of file btgattclient.c.
References AF_BLUETOOTH, ATT_CID, ba2str(), bacpy(), BT_SECURITY, BTPROTO_L2CAP, htobs, sockaddr_l2::l2_bdaddr, sockaddr_l2::l2_bdaddr_type, sockaddr_l2::l2_cid, sockaddr_l2::l2_family, bt_security::level, PF_BLUETOOTH, SOL_BLUETOOTH, and verbose.
Referenced by main().
|
static |
counter increment sign_cnt by one
| sign_cnt | variable to increment |
| user_data | not used |
Definition at line 1606 of file btgattclient.c.
Referenced by cmd_set_sign_key().
|
static |
log discovered service
| attr | gatt_db_attribute structure (service data) |
| str | comment about the logged service ("Service added", "Service removed"...) |
Definition at line 207 of file btgattclient.c.
References bt_uuid_to_string(), gatt_db_attribute_get_service_handles(), gatt_db_attribute_get_service_uuid(), MAX_LEN_UUID_STR, and PRLOG.
Referenced by service_added_cb(), and service_removed_cb().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
gatt client which browse ble device services and characteristics
| argc | args count |
| argv | args value |
Definition at line 1896 of file btgattclient.c.
References bacpy(), BDADDR_ANY, BDADDR_LE_PUBLIC, BDADDR_LE_RANDOM, BT_SECURITY_HIGH, BT_SECURITY_LOW, BT_SECURITY_MEDIUM, client_create(), client_destroy(), hci_devba(), hci_devid(), l2cap_le_att_connect(), main_options, mainloop_add_fd(), mainloop_init(), mainloop_run(), mainloop_set_signal(), print_prompt(), prompt_read_cb(), signal_cb(), str2ba(), usage(), and verbose.
|
static |
notify call back
| value_handle | handle of the notifying object |
| value | vector value of the object |
| length | length of vector value |
| user_data | not used |
Definition at line 1366 of file btgattclient.c.
References PRLOG.
Referenced by cmd_register_notify().
|
static |
parse command string
| str | command to parse |
| expected_argc | number of arguments expected |
| argv | pointers to arguments separated by space or tab |
| argc | argument counter (and actual count) |
Definition at line 550 of file btgattclient.c.
Referenced by cmd_read_long_value(), cmd_read_multiple(), cmd_read_value(), cmd_register_notify(), cmd_services(), cmd_set_security(), cmd_set_sign_key(), cmd_unregister_notify(), cmd_write_execute(), cmd_write_long_value(), cmd_write_prepare(), and cmd_write_value().
|
static |
print characteristic
| attr | |
| user_data |
Definition at line 397 of file btgattclient.c.
References COLOR_OFF, COLOR_YELLOW, gatt_db_attribute_get_char_data(), gatt_db_service_foreach_desc(), gatt_db_attribute::handle, print_desc(), print_uuid(), and gatt_db_attribute::uuid.
Referenced by print_service().
|
static |
print attribute uuid
| attr | |
| user_data |
Definition at line 383 of file btgattclient.c.
References COLOR_MAGENTA, COLOR_OFF, gatt_db_attribute_get_handle(), gatt_db_attribute_get_type(), and print_uuid().
Referenced by print_chrc().
|
static |
print included data
| attr | gatt_db_attribute to print |
| user_data | client structure pointer |
Definition at line 355 of file btgattclient.c.
References COLOR_GREEN, COLOR_OFF, client::db, gatt_db_attribute_get_incl_data(), gatt_db_attribute_get_service_uuid(), gatt_db_get_attribute(), print_uuid(), gatt_db_attribute::service, and gatt_db_attribute::uuid.
Referenced by print_service().
|
static |
print prompt
Definition at line 97 of file btgattclient.c.
References COLOR_BLUE, and COLOR_OFF.
Referenced by main(), prompt_read_cb(), ready_cb(), and service_changed_cb().
|
static |
print service
| attr | |
| user_data |
Definition at line 424 of file btgattclient.c.
References COLOR_OFF, COLOR_RED, gatt_db_attribute_get_service_data(), gatt_db_service_foreach_char(), gatt_db_service_foreach_incl(), print_chrc(), print_incl(), and print_uuid().
Referenced by print_services(), print_services_by_handle(), print_services_by_uuid(), and service_changed_cb().
|
static |
print the list of services
| cli | client pointer |
Definition at line 451 of file btgattclient.c.
References client::db, gatt_db_foreach_service(), and print_service().
Referenced by cmd_services(), and ready_cb().
|
static |
print services providing the handle
| cli | |
| handle |
Definition at line 477 of file btgattclient.c.
References client::db, gatt_db_foreach_service(), and print_service().
Referenced by cmd_services().
print services providing the uuid
| cli | |
| uuid |
Definition at line 464 of file btgattclient.c.
References client::db, gatt_db_foreach_service(), and print_service().
Referenced by cmd_services().
|
static |
printing bt_uuid_t structure (uuid)
| uuid |
Definition at line 338 of file btgattclient.c.
References bt_uuid_to_string(), bt_uuid_to_uuid128(), and MAX_LEN_UUID_STR.
Referenced by print_chrc(), print_desc(), print_incl(), and print_service().
|
static |
prompt read call back
| fd | stdin |
| events | epoll event |
| user_data | pointer to client structure |
Definition at line 1711 of file btgattclient.c.
References cmd, cmd_help(), command, mainloop_quit(), and print_prompt().
Referenced by main().
|
static |
read value callback
| success | ==0 => print error, <>0 print value |
| att_ecode | att error code |
| value | vector of values |
| length | size of vector |
| user_data | not used |
Definition at line 725 of file btgattclient.c.
References ecode_to_string(), and PRLOG.
Referenced by cmd_read_long_value(), and cmd_read_value().
|
static |
read long value usage
Definition at line 788 of file btgattclient.c.
Referenced by cmd_read_long_value().
|
static |
read multiple callback
| success | ==0 => print error, <>0 print values |
| att_ecode | att error code |
| value | vector of values |
| length | number of values |
| user_data | not used |
Definition at line 643 of file btgattclient.c.
References PRLOG.
Referenced by cmd_read_multiple().
|
static |
read multiple usage
Definition at line 629 of file btgattclient.c.
Referenced by cmd_read_multiple().
|
static |
|
static |
GATT discovery procedures call back
| success | if not 0 an error occured |
| att_ecode | att error code |
| user_data | pointer to client structure |
Definition at line 492 of file btgattclient.c.
References print_prompt(), print_services(), and PRLOG.
Referenced by client_create().
|
static |
register notify call back
| att_ecode | att error code |
| user_data | not used |
Definition at line 1392 of file btgattclient.c.
References PRLOG.
Referenced by cmd_register_notify().
|
static |
register notify usage
Definition at line 1353 of file btgattclient.c.
Referenced by cmd_register_notify().
|
static |
service added callback
| attr | |
| user_data |
Definition at line 228 of file btgattclient.c.
References log_service_event().
Referenced by client_create().
|
static |
service changed call back
| start_handle | |
| end_handle | |
| user_data | client pointer |
Definition at line 515 of file btgattclient.c.
References client::db, gatt_db_foreach_service_in_range(), print_prompt(), and print_service().
Referenced by client_create().
|
static |
service removed callback
| attr | |
| user_data |
Definition at line 239 of file btgattclient.c.
References log_service_event().
Referenced by client_create().
|
static |
services usage (services –help to learn options)
Definition at line 531 of file btgattclient.c.
Referenced by cmd_services().
|
static |
set security usage
Definition at line 1492 of file btgattclient.c.
Referenced by cmd_set_security().
|
static |
|
static |
signal call back SIGINT and SIGTERM processing
| signum | SIGXXX |
| user_data | unused |
Definition at line 1766 of file btgattclient.c.
References mainloop_quit().
Referenced by main().
|
static |
un-register notify usage
Definition at line 1447 of file btgattclient.c.
Referenced by cmd_unregister_notify().
|
static |
|
static |
write value call back
| success | ==0 => print error, <>0 print value |
| att_ecode | att error code |
| user_data | not used |
Definition at line 861 of file btgattclient.c.
References ecode_to_string(), and PRLOG.
Referenced by cmd_write_execute(), and cmd_write_value().
|
static |
write execute usage
Definition at line 1283 of file btgattclient.c.
Referenced by cmd_write_execute().
|
static |
write long call back
| success | ==0 => print error, <>0 print value |
| reliable_error | status of the write operation when failed |
| att_ecode | att error code |
| user_data | not used |
Definition at line 1010 of file btgattclient.c.
References ecode_to_string(), and PRLOG.
Referenced by cmd_write_long_value(), and cmd_write_prepare().
|
static |
write long value usage
Definition at line 987 of file btgattclient.c.
Referenced by cmd_write_long_value().
|
static |
write prepare usage
Definition at line 1133 of file btgattclient.c.
Referenced by cmd_write_prepare().
|
static |
write value usage
Definition at line 838 of file btgattclient.c.
Referenced by cmd_write_execute(), cmd_write_long_value(), cmd_write_prepare(), and cmd_write_value().
| char* cmd |
Definition at line 1656 of file btgattclient.c.
Referenced by cmd_help(), and prompt_read_cb().
| struct { ... } command[] |
Referenced by cmd_help(), and prompt_read_cb().
| char* doc |
Definition at line 1658 of file btgattclient.c.
Referenced by cmd_help().
| command_func_t func |
Definition at line 1657 of file btgattclient.c.
Referenced by gatt_db_attribute_read(), gatt_db_attribute_write(), gatt_db_find_by_type(), gatt_db_find_by_type_value(), gatt_db_foreach_service_in_range(), gatt_db_service_foreach(), gatt_db_service_foreach_desc(), hci_for_each_dev(), sign_set_key(), and timeout_add().
|
static |
Definition at line 1877 of file btgattclient.c.
Referenced by main().
|
static |
Definition at line 76 of file btgattclient.c.
Referenced by client_create(), l2cap_le_att_connect(), and main().
|
static |
Definition at line 997 of file btgattclient.c.
Referenced by cmd_write_long_value().
|
static |
Definition at line 1143 of file btgattclient.c.
Referenced by cmd_write_prepare().
|
static |
Definition at line 848 of file btgattclient.c.
Referenced by cmd_write_value().