Commits

Commit Message Author Age Changes
c52903c4 Mesh: Fix in Config GATT Proxy Set According to the 4.3.2.10 Config GATT Proxy Set, message should have only 1 byte. Robert Lubaś 7 years ago 1 file, +1, -2
e10c204e gatt: Fix crash with BR/EDR only adapter adapter->database can be NULL if controller is BR/EDR only or LE was disabled. Make btd_gatt_database_restore_svc_chng_ccc accept NULL pointer and silently ignore it similiar to rest of btd_gatt_database API. Invalid read of size 8 at 0x164DCB: btd_gatt_database_restore_svc_chng_ccc (src/bluez-git/src/bluetoothd) by 0x17B70F: read_info_complete (src/bluez-git/src/bluetoothd) by 0x1A7E58: request_complete (src/bluez-git/src/bluetoothd) by 0x1A89AD: can_read_data (src/bluez-git/src/bluetoothd) by 0x1B5752: watch_callback (src/bluez-git/src/bluetoothd) by 0x4E852C5: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5600.0) by 0x4E856A0: ??? (in /usr/lib/libglib-2.0.so.0.5600.0) by 0x4E859D1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5600.0) by 0x125058: main (src/bluez-git/src/bluetoothd) Address 0x40 is not stack'd, malloc'd or (recently) free'd Szymon Janc 7 years ago 1 file, +3, -0
fde2b058 mesh: Return exit status for non-interactive ERAMOTO Masaya 7 years ago 1 file, +3, -2
a0b886e2 gatt: Add support for storing Service Changed CCC value This adds support for storing CCC value of Service Changed characteristic. Once bluetoothd is restart stored values are read and any device subscribed to indications will receive Service Changed indication with 0x00010-0xffff value. This is to invalidate any non-core services since there is no way to verify if applications will register their services in same order (or at all). This fix accessing invalid handles by stacks that rely only on Service Changed indication for rediscovery ie. Apple iOS. Szymon Janc 7 years ago 6 files, +180, -2
2c3bba7b adapter: Don't refresh adv_manager for non-LE devices btd_adv_manager_refresh is called upon MGMT_SETTING_DISCOVERABLE setting change but as only LE adapters have an adv_manager, this leads to segmentation fault for non-LE devices: 0 btd_adv_manager_refresh (manager=0x0) at src/advertising.c:1176 1 0x0000556fe45fcb02 in settings_changed (settings=<optimized out>, adapter=0x556fe53f7c70) at src/adapter.c:543 2 new_settings_callback (index=<optimized out>, length=<optimized out>, param=<optimized out>, user_data=0x556fe53f7c70) at src/adapter.c:573 3 0x0000556fe462c278 in request_complete (mgmt=mgmt@entry=0x556fe53f20c0, status=<optimized out>, opcode=opcode@entry=7, index=index@entry=0, length=length@entry=4, param=0x556fe53eb5f9) at src/shared/mgmt.c:261 4 0x0000556fe462cd9d in can_read_data (io=<optimized out>, user_data=0x556fe53f20c0) at src/shared/mgmt.c:353 5 0x0000556fe46396e3 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:170 6 0x00007fe351c980e5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 7 0x00007fe351c984b0 in ?? () from /usr/lib64/libglib-2.0.so.0 8 0x00007fe351c987c2 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 9 0x0000556fe45abc75 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:770 This commit prevents the call to btd_adv_manager_refresh for non-LE devices. antoine.belvire@laposte.net 7 years ago 1 file, +2, -1
9f1388f2 client: Attempt to convert the device path to address Printing the object path is not only long but it also may change. Luiz Augusto von Dentz 7 years ago 1 file, +24, -8
650a0d81 client: Add envs for proxies This adds envs for device and adapter proxies found so other files are able to access them. Luiz Augusto von Dentz 7 years ago 1 file, +4, -0
53b8b8df shared/shell: Add export command This adds export command to default menu which can be used to print the environment variables that have been set. Luiz Augusto von Dentz 7 years ago 1 file, +13, -0
ed5ee4d4 shared/shell: Don't allocate any data if env value is NULL If value is NULL there is no point in allocating any data if value is NULL since bt_shell_get_env would return NULL anyway, also this makes sure the existing value is freed which means passing NULL can remove an env like it was intended. Luiz Augusto von Dentz 7 years ago 1 file, +6, -0
4dc3fd37 Mesh: Fix TTL in Config Heartbeat Publication Set In Mesh Profile spec 4.2.17.4 Heartbeat Publication TTL value range is 0x00-0x7F. In cmd_hb_pub_set heartbeat ttl was set to DEFAULT_TTL 0xFF, this patch fix this by adding ttl param to hb-pub-set. Robert Lubaś 7 years ago 1 file, +6, -6
c79ad882 gatt: Fix checking for paired flag instead of bonded Device state should remain valid for devices that are bonded/stored not only paired. Luiz Augusto von Dentz 7 years ago 1 file, +2, -2
382ad090 Mesh: add 'node-reset' command This patch adds 'node-reset' command which can be used to reset a node (other than a Provisioner) and remove it from the network. Atul Rai 7 years ago 1 file, +18, -0
f7c7a24b device: Fix storing GATT attributes This fix two issues: - not storing attributes after pairing if device is using RPA - storing attributes for temporary device if it is using static or public address Szymon Janc 7 years ago 1 file, +10, -3
3fd2a9cf device: Change storage warning to debug messages It is normal for device to have private address so there is no reason to issue warning message when not storing data for it. Szymon Janc 7 years ago 1 file, +4, -4
0a2a2b0c mesh/meshctl: Exit cleanly if start up fails This addresses the following issue: if the program exits after bt_shell_init() has been called, but prior to calling bt_shell_run() (e.g., failing to start meshctl due to invalid input configuration), the original shell is messed up after that. Calling bt_shell_cleanup() on faiure fixes this. Inga Stotland 7 years ago 1 file, +9, -5
62168ef6 shared/mainloop: Fix overwriting exit status Since mainloop_run() overwrites the exit_status variable even if having called mainloop_{quit,exit_*}(), such as in case executing btmgmt with an invalid command, it is initialized in declaration. ERAMOTO Masaya 7 years ago 1 file, +1, -3
42a6847f tools/btmgmt: Return exit status for non-interactive ERAMOTO Masaya 7 years ago 1 file, +1, -1
d2f105c3 tools/obexctl: Return exit status for non-interactive ERAMOTO Masaya 7 years ago 1 file, +3, -2
e2a31b1b tools/bluetooth-player: Return exit status for non-interactive ERAMOTO Masaya 7 years ago 1 file, +3, -2
14388c1d client: Return exit status for non-interactive ERAMOTO Masaya 7 years ago 1 file, +3, -2
ab7da5b2 shared/shell: Return exit status to caller ERAMOTO Masaya 7 years ago 2 files, +6, -3
834a45d2 Add support for requiring min key size for access GATT characteristics This allows to configure bluetoothd to require minimum encryption key size when accessing GATT server characteristics. It is a global configuration option affecting whole GATT database. Szymon Janc 7 years ago 14 files, +134, -36
db663b1d client: Parse all options passed for GATT attribute This parses the options given to Acquire*, WriteValue and ReadValue. Luiz Augusto von Dentz 7 years ago 1 file, +55, -42
2dded6f8 gatt: Send device and link options with AcquireNotify This adds the device and link options to AcquireNotify as mentioned in the documentation. Luiz Augusto von Dentz 7 years ago 1 file, +115, -64
fe86d4ad doc/gatt-api: Update documentation regarding link option This reflects what the code has already doing so any server operation which requires the device option shall also get the link type as well. Luiz Augusto von Dentz 7 years ago 1 file, +3, -0
89564618 gatt: Fail to register service with invalid Includes property This is optional property but if it is present it must be of proper type. Szymon Janc 7 years ago 1 file, +4, -1
806ba442 shared/gatt-client: Fix tracking current service during discovery We should mark service as completed before trying to insert another characteristic - in case inserting characteristic for new service fails, previous one won't be discarded. Andrzej Kaczmarek 7 years ago 1 file, +13, -13
a07eb3a5 shared/gatt-client: Fix discovery of discontinuous database If local cache of peer's database has gaps where new services appear after reconnection, GATT client will attempt to discover all included services and characteristics definitions between starting handle of first service and end handle of last service. This means the result will contain also attributes which are already present in active services in local database and thus attempting to add them again will fail. To fix this, instead of discovering whole range we'll only discover ranges for missing services - starting with included services then characteristics. To optimize this process we'll merge ranges of adjacent services and any empty spaces in between - the result is basically set of ranges without any known service. In most cases this works the same or very similar to current implementation. This issue can sometimes be observed with iOS devices as ANCS and CTS services may not be available all the time. Andrzej Kaczmarek 7 years ago 1 file, +106, -10
c8e7911e shared/gatt-client: Fix removing services from pending list We should remove from pending list service which was just processed, not the one that has just started being processed. Andrzej Kaczmarek 7 years ago 1 file, +6, -3
009acf56 shared/shell: Add bt_shell_cleanup This releases resources used for shell initialization. This is needed as a separate function to enable clean shutdown when an application needs to exit prior to calling bt_shell_run(), e.g., when failing program initialization based on processed command line input options. Inga Stotland 7 years ago 1 file, +7, -2
76d29b9b client: Fix stay on error handling in non-interactive Returns the FAILURE status since there is no meaning of stay in non-interactive mode when executing some commands with an invalid argument or with no controller. Also returns with the SUCCESS status when getting a scan filtering value or disconnecting a non-default device. ERAMOTO Masaya 7 years ago 2 files, +32, -33
73233aa4 gatt: Properly handle service changes when offline If remote peer is disconnected the indication shall be cached so when the peer connects again it receives the changes. Luiz Augusto von Dentz 7 years ago 3 files, +83, -17
c0e2b3d0 gatt: Add confirmation callback This replaces indicate flag with confirmation callback to enable setting custom callback if necessary. Luiz Augusto von Dentz 7 years ago 1 file, +20, -13
302a03f1 shared/shell: Fix short option parsing The index value used for detecting and validating a short option was not reset after processing a first short option. This prevented the correct parsing of additional short options. Fixed by resetting the index value back to original after each iteration. Inga Stotland 7 years ago 1 file, +2, -0
4f716207 doc/gatt-api: Includes shall not be mandatory It is perfectly fine to have a service without any Includes. Luiz Augusto von Dentz 7 years ago 2 files, +2, -2
e8ae7a4f build: Fix make distcheck Luiz Augusto von Dentz 7 years ago 2 files, +4, -8
bff0c2ae build: Fix not disabling obexd when given --disable-obex --disable-obex shall disable building obexd daemon. Luiz Augusto von Dentz 7 years ago 2 files, +7, -2
d3f155e4 client: Add authorization request handling for attribute operations This patch adds optional authorization request for reading, writing of gatt database attributes. Grzegorz Kolodziejczyk 7 years ago 2 files, +136, -3
bc6facb0 client: Update read callbacks with invalid offset error handlers This patch adds invalid offset handlers to read callbacks of attributes. Grzegorz Kolodziejczyk 7 years ago 1 file, +8, -0
4c22678e gatt: Add org.bluez.Error.InvalidOffset for long read procedure This patch adds handling of invalid offset error for gatt database in case if offset in read blob would be invalid. "The Read Blob Request is repeated until the Read Blob Response’s Part Attribute Value parameter is zero or an Error Response is sent by the server with the Error Code set to Invalid Offset." Bluetooth Core 5.0, 4.12.2 "If the prepare Value Offset is greater than the current length of the attribute value then all pending prepare write values shall be discarded for this client, the queue shall be cleared and then an Error Response shall be sent with the «Invalid Offset»." Bluetooth Core 5.0, 3.4.6.3 Grzegorz Kolodziejczyk 7 years ago 2 files, +4, -0
1abee587 client: Fix reading long values While value has more than single MTU can carry long read procedure will be triggered. In such cases offset need to bo considered while getting value from storage. Grzegorz Kolodziejczyk 7 years ago 1 file, +47, -2
9786f580 gatt-database: Add support for Included service Parse Includes property and register any object path found as included service. Avichal Agarwal 7 years ago 1 file, +79, -0
6e8f9472 doc/gatt-api.txt: Add support for Included Service included service support implemented at server side Avichal Agarwal 7 years ago 1 file, +1, -1
99209ba5 Mesh: Fix proxy PDU SAR msg length In read_pipe function there was a mishandled case when the msg has more than one segment. As a result e.g. after provisioning the capabilities discovery was incorrect parsed. Robert Lubaś 7 years ago 1 file, +8, -8
80c56880 shared/shell: Fix memory leak by generator for submenu Since asprintf() allocates new memory when a submenu command is complemented, the memory leak occurs as below: 8 bytes in 1 blocks are definitely lost in loss record 18 of 179 at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x5679C99: strdup (strdup.c:42) by 0x13B1E7: find_cmd.constprop.2 (shell.c:597) by 0x13B2D1: cmd_generator (shell.c:646) by 0x53B976D: rl_completion_matches (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x13BA91: shell_completion (shell.c:777) by 0x53B98B6: ??? (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x53B9A99: rl_complete_internal (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x53B02EE: _rl_dispatch_subseq (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x53B07B5: readline_internal_char (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x53C8F84: rl_callback_read_char (in /lib/x86_64-linux-gnu/libreadline.so.7.0) by 0x13AD80: input_read (shell.c:1065) ERAMOTO Masaya 7 years ago 1 file, +7, -1
5aa0dd42 shared/shell: Return NULL if generator error occur Explicitly returns NULL if asprintf() fails, since the asprintf(3) man-page says that the contents of the first argument are undefined if any error occurs. ERAMOTO Masaya 7 years ago 1 file, +7, -2
1c1f807c Mesh: Close net session on device disconnection On device disconnection, net session is not closed. On next attempt to provision/connect a device, net session proxy is not updated by net_session_open() as proxy_in is not NULL. This causes meshctl to use invalid proxy resulting in below crash. 0 strlen () at ../sysdeps/x86_64/strlen.S:106 1 0x00007f3a3c8b1ac4 in _dbus_string_init_const () from libdbus-1.so.3 2 0x00007f3a3c89ed15 in ?? () from libdbus-1.so.3 3 0x00007f3a3c89fba0 in dbus_message_new_method_call () from libdbus-1.so.3 4 0x0000000000419880 in g_dbus_proxy_method_call at gdbus/client.c:997 5 0x000000000040ab9d in mesh_gatt_write at mesh/gatt.c:347 6 0x000000000040d761 in send_mesh_pkt at mesh/net.c:1227 7 send_seg at mesh/net.c:1325 8 0x000000000040fa60 in net_access_layer_send at mesh/net.c:2163 9 0x0000000000413c74 in config_send at mesh/config-client.c:418 10 0x0000000000414886 in cmd_composition_get at mesh/config-client.c:470 11 0x000000000041ffd9 in cmd_exec at src/shared/shell.c:356 12 menu_exec at src/shared/shell.c:383 13 0x00000000004203a5 in shell_exec at src/shared/shell.c:426 14 0x0000000000420d24 in rl_handler (input=0x2259aa0 "composition-get ") at src/shared/shell.c:571 15 0x00007f3a3c45d6f5 in rl_callback_read_char () from libreadline.so.6 16 0x0000000000420229 in input_read at src/shared/shell.c:1034 17 0x0000000000421655 in watch_callback at src/shared/io-glib.c:170 18 0x00007f3a3cb1a04a in g_main_context_dispatch () from libglib-2.0.so.0 19 0x00007f3a3cb1a3f0 in ?? () from libglib-2.0.so.0 20 0x00007f3a3cb1a712 in g_main_loop_run () from libglib-2.0.so.0 21 0x0000000000421bf5 in mainloop_run () at src/shared/mainloop-glib.c:73 22 0x000000000042115a in bt_shell_run () at src/shared/shell.c:962 23 0x0000000000405c5d in main at mesh/main.c:1992 Atul Rai 7 years ago 1 file, +3, -2
340a7b04 shared/shell: Enable generator for submenus This enables command generator to work with submenu commands like: [bluetooth]# advertise. advertise.appearance advertise.manufacturer advertise.timeout advertise.clear advertise.name advertise.tx-power advertise.duration advertise.service advertise.uuids Note that by default submenus commands will not be shown until . is present in the input, that way only one command list is active at time. Luiz Augusto von Dentz 7 years ago 1 file, +33, -6
969dfae9 shared/gatt-client: Fix attempting to discovery with handle 0 If a service was removed an no other service was added it may happen that pending_svc has not empty but first_svc and last_svc has not been set causing the following request: < ACL Data TX: Handle 76 flags 0x00 dlen 11 ATT: Read By Type Request (0x08) len 6 Handle range: 0x0000-0x0000 Attribute type: Include (0x2802) Luiz Augusto von Dentz 7 years ago 1 file, +1, -1
fad3abf4 shared/gatt-client: Fix secondary service discovery If the error returned is either BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND or BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE the discovery shall be marked as successful and no error shall be printed. Luiz Augusto von Dentz 7 years ago 1 file, +5, -3
Previous Next