Commit Graph

279 Commits

Author SHA1 Message Date
Andrei Emeltchenko
6c05eb5209 lib: Add headers for AMP ASSOC data 2012-06-28 16:14:40 +03:00
Slawomir Bochenski
2053eeda32 lib/sdp.c: Prevent passing unitialised argument
In case of sdp_seq_alloc() failures in loop, unitialised seqDTDs would
be passed to final sdp_seq_alloc.
2012-06-28 13:51:00 +03:00
Daniel Wagner
9bfc21c2dd core: Move UUID string definition to lib 2012-06-02 09:07:56 +08:00
Daniel Wagner
5c3c3fef23 pnat: Move UUID string definition to lib 2012-06-02 09:07:50 +08:00
Daniel Wagner
3af0412b42 input: Move UUID string definition to lib 2012-06-02 09:07:47 +08:00
Daniel Wagner
cce53f0cf2 health: Move UUID string definition to lib 2012-06-02 09:07:45 +08:00
Daniel Wagner
9e80406e08 serial: Move UUID string definition to lib 2012-06-02 09:07:43 +08:00
Daniel Wagner
0a87ad9099 thermometer: Move UUID string definition to lib 2012-06-02 09:07:39 +08:00
Daniel Wagner
8f13cb2beb sap: Move UUID string definition to lib 2012-06-02 09:07:36 +08:00
Daniel Wagner
5a82646b30 proximity: Move UUID string definition to lib 2012-06-02 09:07:34 +08:00
Daniel Wagner
2eda66eb47 deviceinfo: Move UUID string definition to lib 2012-06-02 09:07:17 +08:00
Daniel Wagner
b0dcec9c79 network: Move UUID string definition to lib 2012-06-02 09:07:00 +08:00
Daniel Wagner
b968b12927 audio: Move UUID string definition to lib 2012-06-02 09:06:32 +08:00
Daniel Wagner
78745b2400 sdp: Remove unused BASE_UUID definition 2012-06-02 09:06:16 +08:00
Arek Lichwa
cbd2b1348b sdp/build: Build fails when SDP_DEBUG enabled
Enabling SDP_DEBUG prevents build to be done.
2012-05-23 17:29:36 +03:00
Anderson Lizardo
068ea1c864 sdp: Remove unnecessary memset()
The memory referenced by "u" pointer is initialized right after the
memset() call.
2012-05-18 23:35:59 +03:00
Andrei Emeltchenko
6e6e6af140 lib: Add definitions for AMP Assoc data
Definitions are needed for decoding A2MP Assoc Rsp.
2012-05-16 11:05:06 +03:00
Anderson Lizardo
69e73aeffe lib: Fix tab misuse 2012-05-10 16:42:39 -07:00
Claudio Takahasi
a21b3c28d1 Remove MGMT address type definition
This patch replaces the address type defined in management interface
header by the new address type constants defined in the bluetooth.h.
2012-04-25 13:02:59 +03:00
Claudio Takahasi
ba801fcd67 Add Bluetooth address type in sockaddr_l2
This patch adds the address type information to sockaddr_l2 structure,
allowing the userspace to inform the remote address type required for
LE Create Connection command.
2012-04-25 12:54:17 +03:00
Syam Sidhardhan
4b6c1b7311 sdp: Fix compilation warning due to data type mismatch
In certain cross compiling environment, if we build the code with
enabling the maintainer mode, the following error happens.

cc1: warnings being treated as errors
lib/sdp.c: In function 'sdp_process':
lib/sdp.c:4111:6: error: comparison between signed and unsigned integer
expressions
make[2]: *** [lib/sdp.lo] Error 1
make[1]: *** [all] Error 2
2012-04-16 22:55:29 +03:00
Gustavo Padovan
d22d083d6d mgmt: update mgmt control channel id
kernel side has updated its control channel id from 1 to 3.
2012-04-05 22:30:31 +03:00
Szymon Janc
2f6a0a6641 Fix common spelling error in code and comments
Correct spelling is "incoming" not "incomming".
2012-03-30 13:10:11 +03:00
Szymon Janc
e26b01d25b Move common code to sdp to avoid duplication
LanguageBaseAttributeIDList is set from few places and each time static
function was copied and used for that. Move this funtion to sdp code
and use that instead of copying code.
2012-03-28 13:17:39 +03:00
Szymon Janc
d5f15eac21 mgmtops: Add support for setting Device ID 2012-03-28 13:16:02 +03:00
Frédéric Dalleau
46b3a3d2d0 sdp: Fix sdp_get_profile_descs for Mac Os X Lion
Mac OS X 10.7.3 publishes the following SDP record for HFP Gateway.
      record #2
          aid 0x0000 (SrvRecHndl)
             uint 0x10003
          aid 0x0001 (SrvClassIDList)
             < uuid-16 0x111f (Handsfree AG) uuid-16 0x1203 (Audio) >
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x2 > >
          aid 0x0005 (BrwGrpList)
             < uuid-16 0x1002 (PubBrwsGrp) >
          aid 0x0006 (LangBaseAttrIDList)
             < uint 0x656e uint 0x6a uint 0x100 >
          aid 0x0009 (BTProfileDescList)
             < uuid-16 0x111e (Handsfree) uint 0x105 >
          aid 0x0100 (SrvName)
             str "Hands Free Audio Gateway"
          aid 0x0301 (SuppDataStoresList)
             uint 0x0
          aid 0x0311 (SuppFeatures)
             uint 0x0

