Any new header files (att-database.h in this case) need to be added to
Makefile.am.
Fixes this "make distcheck" error:
CC attrib/bluetoothd-gatt-service.o
../attrib/gatt-service.c:35:26: fatal error: att-database.h: No such
file or directory
compilation terminated.
make[2]: *** [attrib/bluetoothd-gatt-service.o] Error 1
make[1]: *** [all] Error 2
make: *** [distcheck] Error 1
The profile is implemented in immalert.[ch]. A GATT service is
registered with a write callback on the immediate alert level attribute.
This attribute is write-only and is maintained per remote device.
When a remote device write a raises or lowers the alert level,
an appropriate PropertyChanged signal is emitted. When the alert level
of a device is non-zero, a callback is registered on its disconnection.
When the callback is called, the alert level of the device is reset to
zero and an appropriate signal is emitted.
The profile is implemented in linkloss.[ch]. A GATT service is
registered with read/write callbacks on the link-loss alert level
attribute. The alert level is maintained per device. It is returned
on read and updated on write.
When the alert level is non-zero, a callback is registered on the
disconnection of the remote device. If a device with non-zero alert
state is disconnected, an appropriate PropertyChanged signal is emitted
with the alert level previously set by the device. We avoid emitting
a signal when the disconnection was requested by us.
Remove individual GATT plugin configuration switches and add a
new master gatt switch called --enable-gatt to enable/disable all
GATT related plugins at once.
It was disabled for quite some time (since 2009), and does not even
compile anymore if enabled:
plugins/echo.c: In function 'session_event':
plugins/echo.c:53: error: implicit declaration of function
'g_io_channel_read'
plugins/echo.c:57: error: implicit declaration of function
'g_io_channel_write'
This new internal API can be used for implementing GATT services (server
role). It is built around the current attribute API (attrib_db_add() and
others).
Initial config file to disable Proximity and Find ME support in the
proximity monitor side. By default all services will be supported.
Config file is necessary at least to disable Find ME profile since the
Immediate Alert service is shared between Pass Loss and Find ME.
As these files are auto-generated they need to be marked as BUILT_SOURCES
so that we don't run into a build race later on. lib/bluetooth is removed
by clean-local so this doesn't need to be in CLEAN_FILES
Function intends to be used by profiles to inform that a connection
is required and the callback that needs to be called when the it is
established. New header is required to avoid non GATT based profiles
including GAttrib header.
The Nintendo Wii Remote requires binary bluetooth addresses as PINs.
This is not possible via dbus agent API. So this adds a plugin that
registers a pin-callback and forces the right pin for every
authentication request of wiimotes.
Instead of passing --[disable|enable]-configfiles, now we use
--[disable|enable]-datafiles as not all of the files are installed for
configuration but are rather data files.
Replacing the name setting code in src/adapter.c.
Moving the adapter naming allows us to use the /etc/machine-info [1]
pretty hostname, as implemented by hostnamed [2] in systemd.
If /etc/machine-info is not present, the adapter name stored
on disk in /var/lib/bluetooth will be used. If no adapter name
has been set yet, the default from the main.conf will be used.
We don't currently number the name of hci0 if a pretty name is
available, but we should instead number it if it happens not
to be the default adapter. As we cannot be told when the default
adapter changes, we'll behave this way for now.
Note that when an adapter name is set automatically from
the pretty hostname, changing it through the D-Bus interface
will fail.
[1]: http://0pointer.de/public/systemd-man/machine-info.html
[2]: http://www.freedesktop.org/wiki/Software/systemd/hostnamed
The attrib plugin is deprecated and it is not used anymore. Remove it
and all related configuration. Note that GATT utility (gatttool)
configuration item was moved to Makefile.tools and it is compiled when
--enable-tools is used in configure.
Add a Sim Access Server to the SAP plugin and a framework for the dummy
sap driver as well.
* add the server register and unregister rutines
* add server listening socket setup
* add SAP DBus API
* add prototypes for SAP protocol implementation
* add skeleton of dummy SIM driver
Mode required to allow better GATT procedures control. Some scenarios
require sequential commands without disconnection and delay between
operations. It is also desirable to change some connection parameters
of an active connection.
Implement only the first interaction of the discovery procedure. If the
response doesn't fit in the MTU, "start" and "end" options can be used
to discover the handles ranges of the remaining primary service instances.
UUID16 and UUID128 are supported in the uuid option.
Usage example:
$gatttool -i hcix -b xx:xx:xx:xx:xx:xx --uuid=1801 --primary
Adding -lrt fix the following errors in one of my systems:
health/mcap_sync.o: In function `initialize_caps':
/root/bluez/health/mcap_sync.c:341: undefined reference to `clock_getres'
/root/bluez/health/mcap_sync.c:350: undefined reference to `clock_gettime'
/root/bluez/health/mcap_sync.c:358: undefined reference to `clock_gettime'
/root/bluez/health/mcap_sync.c:363: undefined reference to `clock_gettime'
health/mcap_sync.o: In function `reset_tmstamp':
/root/bluez/health/mcap_sync.c:163: undefined reference to `clock_gettime'
health/mcap_sync.o: In function `mcap_get_timestamp':
/root/bluez/health/mcap_sync.c:309: undefined reference to `clock_gettime'
health/mcap_sync.o:/root/bluez/health/mcap_sync.c:514: more undefined references to `clock_gettime' follow
collect2: ld returned 1 exit status
make[1]: *** [src/bluetoothd] Error 1
make: *** [all] Error 2
This time based on the kernel exported DMI, rather than calling
out to HAL. The HAL plugin can still be preferred with
--enable-hal=yes passed to configure.
The inclusion of src/attrib-server.c file by default in the daemon
source needs also to compile by default attrib_sources, not only
when SBC is active.
GAttrib aims to provide high level functions to hide GATT/ATT internals.
GATT client and server shall use these functions to serialize ATT
requests/responses.
Initial changes to start the GATT server example. For the server side,
attrib plugin will only register the GATT service record and add
the attributes into the attribute database.
Attribute server database will contain functions to manage attributes,
allowing any plugin to add, remove or change attributes. Advertising
data shall be also generated based on exported services/attributes.
Contains device driver declaration for attribute protocol. Registers
D-Bus path/interface to represent the remote device client: BR/EDR or
LE. For the most common LE scenarios, devices running BlueZ will be
client role.
This plugin will have the implementation of a Generic Attribute
Protocol server over Bluetooth Basic Rate and BLE. For BR/EDR this
plugin will register the service record. GATT database will be located
in the BlueZ "core", this plugin will contain only calls to add and
change attributes.
Adds a plugin for listening to the MCE (Mode Control Entity)
radio state signal. Implemented in a new source file,
configuration flag for enabling it added to the build files.
The plugin registers an adapter driver containing a DBus signal
watch for receiving MCE_RADIO_STATES_SIG messages. On receiving
the signal, it sets the powered state of the adapter according
to the Bluetooth field.
The optimized filter gets enabled when the code is compiled
with -mcpu=/-march options set to target the processors which
support ARMv6 instructions. This code is also disabled when
NEON is used (which is a lot better alternative). For additional
safety ARM EABI is required and thumb mode should not be used.
Benchmarks from ARM11:
== 8 subbands ==
$ time ./sbcenc -b53 -s8 -j test.au > /dev/null
real 0m 35.65s
user 0m 34.17s
sys 0m 1.28s
$ time ./sbcenc.armv6 -b53 -s8 -j test.au > /dev/null
real 0m 17.29s
user 0m 15.47s
sys 0m 0.67s
== 4 subbands ==
$ time ./sbcenc -b53 -s4 -j test.au > /dev/null
real 0m 25.28s
user 0m 23.76s
sys 0m 1.32s
$ time ./sbcenc.armv6 -b53 -s4 -j test.au > /dev/null
real 0m 18.64s
user 0m 15.78s
sys 0m 2.22s
Explicitely link against libm, to avoid linking problems:
CCLD sbc/sbctester
/usr/bin/ld: sbc/sbctester.o: undefined reference to symbol 'sqrt@@GLIBC_2.2.5'
/usr/bin/ld: note: 'sqrt@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/lib64/libm.so.6: could not read symbols: Invalid operation
The following patch against the 4.54 codebase drops posix capabilities
after startup so that the bluetooth daemon is less of a threat to the
system should there be any way to compromise it. The retained
capabilities was compared to selinux policy to make sure that its
roughly the same. It uses the libcap-ng library which allows patches
for dropping capabilities to be much smaller.