Commit graph

18591 commits

Author SHA1 Message Date
Johan Hedberg
2f9ff6f11b Bluetooth: Rename att.h to att_internal.h
In preparation of creating a public att.h rename the existing internal
header appropriately.

Change-Id: I8588712bc5aa57d391c5ce0886c99692e5a2823e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-17 16:15:56 +02:00
Mariusz Skamra
89fbdeef9a Bluetooth: btp: Fix permission bits
This splits Authorization permission to Read with Authorization
and Write with Authorization.

Some attribites may be readable with no authorizarion, but writable
with authorization defined by a higher layer specification or be
implementation specific (eg. Server Characteristic Configuration
Descriptor).

Change-Id: I341a7095c1e8db1dea92cdeebf76c5a2307a49a1
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-17 14:09:25 +00:00
Anas Nashif
3096b54257 Use .zephyrrc for initializing common variables
The file can be used to define variables used by the SDK to avoid
having to define them everytime a session is started.

The old file names ~/zephyr-env_install.bash will still work but
it will warn about the file being renamed. We do not want to break
users who have ~/zephyr-env_install.bash in their home and depend on
it.

Change-Id: I04fcaa76854bda3dcfc1cabe75e00e95c511b10d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 13:42:25 +00:00
Anas Nashif
a77c7d819a improve 'make help' and remove config targets
- Put kconfig targets in a new target 'kconfig-help' instead of showing
  it by default.
- Show how the the different boards can be used with make BOARD=<board>

Change-Id: I481d4acaf72b1f05925c6f56e510329681da8e11
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 13:42:08 +00:00
Szymon Janc
b7b0a16a07 Bluetooth: Fix tracking of advertising state
This fix not being able to stop advertising while connected due to
invalid use of BT_DEV_ADVERTISING flag.

Change-Id: If5578fa2c69dd18d6623d05ae44d4710cce9a9e5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-17 13:15:08 +00:00
Jukka Rissanen
086dfc2c2a cc2520: Busywait max 500ms before trying to send another packet
The 100ms wait was too short. After some debugging, the
packets were successfully sent after 250ms wait.

Change-Id: Ib367f8df81ed3039b041f1e7b46d8f562a0adcac
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-17 13:08:04 +00:00
Jukka Rissanen
a63f175d44 net: apps: Resend failed message once in echo-client
If the reply for a sent message is not received, then try
to send it once again. If the second resend fails, then mark
the packet as failed.

Change-Id: Ibe9b9384e2e84f055c6486a5bd4d7293675e5d42
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-17 13:07:54 +00:00
Szymon Janc
4dfb50e514 Bluetooth: Fix not calling connected callback on connect failed
If LE Create Connection fails notify application that connection
failed.

Change-Id: I3993bcb1bf3f8bd8fc08546e1fe683326b47db5b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-17 13:07:46 +00:00
Jukka Rissanen
feff518981 net: apps: Disable multicast sending in echo-client
In order to test unicast sending properly, disable multicast
sending temporarily.

Change-Id: If90acf003910a954770caa53825116d2a9ddadc1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-17 13:07:18 +00:00
Luiz Augusto von Dentz
12a092757f Bluetooth: L2CAP: Fix use of '/n' with BT_DBG
BT_DBG already add a new line so that '/n' is not necessary.

Change-Id: I7b25470386e2a7228a684665301d2d28d1360808
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-17 11:50:12 +02:00
L.S. Cook
3f4c347f35 doc: Cleanup prefix table on naming_conventions.rst
Table updated with examples column to eliminate Latin prefixes (e.g.) and
to enhance readability.

W/S fixed

Change-Id: Ia92e2d5454e816595e054cb44caa56364f9dc1b3
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-17 06:38:56 +00:00
L.S. Cook
7c2a12f6a5 doc: Edit arduino_101.rst for spelling, grammar, consistency
Minor ReST syntax and consistency errors fixed.

Change-Id: Ia53ffc3303d1fb75dc513ae1d7f53301d8c874e3
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-17 00:06:55 +00:00
Dan Kalowsky
59f305ed85 docs : setting up LF account
Breaking out the documentation on setting up a Linux Foundation account to
it's own section.  This isn't needed for the getting started process, and is
only needed if someone decides to start contributing code.

Change-Id: I112b65a53b167927d2617aef7364c13f30f74c33
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-16 11:04:04 -08:00
Dan Kalowsky
40781ac1d0 docs : setting_up : allow anonymous downloads
The current doc structure requires the creation of a Linux Foundation
account, which is not really a valid open source usage model.  In fact,
it isn't even required to download anything as anonymous git clone works.

Content on creating a Linux Foundation ID will be moved to the
collaboration section in another commit.

Change-Id: I50253d7b3da85b64986d62f2e5bee25da3eb3987
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-16 09:59:54 -08:00
Andrei Emeltchenko
017394c2a6 drivers/nble: Add debug option for Nordic RPC
This debug option enables debug of Nordic RPC.

