Commit graph

2626 commits

Author SHA1 Message Date
Maureen Helm 28bf1a554a samples: blink_led: Add support for hexiwear_k64
The hexiwear_k64 board can drive the leds with a pwm, so update the
blink_led sample to work with this board. Reduces the maximum blinking
frequency from 500 Hz to 64 Hz because your eye can't distinguish these
higher frequencies (the led appears solidly on). Increases the minimum
blinking frequency from 0.5 Hz to 1 Hz because the mcux pwm driver can't
handle frequencies less than 1 Hz.

Jira: ZEP-2025

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-08-09 18:13:29 -04:00
Leandro Pereira d89e7e4e45 samples: drivers: gpio: Make the sample work with ESP32
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Michel Jaouen 6e2ba2c9e1 mpu_stack_guard_test: update log in README.rst
Following test changes, log info have changes and previous log info
with stack guard present shows an mpu error not caused by a stack
overflow caught by mpu stack guard feature.

Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
2017-08-09 13:36:09 -05:00
Michel Jaouen 3e6965d188 mpu_stack_guard_test: add more thread for test
This test launches several threads. Only last thread will overflow the
stack and an mpu exception will occur. The other threads are regulary
suspended, this triggers access to kthread structure. This tests is
failed on st and nxp platform, if 32 bytes alignement is not set.

Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
2017-08-09 13:36:09 -05:00
Jukka Rissanen 55b8edc88e net: Fix LLVM compiler warnings
Jira: ZEP-2488
Jira: ZEP-2486
Jira: ZEP-2485
Jira: ZEP-2482
Jira: ZEP-2480

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-09 12:50:50 -04:00
Robert Chou cd56290dbe net: lwm2m: rename CONFIG_NET_L2_BLUETOOTH to CONFIG_NET_L2_BT
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
2017-08-09 16:03:02 +03:00
Jukka Rissanen ce80c9e42d samples: net: ieee802154: Fix compile error
The path to ieee802154_settings.c was wrong so the hw sample
did not compile properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-09 14:21:02 +03:00
Johan Hedberg 2975ca0754 Bluetooth: Kconfig: Rename CONFIG_BLUETOOTH_* to CONFIG_BT_*
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.

Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-09 11:14:19 +03:00
Michael Scott 29c7c70a86 samples: lwm2m: add IPSO temperature object to LWM2M client
This commit adds IPSO temperature support to the LwM2M client sample.

NOTE: A dummy value of 25C is set during initialization and does not
change.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-08-09 10:55:53 +03:00
Michael Scott b8ac539e51 samples: lwm2m: initial sample for LWM2M client
This sample utilizes the new LwM2M library by setting up default
values for LwM2M device and firmware objects and then establisting
a connection to a LwM2M server (for example Leshan Demo Server) via
the registration interface.

To use QEMU for this purpose please see:
doc/subsystems/networking/qemu_setup.rst

NOTE: This sample currently does not demonstrate DTLS/bootstrap as
neither of these is supported by the LwM2M library.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-08-09 10:55:53 +03:00
Jukka Rissanen b300aa58a9 samples: net: zoap_server: Check IPv6 address add return value
When unicast IPv6 address is added to network interface, it is
possible that the return value is NULL (if all the address slots
are already occupied).

Coverity-CID: 157607

Jira: ZEP-2467

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-08 12:31:08 -04:00
Vincenzo Frascino 5398ef4d85 samples: mpu_test: Add Allow Flash Write config
This patch adds a configuration file that tests Flash writes with MPU
enabled.

[david.brown: Put options in prj.conf with comments as per review
 feedback]

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2017-08-08 11:20:46 -05:00
Johan Hedberg 51252bdea4 Bluetooth: samples/mesh_demo: Fix tune generation with sharp notes
The parsing of strings with sharp notes (e.g. "100C#") was incorrectly
implemented. Now it should be correct. Additional benefit is that this
should fix Coverity CID 173632.

Jira: ZEP-2467

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-08 13:10:29 +03:00
Jukka Rissanen 0c243dfe8c samples: net: Remove IEEE 802.15.4 sample setup
The IEEE 802.15.4 settings are applied automatically by
net_app_init() function is is enabled by default.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-07 21:52:51 -04:00
Jukka Rissanen 19b7213f36 samples: net: Some apps were missing IPv6 address settings
Make sure that by default we have at least IPv6 address specified
in the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-07 21:52:51 -04:00
Anas Nashif f461ee4df5 samples: fixed tc syntax
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-07 21:43:51 -04:00
Johan Hedberg bf8e504588 Bluetooth: Mesh: Fix duplicate const declarations
Remvoe duplicate const declarations which may cause compiler warnings.

Jira: ZEP-2442

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-07 19:18:02 +03:00
Paul Sokolovsky 5245a686fc samples: net: sockets: Switch to net_app auto-init
Don't call net configuration explicitly, instead rely on net_app
auto init service.

Thus, the only difference between POSIX and Zephyr versions of these
samples are different include files. The application code is 100%
the same.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-08-07 10:13:47 +03:00
Luiz Augusto von Dentz e57b7ec4ba Bluetooth: ipsp: Use CONFIG_NET_APP_BLUETOOTH_NODE
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz 7d9e0184d9 net: led_demo: Remove dependency on ipss sample service
The led demo does not even enable Bluetooth by default, and in case a
custom enables it shall use CONFIG_NET_APP_BLUETOOTH_NODE.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz 5383d47b3b net: zoap_server: Use CONFIG_NET_APP_BLUETOOTH_NODE
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz 4c9ebb9d9c net: zperf: Remove dependency on ipss sample service
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz b9c7f2ac33 net: zoap_client: Remove dependency on ipss sample service
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz 71929d2d5c net: mqtt_publisher: Use CONFIG_NET_APP_BLUETOOTH_NODE
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz f78b13c059 net: http_clients: Remove dependency on ipss sample service
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz a0f547d3d1 net: http_client: Remove dependency on ipss sample service
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz 4ce629d128 net: echo_client: Remove dependency on ipss sample service
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz e71d7f5dc9 net: http_server: Use CONFIG_NET_APP_BLUETOOTH_NODE
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Luiz Augusto von Dentz a1d694bc6d net: echo_server: Use CONFIG_NET_APP_BLUETOOTH_NODE
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-08-04 18:18:40 +03:00
Punit Vara da163e3bfc samples: Add sample for APDS9960 sensor
Sample can be used to test ambient light, RGB and proximity
functionality of APDS9960 sensor in polling mode.

Remove old sample which is not using sensor API.

ZEP-1552

Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-08-03 15:29:35 -05:00
Anas Nashif 3ac7b3a229 doc: qemu target was deprecated, use 'run'
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-03 11:48:55 -04:00
David B. Kinder 62a0cd246d doc: fix uses of back quotes in documentation
ReST defines interpreted text roles where text enclosed by single quotes
can be "intrepreted", for example :ref:`some name` becomes a link to
a label anywhere in the doc set named "some name", :c:func:`funcname()`
becomes a link to the API documentation for "funcname", and
:option:`CONFIG_NAME` becomes a link to, in our case, the documentation
for the generated Kconfig option.

This patch fixes uses of `some name` (without a role) by either adding
an explicit role, or changing to ``some name``, which indicates inline
code block formatting (most likely what was intended).

This is a precursor to changing the default behavior of interpreted
text to treat `some name` as :any:`some name` (as configured in
doc/conf.py), which would attempt to create a link to any available
definition of "some name".

We may not change this default role behavior, but it becomes an option
after the fixes in this patch.  In any case, this patch fixes incorrect
uses of single-quoted text (possibly introduced because GitHub's
markdown language uses single-quoted text for inline code formatting).

Jira: ZEP-2414

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-03 11:08:23 -04:00
Johan Hedberg 0be8414e2f Bluetooth: samples/mesh: Increase GATT TX buffer count
Count of 4 seems to cause deadlocks with some Android phones due to
other GATT activity in addition to Mesh related data.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-03 13:10:30 +03:00
David B. Kinder e9a3411651 doc: spelling fixes in docs
regular scan through docs and KConfig files for spelling issues
and UTF-8 characters

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-08-02 15:14:13 -04:00
Andrew Boie 3d346a1105 samples: ipm_mailbox: fix build error
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-08-02 11:15:25 -04:00
Anas Nashif 7c6cecde14 samples: mbedTLS server: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 48b351e34c samples: socket: echo_async unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 6ca686cc51 samples: socket: echo: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif ce6bc346b9 samples: http_server: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 69d8a9dd3a samples: telnet_server: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 103c3bb99a samples: coaps_client: unify prj.conf and cleanup docs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif b92733d47a samples: dns_resolve: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif f69d9b9951 samples: https_client: unify prj.conf
Disable qemu_cortex_m3 due to SRAM limitation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 6bb24976f9 samples: coaps_server: unify prj.conf and cleanup docs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif b8e4464958 samples: http_client: unify prj.conf
tested on frdm_k64f

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 32f41964fb samples: nats: unify prj.conf and add sample.yaml
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif db34c58d1f samples: irc_bot: unify prj.conf
tested on frdm_k64f

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 05e24ea373 samples: mbedtls_dtlsclient: unify prj.conf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Anas Nashif 562da39f9b samples: dhcpv4_client: unify prj.conf
tested on frdm_k64f.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-02 07:31:22 -04:00
Jukka Rissanen 4349895c5d samples: net: echo-client: Add DTLS support
Convert echo-client to use DTLS for UDP connections if DTLS
is enabled by prj.conf file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-01 21:09:59 +03:00
Jukka Rissanen 72ac166429 samples: net: echo-server: Add DTLS support
Convert echo-server to use DTLS for UDP connections if DTLS
is enabled by prj.conf file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-01 21:09:59 +03:00
Jukka Rissanen cee4a624f3 samples: net: irc-bot: Fix Kconfig warning
Duplicate CONFIG_SYS_LOG_NET_LEVEL variable was defined in
config files so removing extras.

.config:58:warning: override: reassigning to symbol SYS_LOG_NET_LEVEL

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 20:55:26 +03:00
Jukka Rissanen 9fee74cdbb samples: net: Remove extra startup thread
Couple of network samples had extra startup thread which is not
needed currently. This was an artifact before moving to using
unified kernel.

Jira: ZEP-2236

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 20:55:26 +03:00
Jukka Rissanen 607f4fffdd samples: net: http: Enable compile tests with Bluetooth config
Run http_server, http_client and https_client compile tests with
Bluetooth config. For http client tests we only use qemu_x86 as
the qemu_cortex_m3 tests failed because of too little memory.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen 0134abe368 samples: net: http: client: Enable Bluetooth if configured
If Bluetooth IPSP is enabled, then set the http client to use it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen 47be0f4989 samples: net: http: client: Set QEMU flags for Bluetooth connection
Bluetooth needs different QEMU_EXTRA_FLAGS than SLIP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen c724a5730c samples: net: http: client: Use net_buf context pool for TX
If CONFIG_NET_CONTEXT_NET_PKT_POOL is defined, which is the
default for Bluetooth, then create the pool and use it when
sending network packets. This is needed when trying to send
TCP packets using Bluetooth IPSP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen a4cfee8fe6 samples: net: http_server: Set QEMU flags for Bluetooth connection
Bluetooth needs different QEMU_EXTRA_FLAGS than SLIP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen 1a16b9decf samples: net: http_server: Remove QEMU memory setting
There is plenty of memory for QEMU currently so no need to
manually set the amount of memory.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Jukka Rissanen 0cdb31136c samples: net: http_server: Use net_buf context pool for TX
If CONFIG_NET_CONTEXT_NET_PKT_POOL is defined, which is the
default for Bluetooth, then create the pool and use it when
sending network packets. This is needed when trying to send
TCP packets using Bluetooth IPSP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-31 11:50:25 +03:00
Aska Wu c0b5e55e6d net/mqtt: Enable TLS support
CONFIG_MQTT_LIB_TLS is introduced to enable TLS support.

Also, prj_frdm_k64f_tls.conf is added to demostrate the whole idea.

jira:ZEP-2261

Signed-off-by: Aska Wu <aska.wu@linaro.org>
2017-07-28 11:25:43 +03:00
Aska Wu fb79837862 net/mqtt: Convert mqtt lib to use net app API
Use net app API since we want to enable MQTT with TLS.
mqtt_connect() and mqtt_close() are added to build and close the
connection to the broker. The caller doesn't need to deal with
the net context anymore and the most of network setup code in
mqtt_publisher is removed.

Signed-off-by: Aska Wu <aska.wu@linaro.org>
2017-07-28 11:25:43 +03:00
Inaky Perez-Gonzalez 3d498dd10c build: workaround build bug in tests
When an app uses a construct such as:

obj-y = main.o ../../../../samples/bluetooth/gatt/hrs.o

in its makefile, it causes said object module to be built in the
source tree, not in the object tree.

When building massively parallel, this usually resuls on the files
getting corrupted, leading to bugs such as:

https://jira.zephyrproject.org/browse/ZEP-2316
https://jira.zephyrproject.org/browse/ZEP-2317

src/../../../../samples/bluetooth/gatt/.gap.o.cmd:3: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:4: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:5: *** missing separator.  Stop.

as multiple build are trying to touch the same file in the source tree
and of course, race and causes a build bug.

We have known about this issue for a long time, but it requires
modifications in the build system that there is no time to tackle.

A suggested workaround is to include the source files into a local .c
file, so this is what this patch does, to remove the random noise.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-07-27 14:09:40 -04:00
Johan Hedberg ee3b715d1d Bluetooth: samples/mesh: Update generic nRF51 16k configuration
Update the configuration with the latest fine-tuning that was already
present in microbit.conf.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-07-27 13:51:34 -04:00
Johan Hedberg 28ce610a06 Bluetooth: samples/mesh: Disable unnecessary debug logs
There's no need for debug logs by default in the mesh sample, and it
just contributes excessively to the ROM footprint.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-07-27 13:51:34 -04:00
Wojciech Bober ac9a8804b9 net: http_server: Enable Bluetooth stack if configured
This PR enables Bluetooth stack if Bluetooth L2 is
compiled in.

Change-Id: I8f8127031140f0603615af44e0809d203db32f48
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-07-27 16:51:55 +03:00
Anas Nashif 977537107e samples: mesh: build sample where they fit
Not easily done using RAM/ROM filters, configurations need to be adapted
to make this fit on more devices. Limit the target platforms now while
we figure out configurations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-27 07:47:53 -04:00
Anas Nashif ca0ad13a61 net: enable SLIP only on QEMU targets
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.

