Commit graph

41120 commits

Author SHA1 Message Date
Daniel Leung
f6646e2688 i2c: clarify API doc
() Add brief descriptions for #defines.
() Remove the callback enums as they are not being used.
() Hides internal only API typedefs and struct.

Change-Id: I62bc38890a7b49b3ec613064f7574e2f5b75b70c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-18 17:54:03 +00:00
Dan Kalowsky
b2c9b5f529 doc : getting_started : wget no longer needs userid
Now that we've gone open source, there no longer needs to be a user id.

Change-Id: Ib3bc8ca1591d23e89a7d9d33946d56438c4f9846
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-18 17:33:10 +00:00
Szymon Janc
c1c21965d6 Bluetooth: GATT: Fix check if device is bonded
Keys storage is present also for non bonded devices. Add helper
that checks for actual keys being present in storage that may be
used inline.

Change-Id: Icfc758e3ac89e88ca48948e5193878cf5689611a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-18 16:36:12 +01:00
Szymon Janc
194f9d9c89 Bluetooth: SMP: Add support for no bond pairing
If remote device indicates no bond pairing there is no point in
storing any keys. If no keys are stored key storage is freed on
disconnection. Keeping key storage around while device is connected
is important for GATT being able to check encryption key size also
for paired but not bonded devices.

Change-Id: If80e9d4c6da02e73c8730972a7a388b0b7d14ba6
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-18 14:54:29 +00:00
Luiz Augusto von Dentz
5676fb012d Bluetooth: L2CAP: Add proper documentation for callbacks
Document callbacks included in structs since they are also public API.

Change-Id: I8eda02b12172c54e8076208d8ea5ae246c650a3c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-18 14:14:30 +00:00
Jukka Rissanen
1b4271baef net: apps: Fix style issue
Add spaces after a list of values as required by checkpatch script.

Change-Id: I04bd8af8195e3966fd2b9c36ead49483030eae18
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-18 12:51:27 +00:00
Mariusz Skamra
fc7bc7cffb Bluetooth: tester: Use common write without response command handler
There is no point having separate handlers for signed writes and
write without response commands because both call the same,
bt_gatt_write_without_response function.

Change-Id: Ib033ffb77e2123dd565e8f1119ef668253f810f9
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-02-18 11:41:11 +01:00
Luiz Augusto von Dentz
ce83b0f955 net: echo_server: Add support for Bluetooth
This enables using echo_server with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
echo_server are actually tested with NETWORKING_WITH_BT.

Change-Id: I1d949798c7a9689ebc2d342ae7342dce32f319e5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-18 12:16:19 +02:00
Luiz Augusto von Dentz
53dbe52f7d net: echo_server: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: I59c6fff1f2d4e950f9ae64adb9f8833ef0fea4d0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-18 12:16:18 +02:00
Luiz Augusto von Dentz
c22f551940 Bluetooth: L2CAP: Log an error if data cannot be sent
This add an error to the output which helps detects failures in case
debug is not enabled.

Change-Id: I2f4ed357ccf288c15b231d637bf1986af9ecbf37
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-18 10:01:05 +00:00
Johan Hedberg
8cf5a5080c Bluetooth: GATT: Provide documentation for the attribute callbacks
Document the parameters and expected return values of the read, write
and flush attribute callbacks.

Change-Id: I600da2ed64944986395520d7fae77fcb05b58e86
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-18 10:38:45 +02:00
Anas Nashif
be50492f81 remove old and obsolete file
Change-Id: Ib929099e28216225e627f4f7a1a646030c037f0a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-18 00:40:44 -05:00
Benjamin Walsh
6939e0826c pci: trivial if statement refactoring
It was hard to see where the condition ended and the code block started.

Change-Id: If966b0a404beb1c783a1c8dd89e6049a6600cadf
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-17 21:57:13 +00:00
Benjamin Walsh
74cd948ed3 x1000/pci: fix coding standards
Always use braces, even on one-line code blocks.

Change-Id: Ic9e60db7f851d2fbee5bfd79cd810df23c0c5db0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-17 21:51:57 +00:00
Gerardo Aceves
342d7e2e96 doc: Edit functions.rst
Edited functions.rst for coherence.
Added hello_wrong.c for usability.

