Commits

Commit Message Author Age Changes
f40565d5 shared/shell: Fix timeout parameter Fix help message and add proper optstr modifier so both -t/--timeout work properly. Luiz Augusto von Dentz 7 years ago 1 file, +3, -3
799a9eb3 shared/shell: Fix not reseting optind Not reseting optind may crash the tool if getopt and variants are called a second time. Luiz Augusto von Dentz 7 years ago 1 file, +1, -0
23b257aa shared/shell: Add bt_shell_{noninteractive_}quit The functions can be used to tell the shell to stop running. Luiz Augusto von Dentz 7 years ago 2 files, +41, -7
457a4f7d shared/mainloop-glib: Fix calling g_main_loop_quit with NULL This produces warnings such as: (process:5122): GLib-CRITICAL **: g_main_loop_quit: assertion 'loop != NULL' failed Luiz Augusto von Dentz 7 years ago 1 file, +3, -0
27d5e624 sharead/mainloop-glib: Fix mainloop_exit* These function shall cause the mainloop to quit. Luiz Augusto von Dentz 7 years ago 1 file, +2, -0
31f0c4e9 shared/btp: Fix return type in btp_send This function returns bool. Szymon Janc 7 years ago 1 file, +1, -1
06eb3d80 shared/btp: Allow to call btp_send without valid btp This allows to unconditionally call btp_send from code that generates events eg when mapping those from D-Bus events. Szymon Janc 7 years ago 1 file, +3, -0
48a2c3db mesh: node: Correct minor errors Correct length computation in node_parse_composition() Correct return value in node_set_model() An existing node is not an error Steve Brown 7 years ago 1 file, +2, -2
444af714 mesh: prov-db: Correct json database parsing "composition": { "cid": "0002", "pid": "0010", "vid": "0001", "crpl": "000a", "features": { "relay": false, "proxy": true, "friend": false, "lowPower": false }, "elements": [ { "elementIndex": 0, "location": "0001", "models": ["0000", "0001", "1001"] } ] }, Steve Brown 7 years ago 1 file, +12, -6
703229ad shared/shell: Use mainloop wrappers instead of GLIB directly This will allow the shell to be used by the likes of btmgmt. Luiz Augusto von Dentz 7 years ago 1 file, +26, -23
4653ff97 shared/util: Add strdelimit and strsuffix Luiz Augusto von Dentz 7 years ago 2 files, +48, -0
a287cb42 shared/mainloop: Add GLIB wrapper This adds wrappers function to interface with GLIB mainloop so applications can use mainloop functions no matter what is the underline implementation. Note: Most functions are not actually implemented on purpose since both io and timeout functions already exists for GLIB covering the same functionality. Luiz Augusto von Dentz 7 years ago 2 files, +114, -1
fd656b1c client: Don't auto register agent on non-interactive mode There is no use to register an agent when on non-interactive mode. Luiz Augusto von Dentz 7 years ago 1 file, +2, -1
21e4ed93 shared/shell: Set NON_INTERACTIVE env This sets NON_INTERACTIVE environment variable which applications can then use to query under what mode they are running. Luiz Augusto von Dentz 7 years ago 1 file, +3, -0
982c73e1 tools/obexctl: Only enable attach input when connected Luiz Augusto von Dentz 7 years ago 1 file, +2, -1
69623208 tools/bluetooth-player: Only enable attach input when connected Luiz Augusto von Dentz 7 years ago 1 file, +2, -1
0985a594 shared/shell: Add non-interactive mode This detects if any command was given as parameter, execute it and exit disabling all other outputs: bluetoothctl list Controller 00:1B:DC:07:31:88 Vudentz's T460s #1 [default] Controller B8:8A:60:D8:17:D7 BlueZ-1 It is also possible to run interactive command with use of timeout option: bluetoothctl --timeout=10 advertise on Agent registered [CHG] Controller 00:1B:DC:07:31:88 SupportedInstances: 0x04 [CHG] Controller 00:1B:DC:07:31:88 ActiveInstances: 0x01 Advertising object registered Tx Power: off Name: off Apperance: off Luiz Augusto von Dentz 7 years ago 1 file, +35, -2
c3f7b673 adapter: Add ConnectDevice method This allows to connect device without doing general discovery. This is needed for some of qualification tests where there is no general discovery upfront and we need to do connection to device with provided address. Another usecase is for scenario where scanning happen on one controller but connection handling on another. New device object is announced only if physical connection was successful. On success this method returns path to created device object. After ConnectProfile return bluetoothd continue with services discovery and profile connection. This patch implements bare minimum properties needed for connection - address and address type. If needed eg. for non-NFC based OOB it could be extended with more options. Szymon Janc 7 years ago 3 files, +237, -14
19cb7b8c shared/shell: Fix history display with no saved prompt Prompt needs to be restored always since default prompt is provided. This fix issues with history line being clobbered by offset of prompt length. [bluetooth]# connect 9C:5C:F9:AB:C5:82 Attempting to connect to 9C:5C:F9:AB:C5:82 [bluetooth]# disconnect 9C:5C:F9:AB:C5:82 Attempting to disconnect from 9C:5C:F9:AB:C5:82 Failed to connect: org.bluez.Error.Failed Successful disconnected [bluetooth]# discoverable on Changing discoverable on succeeded [CHG] Controller 5C:E0:C5:34:AE:1C Discoverable: yes [bluetooth]# disconnect discoverable on after pressing up-down [bluetooth]# disconnect dis5C:F9:AB:C5:82 Szymon Janc 7 years ago 1 file, +4, -7
8b21a74f adapter: Fix crash when discovering If client exits while start discovery command is pending it may produce the following crash: Invalid read of size 8 at 0x49036E: start_discovery_complete (adapter.c:1428) by 0x4D4957: request_complete (mgmt.c:261) by 0x4D5BD4: can_read_data (mgmt.c:353) by 0x4E717A: watch_callback (io-glib.c:170) by 0x50CEB76: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x50CEF1F: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x50CF231: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x40CEC0: main (main.c:770) Address 0x0 is not stack'd, malloc'd or (recently) free'd Luiz Augusto von Dentz 7 years ago 1 file, +4, -2
1bf03369 shared/io: Don't process HUP cond before others When a HUP happens there maybe data left to be processed so the disconnect handler shall be called last. Luiz Augusto von Dentz 7 years ago 1 file, +4, -1
bc3f2cff device: Fix probing service twice If there is already a service for a given profile there is no point in probing it again. Luiz Augusto von Dentz 7 years ago 1 file, +5, -0
0d57a236 adapter: Fix not clearing connectable setting on power off When kernel control of connectable is used daemon doesn't enable connectable setting unless discoverable. Both settings are permanent over power toggle unless discoverable timeout was set. In that case discoverable flag is cleared by kernel on power off. This leads to connectable flag being left enabled when toggling power on discoverable adapter with timeout set. This has some implications on system behaviour: - accepting connection from unknown devices - not being able to advertise as broadcaster Since kernel doens't know the reason for enabling connectable flag (and thus if disable if on power off) this needs to be handled in bluetoothd. Szymon Janc 7 years ago 1 file, +29, -0
9c90fc50 client: Add clear command for advertise Adds the clear command to advertise-related commands to clear individual fields or whole of advertise configuration. ERAMOTO Masaya 7 years ago 1 file, +70, -0
4d04b9f5 client: Introduce ad_disable_{uuids,service,manufacturer} ERAMOTO Masaya 7 years ago 2 files, +39, -3
f0fccd6f client: Introduce data_clear() calling ->clear() ERAMOTO Masaya 7 years ago 1 file, +28, -11
0540ff63 client: Improve help messages for advertise ERAMOTO Masaya 7 years ago 1 file, +7, -7
3df94353 client: Fix data growth if reconfiguring ad service Since commit 65eff5c2 ("client: Rename set-service to service"), data are appended in every run of advertise service with data arguments as below: [bluetooth]# service 1 1 2 [bluetooth]# service UUID: SDP(1) 01 02 .. [bluetooth]# service 1 1 2 3 [bluetooth]# service UUID: SDP(1) 01 02 01 02 03 ..... ERAMOTO Masaya 7 years ago 1 file, +2, -0
7c6d0647 client: Not output ad service info if no uuid sets ERAMOTO Masaya 7 years ago 1 file, +5, -2
3de5807a client: Fix null output for ad service uuid If getting the advertise service information without setting, outputs null as UUID as below: [bluetooth]# service UUID: ((null)) ERAMOTO Masaya 7 years ago 1 file, +1, -1
3e900572 adapter: Fix initializing GATT server for BR/EDR only controllers Controller that do not support LE bearer shall not use GATT server for anything. Luiz Augusto von Dentz 7 years ago 1 file, +9, -6
287cd9b5 mesh: meshctl: Add subscriptions to node structure and json database sub-add 0101 c000 1000 { "modelId":"1000", "bind":[ 1 ], "subscribe":[ "c000" ] }, Steve Brown 7 years ago 5 files, +99, -11
c3610968 obexd: Fix null response name Prints out "<unknown>" string if there is no response name as below: obexd[8117]: obexd/src/obex.c:cmd_connect() obexd[8117]: CONNECT(0x0), (null)(0xffffffff) ERAMOTO Masaya 7 years ago 1 file, +4, -55
2fa53e0f advertising: only parse adv from adv interfaces client_proxy_added is called for every interface on an object passed in to the dbus RegisterAdvertisement method. This can cause a NULL dereference to occur and a failure status in the reply on dbus RegisterAdvertisement method calls. The fix is to return early from client_proxy_added if the proxy interface is not org.bluez.LEAdvertisement1. If this early return is not there, two different error paths could occur. 1) client_proxy_added is first called with the org.bluez.LEAdvertisement1 interface and then with another interface. The second call will fail the parse_advertisement call and possibly cause a NULL dereference on the dbus_message_unref if add_client_complete has already occurred. 2) client_proxy_added is first called with an unknown interface and then org.bluez.LEAdvertisement1. The first call will cause parse_advertisement to fail and a failure to be replied to the client calling RegisterAdvertisement. The advertisement may be successfully registered on the second client_proxy_added call but a NULL dereference will occur on the call to dbus_message_new_method_return in add_client_complete. Matt Schulte 7 years ago 1 file, +5, -0
0412f384 mesh: meshctl: Conform command and function names Also improve readability of commands descriptions Steve Brown 7 years ago 1 file, +39, -39
7f33e5cc mesh: meshctl: Cleanup status messaging Remove redundant status tests mesh_status_str() also decodes MESH_STATUS_SUCCESS Regularize text in status messages Add helper function to print model id Steve Brown 7 years ago 1 file, +82, -83
3cb97705 mesh: meshctl: Add heartbeat get subscribe and publish [config: Target = 0100]# hb-pub-get Set heartbeat for node 0100 status: Success Destination: c000 Count: 00 Period: 00 TTL: ff Features: 0000 Net_Idx: 0000 [config: Target = 0100]# hb-sub-get Heartbeat subscription status for node 0100 status: Success Source: 0100 Destination: 0100 Period: 00 Count: 00 Min Hops: 7f Max Hops: 00 Steve Brown 7 years ago 1 file, +14, -0
1b5ece87 shared/btp: Change struct member order for device found as in btp This patch changes member order in device found struct definition to be compatible with btp specification. Grzegorz Kolodziejczyk 7 years ago 1 file, +1, -1
30faa996 tools/btpclient: Fix ad property manufacturer data name This patch fixes wrong naming of advertising instance data property. Grzegorz Kolodziejczyk 7 years ago 1 file, +1, -1
d13f579a shared/gatt-db: Fix declaration attributes permission According to Bluetooth Core specification v4.2 (Vol. 3, part G, section 3.1), service declararion attributes should have only READ permission. The same obligation has charateristic declaration and include service declaration attributes. Without this permission connected clients could corrupt GATT database by writing to declaration attributes. After thatm service discovery fails in other clients. Konstantin Zhukov 7 years ago 1 file, +17, -13
5d2baeb6 tools/obexctl: Fix display of size on completion Outputs zero as the transferred size on completion of transfer as below: [CHG] Transfer /org/bluez/obex/server/session3/transfer2 Transferred: 5339965 (@32KB/s 00:01) [CHG] Transfer /org/bluez/obex/server/session3/transfer2 Transferred: 5372726 (@32KB/s 00:00) [CHG] Transfer /org/bluez/obex/server/session3/transfer2 Transferred: 0 (@18446744073704178KB/s 00:00) [CHG] Transfer /org/bluez/obex/server/session3/transfer2 Status: complete ERAMOTO Masaya 7 years ago 1 file, +8, -0
3c2d4613 tools/obexctl: Fix retrieving non-existent iterator If transfer is completed with one time file transfer, transfer_property_changed() is called with the iter argument, which is NULL, as below: #0 transfer_property_changed (proxy=<optimized out>, name=<optimized out>, iter=0x0, user_data=0x5555557b9060) at tools/obexctl.c:1896 #1 0x000055555556e3cf in properties_changed (conn=<optimized out>, msg=<optimized out>, user_data=0x5555557c8300) at gdbus/client.c:433 #2 0x000055555556c830 in signal_filter (connection=0x5555557c65a0, message=0x5555557ccea0, user_data=0x5555557cdbf0) at gdbus/watch.c:407 #3 0x000055555556c291 in message_filter (connection=0x5555557c65a0, message=0x5555557ccea0, user_data=<optimized out>) at gdbus/watch.c:557 #4 0x00007ffff7888661 in dbus_connection_dispatch () from /lib/x86_64-linux-gnu/libdbus-1.so.3 #5 0x000055555556b010 in message_dispatch (data=0x5555557c65a0) at gdbus/mainloop.c:72 #6 0x00007ffff7b0be25 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #7 0x00007ffff7b0c1f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #8 0x00007ffff7b0c502 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x0000555555577594 in bt_shell_run () at src/shared/shell.c:833 #10 0x000055555556516d in main (argc=<optimized out>, argv=<optimized out>) at tools/obexctl.c:2116 ERAMOTO Masaya 7 years ago 1 file, +3, -0
bb160515 obexd: Emit Size property of transfer after open() Emits the Size property of transfer after calling ->open() because it may update the size information. ERAMOTO Masaya 7 years ago 1 file, +3, -0
3e9617fc obexd: Use emitting function wrapped for transfer Also replaces emit_transfer_progress() with the new wrapper function because the total/transferred arguments have not been used since commit a5c2b6e8 ("obexd: Align client and server spec of org.bluez.obex.Transfer1") and g_dbus_emit_property_changed_full() checks if the path argument is NULL. ERAMOTO Masaya 7 years ago 2 files, +15, -16
6811debb unit/test-ecc: Fix uninitialised values Conditional jump or move depends on uninitialised value(s) at 0x40208C: test_sample (test-ecc.c:106) by 0x4022AB: test_invalid_pub (test-ecc.c:272) by 0x406DA2: run_callback (tester.c:415) by 0x4E83576: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E86B76: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E86F1F: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E87231: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x408245: tester_run (tester.c:830) by 0x401CC3: main (test-ecc.c:291) Conditional jump or move depends on uninitialised value(s) at 0x4020D6: test_sample (test-ecc.c:113) by 0x4022AB: test_invalid_pub (test-ecc.c:272) by 0x406DA2: run_callback (tester.c:415) by 0x4E83576: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E86B76: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E86F1F: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x4E87231: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5400.3) by 0x408245: tester_run (tester.c:830) by 0x401CC3: main (test-ecc.c:291) Luiz Augusto von Dentz 7 years ago 1 file, +4, -0
b22a2596 shared/gatt-client: Reset callbacks when unregistering If user application is unregistering a notification handler its callbacks shall not be called even CCC write is still holding a reference to notify_data. Luiz Augusto von Dentz 7 years ago 1 file, +7, -1
1d4d0d81 mgmt-tester: Add testcases for advertising while connected This patch adds testcases which verifies if Linux Kernel properly enables advertising while is connected (LE) based on supported LE states in the controller Łukasz Rymanowski 7 years ago 1 file, +313, -55
de9a43dc mgmt-tester: Add test_le_full Łukasz Rymanowski 7 years ago 1 file, +5, -2
b54111d2 emulator: Add initial LE states to btdev and API to set new one Łukasz Rymanowski 7 years ago 4 files, +31, -1
b83b171c adapter: Remove spurious propery changed signal There is no "Connectable" property on Adapter1 interface. Szymon Janc 7 years ago 1 file, +0, -4
Previous Next