Additionally, the TUN options is removed. This option was not used
anywhere.

To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 10:57:48 -04:00
Anas Nashif 9f642c4291 samples: mesh: build only on BLE platforms
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-26 07:23:14 -04:00
Andrew Boie 768e2a9617 mpu_stack_guard_test: fix stack declaration
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:53:14 -04:00
Andrew Boie 010498da62 samples: net: fix stack definitions
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-26 05:53:14 -04:00
Michael Scott c58be92208 samples: net: irc_bot: fix stack declarations
kernel APIs have changed to using K_THREAD_STACK_DEFINE to declare stack
memory as well as K_THREAD_STACK_SIZEOF to calculate it's size.

Adjust irc_bot sample to reflect those changes.

This fixes stack related page faults when running irc_bot with
CONFIG_X86_STACK_PROTECTION enabled (which it is by default for qemu).

Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-07-25 18:01:32 -04:00
Johann Fischer bc2454fa9e samples: usb: add usb.rst and README.rst for CDC ACM sample
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Johann Fischer 1ff51986e5 samples: cdc_acm: use Arduino 101 as default board
Be consistent with other usb samples and use Arduino 101
as default board.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Paul Sokolovsky 4732452a42 samples: bluetooth: ipsp: Bump max number of contexts
This sample includes builtin UDP and TCP echo servers, max
MAX_CONTEXTS=3 as set previously, they just didn't work.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-07-22 10:33:29 +03:00
Johan Hedberg 0ec2630882 Bluetooth: Mesh: Add initial implementation
Add an initial implementation for the Bluetooth Mesh Profile
Specification. The main code resides in subsys/bluetooth/host/mesh and
the public API can be found in include/bluetooth/mesh.h. There are a
couple of samples provided as well under samples/bluetooth and
tests/bluetooth.

The implementation covers all layers of the Bluetooth Mesh stack and
most optional features as well. The following is a list of some of
these features and the c-files where the implementation can be found:

 - GATT & Advertising bearers (proxy.c & adv.c)
 - Network Layer (net.c)
 - Lower and Upper Transport Layers (transport.c)
 - Access Layer (access.c)
 - Foundation Models, Server role (health.c & cfg.c)
 - Both PB-ADV and PB-GATT based provisioning (prov.c)
 - Low Power Node support (lpn.c)
 - Relay support (net.c)
 - GATT Proxy (proxy.c)

Notable features that are *not* part of the implementation:

 - Friend support (initial bits are in place in friend.c)
 - Provisioner support (low-value for typical Zephyr devices)
 - GATT Client (low-value for typical Zephyr devices)

Jira: ZEP-2360

Change-Id: Ic773113dbfd84878ff8cee7fe2bb948f0ace19ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-07-20 09:30:44 +03:00
Paul Sokolovsky 0e5c365f9a samples: net: sockets: Move socket sample(s) under a subdir
It's expected that there will be few socket-based samples, so move
tehm under samples/sockets/ to not clutter the main dir.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-07-18 21:46:56 +03:00
Paul Sokolovsky 00e8309f03 samples: sockets: Add async echo server example
Implements asynchronous TCP echo server using non-blocking sockets
and poll, with concurrent connections support.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-07-18 21:46:06 +03:00
Jukka Rissanen 8f9249cf5c samples: net: coaps_server: Increase mcast addresses
The coaps server sample application did not start because
number of IPv6 multicast addresses was too low. Increased
the address count from 2 to 5.

Jira: ZEP-2359

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-18 09:33:46 +03:00
Luiz Augusto von Dentz ca9c8a2627 Bluetooth: ipsp: Remove requirements section
All supported driver are HCI based so there is no need have it state on
the README.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-07-17 17:45:46 +02:00
Johann Fischer a8d7659a63 samples: dfu: fix usb configuration descriptor length
The macros for calculating the length of the configuration
descriptors have been interchanged, fix it, and use the
correct macro for the length of the DFU mode configuration
descriptor.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-15 11:26:40 +03:00
Robert Chou 33c54ee6fd net: zoap: advance block context by checking M bit from block option
According to RFC7959 page 30, "The end of a block-wise transfer is
governed by the M bits in the Block options, _not_ by exhausting the
size estimates exchanges."

Therefore, we should check the M bit instead of total size (which
is not always available, too)

Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
2017-07-14 11:06:54 +03:00
Luiz Augusto von Dentz 94409a14ae Bluetooth: ipsp: Disable debug options
This disable debug options in order for the image to fit in boards
such as arduino_101 and quark_se_c1000_devboard.

For convenience this adds another configuration file with as it was
available previously which can be build using:

make CONF_FILE=prj_dbg.conf

JIRA: ZEP-2378
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-07-12 17:37:45 +03:00
Erwin Rol 507add28c9 samples: net: http_server: Add olimex_stm32_e407 project config file
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-12 12:53:51 +03:00
David B. Kinder eeed8ce179 doc: fix wiki board references in non .rst files
Some README files referenced wiki articles that have been
moved to the doc area on the website.

Fixes #668

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-07-11 12:45:35 -05:00
Paul Sokolovsky 52f8cde07b samples: net: socket_echo: Add sample.yaml, update for net_app refactor
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-07-11 10:32:29 +03:00
Andrew Boie 65a9d2a94a kernel: make K_.*_INITIALIZER private to kernel
Upcoming memory protection features will be placing some additional
constraints on kernel objects:

- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.

Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.

It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.

There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.

k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-10 11:44:56 -07:00
Geoff Gustafson 1405627c37 net: context: Use K_NO_WAIT instead of 0 for timeout
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-07-10 10:59:28 +03:00
Kumar Gala 5920acef8a samples: mark samples that require usb_device support
Add depends_on usb_device for those samples that need it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-07 09:01:01 -05:00
Erwin Rol 3ff4d7409f samples: random: Add sentinel to check for buffer overflows
Initialize the buffer to 0 and read one byte less than the
buffer size. The result should be that the last byte of
the buffer always stays 0. This way it is possible to verify
it the driver does not write outside the buffer.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-07 07:27:39 -05:00
Jukka Rissanen 6ce9d8e882 samples: net: zperf: Add net tag
This sample app should be tested whenever net tag is specified.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-07 15:24:00 +03:00
Jukka Rissanen 3604c391e6 net: udp: Remove NET_UDP_HDR() macro and direct access to net_buf
Remove NET_UDP_HDR() macro as we cannot safely access UDP header
via it if the network packet header spans over multiple net_buf
fragments.

Fixed also the UDP unit tests so that they pass correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-07 15:24:00 +03:00
Bogdan Davidoaia e90064f317 samples: net: ieee802154: add KW40Z prj conf file
The config file for KW40Z has the shell disabled, as available
SRAM memory is limitted to 16kB.

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-07-06 14:20:32 -05:00
Bogdan Davidoaia 8909be81f9 samples: net: ieee802154: kw41z: reduce log level
Reduce log level to show only error messages.

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-07-06 14:20:32 -05:00
Anas Nashif d7154d50df samples: wpanusb: add testcases
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-06 10:34:41 -05:00
Jukka Rissanen 7a31d4b8cb net: app: Fix dual IPv4 and IPv6 support
It was not possible to send IPv4 packets if IPv6 was also
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-06 14:32:37 +03:00
Anas Nashif c364e06ccb tests: move spi test under tests/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Anas Nashif c69de8b146 samples: remove reference to nimble
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Anas Nashif 68d7a207ae ethernet: fix Kconfig option for ETHERNET
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Anas Nashif c01c074b5b net: fix wrong Kconfig
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT should be used instead of
CONFIG_NET_IFACE_UNICAST_IPV6_ADDR_COUNT.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Carles Cufi c170855825 Bluetooth: hci_uart: Set the UART TX size correctly
Since the controller comes with a transmit buffer size that mirrors the
maximum size of a transmit packet, use that to size the buffers that are
used in the hci_uart application to receive packets from the Host over
the UART.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-07-05 16:59:31 +02:00
Anas Nashif 8aac831e3c samples: mqtt_publisher: fixed typo
Also fix console syntax adding prompt: $

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-04 16:52:40 -04:00
Johan Hedberg 30beef9419 Bluetooth: GATT Introduce BT_GATT_CCC_MAX helper define
The worst-case maximum number of CCC entries we need is actually
MAX_CONN + MAX_PAIRED. Provide a helper define for it and use it
whenever appropriate.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-07-04 17:30:40 +03:00
Anas Nashif 07c0d3d0f0 samples: ipm_mailbox: fix thread creation
We have been starting the same thread twice. Introduced when we moved
from k_thread_spawn.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-03 20:57:44 -04:00
Neil Armstrong 395daba0d4 samples/spi: Enable test on STM32 SoCs
Add support for the STM32 SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 394aa8127a samples/spi: Permit specifying low test frequency
The STM32 lower frequency is different, let us specify a different one.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 9eb865e03a samples/spi: Make async test optional
Handle the case when the async transceive call returns ENOTSUP.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Vinayak Kariappa Chettimada 6cc00f0ee3 Bluetooth: samples: scan_adv: Select BROADCASTER and OBSERVER
Explicitly select CONFIG_BLUETOOTH_BROADCASTER and
CONFIG_BLUETOOTH_OBSERVER in the scan_adv sample.

If the Controller is included without connections support
then only broadcaster support is compiled in by default,
hence add broadcaster and observer role support explicitly
in the prj.conf file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-30 13:42:33 +03:00
Jukka Rissanen 439ceb99c1 samples: net: https: Increase the RAM for client and server
Next two commits will increase the mbedtls ram usage a bit and
https client and server sample test will fail.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Jukka Rissanen 5f9d79f290 samples: net: http: Remove net_app_init() calls
As the net app API is automatically initialized, there is no
need to call net_app_init() by the http client and server sample
applications.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Jukka Rissanen d14d167188 samples: net: wpan: No need to define IP addresses
Removing CONFIG_NET_APP_SETTINGS from prj.conf file as the
sample does not use or need any IP addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Jukka Rissanen 76e6e32cad net: samples: Convert echo-client to use network app API
This commit will convert echo-client to use the net app API
when creating the connection to peer. Most of the network
setup code will be removed from echo-client by this commit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Jukka Rissanen 2e7c3519a4 net: samples: Convert echo-server to use network app API
This commit will convert echo-server to use the net app API
when creating the listening service. Most of the network
setup code will be removed from echo-server by this commit.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Jukka Rissanen a1be6a8ba9 net: app: Create support for network application API
The network application API is a higher level API for creating
client and server type applications. Instead of applications
dealing with low level details, the network application API
provides services that most of the applications can use directly.

This commit removes the internal net_sample_*() API and converts
the existing users of it to use the new net_app API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-30 06:13:09 -04:00
Kumar Gala c84e90e7de samples: nfc_hello: limit to uarts that support interrupts
We get some failures to build if we don't filter this test to only
boards that support uart interrupts.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-29 14:55:43 -04:00
Kumar Gala fbd1bc2a93 samples: hello_world: remove min_ram requirement
The hello_world sample builds everywhere so remove the min_ram
requirement from samples.yaml.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-29 11:48:34 -04:00
John Andersen 913e2cdb24 samples: net Documented QEMU_INSTANCE usage
Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-06-29 07:20:46 -04:00
John Andersen 06b92c6611 samples: net: Multiple instances of QEMU
Makefiles which start QEMU (make run) have been changed to operate
off of the QEMU_INSTANCE variable. QEMU_INSTANCE is simply appended
to the pid and sock file names. This makes us able to run multiple
QEMU Zephyr instances of the same sample.

Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-06-29 07:20:46 -04:00
Kumar Gala 21cf3a6344 samples: Fix filtering on UART_CONSOLE
There were a few different issues with the UART_CONSOLE filtering:
* Filter was incorrect - UART_CONSOLE should be CONFIG_UART_CONSOLE
* platform_exclude was used for drivers that had a #error for lack of
  interrupt support.  We can now use CONFIG_SERIAL_SUPPORT_INTERRUPT in
  the filter for that.  This catches all the various drivers that needed
  don't support uart interrupts, not just the onces that had a #error

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-29 07:07:31 -04:00
Johann Fischer 08df5961b3 arch: intel_quark: use DW device driver when USB is selected
This patch allows more generic USB configuration in the samples
and removes platform dependent driver configuration.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-28 15:14:15 -04:00
Anas Nashif d1e562c924 tests: replace filters in testcase files
Where possible, replace the use of filter with newly added keywords.
This will speed things up and in some cases add more coverage due to bad
filters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-28 09:51:40 -05:00
Paul Sokolovsky d950ec2981 samples: net: Add socket-based echo server example
The example source code is POSIX-compatible (modulo include files),
i.e. can be built and behaves the same way for Zephyr and a POSIX
system (e.g. Linux). Makefile.posix is available for the latter.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-06-28 16:07:55 +03:00
Johann Fischer 3dd51d52a2 drivers: usb: use generic option name for log level
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-28 09:02:27 -04:00
Jukka Rissanen cd19a57811 samples: net: mbedtls: Fix server compilation
The code has missing proper conversion from net_buf to net_pkt
that was implemented in commit db11fcd "net/net_pkt: Fully
separate struct net_pkt from struct net_buf"

The sample.yaml had incorrect whitelist string so this is also
fixed here.

Fixes #596

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-27 19:20:53 -04:00
Anas Nashif 6ff291a174 tests: do not exclude quark_d2000_crb
quark_d2000_crb does not build net/bluetooth tests by default now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Jukka Rissanen 92fa7ac6ce net: http: Remove mbedtls heap setting from http library
The global mbedtls heap is set automatically now so no need to
set it individually in the http library.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-27 16:42:59 +03:00
Kumar Gala 514a07a9e2 samples: coaps_server: Fix platforms to build coap_server test on
We incorrectly had an arch_whitelist constraint set to 'qemu_x86' that
should have been a platform_whitelist, so fix that and add arduino_101
frdm_k64f to the platform_whitelist as targets that we can test this on.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-06-23 16:03:21 -04:00
Anas Nashif 3afb47887f samples: hci_uart: optimize testcase definition
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-22 09:22:48 -04:00
Anas Nashif dc36e905b6 samples: environmental_sensing: update filtering
Build only for arduino 101 and update title and description.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-22 09:22:48 -04:00
Carles Cufi 634d3b46a9 Bluetooth: Set hci_uart RAM config to fit privacy
With the introduction of privacy, the system workqueue is now being
linked into the image, growing the RAM footprint considerably.