Change-Id: I2e963f10ed6407b836e1572673244cb0187227d2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 17:20:53 +00:00
Rodrigo Caballero
77d1e04a7f doc: Fix minor grammar error on getting_started.rst
Change-Id: Ifdd6527d37098edd233ef6a152541419e1708fad
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-16 17:05:04 +00:00
Andrei Emeltchenko
fb68b8e780 drivers/nble: Enable NBLE GAP debug
Use NBLE_DEBUG_GAP to enabled / disable GAP NBLE
debug.

Change-Id: Iefbb18e697d523137a101df00b02d46e209e7f14
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 15:45:22 +00:00
Andrei Emeltchenko
92cd5c9529 drivers/nble: Decrease shell debug
Makes shell output readable by disabling extensive debug from UART
driver.

Change-Id: Ic8df252c8ca4abd6b021db11d266f4db80df4b09
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 15:44:32 +00:00
Luiz Augusto von Dentz
ca90ac5e62 net: Select NETWORKING_IPV6_NO_ND in case of NETWORKING_WITH_BT
Bluetooth links are point to point so it shouldn't be necessary to do
neighbor discovery, futhermore it blocks transmission if the remote
doesn't respond which seems to be the case with Linux.

Change-Id: Ic8997f9c5bc832ba71f71e20e6317ee0c79d250d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-16 15:44:26 +00:00
Andrei Emeltchenko
68fcd4e04b drivers/nble: Implement client scanning
Implement Bluetooth LE scan start/stop API for Nordic.

Change-Id: I3dc153346d0135501091a4b952a3c60c081802db
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 15:10:01 +00:00
Szymon Janc
c80cf24e03 Bluetooth: GATT: Fix possible bt_conn leak
If other peers were present but not in CONNECTED state temporary
connection reference was leaked.

Change-Id: Icc32bfe1a86f92a9d8472991476ebfd26c889d84
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-16 15:03:50 +00:00
Luiz Augusto von Dentz
6ee34adff4 Bluetooth: IPSP: Add sample header
This make it possible to include IPSP services in other samples.

Change-Id: If6eaecd8bab85a382b2da623b06603f6c98aef59
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-16 14:39:03 +00:00
Andrei Emeltchenko
b4bf9f8b58 drivers/nble: Implement bt_conn_create_le()
Implement bt_conn_create_le() and copy bt_le_conn_params_valid() from
net/bluetooth.

Change-Id: I6b3fff5027a82b8040c0c724eac1251945415f43
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 14:35:14 +00:00
Szymon Janc
7dc9210939 Bluetooth: ATT: Fix notifying GATT on disconnection
Channel context was cleared before calling bt_gatt_disconnected
which resulted in passing NULL conn to it.

Change-Id: I486d1cf6662716584c2c973366a9c9654f499802
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-16 14:25:34 +00:00
Mariusz Skamra
8ca1826bde Bluetooth: doc: Add L2CAP PICS file
This adds Implementation Conformance Statement (ICS) for L2CAP layer
with currently supported features.

Change-Id: Ie15d2936877edb674e20283b12a50487df5cdc02
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-16 13:50:00 +01:00
Mariusz Skamra
fef38c1e6d Bluetooth: Add Cycling Speed and Cadence sample application
This adds sample application that implements Cycling Speed
and Cadence profile.

Change-Id: I0fd94582887ca3f5fdc363f35e5a3304c5f64cd9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-16 11:24:39 +00:00
Mariusz Skamra
7e389af158 Bluetooth: Add Environmental Sensing Profile sample app
This adds peripheral sample that implements Environmental
Sensing Profile.

Change-Id: I34ad003b6157a5f87fce32b1c00d8eba66f205fe
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-16 11:23:50 +00:00
Mariusz Skamra
7acdf884cf Bluetooth: Add Cycling Speed and Cadence Service related UUID defs
This adds CSC Service related UUID definitions.

Change-Id: I3fc77cd6561ccfd7de0d906c7ddcd5d8dac5bff9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-16 10:49:50 +00:00
Andrei Emeltchenko
0fc0472bad drivers/nble: Update connect request parameters
Structure has changed in firmware headers.

Change-Id: I0df1549ce5353a2c7807f7839ee9270e833fbbf2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-16 08:08:03 +00:00
Arkadiusz Lichwa
1246df3c98 Bluetooth: BR/EDR: Validate security on encryption key refresh evt
During endup pairing as acceptor update security level on encryption key
refresh complete event.

Change-Id: Id1d252bfa5a7f6c69d52b3f6b23907025e711fb2
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-16 06:51:31 +00:00
Arkadiusz Lichwa
9c88e66935 Bluetooth: BR/EDR: Validate security on encryption change evt
During endup pairing as acceptor update security level on encryption change
event.

Change-Id: Icddedc09f70093cc05ac99d04053b3bd3ef22555
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-16 06:51:10 +00:00
Anas Nashif
3320df7949 docs: fixed API linking
Change-Id: If9daa0e11c967ee19684dd9d08438f749abf9d5e
2016-02-16 06:16:48 +00:00
Anas Nashif
4090f0e5a7 docs: doxygen: group driver APIs
Make device APIs a group to enable in raw doxygen output and group
all IO drivers into one category.

