Android build system is enabling some additional warnings that are not
enabled when building with autotools. This avoids spurious warnings
while building on Android.
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.
This file cotains help on how BlueZ for Android should be build, run
and test. Some hints and examples on how BlueZ can be intergrated into
Android are present as well.
Currently the code does not assign a player if version is bellow 1.3,
but sometimes the version may not be initialized correctly e.g: record
could not be fetch.
Futhermore by assigning a player for 1.0 CT it won't break backward
compatibility as no commands will be sent but adds the possibility to
respond properly in case the CT is sending commands above its own
version which is a violation of the spec but unfortunately there exists
such stacks on the market.
The patch fixes following issues when building:
Make links to sco.h and rfcomm.h needed for Android sockets.
...
btio.c:39:30: fatal error: bluetooth/rfcomm.h: No such file or directory
compilation terminated.
...
btio.c:40:27: fatal error: bluetooth/sco.h: No such file or directory
compilation terminated.
...
Name should be 249 bytes so it is always NULL terminated string.
Class of device is send as uint32. This will allow to make simple
passing of data in HAL library without need of copying data.
For PIN and SSP requests callback define CoD as 4 bytes. This will
allow HAL library to pass CoD direclty to callback. Will also match
how CoD is passed as property.
Notification thread is started on IPC init and it can be scheduled
before main thread.
Fix following crash on HAL init:
pid: 3392, tid: 3492, name: droid.bluetooth >>> com.android.bluetooth <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000028
eax 00000000 ebx ce047f64 ecx ce0405d0 edx f7763724
esi cdf3af00 edi f837fb90
xcs 00000023 xds 0000002b xes 0000002b xfs 00000000 xss 0000002b
eip ce042289 ebp cdf3a9f8 esp cdf3a9e0 flags 00010292
backtrace:
#00 pc 00003289 /system/lib/hw/bluetooth.default.so (bt_thread_associate+25)
#01 pc 000015f8 /system/lib/hw/bluetooth.default.so (notification_handler+40)
#02 pc 0000f804 /system/lib/libc.so (__thread_entry+276)
#03 pc 0002999d /system/lib/libc.so
#04 pc 00082ae7 /system/lib/libdvm.so (dvmThreadSelf()+39)
#05 pc 00010db9 /system/lib/libc.so (pthread_mutex_unlock+25)
Android holds Bluetooth address in reverse order comparing to
bluetoothd. Add convenient functions for converting to and from that
format.
Convertion will done on daemon side to keep HAL library simple.