In order for the sample to fit in QFAA and QFAB variants of the nRF51
(16KB of RAM) we reduce the workqueue stack size to 512 since the RPA
update mechanism doesn't use more than 340 bytes and we stick to 16
connections maximum.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-06-22 14:40:23 +03:00
Johann Fischer aea4c31722 samples: wpanusb: remove unnecessary condition for ccflags
The condition in src/Makefile is not necessary since the
net_private.h is always included from wpanusb.c and is not
dependent on the transceiver.

Change-Id: I07a0bf599f328bacb8c5677f20eb221a05f30866
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-06-22 07:09:07 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
David B. Kinder a741c00a08 doc: fix references to moved files
Some recent PRs moved sample files to a new location

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-20 18:26:53 -04:00
Anas Nashif 1618013e52 doc: add MPU samples to index
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-20 10:40:16 -04:00
Anas Nashif e3806d9766 Revert "Kconfig: Source Kconfig from Zephyr application directory."
This reverts commit 83edd615ca.

Causes the documentation build to fail on Kconfig parsing, needs fixing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-20 10:40:16 -04:00
Michał Kruszewski 83edd615ca Kconfig: Source Kconfig from Zephyr application directory.
Enable application specific configuration to be easily included
and manageable via Kconfig. Add sample.

Signed-off-by: Michał Kruszewski <mkru@protonmail.com>
2017-06-20 08:48:36 -04:00
Sharron LIU f6bc86db50 samples: appdev: static_lib: added "make flash"
ISSM team wanted to integrate
"samples/application_development/static_lib" app
into their IDE. Al-ashi, Mahmoud <mahmoud.al-ashi@intel.com> found
it failed to "make flash" this app.

Also this patch added "make flash" build targets.

Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-06-20 08:30:26 -04:00
Anas Nashif 4ad2746088 samples: demonstrate the use of KBUILD_ZEPHYR_APP
Jira: ZEP-2280
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-19 21:23:11 -04:00
Anas Nashif c2a2cfc8c8 samples: move app developemnt samples samples/appdev
Move all application development and build related samples into one
folder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-19 21:23:11 -04:00
Anas Nashif 5c3c323069 samples: move all MPU samples into one directory
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-19 21:23:11 -04:00
Anas Nashif 19e78bcfe1 samples: move quark se power samples to boards/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-19 21:23:11 -04:00
Anas Nashif f7c226400d samples: move environment sensing to boards
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-19 21:23:11 -04:00
Anas Nashif 397d29db42 linker: move all linker headers to include/linker
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-18 09:24:04 -05:00
Geoffrey Le Gourriérec 1975ce4f7c samples: gpio: Add support for SensorTag board.
Add extra #defines in samples/drivers/gpio to test
TI SensorTag board.

Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@smile.fr>
2017-06-16 16:18:12 -04:00
Johan Hedberg 9703927f84 net: buf: Move net_buf_pool objects to dedicated linker area
Moving the net_buf_pool objects to a dedicated area lets us access
them by array offset into this area instead of directly by pointer.
This helps reduce the size of net_buf objects by 4 bytes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-06-16 17:05:06 +03:00
David B. Kinder cbec29ab95 doc: change UTF-8 chars to sphinx inline replaces
Avoiding use of UTF-8 characters (trip up some tools)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-16 07:35:11 -05:00
Luiz Augusto von Dentz 79af35991b Bluetooth: GATT: Add bt_gatt_register_service
This adds bt_gatt_register_service using bt_gatt_service which contains
the attribute array that is then added to the database saving a pointer
in each and every attribute declared.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Luiz Augusto von Dentz d837a6ec4b Bluetooth: GATT: Add GAP service by default
GAP is mandatory service and now that the db can only be build
dynamically there is no reason to keep the applications registering it.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Luiz Augusto von Dentz b3cfabab63 Bluetooth: Remove CONFIG_BLUETOOTH_GATT_DYNAMIC_DB
Removes CONFIG_BLUETOOTH_GATT_DYNAMIC_DB in preparation to the
introduction of bt_gatt_unregister.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Aska.Wu 2970e8beae samples: coaps_server: add prj_frdm_k64f.conf
Be able to test coaps server on frdm k64f board.

