Luiz Augusto von Dentz
ea873d1a6a
android/haltest: Add support for loading Audio HAL
...
This makes audio.a2dp.default.so to be loaded by haltest.
2014-01-10 15:37:46 +02:00
Luiz Augusto von Dentz
48a962ec6d
android: Load bluetooth.default.so as a module
...
This makes haltest and android-tester to load bluetooth.default.so
instead of linking directly to it.
2014-01-10 15:07:23 +02:00
Anderson Lizardo
37f1b609ae
android/client: Fix uninitialized "sock_fd" variable
...
If EXEC() macro is called with the first pointer argument NULL, sock_fd
will not be initialized. Given that the NULL check is not fatal, it is a
good idea to initialize the variable to -1 so the code has defined
behavior on this situation.
Detected by clang:
android/client/if-sock.c:251:7: error: variable 'sock_fd' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
2014-01-06 21:22:28 +02:00
Anderson Lizardo
7ce750c3e4
android/client: Use memcpy() for getting CMSG_DATA()
...
This is how it is done in all other places in BlueZ. Also drop
unnecessary "descs" local variable.
Fixes clang error:
android/client/if-sock.c:164:11: error: cast from 'unsigned char *' to
'int *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
2014-01-06 21:22:15 +02:00
Anderson Lizardo
e957c5059e
android/client: Remove duplicate "const" specifier
...
Fixes clang errors like:
android/client/if-hh.c:181:39: error: duplicate 'const' declaration
specifier [-Werror,-Wduplicate-decl-specifier]
2014-01-06 21:22:02 +02:00
Anderson Lizardo
eec27c1cfc
android/client: Fix incorrect usage of bt_state_t2str()
...
Fixes clang error:
android/client/if-bt.c:313:54: error: implicit conversion from
enumeration type 'bt_status_t' to different enumeration type
'bt_state_t' [-Werror,-Wenum-conversion]
2014-01-06 21:21:50 +02:00
Szymon Janc
5ea252c446
android/haltest: Implement missing functions from bluetooth HAL
...
Implement functions added in Android 4.3+ to Bluetooth HAL.
2014-01-01 18:29:03 +02:00
Szymon Janc
475e1c3639
android/haltest: Improve EXEC macro robustness
...
Print info about method being NULL instead of crashing.
2014-01-01 18:28:56 +02:00
Andrei Emeltchenko
3cc6ed2d30
android/haltest: Add uuid autocompletions
2013-11-26 17:42:36 +02:00
Andrei Emeltchenko
7eac27334f
android/haltest: trivial: Fix typo channle -> channel
2013-11-26 17:42:25 +02:00
Andrei Emeltchenko
71e455c8b9
android/haltest: Zero initialize cmsg buffer
2013-11-21 16:43:40 +02:00
Andrei Emeltchenko
d39e947a1f
android/debug: Move debug functions to hal-utils.c
...
Debug functions will be used by HALs and haltest.
2013-11-14 10:27:15 +02:00
Andrei Emeltchenko
bec0539ba9
androi/haltest: Make debug functions return const string
2013-11-08 16:21:14 +02:00
Andrei Emeltchenko
d18c36e232
android/debug: Convert uuid helper to use uint8_t buffer
...
At this moment Android uses uint8_t * and bt_uuid_t for representing
UUID for different HALs. Convert debug helper to use uint8_t * string.
2013-11-08 15:57:25 +02:00
Andrei Emeltchenko
5af8d164ac
android: Create debug hal-utils helpers
...
Create hal-utils helpers which helps to decode packets Android
sends through HAL interface.
2013-11-08 15:40:25 +02:00
Jerzy Kasenberg
fcd2812197
android/client: Add ssp key confirmation helper
...
This patch adds handling of ssp_request_cb that prints prompt
asking user if pass key matches. User does not need to type:
bluetooth ssp_reply address BT_SSP_VARIANT_PASSKEY_CONFIRMATION 1 key
2013-11-08 15:13:06 +02:00
Jerzy Kasenberg
72c31efadf
android/client: Add pin handling for bind
...
This patch ask user for ping in pin_request_cb, which does
what otherwise would be required to manually type
bluetooth pin_reply address pin.
2013-11-08 15:13:04 +02:00
Jerzy Kasenberg
037632dc24
android/client: Add prompting for answer
...
This patch allows to switch to prompt mode where user will be asked
to supply some information.
2013-11-08 15:13:03 +02:00
Jerzy Kasenberg
b07cff3c6b
android/client: Split terminal_process_char
...
This patch changes the way input characters are handled in function
terminal_process_char from big switch statement to smaller functions.
No functionality is changed in this patch.
Splitting to smaller functions will make easier to change behaviour
of terminal for prompt handling when user will be asked for something
and history substitution or auto completion will not be used.
2013-11-08 15:13:01 +02:00
Jerzy Kasenberg
316ddc8b96
android/client: Add command line arguments
...
This patch adds command line argument parsing.
Options added:
-h, --help
-n, --no-init - disable initialization of interfaces
--version
2013-11-08 15:13:00 +02:00
Jerzy Kasenberg
df3b6c7dc0
android/client: Initialize all interfaces at start
...
Patch adds function that initializes all HAL interfaces.
2013-11-08 15:12:58 +02:00
Jerzy Kasenberg
464d9b64af
android/client: Add NELEM macro for count elements
...
NELEM macro will be used in several places.
2013-11-08 15:12:57 +02:00
Jerzy Kasenberg
507c457d3c
android/client: Export get_interface_method
...
This method will be used outside tab completion.c.
2013-11-08 15:12:55 +02:00
Jerzy Kasenberg
ef0609cc15
android/client: Fix build for android 4.3
...
Chagnes in HAL interface from 4.3 to 4.4 result in build failure:
target thumb C: haltest <=
external/bluetooth/bluez/android/client/if-gatt.c
external/bluetooth/bluez/android/client/if-gatt.c:225:1:
error: unknown type name 'btgatt_gatt_id_t'
This patch allows to build GATT for Android 4.3 (api level 18).
2013-11-05 14:55:37 +02:00
Jerzy Kasenberg
126aad3a5d
android/client: Change adapter to bluetooth
...
This fixes all places where adapter should be changed to
bluetooth.
2013-11-05 12:31:27 +02:00
Jerzy Kasenberg
c73ddc609b
android/client: Fix style and typos
...
Fixes spelling errors and white space style errors.
2013-11-05 12:31:25 +02:00
Andrei Emeltchenko
8baa84b767
android/client: Fix printing not NULL terminated strings
...
Android passes not NULL terminated strings.
2013-11-04 21:17:50 +02:00
Jerzy Kasenberg
fe552a1a5d
android/client: Fix annoying delay in command line
...
Move fflush(stdout) to after prints and user input.
This removes delay of showing prompt.
2013-11-04 21:14:35 +02:00
Jerzy Kasenberg
180bc6dbd8
android/client: Change interface name to bluetooth
...
This changes 'adapter' to 'bluetooth' as name of HAL interface.
This name matches name fond in bluetooth.h where all interfaces
are defined.
2013-11-04 21:13:52 +02:00
Jerzy Kasenberg
6807460f1b
android/client: Fix uninitialized variable
...
Pin accept variable was intended to be set to 1
only when pin was typed by user. If no pin was given
accept should be set to 0. This patch fixes this.
2013-11-04 12:14:18 +02:00
Andrei Emeltchenko
5ad3530e8b
android/haltest: Fix print device name
2013-11-04 09:28:49 +02:00
Andrei Emeltchenko
2563307c2d
android/haltest: Use pointer as parameter for debug
...
Pass structure as pointer. This makes it consistent with the rest of
the code and helps to reuse this function in other parts.
2013-11-04 09:28:33 +02:00
Andrei Emeltchenko
59dcd70722
android/haltest: Export print property
...
Export property printing debug function.
2013-11-04 09:28:16 +02:00
Marcel Holtmann
33c400b88b
android: Fix up the GATT client to handle KitKat API changes
2013-11-01 06:25:30 -07:00
Jerzy Kasenberg
c6c6ef6898
android/client: Add GATT server methods
...
This patch implements GATT server method calls.
2013-10-31 16:02:23 +02:00
Jerzy Kasenberg
5ebab55cda
android/client: Add GATT server callbacks code
...
This patch adds callbacks code for GATT server interface.
2013-10-31 16:02:05 +02:00
Jerzy Kasenberg
5b21d9d67b
android/client: Add tab completion to GATT client
...
This patch adds tab completion to GATT client methods.
2013-10-31 16:01:47 +02:00
Jerzy Kasenberg
ed3e26b591
android/client: Add GATT complex type parsing
...
This patch adds code to parse: UUID, service ID, characteristic ID,
and general hex string filed.
2013-10-31 16:01:06 +02:00
Jerzy Kasenberg
d0dbd47af8
android/client: Add GATT client method calls
...
This patch adds code for all GATT client methods.
2013-10-31 16:00:39 +02:00
Jerzy Kasenberg
ac77140a00
android/client: Add helper macros to verify args
...
This patch adds bunch of macros that will simplify
common arguments checking for methods.
2013-10-31 15:59:42 +02:00
Jerzy Kasenberg
c621c15d5e
android/client: Add init/cleanup for GATT
...
This patch adds gatt functions code.
2013-10-31 15:59:34 +02:00
Jerzy Kasenberg
6c6e02b379
android/client: Add complex GATT type formating
...
This adds formating for complex types in GATT.
2013-10-31 15:58:51 +02:00
Jerzy Kasenberg
5d23d8caaf
android/client: Add GATT client callbacks code
...
This adds callbacks code, mostly printing.
Complex formating function not implemented yet.
2013-10-31 15:58:41 +02:00
Jerzy Kasenberg
5c26c130f1
android/client: Add skeleton for GATT interface
...
This patch adds empty functions for all gatt methods
and callbacks.
2013-10-31 15:57:14 +02:00
Szymon Janc
c7a838af87
android/client: Don't align name property while printing
...
Received name property is guaranteed to be NULL terminated so there is
no need to use length specifier. This also fix really long space while
printing due to text alignment to the right.
2013-10-31 15:48:07 +02:00
Jerzy Kasenberg
3e4893a27b
android/client: Fix crash in get_profile_interface
...
This fixes crash due to uncheck input from user.
2013-10-31 13:51:59 +02:00
Andrei Emeltchenko
a49fa76fa8
android/haltest: Fix bug when building for Android 4.2.2
...
Since I started to use system Android headers instead of local this
bug was found.
2013-10-31 10:53:10 +02:00
Jerzy Kasenberg
c26309164b
android/client: Fix crash in tab completion
...
When user pressed tab on third or later argument when
first two did not make sense tool crashed.
Now method is checked for NULL before accessing help field.
2013-10-30 12:06:45 +02:00
Jerzy Kasenberg
5b5f62794e
android/client: Add clear screen on Cltr-L
...
This patch allows to clear screen on Ctrl-L.
2013-10-28 14:57:56 +02:00
Jerzy Kasenberg
c8fea98cba
android/client: Add completion for hf methods
...
This patch adds completion functions to handsfree methods.
2013-10-28 14:41:23 +02:00