Add support for SAP protocol features:
* connect and disconnect requests
* connect and disconnect responses
* disconnect indication
* timeouts for the valid connection
Since media driver uses a2dp to register its sep and store a pointer,
this pointer may be invalid/freed when media driver is unregistered.
To fix this now a2dp will also release any sep registered using media
API.
It also protect from future changes on the order of drivers removal by
checking if pointers (sep or endpoint) are still available in the list
before removing them.
This forces recalculating the remote SEP if the local SEP's codec type
is no longer the same as the remote SEP's codec type. This can happen
after we issue a BT_STOP_STREAM+BT_CLOSE followed by a
BT_SET_CONFIGURATION with a new SEID.
Previously resetting STATE_RESOLVNAME for adapter was missing.
This was causing problems with discovering devices when discovery
was quickly turned off/on during resolving name.
The new buffer is allocated in g_attrib_new() and it will be used to
send/receive PDUs. The buffer size is the MTU read from L2CAP channel
limited to ATT_MAX_MTU. Functions to handle the buffer size were also
created.
attrib_db_update() uses g_try_realloc(), which means the memory address
of the updated attribute may change. Callers may need to update
references to the old address.
The new struct attribute pointer is returned to caller by the "attr"
paramater.
attrib_db_update() uses g_try_realloc() only to expand/shrink space for
the variable "data" field. Therefore existing fields (like handle) are
guaranteed to remain unchanged.
A NULL uuid_t pointer means that the UUID should remain unchanged. This
simplifies most attrib_db_update() calls which do not change the
attribute UUID.
According to the specification the characteristics discover and
characteristics discover by UUID use the same opcode and the result
should be filtered by callback.
'Protocol not supported' error code is added to the registration of A2DP
end-points. Error response org.bluez.Error.NotSupported instead of
org.bluez.Error.InvalidArguments is used when SEP registration fails due
to disabled corresponding interface in audio.conf.
With some kernels and the right timing it is possible to get into the
state where we get the local name but haven't yet gotten a DEVUP event.
In such a case it is *not* ok to call init_adapter.
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
This patch puts the new UUID functions into use for GATT-related
code, and adds some convenience functions to ATT API (att.h).
Example GATT server is also changed.
Dial and re-dial to last number functions are changed in maemo6
telephony driver accordingly to updated API in csd back-end. CreateWith
method call is replaced by Create and CreateFromLast.
After such modification callerid and last dialed number are not used
and hence removed in sucessive patch.
This patch adds a new set_local_name command as well as a
local_name_changed event to the management interface. Instead of 248
bytes (like in the HCI spec) 249 bytes are always reserved for the name
in the messages so that there's a guarantee of it being nul-terminated
(this is not guaranteed on the HCI level).
When the connection fails an error should be returned to inform
the user.
This adds a field to store the DBusMessage that caused the error,
so we can send the correct reply.
The previous behaviour could lead to some problems, as it returned
as soon as possible. To avoid problems we return just after as the
characteristics are discovered, and to save a few round trips we
return the path of all characteristics that belong to this service.
After this method return it will try to read the characteristics
values.
This patch adds more functions that are necessary to handle the new
bt_uuid_t type, and moves basic things like byte-swapping functions and
uint128_t type to bluetooth.h.