Jira: ZEP-1878
Signed-off-by: Aska Wu <aska.wu@linaro.org>
2017-06-14 09:51:34 +03:00
David B. Kinder d1bdb3e092 doc: fix board/sample broken links
Some files have moved from their original location, or are no longer
available.  For the mbedtls samples, tweak the link to point to a page
where links for current and previous downloads can be found.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-13 20:49:13 -04:00
Andrew Boie fed3331c9f mpu_stack_guard_test: use k_thread_create()
Issue: ZEP-2270
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-13 11:04:05 -05:00
Leandro Pereira cf05b11924 samples: net: Do not assume TCP connection was successful
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-13 10:33:41 +03:00
David B. Kinder 342bdda760 doc: spelling fixes in samples/ and boards/
regular spelling check on .rst files

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-06-12 18:28:08 -04:00
Jukka Rissanen 57df515028 samples: net: echo-client: Fix compile error
This commit fixes compile error caused by commit 39962dc9
"samples: use k_thread_create()"

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-12 18:01:50 -04:00
Andrew Boie e87eacacfa samples: use K_THREAD_STACK_DEFINE macros
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-09 18:53:28 -04:00
Jukka Rissanen e90f4e1486 sample: net: Add https-client sample application
This https-client sample starts to send HTTP GET/HEAD/POST
requests same way as http-client, to https server that can
be found in net-tools repository.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-09 09:56:21 +03:00
Jukka Rissanen 393ab90785 samples: net: Fix README.rst file documentation
Various network samples contained QEMU slip setup instructions
or those instructions were missing. A reference doc in
doc/subsystems/networking/qemu_setup.rst file already has the
setup instructions for QEMU. So add a reference to that file
in samples/net/*/README.rst files and remove unnecessary slip
setup instructions in relevant files.

Fix various typos in readme files at the same time.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-09 09:55:37 +03:00
Anas Nashif 3405607d9e license: add missing licenses and copyright
We were missing license boilerplate in many files, add them

Jira: ZEP-1464

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-08 10:41:56 -04:00
Sharron LIU c282811983 samples: static_lib: conditional assign BOARD (?=)
The sample app "static_lib" is very important to Zephyr user, which
demonstrate how to build and link a static lib.
ISSM team wanted to integrate this app in their IDE for quark platforms.
However they find the in "static_lib/hello_world/Makefile" BOARD is
hardcoded as qemu_x86.

This patch supports other BOARD passed from build command.
I have verified this app working fine @Arduino101.

Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-06-08 07:55:25 -05:00
Sharron LIU 3970cd4a87 samples: fixed typo in README.rst
Per ISSM team feedbacks:
“demostrating” >> “demonstrating”
“demonstates” >> ”demonstrates”

Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-06-07 22:53:54 -04:00
Andrew Boie 489d7475f8 samples: restore cpp_synchronization test
Issue: ZEP-2172
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-06-06 20:37:11 -04:00
Leandro Pereira cb0f81f25f samples: dns_resolve: Clarify documentation about DNS configuration
Add clarification that the DNS server configuration must be edited in
the respective prj.conf file.

JIRA: ZEP-2040
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-06-03 15:02:14 -04:00
Florian Vaussard 5671c15fee samples: blink_led: Add support for STM32F412
The STM32F412 has PWM output capabilities. Add support to the blink_led
samples.

Tested using a Nucleo STM32F412ZG board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).

Change-Id: I75fb986fa97bd1c07c6375938430e7963297cd9d
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-06-02 14:11:13 -04:00
Florian Vaussard acdbf7d093 samples: blink_led: Add support for STM32F413
The STM32F413 has PWM output capabilities. Add support to the blink_led
samples.

Tested using a Nucleo STM32F413ZH board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).

Change-Id: I3b25b09cab54265b28088ac9681aec588d9d48b5
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
2017-06-02 14:11:13 -04:00
Jukka Rissanen 3616ec145b samples: net: http_client: Increase the number of buffers
The number of RX and TX buffers is increased to 64 as the
earlier limit can cause memory exhaust in some cases.

Jira: ZEP-2223

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-02 12:43:52 +03:00
Jukka Rissanen bad6e28827 samples: net: dtls_client: Fix Coverity warning
This fix is basically a no-op as the rx_buf pointer cannot be null
in practice, but in order to avoid Coverity complaining about
it add some null pointer checks to the UDP handling code.

Coverity-CID: 170124
Jira: ZEP-2235

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-02 12:34:50 +03:00
Tomasz Bursztyka cced7fd47a api/spi: Change transceive functions signature
Instead of NULL terminated buffer arrays, let's add a parameter for each
that tells the number of spi_buf in it.

It adds a little bit more complexity in driver's side (spi_context.h)
but not on user side (bufer one has to take care of providing the NULL
pointer at the end of the array, now he requires to give the count).

This will saves a significant amount of bytes in more complex setup than
the current dumb spi driver sample.

Fix and Use size_t everywhere (spi_context.h was using u32_t).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-06-01 10:49:30 -04:00
Jukka Rissanen 7d13261bd9 samples: net: zperf: Fix llvm compiler warnings
Jira: ZEP-1884

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-06-01 10:30:21 -04:00
Leandro Pereira 7a972c0229 samples: mqtt_publisher: Try connecting a few times before giving up
Waiting for an NET_EVENT_IF_UP before trying to connect isn't sufficient
in some cases; for instance, on devices using the MCUX HAL, such as the
FRDM-K64F, the interface will have the NET_IF_UP flag set even though
the link negotiation didn't yet complete.

Executing this sample on such board will produce the following output.
Notice the "Enabled 100M..." message right after trying to connect.

    [dev/eth_mcux] [DBG] eth_0_init: MAC 00:04:9f:6f:91:da
    net_context_connect error Is the server (broker) up and running?
    [publisher:247] network_setup: -60 <ERROR>

    Bye!  [dev/eth_mcux] [INF] eth_mcux_phy_event: Enabled 100M
    full-duplex mode.

Even though the returned error is ETIMEDOUT, increasing
net_context_connect()'s timeout parameter to several seconds isn't
sufficient; other steps performed by network_setup() after the link has
been fully established are necessary.  As a stopgap measure, try
connecting a few times before giving up (more than one connection
attempt should be made by application in most cases, anyway.)

It might be the case that we need events to monitor ethernet link
(re)negotation in addition to the NET_IF_UP bit.

Jira: ZEP-2036
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-31 17:16:28 -04:00
Johan Hedberg d2ba7950c5 samples: boards/microbit: Use 250 ticks per second for smooth display
To avoid display flickering, use 250 ticks per second instead of the
default 100.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-30 12:29:11 +03:00
Johan Hedberg a90735d64c samples: microbit/pong: Disable advertising when connected
The state machine of the game assumes that the user needs to
explicitly re-select multiplayer game when disconnected. We need to
therefore make sure that advertising stays off as soon as the first
connection happens.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-30 10:11:09 +03:00
Johan Hedberg eb89db26b5 samples: microbit/pong: Fix disabling sound when ending game
Occasionally the sound might stay enabled for the restart timeout (2
seconds) if the ball would hit the wall right before missing the
paddle. Ensure that it's disabled whenever the game ends.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-30 10:11:09 +03:00
Jukka Rissanen 35ef580389 samples: net: coaps_client: Fix testcase.ini
The platform list was incorrectly set.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-29 17:35:20 -04:00
Jukka Rissanen 5a0b4976d9 samples: net: coaps_client: Fix compile issues
The coaps_client was bit rotted and did not compile
correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-29 17:35:20 -04:00
Jukka Rissanen e7c52a492f samples: net: mbedtls_dtlsclient: Fix testcase.ini
The platform list was incorrectly set.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-29 23:51:35 +03:00
Jukka Rissanen 27990f77e1 samples: net: mbedtls_dtlsclient: Fix compile issues
Some net_pkt API changes were not done for this sample.

Jira: ZEP-2072

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-29 23:51:35 +03:00
Jukka Rissanen eeaa29666b net: http: Handle HTTPS connection closing gracefully
If the HTTPS connection is closed, then properly handle call to
HTTP parser init in case of error and also remove any pending
data that belong to old connection.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-29 23:50:33 +03:00
Johan Hedberg 1bb9a04912 samples: microbit/pong: Fix refreshing display upon disconnect
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-29 17:31:30 +03:00
Johan Hedberg 190b0d1a10 samples: microbit/pong: Filter out spurious button presses
The buttons on the microbit cause quite easily "ghost" key presses.
Add a simple filter that ignores button presses from the same button
that happen less than 100ms from each other.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-29 17:31:30 +03:00
Johan Hedberg 0b16e8ada5 samples: microbit/pong: Increase ISR stack size
The stuff that the GPIO button callback does (in particular the printk
calls) requires more stack space from the ISR stack. Increase it to 1k
from the default 640.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-29 17:31:30 +03:00
Johan Hedberg 3357813373 samples: microbit/pong: Analyze kernel stacks periodically
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-29 17:31:30 +03:00
Luiz Augusto von Dentz f8c4a34663 Bluetooth: ipsp: Enable CONFIG_BLUETOOTH_SHELL
This enabled testing CONFIG_BLUETOOTH_SHELL with configuration other
than btshell and enables ipsp sample to use bt shell module which
allows to disconnect, print metrics, etc.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-29 10:42:21 +03:00
Vincenzo Frascino 68f3b71b5d arm: core: mpu: Add core support to NXP MPU
This patch add arm core MPU support to NXP MPU driver.

With this feature it is now possible to enable stack guarding on NXP
MPUs.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-05-28 09:18:54 -05:00
Johan Hedberg 9516d63836 Bluetooth: Remove support for NBLE
NBLE has been deprecated for a few releases now and can be removed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-25 09:03:16 -07:00
John Andersen 7985e917c9 samples: net: mqtt_publisher: fixed formatting
README.rst had formatting which was making things disappear in the
online documentation.

Signed-off-by: John Andersen <john.s.andersen@intel.com>
2017-05-25 18:48:49 +03:00
Johan Hedberg 9e2fb2f3ad samples: microbit/pong: Add basic sound support
Add beeps whenever the ball hits the walls or the paddle. Requires a
piezo buzzer connected to pin 0.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-23 14:46:02 -07:00
Johan Hedberg 5e59f13ca3 samples: microbit/pong: Add BLE-based multiplayer support
Add support for connecting two micro:bit devices to play pong between
themselves.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-23 14:46:02 -07:00
Johan Hedberg 9a7cb7134a samples: microbit/pong: Add initial draft of a pong game
Add initial draft of a pong game using the display on the micro:bit
and its two buttons. This draft only supports a solo game where the
ball bounces from the "roof" and lets the player play against himself.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-23 14:46:02 -07:00
Jukka Rissanen 11aee50eef sample: net: http: Add Basic auth support to server sample
Basic auth support was missing from HTTP server sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-23 18:01:04 +03:00
Tomasz Bursztyka 0938ccbbc1 samples/spi: Add a quick test for spi_release() API function
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka d9007a09f8 samples/spi: Add an asynchronous call test
This gives a quicke example on how to use SPI asynchronous calls with
kernel's k_poll API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka 761a1d9429 api: Add asynchronous call support to SPI API
Adding a struct k_poll_signal parameter to driver's API unique
exposed function.

If not NULL, the call will be handled as asynchronous and will
return right after the transaction has started, on the contrary
of current logic where is waits for the transaction to finish
(= synchronous).

In order to save stack, let's move the device pointer to struct
spi_config. So the call is still at a maximum of 4 parameters.

Adapting spi_dw.c and spi driver sample to the change so it still
builts.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka cd54dc66f2 samples: Add an SPI driver test application
This application intents to test an SPI driver by looping over MISO/MOSI
line where the controller will then send data to itself.

It will test various buffer tx/rx schemes.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Jukka Rissanen 63ca45b222 samples: net: http: Remove Arduino-101 config from server
There is not enough memory to run the HTTP server sample
application in Arduino-101 so remove the config file.

Jira: ZEP-2157

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-19 16:05:38 +03:00
Anas Nashif 51f9318a32 samples: lcd_hd44780: return if binding fails
Coverity-ID: 151980
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-18 11:19:11 -05:00
Anas Nashif 6aa77e9f3e Revert "net: zoap_server: Unify Makefile and add prj file"
This reverts commit 350d5d4d60.

This change break with many boards and leaves prj.conf unused.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-18 15:09:15 +03:00
Jukka Rissanen c9d21ef831 samples: net: http: Remove obsolete files from server sample
There was some left overs from earlier version of http_server
sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-18 15:07:02 +03:00
Wu Jiequan 350d5d4d60 net: zoap_server: Unify Makefile and add prj file
Modify the Makefile to unify with other sample apps and
add the arduino 101 configuration file.

Signed-off-by: Wu Jiequan <jiequanx.wu@intel.com>
2017-05-17 09:37:40 +03:00
Vincenzo Frascino 8162bb63c4 samples: mpu_test: Add controller specific write
This patch add a controller specific write function and fixes a
documentation error in the mpu_test README file.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-05-16 09:28:06 -05:00
Vincenzo Frascino 14a892f7a4 samples: Add mpu stack guard test
This patch adds the mpu_stack_guard_test to the available samples.
The purpose of this test is to exercize the thread stack guard enabled
via MPU on arm platforms.

Change-Id: I4665a20956d9e6d0dd4b5cc862e82040a53afafc
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-05-16 09:28:06 -05:00
Vincenzo Frascino 1a1df7cc64 samples: synch: Add Thread Stack Guards conf
This patch adds the Thread Stack Guards configuration option to the
synchronization sample.

This is meant to be an easy way to prove that the MPU can be dynamically
programmed on the supported platforms.

Change-Id: I77fbe6af3303ff8a2904768abd4cc9797f03c092
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-05-16 09:28:06 -05:00
Paul Sokolovsky 3cb13b9687 subsys: console: Add buffered output support to console subsystem
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-05-15 15:56:56 -04:00
Erwan Gouriou 19a91c0272 soc: stm32l476rg: rename SOC config flag
Rename SOC_STM32L476XX to SOC_STM32L476XG to keep flash
size information.
Aim is to be able to distinguish flash size variants of
the SoC when needed (for instance in dts/arm/st/mem.h file)

Change-Id: I834bb5b83c24c39e90c0492a2b22a7c7802de361
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-05-15 13:22:54 -04:00
Youvedeep Singh 1da0a9eebd cdc_acm : Restrict writing more than 4 bytes into TX USB Endpoint.
Sometime it is observed on the Arduino 101 that when we write more than
4 bytes into TX USB Endpoint, first 4 bytes are getting repeated
(frequency of occurrence ~1/3000).

This patch does following :-

1. In sample application "cdc_acm", it adds capability to
handle partial transfer data incase data is transferred partially
if exceeds maximum data transfer size.
2. It restricts write of more than  4 bytes into TX USB Endpoint.
This is work around to  avoid issue occarance.

Jira: ZEP-2074

Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-13 15:12:27 -04:00
Jukka Rissanen a174d2eba7 net: http: Add HTTP server library support
This commit creates a HTTP server library. So instead of creating
a complex HTTP server application for serving HTTP requests, the
developer can use the HTTP server API to create HTTP server
insteances. This commit also adds support for creating HTTPS servers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-13 14:30:58 -04:00
Jukka Rissanen 19868313fc net: samples: Fix the BT compilation in sample API
The CFLAGS and object path were set incorrectly for Bluetooth.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-13 14:30:58 -04:00
Jukka Rissanen d4c5cc10e4 net: samples: Add support to wait both IPv4 and IPv6
The net_sample_app_init() is now able to wait that both IPv4
and IPv6 addresses are setup before continuing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-13 14:30:58 -04:00
Carles Cufi 6c9e563c92 Bluetooth: Move common code to common/
Since more and more code is going to be reused by both the Host and the
Controller, this commit introduces a common/ folder that will contain
everything that is not tied to one of the two components but shared by
them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-12 12:56:14 +03:00
Andrew Boie 39962dc92c samples: use k_thread_create()
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-11 20:24:22 -04:00
Andrei Emeltchenko bca1077d3c samples: ipm_mailbox: Remove unneeded definitions
Make sample working for other architectures.
SCSS_REGISTER_BASE and SCSS_SS_STS are defined in soc.h

Change-Id: Ie477520d2fb9bfcbbb5038ff42356a56d8180a1f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-05-10 09:08:58 -04:00
David B. Kinder 2f41cb8329 doc: misspelling and UTF-8 fixes
More general spelling fixes, and cleaning up stray UTF-8 characters
such as curly-quotes, em- and en-dashes.  Use replacement strings
for |reg| and |trade|.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-05-09 20:15:49 -04:00
Johan Hedberg 18593e74e1 Bluetooth: samples: Fix passkey display
Passkeys are always 6 digits in length and should therefore be
zero-padded if necessary.

Jira: ZEP-2113

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-05 11:25:57 +03:00
Jukka Rissanen dc0fc57917 net: samples: Common application init API
This creates a common API for network sample applications for
setting up IP addresses etc. The HTTP client application is modified
to use this API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-04 15:58:45 -04:00
Jukka Rissanen 70f334d9f2 http: client: Create a HTTP library
Instead of separate sample application that does everything
related to HTTP client connectivity, create a HTTP client library
that hides nasty details that are related to sending HTTP methods.
After this the sample HTTP client application is very simple and
only shows how to use the client HTTP API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-04 15:58:45 -04:00
Carles Cufi 689bd232f8 Bluetooth: Reshuffle Kconfig options
In order to achieve proper sharing of configuration options, everything
that is common to both the Host and the Controller should now be placed
in the top-level Kconfig file, and Controller-only options are in the
controller/ Kconfig one.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-04 11:27:04 +03:00
Erwan Gouriou 7991784297 samples: sensor: hts221
This commit provides sample application for sensor hts221.
By default, it is enabled on board disco_l475_iot1

Change-Id: I535fac8a670fa89cc1cae15ea1abe9cfe4b6c56b
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-05-03 13:51:37 -04:00
Justin Watson 558281b096 arch: sam3x: update Kconfig options after move to SAM SoC family tree
The files for the Arduino Due needed to be updated to use the new
configuration when the SoC moved from the atmel_sam3 directory to
the atmel_sam/sam3x directory.

Jira: ZEP-2067

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2017-05-03 13:51:37 -04:00
Carles Cufi 7a0588ac9f samples: bluetooth: Set DT baud rate for nRF5x boards
Since most of nRF5x-based boards can be used either as a standalone
development kit or as a BLE controller to connect to an external host,
add DT overlays so that the baud rate is correctly set to 1Mbit/s
whenever building the hci_uart sample application.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-03 08:43:17 -05:00
David B. Kinder 1d36cfba90 doc: change gerrit references to github
We're moving the project code to GitHub folks, so change references
in the documentation from gerrit over to GitHub:
https://github.com/zephyrproject-rtos/zephyr

Change-Id: Ic491a62ed43fc799eb5698e92435cb6eb4d89394
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-28 21:21:06 +00:00
Paul Sokolovsky ddf23f3167 samples: net: dns_resolve: Clarify that DNS queries aren't immediate
The sample in its default configuration waits for DNS server
configuration via IPv4 or IPv6 specific means. Until this
information is receives, DNS querying won't even start. Make
diagnostic messages explicit of this fact, because if user
doesn't have required services available in the network, the
sample will appear to just hang.

Jira: ZEP-2061

Change-Id: I56a5b7354a2d1239a35d8334ed95a15ebd19254f
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:12 +03:00
Ravi kumar Veeramally e4d8900cc6 net: samples: Use correct API to get net pkt length
net_pkt_get_len() is the correct API to get network packet
length.

Jira: ZEP-2076

Change-Id: Ifff6f3d5df28b3684cc8bb3758f9e8bccd5d4534
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-04-28 15:01:11 +03:00
Bogdan Davidoaia efc3ba6b98 samples: net: ieee802154: add KW41Z config file
Add config file to be used for testing KW41Z's IEEE 802.15.4 driver.

Jira: ZEP-2026
Change-Id: I7042c57ad33ff72b35d24fbf28085b99b2301726
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-04-28 15:01:10 +03:00
Jukka Rissanen f7d291ea90 samples/dns: Add config file for Arduino-101 and FRDM-K64F
The dns_resolve sample application did not had project file for
two boards that the README file is talking about, so adding them here.

Jira: ZEP-2040

Change-Id: I68e825854a171b09d56df91ab80ce5d9349733f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-28 15:01:09 +03:00
Paul Sokolovsky 25307d5331 net: net_pkt_append: Refactor to return length of data actually added
For stream-based protocols (TCP), adding less data than requested
("short write") is generally not a problem - the rest of data can
be sent in the next packet. So, make net_pkt_append() return length
of written data instead of just bool flag, which makes it closer
to the behavior of POSIX send()/write() calls.

There're many users of older net_pkt_append() in the codebase
however, so net_pkt_append_all() convenience function is added which
keeps returning a boolean flag. All current users were converted to
this function, except for two:

samples/net/http_server/src/ssl_utils.c
samples/net/mbedtls_sslclient/src/tcp.c

Both are related to TLS and implement mbedTLS "tx callback", which
follows POSIX short-write semantics. Both cases also had a code to
workaround previous boolean-only behavior of net_pkt_append() - after
calling it, they measured length of the actual data added (but only
in case of successful return of net_pkt_append(), so that didn't
really help). So, these 2 cases are already improved.

Jira: ZEP-1984

Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-28 15:01:09 +03:00
Piotr Mienkowski f9a85815c2 samples: net: remove redundant Kconfig options for sam_e70_xplained
- Manual MAC address settings
- Default ETH driver initialization priority

Change-Id: I6294e2f66623087dfdc131344a94d0e9f2edc6b4
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-28 15:01:09 +03:00
Ramesh Thomas c759ed1f94 samples: power: Time is passed as milliseconds in tickless kernel
In tickless kernel mode, time parameter of _sys_soc_suspend is in
milliseconds. Based on the kernel mode use the correct
mulitplier to convert to seconds.

Jira:1821
Change-Id: Idf156f56ece79a82729ebb124d1552a5eeb69e25
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-04-27 13:46:35 +00:00
Ramesh Thomas 700712f869 samples: tickless: Enables tickless kernel option in some apps
Adds changes to enable existing kernel and timer tests and samples to
be used to test the tickless kernel feature.

Updated samples/philosophers and tests/kernel/timer/timer_api apps

Run the tests using following commands
make pristine && make BOARD=<board> CONF_FILE=prj_tickless.conf qemu
Board could be any of the following
qemu_x86
quark_se_c1000_devboard

Jira: ZEP-339 ZEP-1812
Change-Id: I1530b19b79ddeb0e2181594caf15f3ac28ff51f4
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-04-27 13:46:33 +00:00
Tomasz Bursztyka fcb4ea1383 samples/crypto: Use sys_log properly
Sys log already break a line after each line, by default, so removing
the '\n' on log messages.

Enabling support for sys log colors.

Change-Id: Ica3a601aba0bbbd2d9438b41fb7bca0aad9c05f4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:35 +00:00
Tomasz Bursztyka 50151db3c5 samples/crypto: Fix memory leaks
Don't return without freeing the session when relevant.

Change-Id: I9e5903791f8eb54026c4bb2ddda9f1fe9f3f7bb3
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:35 +00:00
Tomasz Bursztyka 0b5946e4b7 drivers/crypto: Use a proper driver name for TinyCrypt shim driver
Change-Id: I526677c98fa70e46f92dbb4e4569707e1cb8469a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:29 +00:00
Kumar Gala 5899d750e8 samples: Cleanup uint types in SEGGER SystemView
Convert sample to using new u{8,16,32}_t types

Change-Id: I0f5d9ad6fecef59cd1552e48e0cf02173d631916
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-25 22:09:11 +00:00
Marc Moreno 3376c67691 samples: Add an MPU test suite
This patch contains a MPU test with a set of options to check
the correct MPU configuration against the following security
issues:
    * Read at an address that is reserved in the memory map.
    * Write into the boot Flash/ROM.
    * Run code located in SRAM.

The MPU test application uses the Zephyr shell.

Change-Id: Ib40dc76b082b800884fd636a1509a0712227d681
Signed-off-by: Marc Moreno <marc.morenoberengue@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:22 +00:00
Leandro Pereira 6ccfe5aa14 samples: Add SEGGER SystemView sample application
This sample application uses the kernel system logger already present
in Zephyr and publishes events through the SEGGER RTT protocol, so it's
available by the SEGGER SystemView application.

[1] https://www.segger.com/systemview.html?p=1731

Jira: ZEP-1463
Change-Id: If1eba4644b95175660b3040bdc4b2717b2cfc9ad
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 02:16:37 +00:00
Kumar Gala e547533435 samples: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
Kumar Gala a509441210 net: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I4ec03eb2183d59ef86ea2c20d956e5d272656837
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:30:38 -05:00
Jukka Rissanen da6eba463d Bluetooth: ipsp: Fix compile error in sample app
Some incompatible changes were introduced when net and bluetooth
branches were changed at the same time.

Change-Id: Ifa03f85d26a63ade0fcc029377d54850c0e92451
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-21 15:44:20 +03:00
Tomasz Bursztyka e5896906f6 net: Rename all *_BUF() macros to *_HDR()
Most of these macros are not exactly exposing a buffer, but a specific
header pointer (ipv6, ivp4, ethernet and so on), so it relevant to
rename them accordingly.

Change-Id: I66e32f7c3f2bc75994befb28d823e24299a53f5c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 14:19:51 +03:00
Tomasz Bursztyka db11fcd174 net/net_pkt: Fully separate struct net_pkt from struct net_buf
- net_pkt becomes a stand-alone structure with network packet meta
  information.
- network packet data is still managed through net_buf, mostly named
  'frag'.
- net_pkt memory management is done through k_mem_slab
- function got introduced or relevantly renamed to target eithe net_pkt
  or net_buf fragments.
- net_buf's sent_list ends up in net_pkt now, and thus helps to save
  memory when TCP is enabled.

Change-Id: Ibd5c17df4f75891dec79db723a4c9fc704eb843d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 14:19:50 +03:00
Tomasz Bursztyka bf964cdd4c net: Renaming net nbuf API to net pkt API
There have been long lasting confusion between net_buf and net_nbuf.
While the first is actually a buffer, the second one is not. It's a
network buffer descriptor. More precisely it provides meta data about a
network packet, and holds the chain of buffer fragments made of net_buf.

Thus renaming net_nbuf to net_pkt and all names around it as well
(function, Kconfig option, ..).

Though net_pkt if the new name, it still inherit its logic from net_buf.
'
This patch is the first of a serie that will separate completely net_pkt
from net_buf.

Change-Id: Iecb32d2a0d8f4647692e5328e54b5c35454194cd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 14:19:50 +03:00
Kumar Gala 3c454017b4 Merge "Merge bluetooth branch into master" 2017-04-20 16:55:36 +00:00
Kumar Gala 789081673f Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 16:07:08 +00:00
Johan Hedberg c52fa3c424 Merge bluetooth branch into master
- newlib related fixes for the AT parser
 - Channel Selection Algorithm #2 support (Bluetooth 5.0 feature)
 - Better tracking of outgoing data (with callback support)
 - Various smaller cleanups & fixes

----------------------------------------------------------------
Carles Cufi (3):
      Bluetooth: HCI: Add Bluetooth 5.0 LE commands and events
      Bluetooth: HCI: Naming consistency tweaks
      Bluetooth: Use event masks instead of bits in controller and host

Johan Hedberg (8):
      Bluetooth: hci_raw: Fix ECC support
      Bluetooth: Add support for tracking transmitted packets
      Bluetooth: ATT: Enforce flow for incoming requests & indications
      Bluetooth: SMP: Track when last key distribution PDU has been sent
      Bluetooth: Introduce a timeout for synchronous HCI command sending
      Bluetooth: ATT: Fix bogus CONTAINER_OF() usage
      Bluetooth: Introduce flow control for outgoing ATT packets
      Bluetooth: ATT: Start response timer only after actual transmission

Kumar Gala (3):
      Bluetooth: AT: use explicit unsigned char to avoid array subscript error
      Bluetooth: AT: Fix building with newlib
      Bluetooth: AT: Unit: Fixup include search path

Luiz Augusto von Dentz (4):
      Bluetooth: ipsp: Add TX pools for TCP
      Bluetooth: L2CAP: Try to allocate segment from the original pool
      net: buf: Add net_buf_reset
      Bluetooth: L2CAP: Reuse request buffer to respond

Vinayak Chettimada (5):
      Bluetooth: controller: Rename channel/chnl to chan
      Bluetooth: HCI: Add Bluetooth 5.0 FeatureSet field's bit mapping
      Bluetooth: Fix missing LE conn param req bit in set LE evt mask
      Bluetooth: controller: Support BT 5.0 feature set bit fields
      Bluetooth: controller: Channel Selection Algorithm #2

 include/bluetooth/hci.h                           | 495 +++++++++++++++--
 include/bluetooth/l2cap.h                         |   2 +-
 include/net/buf.h                                 |   9 +
 samples/bluetooth/ipsp/src/main.c                 |  15 +
 subsys/bluetooth/controller/Kconfig               |   7 +
 subsys/bluetooth/controller/hal/nrf5/radio.c      |   4 +-
 subsys/bluetooth/controller/hal/radio.h           |   2 +-
 subsys/bluetooth/controller/hci/hci.c             |  95 ++--
 subsys/bluetooth/controller/ll_sw/ctrl.c          | 622 ++++++++++++++++------
 subsys/bluetooth/controller/ll_sw/ctrl.h          |  71 ++-
 subsys/bluetooth/controller/ll_sw/ctrl_internal.h |  25 +-
 subsys/bluetooth/controller/ll_sw/ll.c            |  24 +-
 subsys/bluetooth/controller/ll_sw/pdu.h           |  12 +-
 subsys/bluetooth/host/Kconfig                     |  31 ++
 subsys/bluetooth/host/at.c                        |   2 +-
 subsys/bluetooth/host/at.h                        |   2 +-
 subsys/bluetooth/host/att.c                       | 230 ++++++--
 subsys/bluetooth/host/conn.c                      | 111 +++-
 subsys/bluetooth/host/conn_internal.h             |  23 +-
 subsys/bluetooth/host/hci_core.c                  | 163 +++---
 subsys/bluetooth/host/hci_core.h                  |   3 +-
 subsys/bluetooth/host/hci_ecc.c                   |   2 +-
 subsys/bluetooth/host/hci_raw.c                   |   4 +
 subsys/bluetooth/host/hfp_hf.c                    |   2 +
 subsys/bluetooth/host/l2cap.c                     |  79 ++-
 subsys/bluetooth/host/l2cap_internal.h            |  12 +-
 subsys/bluetooth/host/sdp.c                       |   2 +
 subsys/bluetooth/host/smp.c                       | 117 +++-
 subsys/net/buf.c                                  |  12 +-
 tests/bluetooth/init/prj_controller_4_0.conf      |   1 +
 tests/unit/bluetooth/at/src/Makefile              |   2 +-
 tests/unit/bluetooth/at/src/main.c                |   2 +-
 32 files changed, 1695 insertions(+), 488 deletions(-)

Change-Id: I17f9e49e1347a38bc78be3bdcaa596e41d83da56
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-20 18:45:15 +03:00
Anas Nashif 7c81d7f981 samples: remove lsm9ds0 sample code which does nothing
This sensor is supported already with many features, using it to test
SPI and I2C is an overkill. For both basic I2C and SPI samples we have
the FRAM samples supporting both IOs.

Change-Id: I794e584bd540d5fe6353fa3370aac0f1d6d105dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-20 10:31:07 +00:00
Luiz Augusto von Dentz 617842edde Bluetooth: ipsp: Add TX pools for TCP
TCP requires buffers to be acked thus it retain a reference, but L2
driver actually consumes the buffer so it needs a context pool to store
to original ones.

Change-Id: Ie9083ab361d3674c33080f9e7e6c7248aaf7abc3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-20 08:58:09 +03:00
David B. Kinder 30450fea2a spell: fix doxygen comment typos: /boards /samples
Fix doxygen comment typos used to generate API docs

Change-Id: I248d53000d8e57b902b9a18fdcfc9e995142a8b3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-19 18:38:19 +00:00
Anas Nashif 45a7e5d076 kernel: remove legacy.h and MDEF support
Change-Id: I953797f6965354c5b599f4ad91d63901401d2632
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-19 10:59:35 -05:00
Johan Hedberg 191cb2d0fc samples/boards/microbit: Add sound sample
Add a sample demonstrating sound output using PWM to a piezo buzzer
connected to the external edge connector port P0.

Change-Id: I8c0902fd935f2eb3b9979476a7540e7a0216ca63
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-18 01:55:10 +00:00
Maureen Helm 1928632a97 samples: nfc_hello: Add CONFIG_SERIAL=y to project conf
Most boards enable a serial driver by default, but the hexiwear_kw40z
does not because it uses Segger RTT for the console. This sample
requires a serial driver, so add CONFIG_SERIAL=y to its project conf
file.

Jira: ZEP-1391
Change-Id: Iee813d1054378040fe9ff72a3ca1ea7bd66bcdfe
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-04-14 05:56:53 -05:00
Vinayak Chettimada 9584456fc9 drivers: pwm: Add nRF5x GPIOTE based PWM driver
Add support for nRF5x series GPIOTE based PWM driver
implementation.

Provides upto 3 pins/channels using one HF timer, two PPI
channels per pin, and one GPIOTE config per pin.

Change-id: I6056b199ec2cff595ba8fea9f659a0338ed4635b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-04-14 01:53:07 +00:00
Anas Nashif d3af7f75c9 Merge "Merge net branch into master" 2017-04-14 01:43:34 +00:00
Kumar Gala c7bc909914 tests/ztest: rename assert macros to be zephyr specific
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.

Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 21:17:33 +00:00
Tomasz Bursztyka 3a3636ff7f net/ieee802154/samples: Add a Kconfig option to tweak the TX power
This can be useful to override the default value, for testing.

Change-Id: I23b559152c71955ff5aa6fd3643f1f40f5594194
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-13 15:21:46 +03:00
Jukka Rissanen 611ccaaf88 net: dns: Remove dns_client API and sample application
DNS resolving is better done with DNS resolve API so remove
the DNS client API which is quite hard to use.

Change-Id: Ide4973a5be674414ea6e04a35c938195cce40b6a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Jukka Rissanen abb24bb46b samples: net: irc-bot: Use DNS resolve API
Modify the code to use DNS resolve API instead of DNS client API
as the latter is being phased out.

Change-Id: I6a7618d770621fee1f502d2bc277a162c589108a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-13 15:21:45 +03:00
Wu Jiequan 432c750d36 net: coaps_server: add prj_arduino_101.conf file
In order to test the coaps_server sample app on
Arduino 101 board.

Change-Id: I7b393dac03a8020b7bd515c3b5b2fd961940bc21
Signed-off-by: Wu Jiequan <jiequanx.wu@intel.com>
2017-04-13 15:21:44 +03:00
Wu Jiequan c84eff0be4 samples: net: http_server: Add bt test and arduino 101 support
Added bt test code in the http_server sample app and in order
to test on Arduino 101 board, added prj_arduino_101.conf file.

Change-Id: Ie68a81ee809e8618f70b5fab6fdbd66692401014
Signed-off-by: Wu Jiequan <jiequanx.wu@intel.com>
2017-04-13 15:21:43 +03:00
Anas Nashif 259949d10e samples: console: fixed filter and add CONFIG_
The filter expects CONFIG_, otherwise it is noop

Change-Id: I2b0a02b6450287a090b69a12324fe7f7cf494999
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:26 +00:00
Anas Nashif dac15b9b71 samples: shell: fix testcase.ini to be more inclusive
Filter was wrong and sample was not being built on any boards. Exclude
platforms that do not support interrupt based UART drivers.

Jira: ZEP-2014
Change-Id: I84a690e7c93fae52335434830b83086019cfd00d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:25 +00:00
Anas Nashif c6f4476bf6 sensors: bmg160: fixed wrong Kconfig variable
Change-Id: I3e24420519535310728b3395c3c71a5fb3560f35
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-11 03:14:23 +00:00
Anas Nashif d7bc60f096 kernel: remove remaining microkernel references
Change-Id: Ie648dbaaf714316c21395bd43e555618013dbd19
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-10 20:21:05 +00:00
Anas Nashif 3781ed061b samples: usb: remove custom DBG macro and use sys_log
Change-Id: Icc83afe0c48ada9454104f0d1a7487027b1566b3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-10 16:08:01 +00:00
Sathish Narasimman 1f5a809178 Bluetooth: HFP HF: Add support for RING indication cb
This patch adds support for incoming RING indication callback to
notify application.

> ACL Data RX: Handle 256 flags 0x02 dlen 16   [hci0] 167174.600312
      Channel: 65 len 12 [PSM 3 mode 0] {chan 1}
      RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
         Address: 0x0b cr 1 dlci 0x02
         Control: 0xef poll/final 0
         Length: 8
         FCS: 0x9a
        0d 0a 52 49 4e 47 0d 0a 9a                       ..RING...

Change-Id: I0469590a77d619f2a842df647d84f4d56dbd4883
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2017-04-08 20:11:54 +03:00
Luiz Augusto von Dentz 4d1115ab35 net: Enable context buffer pool in case TCP and 6LO are enabled
The context buffer pool was introduced to deal with TCP holding buffers
when 6LO may modify them, therefore it makes sense to have it enabled
by default when TCP and 6LO are enabled given that the code can deal
with NULL pool in case the application don't implement one.

Change-Id: I600ca31ab40c96ee27937c2e885e332b0cee4995
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-04-07 18:32:18 +03:00
Piotr Mienkowski afdb0e0a70 drivers: eth_sam_gmac: Fix initialization order
Atmel SAM family GMAC Ethernet driver is implementing zero-copy
networking. As a result it has to reserve a defined amount of RX
data net buffers before bringing up the interface. Since net buffer
pool is initialized by the network stack and this driver was bringing
the interface up in its initialization function the driver initialization
was performed, as a workaround, after network stack initialization. It
is not a clean solution. This patch fixes this by bringing the
interface up in interface initialization function. The driver itself
can now be initialized before the network stack is.

Tested on Atmel SMART SAM E70 Xplained board

Change-Id: I65886fd6db6f27a10628e393cfabd8e5f78c08ff
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-04-07 12:35:51 +03:00
Maureen Helm 0ab8874fde samples: Add max30101 sample application
Adds a max30101 sample application that polls sensor data and prints it
to the console.

Jira: ZEP-720
Change-Id: I50f28eaf9ea2ff5bfbb9fb6922c4006d5c02e739
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-04-06 11:47:18 +00:00
Johan Hedberg d7a189d2ec drivers: display: mb_display: Unify image and string APIs
Both the string and image rendering may want to take advantage of
scrolling and sequential display capabilities. Consolidate the APIs so
that there's a single one for images (mb_display_image) and a single
one for strings (mb_display_print). Both take a duration parameter for
the per-frame duration as well as a mode parameter which specifies
sequential vs scrolling behavior as well as an optional looping flag.

Change-Id: Ia092d771e3f1b94afd494c7544dab988161c539e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-06 00:59:30 +00:00
Leandro Pereira bb4a2eef7f samples: net/nats: Fix parsing of MSG messages
This addresses the issues found by QA in ZEP-1012 and clarify the
documentated behavior as described in ZEP-1859.

Change-Id: I602e5749db7f6f44cf5be449b8e6f0d2ba66b69b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-04-05 18:24:45 +00:00
David B. Kinder 1a9600b704 doc: add labels to sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: Ie5ff404ac23621dbcf6ca61734ed6f72832c1ce2
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 20:48:08 +00:00
David B. Kinder 0f77021ba7 doc: add labels to board-specific sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: Ib2d9b1cc4144bd84b1b89691a80dffd99212289d
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 20:47:53 +00:00
David B. Kinder 6a7527b5b4 doc: add labels to sensor sample docs for linking
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: I37c654fb0bb7ebdf288af01e41ce5497969f8968
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 20:47:35 +00:00
David B. Kinder 7bc4890202 doc: add labels to net sample docs for linking
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: I46cd75d714449de806a85dde08756c8e190488dc
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:52:06 +00:00
David B. Kinder b78ffc0e6b doc: add labels to basic sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: I57d65a8888f78aa61d776f607a5db86bdb35726c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:51:47 +00:00
David B. Kinder 2bfff175ab doc: add labels to bluetooth sample docs
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.

Change-Id: Ide66f75ca8fac0d5f65fbfc50dc9d130cf45b392
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:51:27 +00:00
Anas Nashif fb5e9b9283 samples: console: filter boards without console
Change-Id: Ifdf0da9295d54cd1e95386297eff2e5ef3d45858
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-04 19:18:15 +00:00
David B. Kinder 2a05cc1b54 doc: add labels to sample docs for linking
Docs need a label at the top so we can use :ref:`labelname` to
create a link to that doc from other docs.

Change-Id: I7d7b98f3a9d22350ca983b3558bf83f77fd6e379
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-04 19:09:30 +00:00
Johan Hedberg 7e5df0cc02 drivers: display: Enhance BBC micro:bit string output capabilities
Add a new mb_display_print() API which takes printf-style parameters
and outputs scrolling text instead of one character at a time. The
existing mb_display_str() API is renamed to mb_display_string() for
consistency, and now also takes printf-style parameters.

Change-Id: I59c42bcd74c62f05ecb6d097dc808b9e5c1984c5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 13:54:00 +03:00
Johan Hedberg 380d24de1d drivers: Add support for BBC micro:bit LED display
Adds a simple driver to access the 5x5 LED display found on BBC
micro:bit boards. The display is so limited that no effort is done to
try to integrate with the existing console (which would likely make
the display unusable). Instead, dedicated mb_display_* APIs are added
that are specific to this display.

References:

 https://www.microbit.co.uk/device/screen
 https://lancaster-university.github.io/microbit-docs/ubit/display/

Jira: ZEP-1990
Change-Id: I431b5b358b5f07592a60d3aed87eaab6ac20ce25
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-04-04 08:14:36 +03:00
Anas Nashif 341d926a04 doc: reduce levels in toc
The level was increased to 3 by mistake.

Change-Id: Ie62e1d1f49a6708c75e2947247279a095082d94e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-03 22:57:40 +00:00
Anas Nashif 7d5be2af73 Merge "Merge net branch into master" 2017-04-01 20:46:11 +00:00
Paul Sokolovsky 542c2b93d0 subsys: console: Add pull-style console API support.
This change introduces console_getchar() and console_getline() API
calls which can be used to get pending console input (either one
char or whole line), or block waiting for one. In this regard, they
are similar to well-known ANSI C function getchar/gets/fgets, and
are intended to ease porting of existing applications to Zephyr, and
indeed, these functions (shaped as an external module) are already
used by few applications.

The implementation of the functions is structured as a new "console"
subsystem. The intention is that further generic console code may be
pulled there instead of being in drivers/console/. Besides the
functions themselves, initialization code and sample applications
are included.

At this time, there're may limitations of how these functions can
be used. For example, console_getchar() and console_getline() are
mutually exclusive, and both are incompatible with callback
(push-style) console API (and e.g. with console shell subsystem
which uses this API). Again, the intention is to make a first step
towards refactoring console subsystem to allow more flexible
real-world usage, better reusability and composability.

Change-Id: I3f4015bb5b26e0656f82f428b11ba30e980d25a0
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-04-01 20:44:17 +00:00
Tomasz Bursztyka e027645c88 net/samples/ieee802154: Making hw sample simpler
- Let's use samples settings
- Enable both net and 15.4 shell modules
- Change prj_*.conf accordingly

Change-Id: If7e32a42c8dc7026d0580b1e94e819e1eda82e5b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:28 +02:00
Tomasz Bursztyka d2f8a5a27f net/samples: Add 802.15.4 link-layer security settings for the samples
And use them accordingly in the common code part.

Change-Id: Id91b76e5baea607c0d68eebcde6f84e4e35ca44c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka 7b8af87fdf samples/net: Remove the need for IEEE 802.15.4 stack in wpan serial
It can uses CONFIG_NET_APP_IEEE802154_* options instead.

Change-Id: I2501ca2015cfc1e68c6c384cb32c21084d2cb30d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka 26a4df620f samples/net: Uses CONFIG_NET_APP_IEEE802154_* options relevantly
In order to simplify when 802.15.4 is selected on these samples, let's
setup the device through a common code.

For this to work, RFD is now the default.

Change-Id: I46590864442f77d83f681cc0e854c94344648856
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:27 +02:00
Tomasz Bursztyka 0f18ce44f9 net: Rename Kconfig.samples and its main option for future changes
s/SAMPLES/APP for name shortening. Applying the change where relevant.

Not only IP addresse will be available as samples settings there but
also IEEE 802.15.4 channel, pan_id, and more for instance.

Change-Id: I05dd24989bd0c804d9588092d67044a3e063bc88
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:26 +02:00
Maureen Helm e09dc931bf samples: fxos8700: Update doc references and sample output
Updates the fxos8700 sample documentation to include board
cross-references and sample output with temperature data.

Change-Id: I8d4e4d8d287806f5480316da09d4072fcf9c05ac
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-30 21:21:22 +00:00
Maureen Helm 07241cafce samples: Add fxas21002 sample application
Adds a fxas21002 sample application that uses the sensor data ready
trigger to periodically print gyroscope data.

Jira: ZEP-1392
Change-Id: Ic9d3803a41f2873aef470a2a73b3f1db44d39b50
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-30 21:19:54 +00:00
Anas Nashif 8c1a073bb1 samples: ipm sample using mailbox for Quark SE
re-add sample that was dropped by mistake and add a top level Makefile
for building and flashing two cores.

Change-Id: Ie22ac1efa7b5373999997489a2c866de19553128
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 15:53:28 -04:00
Anas Nashif 131cfa2043 samples: move ipm samples subsystem folder
Change-Id: I5737e037111f2a5eff5f824bcb72e963b1af22e5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:35 +00:00
Anas Nashif eaffffd963 samples: move usb samples subsystem folder
Change-Id: Id1696bf18dc77a0afb1180f417b2bb641ad809ab
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:34 +00:00
Anas Nashif 52448f6a2b samples: move shell sample subsystem folder
Change-Id: I9729885ec2c6ceb0367323ed9b1f72f05517b2aa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:33 +00:00
Anas Nashif da4ccce59e samples: move logger-hook sample to subsystem
Change-Id: I693ce41046bddcef21e3f634d602683f1512f927
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:33 +00:00
Anas Nashif fdd0cb70ed samples: remove legacy applications
Change-Id: I790d66f2ab14b40dd6c6fe25c59ccd97850602e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-29 19:35:32 +00:00
Anas Nashif f475d2cde9 samples: grove: remove duplicate config
Duplicate Kconfig variable in prj.conf causes warning

Jira: ZEP-1880
Change-Id: I941b36a17c550d7e64759ea3266da6957ec3e82c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-26 02:10:24 +00:00
Anas Nashif 2c04055970 Merge "Merge bluetooth branch into master" 2017-03-25 11:25:43 +00:00
Johan Hedberg 93fbca0d16 Merge bluetooth branch into master
- Controller cleanups
 - Refactor controller for a cleaner Link Layer abstraction
 - SDP enhancements
 - Use sys_slist_t API wherever possible
 - Fix race condition in controller
 - Update controller to report Bluetooth 5.0 version

----------------------------------------------------------------
Carles Cufi (6):
      Bluetooth: controller: Remove unused H:4 tag macros
      Bluetooth: controller: Rename downstream API calls
      Bluetooth: controller: Introduce BLUETOOTH_LL_SW
      Bluetooth: controller: Move ll.h to an include folder
      Bluetooth: controller: Remove public address config option
      Bluetooth: controller: Move LL code from driver to ll_sw

Johan Hedberg (11):
      Bluetooth: Make bt_hci_driver instances link-time constants
      Bluetooth: shell: Fix missing initialization of param.own_addr
      Bluetooth: shell: Add command to start continuous passive scanning
      Bluetooth: Move crypto APIs to dedicated header file
      Bluetooth: Controller: Factor out ECB core code from ecb_encrypt()
      Bluetooth: Controller: Introduce big-endian variant for ECB
      Bluetooth: Introduce public big-endian AES API
      Bluetooth: Controller: Increase default TX buffer count
      Bluetooth: Use specific pointer type for conn->channels
      Bluetooth: ATT: Reorder handler struct for compactness
      Bluetooth: ATT: Refactor PDU handling

Kaustav Dey Biswas (5):
      Bluetooth: SDP: Server: Send service search response
      Bluetooth: SDP: Server: Handle ServiceAttributeRequest
      Bluetooth: SDP: Server: Find the attributes in the record
      Bluetooth: SDP: Server: Send ServiceAttributeResponse
      Bluetooth: SDP: Server: Support ServiceSearchAttributeRequest

Luiz Augusto von Dentz (4):
      Bluetooth: ipsp: Fix checking for NULL pointer
      Bluetooth: L2CAP: Use sys_slist_t for connection channels
      Bluetooth: L2CAP: Use sys_slist_t for server channels
      Bluetooth: L2CAP: Use sys_slist_t for fixed channels

Mariusz Skamra (2):
      Bluetooth: L2CAP: Fix TX queueing for LE CoC
      Bluetooth: tester: Fix UART issue on qemu

Matthias Ringwald (1):
      Bluetooth: Controller: Kconfig company id and subversion number

Sathish Narasimman (5):
      Bluetooth: HFP HF: SCO: Handle synchronous_conn_complete
      Bluetooth: SCO: Rename 'conn' to 'acl'
      Bluetooth: HFP HF: SCO: Handle SCO Disconnect
      Bluetooth: HFP HF: SCO Initiate Audio connection
      Bluetooth: AT: Fix reset the state during error

Vinayak Chettimada (16):
      Bluetooth: Controller: Fix RSSI feature conditional compilation
      Bluetooth: Controller: Add advertisement event indication feature
      Bluetooth: Controller: Add Kconfig range check for public address
      Bluetooth: Controller: Version 5.0 and PDU type rename
      Bluetooth: controller: Use explicit paths to internal headers
      Bluetooth: controller: Move bt_rand into separate file
      Bluetooth: Make LE Encrypt helpers public
      Bluetooth: controller: Replace 0 for pointers with NULL keyword
      Bluetooth: Fix checks for changes in connection parameters
      Bluetooth: Support connection parameter update as central
      Bluetooth: shell: Reorder commands in logical order of use
      Bluetooth: shell: Add connection update command
      Bluetooth: controller: Move PDU macros from radio.h to pdu.h
      Bluetooth: controller: Cleanup makefiles
      Bluetooth: controller: Fix mayfly caller id for thread call path
      Bluetooth: controller: Fix race waiting for ticker job to complt

 drivers/bluetooth/hci/h4.c                         |   2 +-
 drivers/bluetooth/hci/h5.c                         |   2 +-
 drivers/bluetooth/hci/spi.c                        |   2 +-
 include/bluetooth/bluetooth.h                      |  15 +-
 include/bluetooth/conn.h                           |  11 +
 include/bluetooth/crypto.h                         |  77 ++
 include/bluetooth/hci.h                            |  24 +
 include/bluetooth/l2cap.h                          |   4 +-
 include/drivers/bluetooth/hci_driver.h             |   2 +-
 samples/bluetooth/ipsp/src/main.c                  |   6 +-
 subsys/bluetooth/Kconfig                           |   2 +-
 subsys/bluetooth/controller/Kconfig                |  39 +-
 subsys/bluetooth/controller/Makefile               |  23 +-
 subsys/bluetooth/controller/hal/Makefile           |   1 +
 subsys/bluetooth/controller/hal/ecb.h              |   3 +
 subsys/bluetooth/controller/hal/nrf5/Makefile      |   3 +
 subsys/bluetooth/controller/hal/nrf5/cntr.c        |   4 +-
 subsys/bluetooth/controller/hal/nrf5/ecb.c         |  64 +-
 subsys/bluetooth/controller/hal/nrf5/radio.c       |  17 +-
 subsys/bluetooth/controller/hal/nrf5/rand.c        |   4 +-
 subsys/bluetooth/controller/hal/radio.h            |   5 -
 subsys/bluetooth/controller/hci/Makefile           |   4 +
 subsys/bluetooth/controller/hci/hci.c              |  76 +-
 subsys/bluetooth/controller/hci/hci_driver.c       | 217 +-----
 subsys/bluetooth/controller/include/ll.h           |  58 ++
 subsys/bluetooth/controller/ll/ll.h                |  29 -
 subsys/bluetooth/controller/ll_sw/Makefile         |   4 +
 subsys/bluetooth/controller/ll_sw/crypto.c         |  54 ++
 subsys/bluetooth/controller/{ll => ll_sw}/ctrl.c   | 660 +++++++++--------
 subsys/bluetooth/controller/{ll => ll_sw}/ctrl.h   |  54 +-
 .../controller/{ll => ll_sw}/ctrl_internal.h       |   6 +-
 subsys/bluetooth/controller/{ll => ll_sw}/ll.c     | 237 ++++++-
 subsys/bluetooth/controller/{ll => ll_sw}/pdu.h    |  64 +-
 subsys/bluetooth/controller/ticker/Makefile        |   3 +
 subsys/bluetooth/controller/ticker/ticker.c        |  12 +-
 subsys/bluetooth/controller/util/Makefile          |   1 +
 subsys/bluetooth/controller/util/memq.c            |   5 +-
 subsys/bluetooth/host/Kconfig                      |  16 +-
 subsys/bluetooth/host/Makefile                     |   2 +
 subsys/bluetooth/host/at.c                         |   7 +-
 subsys/bluetooth/host/att.c                        | 204 ++++--
 subsys/bluetooth/host/conn.c                       | 148 +++-
 subsys/bluetooth/host/conn_internal.h              |  12 +-
 subsys/bluetooth/host/crypto.c                     | 155 ++++
 subsys/bluetooth/host/crypto.h                     |   8 +
 subsys/bluetooth/host/hci_core.c                   | 150 ++--
 subsys/bluetooth/host/hci_core.h                   |   2 +-
 subsys/bluetooth/host/hci_ecc.c                    |   9 +-
 subsys/bluetooth/host/hci_ecc.h                    |   5 +-
 subsys/bluetooth/host/hci_raw.c                    |   8 +-
 subsys/bluetooth/host/hci_raw_internal.h           |   2 +-
 subsys/bluetooth/host/l2cap.c                      | 202 ++----
 subsys/bluetooth/host/l2cap_br.c                   |  97 +--
 subsys/bluetooth/host/l2cap_internal.h             |   5 +-
 subsys/bluetooth/host/sdp.c                        | 781 +++++++++++++++++++++
 subsys/bluetooth/host/sdp_internal.h               |  14 +
 subsys/bluetooth/host/smp.c                        |  36 +-
 tests/bluetooth/init/prj_controller_4_0.conf       |   1 +
 tests/bluetooth/init/prj_controller_dbg.conf       |   1 +
 tests/bluetooth/shell/src/main.c                   | 137 +++-
 tests/bluetooth/test_bluetooth/src/bluetooth.c     |   2 +-
 tests/bluetooth/tester/qemu.conf                   |   1 +
 62 files changed, 2583 insertions(+), 1216 deletions(-)
 create mode 100644 include/bluetooth/crypto.h
 create mode 100644 subsys/bluetooth/controller/hal/Makefile
 create mode 100644 subsys/bluetooth/controller/hal/nrf5/Makefile
 create mode 100644 subsys/bluetooth/controller/hci/Makefile
 create mode 100644 subsys/bluetooth/controller/include/ll.h
 delete mode 100644 subsys/bluetooth/controller/ll/ll.h
 create mode 100644 subsys/bluetooth/controller/ll_sw/Makefile
 create mode 100644 subsys/bluetooth/controller/ll_sw/crypto.c
 rename subsys/bluetooth/controller/{ll => ll_sw}/ctrl.c (93%)
 rename subsys/bluetooth/controller/{ll => ll_sw}/ctrl.h (84%)
 rename subsys/bluetooth/controller/{ll => ll_sw}/ctrl_internal.h (98%)
 rename subsys/bluetooth/controller/{ll => ll_sw}/ll.c (58%)
 rename subsys/bluetooth/controller/{ll => ll_sw}/pdu.h (77%)
 create mode 100644 subsys/bluetooth/controller/ticker/Makefile
 create mode 100644 subsys/bluetooth/controller/util/Makefile
 create mode 100644 subsys/bluetooth/host/crypto.c
 create mode 100644 subsys/bluetooth/host/crypto.h

Change-Id: Ic8bee0eb4f15c00ce5ca7b3b80133b1bbd0bdbf5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-24 23:21:09 -07:00
Jukka Rissanen c6cad93d8c samples: net: DNS resolving sample application
Change-Id: I4a0283efde4d0dd8ccd0933071acb277431d4a32
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-24 17:31:42 +02:00
Tomasz Bursztyka 3b0769889b net/samples: Add static ipv4 addresses for arduino 101 echo apps config
Jira: ZEP-1444

Change-Id: I689ae6b4b5316e36cdacdf20acbf6e335a10c9e5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-03-24 17:31:42 +02:00
Tomasz Bursztyka d7145b3556 drivers/ieee802154: Remove very old CC2520 left-over from µIP stack
Change-Id: Ief7ef008905e81cedcfc1b7ea2f21702cb68a4ce
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-24 17:31:41 +02:00
Jukka Rissanen 4fcf04dde8 samples: net: Remove multicast address setting in echo-client
The echo-server no longer uses multicast addresses itself,
so the multicast address setting can be removed from echo-client.

Change-Id: Ieab069849ced8a850ada6e6618d625695819be8e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-24 17:31:41 +02:00
Jukka Rissanen 35352130b5 samples: net: Remove multicast address setting in echo-server
The multicast address setting in echo-server was not really
used for anything so removing it from the app.

Change-Id: I8069c670388702fc46ae2f31506c982caa28212d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-24 17:31:41 +02:00
Andrei Emeltchenko 2801389a14 wpanusb: Fix using incorrect nbuf in fragment_get()
Fixes using buf instead of pkt.

Change-Id: I21fd84b68a3967bfc701887f01a7b403d04a4504
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-03-24 17:31:40 +02:00
Andrei Emeltchenko 0d168bff77 drivers: cc2520: Correct configuration options
At the moment CC2520 configuration options are selected inside "TI
CC2520 Driver RAW channe" submenu like:

           [*] TI CC2520 Driver support  ----

           [ ] TI CC2520 Driver RAW channel  --->

Make RAW channel depends on TI CC2520.

Change-Id: I92879b7f4391f1842c012b6c03c78956e90b9441
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-03-24 17:31:40 +02:00
Andrei Emeltchenko 33c2480c09 wpan_serial: Correct system logging domain
Correct logging domain to wpan_serial.

Change-Id: Ic5e99d2fc31ba68c7b211acbf372ee26ab93a62f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-03-24 17:31:40 +02:00
Inaky Perez-Gonzalez 933366631c samples/net/echo_client: add SAM e70 and FRDM k64f ethernet configurations
These are copied verbatim from the echo_server sample.

Change-Id: I56d1386144967177f889e12d4a173bfb6628f18b
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-03-24 17:31:40 +02:00
Maureen Helm 153017834a samples: fxos8700: Add support for temperature
Enables the temperature sensor in the fxos8700 sample.

Change-Id: I2b4c306d3c5528dc32d940476c00180b5df08187
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-23 09:41:49 -05:00
Maureen Helm 9b715d9128 samples: fxos8700: Switch to generic SYS_LOG_SENSOR_LEVEL
The fxos8700 driver was previously converted to use the generic
SYS_LOG_SENSOR_LEVEL. Update the fxos8700 sample to use it too.

Change-Id: I2ef02342ce3a25e8d3a3d1b13181872ca0abdc16
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-23 09:41:49 -05:00
Luiz Augusto von Dentz 4fb0724a55 Bluetooth: ipsp: Fix checking for NULL pointer
This may cause static analyser error such as the following:

  Null-checking "tmp" suggests that it may be null, but it has already
  been dereferenced on all paths leading to the check.
             if (tmp) {

Change-Id: Id04f8d052d8128003d5b91f7a8303940529ef261
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-21 17:05:42 -07:00
Anas Nashif 3dc9af66ca sensors: BME280: added support for SPI communication
Support connection via SPI and keep I2C as the default.

Jira: ZEP-1698
Change-Id: I42a76131577a37429375364deb07e451107f5d81
Signed-off-by: Dario Pennisi <dario@iptronix.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-21 10:39:27 +01:00
Inaky Perez-Gonzalez c9cff15a8a samples/shell: print the actual params passed
The params command is not printing the arguments, which makes this not
so useful to verify how things work, so added it to the sample.

Change-Id: I2d71ee064f12c7353ba83144824ae46803e2ad39
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-03-20 21:48:54 +00:00
Jukka Rissanen 3a1a4d3105 samples: net: coaps_client: Fix the parameters when setting callbacks
The RX callback and timeout parameters were reversed in call to
mbedtls_ssl_set_bio().

Change-Id: I285694e57a024ac3ce735e496daad690f94737ac
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-17 10:34:45 +02:00
Michael Scott 081246737c net/http: let HTTP_SERVER, HTTP_CLIENT and HTTP_PARSER select HTTP
Due to commit 8308b9bd2d ("net/http: Add the HTTP/1.1 API")
every user of CONFIG_HTTP_PARSER would need to add CONFIG_HTTP to
their .conf files.  Which is fine for intree samples/tests as they
have been adjusted, but the rest of world working on Zephyr apps
will need to make this changes as well.

Instead, we should have each of the following select HTTP instead of
depend on it, which will make future use of these configs and their
dependencies more intuitive:
HTTP_SERVER
HTTP_CLIENT
HTTP_PARSER

NOTE: As cleanup, this commit also removes the CONFIG_HTTP added to
samples and test .conf files.

Change-Id: I81cfaa19e37333b1bf98778f8147814780e7f77c
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-03-17 10:34:45 +02:00
Piotr Mienkowski c54b3c7e8f drivers: Update Atmel SAM family GMAC Ethernet driver
Networking stack has split one global DATA pool to RX and TX DATA pools
and also added net_buf pool support to each context. Update the driver
to support this new design. Since the GMAC TX descriptor list has a fixed
size but the number of TX DATA buffers is no longer limited updating the
TX descriptor list has to be guarded by a semaphore.

Tested on Atmel SMART SAM E70 Xplained board

Change-Id: I181e1cdd183e173b85d5d1711b6e78cd5165666d
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-03-17 10:34:44 +02:00
Ravi kumar Veeramally bd1f30a3b9 net: samples: leds_demo: Fix memory leak
Unref the buffer if net_contect_send_to() fails to send.

Change-Id: I182125e64aabd171cd86f42fd9e1de036dd68544
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-03-17 10:34:42 +02:00
Jukka Rissanen fdccd1caf9 samples: net: zperf: Fix compiler warnings
LLVM/icx compiler gives some warnings for signed vs unsigned
pointers.

Jira: ZEP-1884

Change-Id: Ide57be898ebd1bff49c8a27aac392fa58dcae726
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-17 10:34:41 +02:00
Flavio Santes 876e341570 samples/net/http: Add the HTTP Basic Authentication routine
This patch adds the HTTP Basic Authentication routine "http_auth".
Authentication parameters are defined in the config.h file.

The README file is also updated by this patch.

Jira: ZEP-1543

Change-Id: I2d531966290e87a68c54fc1ac834491ac937df22
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-17 10:34:40 +02:00
Flavio Santes e1b46bfe29 samples/http: Match header field ctr with Kconfig variable
Set a local define with the value previously defined at the Kconfig
file.

Change-Id: I3ee424c4a1102ca00c0059cb9d0a86498806486f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-17 10:34:39 +02:00
Sergio Rodriguez ff5178fd22 samples: mbedTLS coap: Cleaning prj.conf for QEMU
Removing unneeded configuration

Change-Id: I72e3714358366de715cb6f47d690a1b0e8f032f5
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2017-03-17 10:34:39 +02:00
Sergio Rodriguez 1b48f9fbc3 samples: mbedtls coap: Fixing entropy source
Using a more efficent entropy call and proper output data

Jira: ZEP-1878

Change-Id: Ife738b84c1e56d58784b4fbc61ec0843579c4453
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2017-03-17 10:34:39 +02:00
Juan Manuel Cruz Alcaraz 172c031ec9 sample: net: mbedtls ssl: SSL client sample is adapted to TCP API
Jira: ZEP-1798

Change-Id: I790cd49cb7cc5ed207141ca6634999d77d6a19bb
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2017-03-09 20:33:50 +02:00
Jukka Rissanen 695cfff535 samples: net: dtls_client: Fix memory leak in RX path
If we have not yet handled the previous RX buf, then we need
to drop the latest received one, otherwise the earlier net_buf
is leaked.

Change-Id: I1b69e07e8b3a3b87c76d923c847dc8316c128e76
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:50 +02:00
Jukka Rissanen 3a2bd9a162 samples: net: dtls_client: Fix mem leak in error path
We need to unref the net_buf in error path in RX and TX.

Change-Id: Icb6d43cb6b7411a5135ea09c6ae96742566fafc4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:50 +02:00
Jukka Rissanen dc8a019823 samples: net: dtls_client: RX buf count too low
The mbedtls_dtlsclient needs more RX buffers.

Jira: ZEP-1855

Change-Id: I80732c511dfade8fa9139e3bd26e21de73a68acd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:50 +02:00
Jukka Rissanen b1aadd0b3a samples: net: http_server: Disable mbedtls
Sanitycheck cannot link the result qemu binary because it is too
large. As a workaround, disable mbedtls to get the linking pass.

.../real-ld: zephyr.elf section `noinit' will not fit in region `RAM'
.../real-ld: region `RAM' overflowed by 192 bytes
collect2: error: ld returned 1 exit status

Change-Id: I543571505ab9412db7eac101848c6032d1550d79
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:50 +02:00
Juan Manuel Cruz Alcaraz 6828412f27 samples: dtls client: DTLS client sample configuration file
The configuration file for Arduino 101 for the DTLS client
sample needs to define IPv4 and IPv6 addresses.

Jira: ZEP-1169

Change-Id: Iabfd5f067d39faaf8796aac84642b630b11ef7f6
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2017-03-09 20:33:50 +02:00
Flavio Santes 87bc931826 samples/net: Add the HTTP API to the HTTP client sample application
This patch replaces some routines found at the HTTP client sample
application by the ones defined at the HTTP API.

Jira: ZEP-1824

Change-Id: Id19e3e346c09716ac95b0c488ff6e6949a5fbabe
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:50 +02:00
Flavio Santes 848966be43 samples/net: Add the HTTP API to the HTTP server sample application
This patch removes some routines from the HTTP server sample
application and replaces them by the ones defined at the HTTP API.

Jira: ZEP-1824

Change-Id: Ia5db424d62997e01896294e12224aa65a58db432
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:50 +02:00
Flavio Santes 8308b9bd2d net/http: Add the HTTP/1.1 API
This patch adds the HTTP/1.1 API for Zephyr. This API consists of client
and server context structures enabled via Kconfig variables.
HTTP parser support is enabled via the CONFIG_HTTP_PARSER configuration
variable.

Currently, this API only includes support for writing HTTP requests
(client mode) and HTTP responses (server mode). TLS support is not
considered in this iteration.

Supported HTTP methods:
	GET, HEAD, OPTIONS and POST.

Supported HTTP responses:
	400, 403 404. The http_response routine may be used to write
	any HTTP status code, for example 200 OK.

Jira: ZEP-1701

Change-Id: Ic9ccd4d4578d6d0f3a439976ea332b031644ca7d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:49 +02:00
Flavio Santes e29202593d samples/net: Add the QEMU x86 prj file to the HTTP client sample app
Add the QEMU x86 project configuration file to the HTTP client sample app.

Change-Id: Ice6ae3f3559680e1d182506671984fd5f946f1d8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:49 +02:00
Flavio Santes f6d40023b4 samples/net: Fix format warning in the HTTP client sample app
Fix a printk format warning found at the HTTP client sample app.

Change-Id: I9665e3e59595b383d6e809af51fe4cf3cd8f8bd8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:49 +02:00
Flavio Santes a561f5e1c7 samples/net/http_client: Cast size_t to int to avoid compiler warnings
Cast size_t to int in the http_client_cb code.

Change-Id: I36133da953669ec133421b5e7fb21bec9807fd06
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:49 +02:00
Marcus Shawcroft 7e6656eb9e samples: net: echo-server: Fix conditional around net_if_ipv4_addr_add()
The invocation of net_if_ipv4_addr_add() should be included within the
conditional code that sets up the address added.

Change-Id: I9b4e76a6b4922b3455bc6b383431b4124d40a49e
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-03-09 20:33:47 +02:00
Vinicius Costa Gomes 43ae27fd9b samples/coaps_server: Don't error if the packet doesn't have payload
GET and DEL requests may not have payloads, so it's not correct to
return with an error in those cases.

This was only noticed now that zoap_packet_get_payload() returns the
correct value for all situations.

Jira: ZEP-1754

Change-Id: Ie533041aa7a66855582ff4c5c937d943304bad84
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-03-09 20:33:47 +02:00
Luiz Augusto von Dentz 4db2c941be net: samples: Enable CONFIG_NET_CONTEXT_NBUF_POOL in prj_bt.conf
Bluetooth consumes buffer when transmitting them therefore any protocol
that need to retain them, like TCP, needs to have its own pool to copy
the buffers as they may need to be resent in case they are not acked.

Change-Id: I483c5a3eb4d54fae6b5b2902c69b67e8c2e0be5e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-09 20:33:46 +02:00
Leandro Pereira 141c0a5f1a samples: net: NATS protocol sample
NATS is a publisher/subscriber protocol implemented on top of TCP. It
is specified in [1], and this is a sample implementation for Zephyr
using the new IP stack.  The API is loosely based off of [2].

With this sample, it's possible to subscribe/unsubscribe to a given
subject, and be notified of changes asynchronously.  In order to
conserve resources, the implementation does not keep its own track of
subscribed subjects; that must be performed by the application itself,
so it ignore unknown/undesired subjects.

TLS is not supported yet, although basic auth is.  The client will
indicate if it supports username/password if a certain callback is set
in the struct nats.  This callback will then be called, and the user
must copy the username/password to the supplied user/pass buffers.

Content might be also published for a given subject.

The sample application lets one observe the subject "led0", and turn it
"on", "off", or "toggle" its value.  Changing the value will, if
supported, act on a status LED on the development board.  The new
status will be published.

Also worth noting is that most of the networking and GPIO boilerplate
has been shamelessly copied from the IRC bot example.  (Curiously, both
protocols are similar.)

[1] http://nats.io/documentation/internals/nats-protocol/
[2] https://github.com/nats-io/go-nats

Jira: ZEP-1012

Change-Id: I204adc61c4c533661eacfb8c28c1c08870debd91
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-09 20:33:45 +02:00
Flavio Santes 760c1f1214 samples/net: Fix error handling issues in IRC bot
Fix the following error:

Calling "transmit(irc->conn, pong, ret)" without checking return value.
It wraps a library function that may fail and return an error code.

Coverity-CID: 163115

Change-Id: I525e1059e6a2ae3896f68760f1a8a6c68ecfc074
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:45 +02:00
Flavio Santes c406be6360 samples/net: Fix uninitialized variable error
Fix "Uninitialized variables (UNINIT)" error found at the
HTTP client sample app.

Coverity-CID: 163117

Change-Id: I3d350fdc0e49a7bb7bea9d7af04494f6e918d603
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-03-09 20:33:45 +02:00
Jukka Rissanen aeb08874af net: samples: echo-client: Allow UDP and TCP run at the same time
Run both TCP and UDP to run at the same time. This requires two
extra threads in echo-client sample application.

Change-Id: I450a26d7ab1472150ea8f1309a43897a30bd4d90
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:44 +02:00
Jukka Rissanen f8c60de061 net: nbuf: Create net_nbuf_frag_del() for tracking allocations
Create net_nbuf_frag_del() so that we can track net_buf frees.
If CONFIG_NET_DEBUG_NET_BUF is not defined, then this new function
will call net_buf_frag_del() directly, and if not, then it will
track memory usage.

Change-Id: I5f382436cebc71fdaf12baf7bf964fb63bee7aca
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:44 +02:00
Jukka Rissanen 5197266768 net: nbuf: Use net_nbuf_get_frag() to allocate a fragment
The code used net_nbuf_get_reserve_{rx|tx}_data() function to
allocate a fragment. Instead of that low level function, use
net_nbuf_get_frag() instead. There are few places this is not
possible or is too big change like in few test programs.

Change-Id: Ied7e2b7db352de998b200ffa6ff82471bfa5ebe3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:43 +02:00
Jukka Rissanen d32503f57e net: nbuf: Split one global DATA pool to RX and TX DATA pools
If we receive lot of packets, it might happen that we exhaust
all the DATA buffers in the system. This would prevent from
us sending anything to the network.
Change this by splitting the DATA buffer pool into RX and TX
parts. This way RX flooding cannot consume all DATA buffers
that needs to be sent.

Change-Id: I8e8934c6d5fdd47b579ffa6268721b5eb3d64b6d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:43 +02:00
Jukka Rissanen ee0cff9ac7 samples: net: Use context specific net_buf pools in echo_*
Use context specific net_buf pool in echo-server and echo-client.
This will prevent application from allocating all available network
buffers in the system and thus preventing the core IP stack
functionality.

Change-Id: I3dbc64dd81c8a1165241426287a3530d00cbc7bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:42 +02:00
Sergio Rodriguez ee8bfe586b samples: mbedtls: Fixing entropy source
Using a more efficent entropy call and proper output data

Change-Id: I2ce71f63b6f22e5ceda79babd2eac802fa4bdf53
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2017-03-09 20:33:40 +02:00
Johan Hedberg 69d9985429 Merge bluetooth branch into master
- Assert fixes to controller state transitions
 - AVDTP fixes & improvements
 - SDP fixes & improvements
 - HFP improvements
 - GATT fixes
 - New GATT API for getting current MTU

----------------------------------------------------------------
Arun Jagadish (3):
      Bluetooth: AVDTP: Add AVDTP Receive Function
      Bluetooth: AVDTP: Fix discover param struct
      Bluetooth: AVDTP: Rename of variables

Carles Cufi (4):
      Bluetooth: controller: Use direct ISRs
      Bluetooth: controller: Set debug pins with macros
      Bluetooth: controller: Introduce debug pins Kconfig option
      Bluetooth: controller: Report 5.0 compliant controller

Jaganath Kanakkassery (1):
      Bluetooth: SDP: Server: Introduce private define for max services

Johan Hedberg (3):
      Bluetooth: Add support for Bluetooth 5.0 version specifier
      Bluetooth: Relax minimum advertising interval for 5.0 controllers
      Bluetooth: samples: Add combined observer & broadcaster app

Kaustav Dey Biswas (5):
      Bluetooth: SDP: Server: Fix MTU setting after l2cap connection
      Bluetooth: SDP: Server: Set security level to NONE
      Bluetooth: SDP: Server: Refactor data element structure header
      Bluetooth: SDP: Server: Handle Service Search request
      Bluetooth: SDP: Server: Filter records based on requested uuids

Luiz Augusto von Dentz (4):
      Bluetooth: GATT: Use __ASSERT for invalid parameters
      Bluetooth: GATT: Add bt_gatt_get_mtu API
      Bluetooth: L2CAP: Move functions in preparation for queuing
      Bluetooth: L2CAP: Add TX queueing for LE CoC

Maureen Helm (1):
      Bluetooth: samples: Add hexiwear_k64 and frdm_k64f to tests

Piyush Itankar (2):
      Bluetooth: A2DP: Stream End Point Registration
      Bluetooth: A2DP: Added Preset Structure

Sathish Narasimman (4):
      Bluetooth: AT: Fix 'signed' warning
      Bluetooth: HFP HF: Handling AG Network error
      Bluetooth: HFP HF: SCO: Add esco supported pkt type
      Bluetooth: HFP HF: SCO: Accept eSCO conn request

Szymon Janc (9):
      Bluetooth: shell: Fix accessing invalid memory
      Bluetooth: shell: Fix typo
      Bluetooth: SMP: Fix passkey entry for legacy pairing
      Bluetooth: shell: Don't echo LE CoC data
      Bluetooth: Fix connection object leak
      Bluetooth: shell: Simplify indication in gatt-subscribe
      Bluetooth: shell: Fix GATT long write support
      Bluetooth: GATT: Remove not needed variable
      Bluetooth: GATT: Fix subscriptions removal

Vinayak Chettimada (6):
      Bluetooth: Controller: Use direct ISR for Radio IRQ only
      Bluetooth: Controller: Fix LE Ping PDU dispatch
      Bluetooth: Controller: Run all enqueued mayfly before disable
      Bluetooth: Controller: Kconfig option to set public address
      Bluetooth: Controller: Fix assert on role stop/abort
      Bluetooth: Controller: mayfly enable to supercede over disable

 include/bluetooth/a2dp-codec.h               |  73 +++++
 include/bluetooth/a2dp.h                     |  61 +++++
 include/bluetooth/conn.h                     |   2 +
 include/bluetooth/gatt.h                     |  11 +
 include/bluetooth/hci.h                      |  50 ++++
 include/bluetooth/l2cap.h                    |   4 +
 include/bluetooth/sdp.h                      | 103 ++++---
 samples/bluetooth/peripheral_hr/testcase.ini |   2 +-
 samples/bluetooth/scan_adv/Makefile          |   5 +
 samples/bluetooth/scan_adv/README.rst        |  25 ++
 samples/bluetooth/scan_adv/prj.conf          |   2 +
 samples/bluetooth/scan_adv/src/Makefile      |   1 +
 samples/bluetooth/scan_adv/src/main.c        |  75 +++++
 samples/bluetooth/scan_adv/testcase.ini      |   4 +
 subsys/bluetooth/controller/Kconfig          |  15 +
 subsys/bluetooth/controller/hal/debug.h      | 124 ++++-----
 subsys/bluetooth/controller/hal/nrf5/radio.c |   4 +-
 subsys/bluetooth/controller/hal/radio.h      |   2 +-
 subsys/bluetooth/controller/hci/hci.c        |   2 +-
 subsys/bluetooth/controller/hci/hci_driver.c |  22 +-
 subsys/bluetooth/controller/ll/ctrl.c        | 229 ++++++++++++----
 subsys/bluetooth/controller/util/mayfly.c    |  58 +++-
 subsys/bluetooth/controller/util/mayfly.h    |   4 +-
 subsys/bluetooth/host/Kconfig                |   9 +
 subsys/bluetooth/host/a2dp.c                 |  19 ++
 subsys/bluetooth/host/at.c                   |  53 +++-
 subsys/bluetooth/host/at.h                   |  38 ++-
 subsys/bluetooth/host/avdtp.c                |  63 ++++-
 subsys/bluetooth/host/avdtp_internal.h       |  14 +-
 subsys/bluetooth/host/conn.c                 |  60 +++-
 subsys/bluetooth/host/conn_internal.h        |  10 +
 subsys/bluetooth/host/gatt.c                 |  86 +++---
 subsys/bluetooth/host/hci_core.c             |  92 ++++++-
 subsys/bluetooth/host/hci_core.h             |   8 +
 subsys/bluetooth/host/hfp_hf.c               |  15 +-
 subsys/bluetooth/host/l2cap.c                | 319 +++++++++++++---------
 subsys/bluetooth/host/sdp.c                  | 391 +++++++++++++++++++++++++--
 subsys/bluetooth/host/sdp_internal.h         |   2 +
 subsys/bluetooth/host/smp.c                  |   1 -
 tests/bluetooth/shell/src/main.c             |  98 ++++---
 40 files changed, 1728 insertions(+), 428 deletions(-)
 create mode 100644 include/bluetooth/a2dp-codec.h
 create mode 100644 samples/bluetooth/scan_adv/Makefile
 create mode 100644 samples/bluetooth/scan_adv/README.rst
 create mode 100644 samples/bluetooth/scan_adv/prj.conf
 create mode 100644 samples/bluetooth/scan_adv/src/Makefile
 create mode 100644 samples/bluetooth/scan_adv/src/main.c
 create mode 100644 samples/bluetooth/scan_adv/testcase.ini

Change-Id: I94f2f9f4431e21da9aae00c9e32581acb383ad49
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-08 22:21:41 +01:00
Kuo-Lang Tseng 5873fee475 samples: pwm: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.

Jira: ZEP-1764

Change-Id: I3c7716fd72e77c99fd29e4e90634c33f47f32e4c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-03-07 23:03:44 +00:00
Andrew Boie 10c41eea00 samples/logger-hook: fix usage of ring buffer
- Ring buffers provide no concurrency control. Since the ring buffer
is being installed as the system log hook, multiple contexts may try
to write to it simultaneously. Lock interrupts to prevent corruption
of the ring buffer.

- NULL pointers were being passed into sys_ring_buf_get() for the
'type' and 'value' parameters, causing undesirable behavior when they
are dereferenced.

- The 'size32' parameter of sys_ring_buf_put() was being passed the
number of bytes, not the number of 32-bit words.

- The 'size32' parameter of sys_ring_buf_get() was not bring correctly
initialized the size of the destination buffer in terms of 32-bit
words. This has been fixed. There is no longer a need to query the
API twice.

Issue: ZEP-1789
Change-Id: I96f9cc74f3711297727b4c5114b6c93510f4a8c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-07 12:40:23 +00:00
Johan Hedberg 9cf9a2f1f2 Bluetooth: samples: Add combined observer & broadcaster app
Add a sample application demonstrating doing continuous scanning and
sending out advertising packets periodically.

Change-Id: I0ce88afd73bed4928ba65472051c0f83ff27a632
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-07 12:21:29 +01:00