Commit graph

19237 commits

Author SHA1 Message Date
Andrei Emeltchenko
63ae9e6f53 drivers/nble: Export bt_conn_lookup_handle()
bt_conn_lookup_handle() would be used in gatt.c to access conn's
discovery parameters.

Change-Id: Ibb494cf8af90ccab478fa7463a41942b06029539
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-19 13:03:47 +00:00
Andrei Emeltchenko
36a59be90a drivers/nble: Store GATT discover parameters
Store GATT discover parameters in bt_conn due to lack support from
NBLE RPC.

Change-Id: I47ade89b4861c9f1260ce3a3dc158d6344de334e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-19 13:02:33 +00:00
Jukka Rissanen
79932abdb7 net: apps: Fix the mac addresses in dtls client demo
Change-Id: Iec0e0d716f7aa718134167ac43b014ef95d7e67b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:38:48 +00:00
Jukka Rissanen
dccce8fab6 net: apps: Make dtls server/client to accept different bearer config
User can now say "make BOARD=xxx NET_IFACE=802154" to compile
IEEE 802.15.4 support into the dtls server/client application.
The default is to compile for qemu and use slip.

Change-Id: I87f9b2d766cc5337a9c01c7657fb8d08d2d3e244
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:38:25 +00:00
Jukka Rissanen
3c44f7e0bc net: contiki: Enable packet queueing
Currently the packet is dropped if some other packet needs to
be sent instead. This does not make much sense in Zephyr so
activate packet queueing where the saved packet is sent later.
The queueing can happen e.g., with neighbor discovery where
the packet to be sent requires ND to be done before the actual
application packet is being sent.

Change-Id: Ia321d641eec5acfbc9f8f581de712801a483e32d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:38:04 +00:00
Jukka Rissanen
04ef24d21b net: apps: Comment out code if IPv6 ND is in use
If neighbor discovery is in use, then we do not need to do
various route etc setup. Normally ND needs to be active
but in some specific scenarios it can be turned off. One
such scenario is if an application is run inside qemu
which uses slip and host tun0 interface for communication,
in this case host typically do not activate ND for tun0
so we need to disable it also in zephyr side.

Change-Id: I8ac59990c5bbcdb06cca98bde7be3a0ad6e807a8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:36:28 +00:00
Jukka Rissanen
e0f966de10 net: apps: Rename application init function
Rename application init function to init_app() so that it is more
descriptive.

Change-Id: Id470756345c0bd10b103270115b26f3e8a281d17
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:35:52 +00:00
Jukka Rissanen
3571e1f20a net: apps: Use IPv6 link local addresses in network apps
Use link local addresses instead of public IPv6 addresses
in the demo applications. This way the application do not
need to do any special setup.

Change-Id: I9aa817c388e3f673a6597801813dd1d0a8feb6b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:35:12 +00:00
Tomasz Bursztyka
050ec13556 net: ip: Make sure CONFIG_NETWORKING_WITH_LOGGING is properly handled
If the user unsets CONFIG_NETWORKING_WITH_LOGGING, it will mean he
really doesn't want to get any network stack logging output.

Change-Id: I0629a045adbf8916327a8a9ba69b6e6e9ee2e7d9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-19 12:33:45 +00:00
Tomasz Bursztyka
8a826102e0 net: ip: Fix a build issue when CONFIG_NETWORKING_WITH_LOGGING=n
Fixing this issue:
net/ip/l2_buf.c:81:31: note: in expansion of macro 'NULL'
 #define inc_free_l2_bufs_func NULL
                               ^
net/ip/l2_buf.c:88:2:
 note: in expansion of macro
 'inc_free_l2_bufs_func'
 inc_free_l2_bufs_func(buf);
 ^

Change-Id: Ie58f23af479ec4f2dd625b1f0f36720bbe54f928
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-19 12:33:19 +00:00
Johan Hedberg
7078efb1ae drivers/nble: Fix GATT error response values
Change-Id: I18cc1788e429876702614ddb2810de53625e8791
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-19 12:52:32 +02:00
Johan Hedberg
6b7ecc47c4 Bluetooth: GATT: Fix error response to bt_gatt_attr_read()
Change-Id: Ic5ab95d2c5ff62975f59239fd79068025ec5c54f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-19 12:52:32 +02:00
Johan Hedberg
dfaafb204f Bluetooth: Use BIT() macro wherever possible
Instead of manually creating bit shifts for individual bits use the
BIT() macro that exists for this purpose.

Change-Id: I599ecc16b3a2cffe8a355e19816c405e51937e91
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-19 10:47:29 +02:00
Iván Briano
f24a02445e net: Include only the necessary headers
Including zephyr.h instead of microkernel.h will also bring in
sysgen.h, which may not be available at the time these files are used
during the build.

Change-Id: I5e9e33a06a5877c6077bceebbab1bee6479fddc0
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-02-19 07:41:01 +00:00
Rodrigo Caballero
f08b35e4be doc: Remove orphaned kbuild_toolchains.rst
Change-Id: Ibc7de92622bafc6ec1fd4fa520f9b0205f8f3b0f
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-18 22:58:07 +00:00
Rodrigo Caballero
7e31cbdcc1 doc: Remove orphan file reference.rst.
Change-Id: I7c41b085a2d6ff3a2d6e6ef1a50e7750f66a4b62
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-18 16:54:47 -06:00
Daniel Leung
7096981791 gpio: clarify API doc
() Add brief descriptions for #defines.
() Hides internal only API typedefs and struct.

Change-Id: I452c5d7fe56d57ba05338639986e2fff44a89244
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-02-18 18:25:50 +00:00
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