summaryrefslogtreecommitdiff
path: root/client/gatt.h
Commit message (Collapse)AuthorAgeFilesLines
* client: Allow gatt.select-attribute to work with local attributesLuiz Augusto von Dentz2022-12-061-0/+4
| | | | | | | | | | | | | | | | | | This allows gatt.select-attribute local to select from the registered attributes: [bluetooth]# gatt.select-attribute local /org/bluez/app/service0/chrc0 [/org/bluez/app/service0/chrc0]# gatt.write 0x01 [CHG] Attribute /org/bluez/app/service0/chrc0 (%UUID) written [/org/bluez/app/service0/chrc0]# gatt.read 01 . [/org/bluez/app/service0/chrc0]# gatt.select-attribute local /org/bluez/app/service0/chrc1 [/org/bluez/app/service0/chrc1]# gatt.write 0x01 [CHG] Attribute /org/bluez/app/service0/chrc1 (%UUID) written [/org/bluez/app/service0/chrc1]# gatt.read 01 . [/org/bluez/app/service0/chrc1]#
* client: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- GPL-2.0-or-later : 11 License: GPL-2.0-or-later client/adv_monitor.c client/adv_monitor.h client/advertising.h client/display.c client/main.c client/display.h client/agent.h client/gatt.c client/agent.c client/advertising.c client/gatt.h
* client: Add gatt.clone commandLuiz Augusto von Dentz2019-02-131-0/+1
| | | | | | | | | | | | | | | | | | | This adds clone command to gatt submenu which can be use to clone services as follow: Clone all services from the connected device: > gatt.clone Clone a given service > gatt.select-attribute <attribute/uuid> > gatt.clone In either case there is a prompt to confirm since this may add a lot of service the user must confim before proceding. Then finally: > gatt.register-application
* client/gatt : Add support for Included ServiceAvichal Agarwal2018-05-211-0/+5
| | | | included service support implemented at service registration
* client: Add support for optional gatt write offset parameterGrzegorz Kolodziejczyk2018-04-261-1/+1
| | | | This patch extends missing optional gatt write offset parameter.
* client: Add support for optional gatt read offset parameterGrzegorz Kolodziejczyk2018-04-261-1/+1
| | | | This patch extends missing optional gatt read offset parameter.
* shared/shell: Use wordexp to parse argumentsLuiz Augusto von Dentz2017-11-171-7/+10
| | | | This ensures the arguments are parsed properly.
* client: Add release-notify commandLuiz Augusto von Dentz2017-07-051-0/+1
| | | | | | | | This adds release-notify command which closes an existing fd unlocking the attribute: [Test peripheral:/service001f/char0020]# release-notify [CHG] Attribute /org/bluez/hci1/dev_69_16_5B_9A_06_CD/service001f/char0020 NotifyAcquired: no
* client: Add acquire-notify commandLuiz Augusto von Dentz2017-07-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | This adds acquire-notify command which uses D-Bus AcquireNotify method to acquire a file descriptor to read notifications locking the attribute: [Test peripheral:/service001f/char0020]# acquire-notify [CHG] Attribute /org/bluez/hci1/dev_56_A0_AA_D0_12_FF/service001f/char0020 NotifyAcquired: yes AcquireNotify success: fd 7 MTU 65 < ACL Data TX: Handle 3585 flags 0x00 dlen 9 ATT: Write Request (0x12) len 4 Handle: 0x0022 Data: 0200 [CHG] /org/bluez/hci1/dev_56_A0_AA_D0_12_FF/service001f/char0020 Notification: 00 > ACL Data RX: Handle 3585 flags 0x02 dlen 8 ATT: Handle Value Indication (0x1d) len 3 Handle: 0x0021 Data: 00
* client: Add release-write commandLuiz Augusto von Dentz2017-07-051-0/+1
| | | | | | | | This adds release-write command which closes an existing fd unlocking the attribute: [Test peripheral:/service001f/char0020]# release-write [CHG] Attribute /org/bluez/hci1/dev_00_1B_DC_07_31_88/service001f/char0020 WriteAcquired: no
* client: Add acquire-write commandLuiz Augusto von Dentz2017-07-051-0/+2
| | | | | | | | | | | | | | | | This adds acquire-write command which uses D-Bus AcquireWrite methods to acquire a file descriptor to write to locking the attribute: [Test peripheral:/service001f/char0020]# acquire-write [CHG] Attribute /org/bluez/hci1/dev_00_1B_DC_07_31_88/service001f/char0020 WriteAcquired: yes AcquireWrite success: fd 7 MTU 65 [Test peripheral:/service001f/char0020]# write 00 Attempting to write fd 7 < ACL Data TX: Handle 3585 flags 0x00 dlen 8 ATT: Write Command (0x52) len 3 Handle: 0x0021 Data: 00
* client: Add unregister-descriptor commandLuiz Augusto von Dentz2017-06-301-0/+2
| | | | | | | | | | | This adds unregister-descriptor which can be used to unregister descriptors registered with register-descriptor: unregister-descriptor /org/bluez/app/service0xf48150/chrc0xf49a40/desc0xf4d350 [DEL] Descriptor /org/bluez/app/service0xf48150/chrc0xf49a40/desc0xf4d350 8260c653-1a54-426b-9e36-e84c238bc669 Vendor specific
* client: Add register-descriptor commandLuiz Augusto von Dentz2017-06-301-0/+2
| | | | | | | | | | | | This adds register-descriptor which can be used to register descriptors to a characteristic registered with register-characteristic: register-descriptor 8260c653-1a54-426b-9e36-e84c238bc669 read,write [NEW] Descriptor /org/bluez/app/service0x902610/chrc0x91d690/desc0x9095a0 8260c653-1a54-426b-9e36-e84c238bc669 Vendor specific [/org/bluez/app/service0x902610/chrc0x91d690/desc0x9095a0] Enter value: 00
* client: Add unregister-characteristic commandLuiz Augusto von Dentz2017-06-301-0/+2
| | | | | | | | | | | This adds unregister-characteristic which can be used to unregister characteristics registered with register-characteristic: unregister-characteristic /org/bluez/app/service0xc80150/chrc0xc99960 [DEL] Characteristic /org/bluez/app/service0xc80150/chrc0xc99960 00002a06-0000-1000-8000-00805f9b34fb Alert Level
* client: Add register-characteristic commandLuiz Augusto von Dentz2017-06-301-0/+2
| | | | | | | | | | | This adds register-characteristic which can be used to register characteristic to a service registered with register-service: register-characteristic 00002a06-0000-1000-8000-00805f9b34fb write-without-response [NEW] Characteristic /org/bluez/app/service0x1122150/chrc0x113fa40 00002a06-0000-1000-8000-00805f9b34fb Alert Level
* client: Add unregister-service commandLuiz Augusto von Dentz2017-06-301-0/+2
| | | | | | | | | | | | | | | | This adds unregister-service which can be used to unregister an application service registered with register-service: register-service 00001820-0000-1000-8000-00805f9b34fb [NEW] Primary Service /org/bluez/app/service0x92a150 00001820-0000-1000-8000-00805f9b34fb Internet Protocol Support [bluetooth]# unregister-service /org/bluez/app/service0x92a150 [DEL] Primary Service /org/bluez/app/service0x92a150 00001820-0000-1000-8000-00805f9b34fb Internet Protocol Support
* client: Add register-service commandLuiz Augusto von Dentz2017-06-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds register-service command which can be used to add GATT services to the application: [bluetooth]# register-service 00001820-0000-1000-8000-00805f9b34fb [NEW] Primary Service /org/bluez/app/service0x8c2610 00001820-0000-1000-8000-00805f9b34fb Internet Protocol Support [/org/bluez/app/service0x8c2610] Primary (yes/no): yes [bluetooth]# register-application [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001112-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001820-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb [CHG] Controller 00:1B:DC:07:31:88 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb Note: register-application still has to be called at the end to register with bluetoothd as everything is done with ObjectManager.
* client: Fix using RegisterProfileLuiz Augusto von Dentz2017-05-291-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | RegisterProfile no longer works for registering GattProfile instances as this functionality has been moved to RegisterApplication. In order to make this more clear this replaces the (un)register-profile with (un)register-application and enable ObjectManager, here is an example how to register for 12345678-1234-5678-1234-56789abcdef1: [bluetooth]# register-application 12345678-1234-5678-1234-56789abcdef1 Application registered bluetoothd[8777]: src/gatt-database.c:manager_register_app() Registering application: :1.483:/ bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/application, iface: org.bluez.GattProfile1 bluetoothd[8777]: src/gatt-database.c:proxy_added_cb() Object received: /org/bluez/agent, iface: org.bluez.Agent1 bluetoothd[8777]: src/gatt-database.c:profile_add() Added ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1" bluetoothd[8777]: src/gatt-database.c:client_ready_cb() GATT application registered: :1.483:/ [bluetooth]# unregister-application Application unregistered bluetoothd[8777]: src/gatt-database.c:profile_remove() Removed ":1.483/org/bluez/application/12345678-1234-5678-1234-56789abcdef1" bluetoothd[8777]: src/gatt-database.c:profile_release() Releasing ":1.483"
* client: Use selected attribute when selecting by UUIDLuiz Augusto von Dentz2017-03-151-1/+1
| | | | | | | There could be multiple instances of the same UUID, like e.g CCC and CEP, so instead of matching the first one found from the beginning this uses the current selected attribute as parent looking up existing child attributes first.
* client: Add unregister-profile commandLuiz Augusto von Dentz2015-03-251-0/+1
| | | | | This adds support to unregister-profile command which uses GattManager1.UnregisterProfile.
* client: Add register-profile commandLuiz Augusto von Dentz2015-03-251-0/+6
| | | | | This adds support to register-profile command which uses GattManager1.RegisterProfile.
* client: Add notify commandLuiz Augusto von Dentz2015-02-101-0/+1
| | | | | This command can be used to start/stop changes on the attribute value, it only works if an attribute has been selected with select-attribute.
* client: Add write commandLuiz Augusto von Dentz2015-02-101-0/+1
| | | | | | | | This command can be used to write attributes, it only works if an attribute has been selected with select-attribute. The data argument should be passed hexdump format, %02x separated by spaces, which is the same format used by read command.
* client: Add read commandLuiz Augusto von Dentz2015-02-101-0/+2
| | | | | This command can be used to read attributes, it only works if an attribute has been selected with select-attribute.
* client: Add command select-attributeLuiz Augusto von Dentz2015-02-101-0/+2
| | | | Command select-attribute can be used to select a service attribute.
* client: Add command list-attributesLuiz Augusto von Dentz2015-02-101-0/+2
| | | | This command can be used to list service attributes of a device.
* client: Add support for GattDescriptor1Luiz Augusto von Dentz2015-02-101-0/+3
| | | | | This add support for GattDescriptor1 interface detection and prints when they are added or removed.
* client: Add support for GattCharacteristic1Luiz Augusto von Dentz2015-02-101-0/+3
| | | | | This add support for GattCharacteristici1 interface detection and prints when they are added or removed
* client: Add support for GattService1Luiz Augusto von Dentz2015-02-101-0/+25
This add support for GattService1 interface detection and prints when they are added or removed