Change-Id: I9f01139f0d8d3cde1f7c439c7a1fa38cd33139b8
Signed-off-by: Gerardo Aceves <gerardo.aceves@intel.com>
2016-02-17 21:51:28 +00:00
Rodrigo Caballero
81e6db0255 doc: Fix table to remove the invalid ARC information.
Change-Id: Id63c27d1c07143e70c09ae12938bf8ca980d8bb9
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-17 21:47:28 +00:00
Dan Kalowsky
1547a8712f doc : arduino_101 : Adding in step to power on device
The current documentation seems to gloss over the fact that powering on
the device before any JTAG operation is necessary.

Change-Id: Id7a46b611ddba97fa72e0a3a33ddc189b1e4a7c4
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-17 11:19:51 -08:00
Dan Kalowsky
96472b59c8 docs : arduino_101 : pins start at 1
Pins start at 1, not 0.  Including JTAG pins.

Change-Id: I2e058c114bd1a4da25d4964e418a942d3c41b08c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-17 11:19:51 -08:00
Dan Kalowsky
05f01bc064 doc : remove \ from wget command
The wget command is broken in the documentation.  By using a \
to continue the command on another line, unfortunately line does not
render a newline character after it.  As such, a copy and paste
fails miserably.  Removing the \ allows a copy and paste operation.

Change-Id: I95c09dbe2dbcd51dedefcedc285e6ed38419960f
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-17 11:19:51 -08:00
Luiz Augusto von Dentz
86b845c44f Bluetooth: IPSP: Correct filename and description
Change-Id: I95e0304d0cc28d27f773ce2333e7ac851b724df1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-17 18:38:05 +00:00
Anas Nashif
1e57226ae6 boards: remove obsolete CTB board
This board is not supported and not available for general public.
Use the Quark SE CRB/Devboard instead.

Change-Id: Id0f8c08bbacb812ef00fe9502b4acecf4f31ffd7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 17:07:08 +00:00
Dan Kalowsky
f5a31b9550 docs : gerrit_accounts : correct ssh key path
Fix incorrect path for ssh key.  It is .ssh, not .id.

Change-Id: I84f054f9ba880e31fcc89cf10da0fb8522dfbae0
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-17 16:44:32 +00:00
Andrei Emeltchenko
5d13a3ef96 drivers/nble: Fix function name
Change-Id: I124be5419ec23feeec6ac82857446c134c8c6e96
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-17 17:10:05 +02:00
Andrei Emeltchenko
1138996744 drivers/nble: Cancel connect req when receiving disconnect cmd
Cancel ongoing connect request when we receive disconnect command.

Change-Id: I12f1c1326c4b13672879b8f2dbe457cae395b486
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-17 17:10:05 +02:00
Andrei Emeltchenko
dc9ff5872b drivers/nble: Implement bt_conn_disconnect()
Implement bt_conn_disconnect() API function.

Change-Id: I08979d35400cf947d7ec646bad72f625141f95e0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-17 17:10:05 +02:00
Johan Hedberg
a72d967d33 Bluetooth: GATT: Expose ATT error codes to application callbacks
Introduce BT_GATT_ERR macro to make it possible for application
callbacks to return exact ATT error codes.

Change-Id: I971536508e75036fbddc40b3f33e5201e11940bc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-17 15:05:34 +00:00
Johan Hedberg
15ac9992a9 Bluetooth: ATT: Add Common Profile Error Codes
These are specified in the Core Specification Supplement.

Change-Id: Ieaa9f061666119bb430d77b0fd40b4891e515b81
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-17 15:05:16 +00:00
Johan Hedberg
96f9831304 Bluetooth: Add public att.h header file
For now this only exposes the various ATT error codes.

Change-Id: If568782e90dca22871681d2d3b2d81ae4cb8e5e4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-17 15:05:08 +00:00
Andrei Emeltchenko
b125e38f9c drivers/nble: Add connection states
Connection state helps to keep make right choice when connecting /
disconnecting.

Change-Id: Ifea620c05f869a633f578bf5d5c8ba603a58a46a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-17 14:58:11 +00:00
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