BlueZ do not read correctly the version number of the profile.
The patch fixes this.

From my understanding, the SDP profile descriptor is a list. The for
loop in sdp_get_profile_desc iterates that list.  Until now, bluez
expected a collection of either uuid or lists with a uuid and a
version number. This can be represented as follow:
list=(uuid, uuid, (uuid, version))

The patch fixes the situation where the profile descriptor list
contains a uuid AND a version number both on the root level and not
enclosed in a sublist. If the next item after uuid is uint16, then
this is the version number. This can be represented as follow:
list=(uuid, uuid, version, uuid, (uuid, version))

Note that core v4.0 spec. states that the Profile Descriptor
list is a data sequence of profile descriptors. Each profile descriptor
is a data sequence whose first element is a UUID and second element is
a version number. This can be represented as follow:
list=((uuid, version), (uuid, version))
2012-03-27 14:26:25 +03:00
Frédéric Dalleau
ba9888c3cf sdp: Check type of sdp data before dereferencing 2012-03-13 15:59:53 +02:00
Marcel Holtmann
6e0bd7d436 lib: Update company identifiers 2012-03-06 08:59:58 -08:00
Peter Krystad
3576d1ba67 lib: Add A2MP definitions 2012-03-05 16:28:12 -08:00
Patrick Ohly
4002cf271e lib: Fix compile issue when using in C++
The compiler error is:
 /usr/include/bluetooth/bluetooth.h::131:9: error: invalid conversion from 'void*' to 'bt_get_le64(void*)::<anonymous struct>*'
 ...

The reason is that C++, in contrast to C, does not allow conversion of
void * to anything, and this code gets compiled as C++ when the app is
written in C++. The macro with the assignment itself is older, but only
recent Bluez starts to use it in inline functions, thus triggering the
problem.

This patch keeps the "struct __attribute__((packed))" magic and merely
changes the typecast so that it works in C and C++. Like the existing
macro this patch relies on support for typeof.
2012-03-04 15:24:39 -08:00
Johan Hedberg
6ed27370c0 mgmt: Add missing error code definitions 2012-03-02 03:17:50 +02:00
Johan Hedberg
5ee47d3540 mgmt: Move string helpers to lib/mgmt.c 2012-03-02 03:17:50 +02:00
Peter Krystad
f3bf387f1d lib: Add L2CAP Create/Move Channel definitions 2012-02-29 19:16:04 -06:00
Johan Hedberg
ba49febf1a mgmt: Add error code definitions 2012-02-29 19:16:04 -06:00
Johan Hedberg
e4d00337ad lib: Add missing host feature defines
This patch add missing SSP and "Simultaneous LE & BR/EDR" feature bit
definitions to hci.h.
2012-02-28 02:10:52 +02:00
Marcel Holtmann
987ffb7360 lib: Make unaligned access functions const 2012-02-26 22:42:41 -08:00
Marcel Holtmann
0c73a367a1 lib: Add definition for HCI_CHANNEL_MONITOR 2012-02-26 22:12:34 -08:00
Andrei Emeltchenko
da47ffe5c7 lib: Copy L2CAP chan policy defines from kernel
Those defines will be used by user space.
2012-02-26 19:06:47 +02:00
Marcel Holtmann
484150cbfd mgmt: Add flags field for device connected event 2012-02-23 20:56:00 +01:00
Marcel Holtmann
9741e4c92d mgmt: Use uint32 for flags in device found events 2012-02-22 23:14:06 +01:00
Johan Hedberg
5bb418bbb7 mgmt: Fix device_found parameters 2012-02-23 00:05:13 +02:00
Marcel Holtmann
13009c7a1b mgmt: Add struct for device disconnected event 2012-02-22 20:02:16 +01:00
Marcel Holtmann
796ac5ca3b lib: Add struct for reading LE host supported setting 2012-02-21 15:01:54 +01:00
Johan Hedberg
0b9eed7567 mgmt: Update stop_discovery and ev_discovering to match API spec 2012-02-21 00:20:27 +02:00
Johan Hedberg
71e8b70208 mgmt: Move status return paramters into the cmd_complete header 2012-02-18 14:44:08 +02:00
Johan Hedberg
b142a9eaed mgmt: Swap cmd_status parameters to match API 2012-02-18 14:11:22 +02:00
Johan Hedberg
dd84242d27 mgmt: Update implementation to match latest API
This patch adds an address type parameter to all places where the latest
API expects there to be one.
2012-02-17 14:30:31 +02:00
Vinicius Costa Gomes
f7a79ac1fc lib: Fix using old-style initializers 2012-02-14 14:27:46 +02:00
Johan Hedberg
455a27fa3a mgmt-api: Reorder parameters for read_commands
It makes more sense to have the num_commands and num_events parameters
in the beginning so that the message length can be validated up front.
2012-02-10 12:18:12 +02:00
Johan Hedberg
8c03ffd265 mgmt: Add mgmt_rp_read_commands struct definition 2012-02-09 18:24:26 +02:00