Change-Id: I1f9338d3b977bd08a6a1b8d8b396ce1fba33aada
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-16 06:16:47 +00:00
Arkadiusz Lichwa
bd81052d41 Bluetooth: BR/EDR: Validate security on connection complete evt
During endup pairing as acceptor update security level and link encryption
state on connection complete event.

Change-Id: I6189a3c6675c080e3ab2610c81b617294dbd98d5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-15 20:46:19 +00:00
Arkadiusz Lichwa
ac7e560ba9 Bluetooth: BR/EDR: Move part of BR/EDR core code up
To skip around forward declaration in next security update patch,
move up part of strictly BR/EDR related code.

Change-Id: Id44fc831f629e66660edbc43c187cbf9a88b771d
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-15 19:52:46 +00:00
Arkadiusz Lichwa
f670d06643 Bluetooth: BR/EDR: Add user I/O context during pairing
When during legacy incoming pairing (as acceptor) the runtime is passed to user
to enter a PIN, mark such interaction and keep it valid until proper
authentication reply API handlers are called.

Change-Id: If63015f5beb256873925602adc6a8e5ff9d3b00f
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-15 17:20:20 +00:00
Arkadiusz Lichwa
998d72a986 Bluetooth: BR/EDR: Track 16 digits PIN code
As a pairing acceptor starts tracking 16 octets PIN entered by user
when pairing devices working in Security Mode 3. Based on PIN tracker
state, the generated link key is saved in keys database as combination of
un/authenticated and legacy key type.

Change-Id: I4cbb20942fb38697d952971df807aec8b16c74e4
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-15 17:19:40 +00:00
Johan Hedberg
29263a0760 Bluetooth: samples/beacon: Advertize http://www.zephyrproject.org
Update the advertising data to advertise the Zephyr project web site.
Also provide references to the Eddystone specification.

Change-Id: Id9cfdf4d9be95bccab4152031479ab45f5b8a035
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-15 16:35:02 +00:00
Anas Nashif
9f26ac9961 docs: fixed lists and indent for arduino_101
Change-Id: I07ac843c5244c23671e57c019db57e84540677e0
2016-02-15 15:46:45 +00:00
Mariusz Skamra
475c550ca3 Bluetooth: Remove HR Control Point Characteristic from HR svc decl.
This removes HR Control Point from Heart Rate Service Declaration.
This characterisitc is mandatory if the Energy Expended feature is
supported, otherwise excluded. Since we don't simulate Energy Expended
we shouldn't have this characterisitc in our service declaration.

Change-Id: Ibdfdb2dd48f28bd01763ee0a038faed08e30f84c
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-15 15:29:49 +00:00
Szymon Janc
ea085c4b47 tests: Fix Bluetooth tests and samples platform blacklisting
To exclude platform platform_exclude=foo should be used and not
platform_whitelist=!foo.

Change-Id: I4cddcd3b73e0bd8c42a0726776f8237ebd79a6ae
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-15 15:06:53 +00:00
Jukka Rissanen
e11295ebe4 net: contiki: If outgoing packet is dropped then print more info
Change-Id: Ibac9592f9af5bd5ad2b984752bd8e3a0542d00b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-15 15:00:00 +00:00
Andrei Emeltchenko
b595f27c13 drivers/nble: Clean up nble headers
Change-Id: Iec078bf3cc4ee99a7df95a687272972b793844e6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 14:52:31 +00:00
Andrei Emeltchenko
dfb5c2172b drivers/nble: Remove not used version_header struct
Change-Id: I72ff7bf785884bf20882af536d9fa2977e70d598
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 14:52:22 +00:00
Andrei Emeltchenko
805a126059 drivers/nble: gatt: Implement bt_gatt_discover()
Implement bt_gatt_discover() function.

Change-Id: I1662c650fc2c9c8058c4518c5f9920647f489d40
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 14:52:14 +00:00
Andrei Emeltchenko
9162e6aef0 drivers/nble: Use weak function definitions
Remove empty function declaration using weak autogenerated method.
This solves API to NBLE constantly changing problem.

Change-Id: I2ff90559dfbf78e9c34e602195d8a76ab9750a47
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 14:51:58 +00:00
Andrei Emeltchenko
d2dde33254 drivers/nble: Fix use of uninitialized data
Change-Id: I447614096180e5984b4b7a2494e0932fafe9c500
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 13:50:11 +00:00
Johan Hedberg
058d5b2266 drivers/nble: Kconfig: Add a note about ABI requirements
Change-Id: I2a5ff8b6944fd4022a02364bf75223af33b5cdd7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-15 12:51:28 +00:00
Andrei Emeltchenko
3df0272a38 drivers/nble: Fix use of uninitialized status
Change-Id: Id14f33ca02717ba9a3d2c7e557672b32a139752d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-15 12:43:59 +00:00
Szymon Janc
3e00c7ad0e tests: Simplify test_bluetooth configuration
Use common config for tests and use testcase.ini for defining micro
and nano kernel variants.

Change-Id: I47453cd49696dd496cc728cc1eb2eba9cf7f1c6c
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-15 12:57:57 +01:00