This patch add the functions to manage ATTIO callbacks. The current
registration mechanism is not suitable for this service since it needs
to be passive. Scan Parameters should not actively request connections,
it needs to be notified if the connections has been established
requested by other services.
This patch adds the Makefile changes and plugin declaration to support
Scan Parameters service. BlueZ will act as Scan Client writting to a Scan
Server the scanning parameters.
This patch adds the initial files to support HoG suspend. The suspend
concept for HoG is implementation specific. The proposal is allowing
back-end selection at build time. Each Linux distribution/platform is
responsible for defining and writting their own policy to manage suspend
on HoG capable devices.
When setting the Control Point, the report device can execute actions to
save power. eg: Reduce the cycle of the key press detection or disable
LEDs.
Initial patch to create GATT based plugin to handle Generic Access,
and Generic Attribute Profile services. GAP characteristics discovery
will be moved from device.c to this new plugin.
uHID is HID I/O driver that makes possible to implement HID I/O drivers
in user-space. It works similar to the uinput but it is initialized with
a HID descriptor and deals with raw HID reports.
This commit uses uHID to create a HID device for the remote HoG device
and to tranfers HID reports to HID subsystem.
This abstraction layer makes the GATT Time profile implementation
consistent with other profiles. It is the first step before implementing
the adapter driver for the Time server implementation.
Set a separate variable for adding warning flags, optimization, etc.
Build systems are not supposed to change CFLAGS and LDFLAGS, these are
user variables.
Doing so we guarantee CFLAGS and LDFLAGS from environment is appended
to the flags used during build. One useful use-case is to temporarily
disable -Werror when using --enable-maintainer-mode, without completely
loosing the warning flags and other parameters in CFLAGS (like -fPIC).
Without this patch, fiddling with CFLAGS/LDFLAGS after configure may
result in errors like below:
/usr/bin/ld: tools/rfcomm.o: relocation R_X86_64_32 against `.bss' can
not be used when making a shared object; recompile with -fPIC
tools/rfcomm.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [tools/rfcomm] Error 1
make: *** [all] Error 2
Reference: http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
Udev is not meant to spawn long-running processes, and as of the next
udev version such processes will be killed.
If using systemd, device activation can be used to get the same effect.
On Arch we have been disabling this rule for a long time, even though we
don't use systemd, as it was causing more problems than it was worth.
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