summaryrefslogtreecommitdiff
path: root/tools/btgatt-client.c
Commit message (Collapse)AuthorAgeFilesLines
* tools: Fix memory leaks in btgatt-server/clientIldar Kamaletdinov2022-05-091-1/+5
| | | | | | | | According to man buffer allocated by getline() should be freed by the user program even if getline() failed. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
* shared/att: Add debug level to bt_att_set_debugLuiz Augusto von Dentz2021-01-081-1/+2
| | | | | | This creates different levels of debugging which can be passed to bt_att_set_debug as depending on the application it may not need to print everything which can pollute the logs quite a bit.
* tools: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-291-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- GPL-2.0-or-later : 97 LGPL-2.1-or-later : 38 GPL-2.0-only : 2 License: GPL-2.0-or-later tools/l2cap-tester.c tools/hcisecfilter.c tools/ciptool.c tools/btsnoop.c tools/check-selftest.c tools/btpclientctl.c tools/hci-tester.c tools/hcitool.c tools/btiotest.c tools/oobtest.c tools/btinfo.c tools/hwdb.c tools/hciattach_bcm43xx.c tools/mgmt-tester.c tools/hex2hcd.c tools/hciattach_st.c tools/smp-tester.c tools/bluetooth-player.c tools/hciattach_tialt.c tools/gap-tester.c tools/bluemoon.c tools/bneptest.c tools/gatt-service.c tools/rctest.c tools/rfcomm-tester.c tools/hcieventmask.c tools/hciattach_ti.c tools/seq2bseq.c tools/scotest.c tools/bcmfw.c tools/hciconfig.c tools/btattach.c tools/l2ping.c tools/obexctl.c tools/l2test.c tools/hciattach_intel.c tools/hciattach.h tools/create-image.c tools/bnep-tester.c tools/userchan-tester.c tools/rfcomm.c tools/btmon-logger.c tools/hcidump.c tools/rtlfw.c tools/hciattach_qualcomm.c tools/btproxy.c tools/nokfw.c tools/hciattach_ath3k.c tools/3dsp.c tools/bdaddr.c tools/sco-tester.c tools/hciattach.c tools/amptest.c tools/btgatt-server.c tools/btgatt-client.c tools/cltest.c tools/ibeacon.c tools/mcaptest.c tools/hid2hci.c tools/btmgmt.c tools/advtest.c tools/eddystone.c tools/avtest.c tools/mpris-proxy.c tools/avinfo.c tools/sdptool.c tools/btconfig.c tools/update_compids.sh tools/parser/parser.h tools/parser/obex.c tools/parser/amp.c tools/parser/sdp.c tools/parser/tcpip.c tools/parser/sap.c tools/parser/cmtp.c tools/parser/avctp.c tools/parser/lmp.c tools/parser/ppp.c tools/parser/rfcomm.h tools/parser/hci.c tools/parser/sdp.h tools/parser/parser.c tools/parser/rfcomm.c tools/parser/avdtp.c tools/parser/avrcp.c tools/parser/ericsson.c tools/parser/hcrp.c tools/parser/bpa.c tools/parser/hidp.c tools/parser/bnep.c tools/parser/capi.c tools/parser/att.c tools/parser/l2cap.c tools/parser/smp.c tools/parser/csr.c tools/parser/l2cap.h tools/parse_companies.pl License: LGPL-2.1-or-later tools/test-runner.c tools/btpclient.c tools/meshctl.c tools/mesh-cfgclient.c tools/mesh/model.h tools/mesh/util.h tools/mesh/config-model.h tools/mesh/cfgcli.h tools/mesh/mesh-db.c tools/mesh/mesh-db.h tools/mesh/keys.c tools/mesh/util.c tools/mesh/agent.h tools/mesh/remote.c tools/mesh/keys.h tools/mesh/agent.c tools/mesh/cfgcli.c tools/mesh/remote.h tools/mesh-gatt/prov.c tools/mesh-gatt/util.h tools/mesh-gatt/prov.h tools/mesh-gatt/net.c tools/mesh-gatt/util.c tools/mesh-gatt/prov-db.h tools/mesh-gatt/crypto.c tools/mesh-gatt/crypto.h tools/mesh-gatt/gatt.c tools/mesh-gatt/config-server.c tools/mesh-gatt/keys.h tools/mesh-gatt/onoff-model.c tools/mesh-gatt/net.h tools/mesh-gatt/gatt.h tools/mesh-gatt/node.c tools/mesh-gatt/config-client.c tools/mesh-gatt/mesh-net.h tools/mesh-gatt/node.h tools/mesh-gatt/onoff-model.h tools/mesh-gatt/prov-db.c License: GPL-2.0-only tools/obex-server-tool.c tools/obex-client-tool.c
* tools/btgatt-client: Add option to set BT_SECURITY_FIPSŁukasz Rymanowski2020-05-131-2/+4
| | | | Needed for GAP/SEC/SEM/BI-10-C.
* shared/gatt-client: Add support for EATT featuresLuiz Augusto von Dentz2020-03-021-1/+1
| | | | | This enables EATT in the Client Features if the EATT characteristic is present in the database.
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* shared/mainloop: Remove mainloop_set_signalLuiz Augusto von Dentz2018-12-051-8/+1
| | | | | This removes mainloop_set_signal and replaces it usage with mainloop_run_with_signal.
* shared/gatt-client: Allow multiple ready callbacksLuiz Augusto von Dentz2017-07-041-1/+1
| | | | | | This makes the ready callbacks much more convenient to track when the client is ready since its is now possible to notify more than on client at the same time.
* tools/btgatt-client: Update set-security usageMaxime Chevallier2016-12-281-2/+2
|
* tools/btgatt-client: Fix set-security interactive commandMaxime Chevallier2016-12-281-2/+1
| | | | | | | | | | | Fix the interactive "set-security" command in btgatt-client, that would always fail due to bad initialization of argv buffer : [GATT client]# set-security 2 Usage: set_security <level> level: 1-3 e.g.: set-sec-level 2
* tools/btgatt-client: Fix register-notify promptMaxime Chevallier2016-12-281-2/+2
| | | | | | Added missing carriage return in register_notify_cb. Changed a call to PRLOG to a simple printf to avoid getting a extra prompt in cmd_register_notify.
* shared/gatt-db: Extend gatt_db_attribute_get_char_data with ext. propŁukasz Rymanowski2016-04-221-3/+5
| | | | | This patch adds way to get extended properties from characteristic extended property descriptor
* tools/btgatt-client: Fix write-value byte parsingChevallier Maxime2016-02-261-28/+13
| | | | | | | | write-value, write-long-value and write-prepare were parsing bytes using strtol with base '0' and restraining wtring size to be exactly 2, forbidding to write values over 99. The string length is no more checked, we instead check that the parsed value is in the correct range.
* shared/att: Add ext_signed flag to be able to use external cryptoMariusz Skamra2015-05-191-1/+1
| | | | | | | | | | | | | Due to the issues with CSRK tests ext_signed flag has been added to allow android/gatt handle signed write operations. This patch fixes following tests: GAP__TC_SEC_CSIGN_BV_02_C GAP__TC_SEC_CSIGN_BI_01_C GAP__TC_SEC_CSIGN_BI_02_C GAP__TC_SEC_CSIGN_BI_03_C GAP__TC_SEC_CSIGN_BI_04_C SM__TC_SIGN_BV_03_C
* tools: Handle the common profile & service ecodeGowtham Anandha Babu2015-05-151-0/+6
| | | | | Handles the common profile and service error codes sent over the Attribute Protocol in btgatt-client and monitor.
* tools/btgatt-client: Rename sec_level to securityLuiz Augusto von Dentz2015-04-291-8/+8
|
* shared/gatt-client: Rename sec_level to securityLuiz Augusto von Dentz2015-04-291-2/+2
|
* tools/btgatt-client: Add prepare and execute writeLukasz Rymanowski2015-03-111-0/+208
|
* tools/btgatt-client: Minor fix of menu alignmentLukasz Rymanowski2015-03-111-2/+2
|
* tools: Use local libbluetooth includesMarcel Holtmann2015-02-281-4/+4
|
* tools/btgatt-client: Fix incorrect error checkAndrei Emeltchenko2015-02-241-1/+1
|
* tools/btgatt-client: Add signed write supportLuiz Augusto von Dentz2015-02-241-15/+84
| | | | | This adds support for signed write which can be used after setting the signing key using set-sign-key.
* tools/btgatt-client: print read/write err messagesBharat Panda2015-02-181-3/+48
| | | | | | | | | | | | | | | Convert att error codes to error messages for gatt read/write responses. e.g. [GATT client]# read-value 0x00D9 [GATT client]# Read request failed: Authorization Required (0x08) [GATT client]# read-value 0x01E2 [GATT client]# Read request failed: Invalid Handle (0x01)
* tools/btgatt-client: Add support for set/get security on the linkLukasz Rymanowski2015-02-131-0/+64
|
* shared: Move mainloop implementation from monitor to sharedJohan Hedberg2015-02-121-1/+1
|
* shared/gatt: Make register_notify cancellableArman Uguray2015-02-021-7/+10
| | | | | | | | | | | | | This patch makes CCC writes via bt_gatt_client_register_notify cancellable. The following changes have been introduced: 1. bt_gatt_client_register_notify now returns the id immediately instead of returning it in a callback. The callback is still used to communicate ATT protocol errors. 2. A notify callback is immediately registered, so that if the remote end sends any ATT notifications/indications, the caller will start receiving them right away.
* tools/gatt: Fix not checking malloc() failureAndrei Emeltchenko2015-01-091-0/+4
| | | | This follows standard practice elsewhere in this file.
* shared/att: Add err argument to disconnect cbArman Uguray2014-12-151-2/+2
| | | | | | This patch adds an "int err" argument to the disconnect callback. shared/att obtains the value of SO_ERROR option for the underlying fd and passes it to the callbacks.
* shared/gatt-db: Add UUID arg to foreach_serviceArman Uguray2014-12-091-5/+4
| | | | | | This patch adds the "uuid" argument to gatt_db_foreach_service, which invokes the callback for a service only if "uuid" is NULL or if it matches the GATT service UUID.
* tools/btgatt-client: Observe service eventsArman Uguray2014-12-031-0/+28
| | | | | tools/btgatt-client now registers service added/removed callbacks in which it logs a message about the affected service.
* tools/btgatt-client: Use gatt-db instead of iteratorsArman Uguray2014-12-031-98/+71
| | | | | btgatt-client now iterates services, characteristics, and descriptors of the shared/gatt-client using gatt-db instead of the iterators.
* shared/gatt-client: Store services in gatt_dbArman Uguray2014-12-031-1/+14
| | | | | | | This patch rewrites the service discovery logic inside shared/gatt-client. The internal service_list structure has been entirely removed and services are stored in a gatt_db instance. Initially, gatt-client creates and owns the life-time of the gatt_db.
* tools/gatt: Fix memory leakAndrei Emeltchenko2014-11-271-0/+1
| | | | | | | | | | Fixes following clang warning: ... tools/btgatt-client.c:451:4: warning: Potential leak of memory pointed to by 'value' printf("Invalid value byte: %s\n", argv[i]); ^~~~~~ ...
* tools/btgatt-client: Add read_multiple_cmdMarcin Kraglak2014-11-201-0/+60
|
* tools/btgatt-client: Leave strtol detect baseLuiz Augusto von Dentz2014-10-281-11/+11
| | | | | | | | | strtol can detect what base the value is: 'If base is zero or 16, the string may then include a "0x" prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is '0', in which case it is taken as 8 (octal).'
* tools/btgatt-client: Print prompt on service changed.Arman Uguray2014-10-281-1/+4
| | | | | The service changed handler now prints the command line prompt if the changed service list empty.
* tools/btgatt-client: Fix off-by-one error.Arman Uguray2014-10-281-1/+1
| | | | | This patch fixes an error in write-long-value command that caused an extra invalid byte to get sent at the end of the long write value.
* tools/btgatt-client: Fix read-long-value offset parsing.Arman Uguray2014-10-281-2/+2
| | | | | | This patch fixes the way read-long-value command parses the "offset" argument by interpreting it as base 10 instead of 16, which is more intuitive.
* tools/btgatt-client: Print found include servicesMarcin Kraglak2014-10-231-0/+15
|
* tools/btgatt-client: Print type of serviceMarcin Kraglak2014-10-231-2/+3
|
* tools/btgatt-client: Set service changed handler.Arman Uguray2014-09-241-0/+34
| | | | | btgatt-client now sets a service changed handler by calling bt_gatt_client_set_service_changed.
* tools/btgatt-client: Fix memory leakAndrei Emeltchenko2014-09-161-6/+5
| | | | Simplify code and fix memory leaks
* tools/btgatt-client: Add "unregister-notify" command.Arman Uguray2014-09-111-0/+38
| | | | | This patch adds the "unregister-notify" command which can be used to test the bt_gatt_client_unregister_notify function.
* tools/btgatt-client: Add the "register-notify" command.Arman Uguray2014-09-111-0/+70
| | | | | This patch adds the "register-notify" command, which registers a notification/indication handler for a given characteristic value handle.
* shared/gatt-client: Introduce struct bt_gatt_characteristic_iter.Arman Uguray2014-09-111-13/+18
| | | | | | | | | | | | | | | shared/gatt-client currently defines a service iterator which returns service data in a copy. The user then accesses the service's characteristics by manually going through an array of bt_gatt_characteristic_t. This patch changes this by restricting access to individual characteristic entries via a new characteristic iterator. This is done so that gatt-client code can internally store private data on each characteristic (e.g. reference count for notification sessions) which shouldn't be exposed to external code. The code also changes the service iterator functions to return a pointer to an internally stored bt_gatt_service_t structure rather than returning its contents in a copy.
* tools/gatt: Fix accessing NULL cmdAndrei Emeltchenko2014-09-051-0/+4
|
* tools/btgatt-client: Added the "write-long-value" command.Arman Uguray2014-09-051-0/+130
| | | | | Added the "write-long-value" command which can be used to perform the "long write" procedure.
* tools/btgatt-client: Added the "write-value" command.Arman Uguray2014-09-051-1/+130
| | | | | Added the "write-value" command which can be used to perform "write" and "write without response" procedures.
* tools/btgatt-client: Added the "read-long-value" command.Arman Uguray2014-09-051-0/+43
| | | | | Added the "read-long-value" command which can be used to read long characteristic and descriptor values.
* tools/btgatt-client: Added the "read-value" command.Arman Uguray2014-09-051-12/+82
| | | | | Added the "read-value" command which sends a simple read request to the specified handle.