Commit graph

1640 commits

Author SHA1 Message Date
Jukka Rissanen 0be446ba5f net: samples: Fix slip config for echo-server and echo-client
The prj_slip.conf file should be used for qemu-to-host
communication only. It is not usable for testing between
two qemus.

Change-Id: Id06813a1b36f33f585e06df3f29479891ea3d2d8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:22 +02:00
Jukka Rissanen 6258dc8e87 net: samples: Fix the location of net-tools project files
Fix the correct location of net-tools project files to
samples/net/README file so that the user can test the
echo-server and echo-client apps using SLIP and Qemu.

Change-Id: Ic34fa6e67da916c63e4f138e1e0def5d7632c80c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:22 +02:00
Tomasz Bursztyka b84e62f269 samples: Build ieee802154 sample with 6lo support
Debugging messages in 6lo are enabled as well.

Change-Id: I8fea044216e3c4e60d742ebc7256489832ae09ac
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:22 +02:00
Tomasz Bursztyka ba4dda1703 samples: ieee802154: Debugging needs new Kconfig option
Change-Id: Iad9e5b9a2fda5b2c26697239d5437ff8ae75743a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:21 +02:00
Jukka Rissanen 44e2ce92f5 net: Fix the debug prints in echo-server
Change-Id: I1bda06e3b8727544727d0929aa180022b7a162d5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:19 +02:00
Tomasz Bursztyka 93ac4a2520 net: Sample code to play with ieee 802.15.4 stack
Meant to setup a real 802.15.4 device, changing channel, pan id, etc...

Change-Id: I221ad197aa221bc8f9ec67d0fd523da2023f7979
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:18 +02:00
Jukka Rissanen 84edd8f2f1 net: apps: Fix echo-server to use the new user API
Echo-server no longer reverses the data as doing it
when we have a fragment chain is quite challenging.

Change-Id: I298669f3ddba67000672320e7b3b14f72e9f12d4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:16 +02:00
Tomasz Bursztyka f51d84d93b samples: Fix echo_server for native IP stack
net_context.h is missing and one variable had a wrong name.

Change-Id: I4aac2f5c12cea39553fb86d1bd497c88f0ef1963
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:13 +02:00
Tomasz Bursztyka 260d3b95d7 net: Make net_core.h include the least amount of necessary header
net_core.h is the ground brick of the IP stack, and thus should not
include other headers that might include net_core.h also: this would
create circular dependencies.

Change-Id: I70c17b736788528e4e0b4b5b2c478098b049c9b1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:40:06 +02:00
Jukka Rissanen 73b57414a7 net: Setting static IP addresses for echo-server
This allows to test things between qemu and host when
using slip.

Change-Id: I27e17de9f0d8c2c8406f0afdd66c295e827f87a0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:05 +02:00
Jukka Rissanen 2f76da194d net: Make echo-server to use documentation IPv4 addresses
Use 192.0.2.0/24 address space that is specified in RFC 5737.

Change-Id: Iff2545f5b0f4817c99813c986d57801e166967a3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:05 +02:00
Jukka Rissanen d24f673248 net: Receive IPv4 packet
Check if we have received IPv4 packet and call a handler
function to process it.

Change-Id: I9f9e5f0888d2c3b91401c98f4925647ddce09962
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:02 +02:00
Jukka Rissanen e6d92ecdcf net: apps: Create a skeleton echo-server for new IP stack
This echo-server does not yet do anything useful.

Change-Id: I317051b3a2bfb0a80584ad385c2f308978a243cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:00 +02:00
Baohong Liu b18e4307b6 samples: net: fix a memcmp len error
The memcmp is a comparison between two strings or buffers.
So, the length should be the buffer length, not the length
of the pointer to the buffer. This was caught by LLVM.

Jira: ZEP-1179

Change-Id: I7fd6b199686b19e7f4a2e1288897483e69ad091e
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-18 00:20:12 +00:00
Johan Hedberg c583a9f43b Bluetooth: Kconfig: Restructure for a more logical hierarchy
Restructure the Bluetooth options more logically.

- Both host and controller are now behind the same high level
  CONFIG_BLUETOOTH.

- Selecting controller support disables other HCI driver selection, so
  the controller isn't in the same list as HCI drivers any more.

- Under the top-level there's a "Custom stack" option, which when
  enabled opens up the option of choosing CONFIG_NBLE.

There are various other cleanups and simplifications in this patch as
well, since splitting these up would have been fairly tricky while
making sure all test cases still build.

Change-Id: I5bb715cb9d20201cb8b72fbd149c8a09a4b2d7d2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-11-11 07:59:15 +02:00
Sergio Rodriguez d56714b1c7 samples/net: mbedTLS TCP client use unified thread spawn API
Change-Id: Ic0c5f9abf94c593ce4aad09faff0b7bcac4e2cd8
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-11 02:51:32 +00:00
Sergio Rodriguez fdc93c4733 samples/net: mbedTLS TCP client use unified kernel
Removing unnecesary flags

Change-Id: I2c72678dc8ba38ae0bd85459c2ea97d0de676314
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-11 02:51:31 +00:00
Andrew Boie 252144f6e8 samples: remove old kernel support
Change-Id: I89ab1e1926e2e8f07f8c8d5538a7587a605cb36b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-07 11:34:18 -08:00
Sergio Rodriguez ddd47e2292 samples/net: mbedTLS TCP client use unified kernel
Use unified kernel.

Change-Id: I533321e908de999d9da9bd26adfc6215175a0cd9
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-05 13:01:21 +00:00
Benjamin Walsh 8cf56bcac7 unified: dissociate system workqueue from common workqueue module
Making a reference to the common work queue code should not necessarily
drag in the system workqueue, since it is possible to use a workqueue
that is not the system workqueue. This is done by moving the system
workqueue into its own code module.

Moving the system workqueue to its own code module allows removing the
NANO_WORKQUEUE and SYSTEM_WORKQUEUE kconfig options, and compiling the
common workqueue code and system workqueue all the time. They are only
linked in the final image if a reference to them exist, same as the
other kernel modules.

Change-Id: I6f48d2542bda24f4702e7c2e317818dd082b3c11
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-11-04 22:39:54 +00:00
Anas Nashif d622b09bc0 samples: tests: remove obsolete KERNEL_TYPE and kernel variables
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.

Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 15:47:25 -04:00
Yael Avramovich d5db35204a console: shell: Support multiple modules
Ability to use Zephyr shell by multiple modules simultaneously, each
module for its own usage.

Old shell implementation enabled the user to call only one module
commands, not all of the modules simultaneously.

Change-Id: I0ef8fa2fd190b7490c44fe91d1016363258302c9
Signed-off-by: Yael Avramovich <yael.avramovich@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-02 00:23:18 +00:00
Anas Nashif b4dc970a7c tests: convert loopback test to unified kernel
Make it run on Qemu only, this test is not intended for HW.

Change-Id: I842d7456f9238221ef5b661749136f4418d5ab16
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-01 10:24:55 -04:00
Marcus Shawcroft c20b48b9ed samples:dhcp_client: Add frdm_k64f configuration.
Change-Id: I4291c42ee601194c4c2cac0c997a2c48a8d52658
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 12:35:20 +00:00
Marcus Shawcroft 1c33ccfbe9 samples:dhcp_client: Refactor config file selection.
Adjust the dhcp_client sample Makefile to select a project
configuration based on BOARD rather than interface hardware.  This is
more convenient for supporting other hardware than the current
organization and is consistent with various other samples.

Change-Id: I0f59b632144dfa875dc036ec6f4aa4f6657a79bc
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 12:35:19 +00:00
Vinicius Costa Gomes fcf98d1534 samples/zoap_server: Add preliminary support for validation
Implement resources so they conform to what the ETSI plugtest suite
expects.

This allows the zoap-server sample to pass most of the tests of the
CORE[1] group, only TD_COAP_CORE_09 is not implemented.

Tests involving lossy networks weren't run as well.

The tests were run against the libcoap[2] client.

[1] ETSI CoAP test description
http://www.etsi.org/plugtests/CoAP/Document/CoAP_TestDescriptions_v015.pdf

[2] libcoap
https://libcoap.net/

Change-Id: Ifa3ed21a93052e02f47e99d7cb6d9d4b28e576d8
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-17 02:12:12 +00:00
Vinicius Costa Gomes da41fc87ed samples/zoap_server: Fix warning about pointer signedness
Change-Id: I78b2762d0713aa42d9800cb7736f4831195a6d3c
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-04 12:29:07 +00:00
Vinicius Costa Gomes 0dfc9db815 samples/zoap-client: Add a README.txt to zoap-client
Change-Id: I2373d87cda125036cce169aaa492aeedcbe200dd
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-01 01:11:27 +00:00
Vinicius Costa Gomes fcb3297b32 samples/zoap-server: Add a README.txt to zoap-server
Change-Id: I136d405e520ed8550e0b5012128a0c673bb9954a
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-01 01:11:27 +00:00
Vinicius Costa Gomes 76e81874f0 samples/zoap_client: Make it work with zoap-server
The path and port used by zoap-client were different than the ones used
by zoap-server.

Even if they are different applications, for consistency, it makes sense
for them both to be able to talk to each other.

Change-Id: I883d59c77bc3800b4f0965ba7bcf96a08e545d29
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-01 01:11:26 +00:00
Vinicius Costa Gomes 441d22a371 iot/zoap: Add port information to network addresses
uIP keeps the port separated from the IP addresses, so if the
application wants to communicate with a remote endpoint we must also
have the port information available.

Change-Id: I8e2b01fe5717166e1f9cebcc74b2056325b8ccc3
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-10-01 01:11:25 +00:00
Anas Nashif 179ce1c891 boards: remove obsolete board basic_minuteia
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.

Jira: ZEP-850
Change-Id: I01c825c7eb44d6c321f2ffb88e8899da528921dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-22 22:09:34 +00:00
Anas Nashif 572f4a1a14 boards: remove obsolete board basic_cortex_m3
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.

Jira: ZEP-850
Change-Id: Ied681b6059ad74f9d019054292c919a9f938e7d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-22 22:09:33 +00:00
Anas Nashif 5363d14a9e boards: rename Quark SE Devboard to Quark SE C1000
This board now has an official name and will be available soon:

http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/overview.html

Jira: ZEP-758
Change-Id: Ia16d33722308cf81471321c3063bdc75055a4d50
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:31 +00:00
Anas Nashif 5e4b62c35c boards: rename Quark SE Devboard to Quark SE C1000 (Sensor Subsystem)
Jira: ZEP-758
Change-Id: I8ee5a2f9e4a6ecbd15214e59321bf27a502ef6ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:30 +00:00
Javier B Perez 5879f1702c samples: zoap server: exclude quark d2000 not enough ram
Excluded Quark D2000 because there is not enough RAM to
build the sample.

Change-Id: Icc772e0aaca2be8731eae8f986eed17782beb445
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-09-14 21:23:25 +00:00
Benjamin Walsh c72acc9333 zperf_shell: add unified kernel string for unified kernel case
Change-Id: I61053d6aff6381eb32626b457da6ef5170ffc503
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Anas Nashif 884d9fb50f samples: zoap: build only for specified boards
Change-Id: I52e5dd0d638eb4582baf9bc7c8ce4d30b4d49733
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 19:53:15 -04:00
Vinicius Costa Gomes 8dad0093d3 samples/net: Add a sample for a CoAP client
Change-Id: I17d88081eb719e55d97a5a034f6861e01ebb6a52
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:25 +00:00
Vinicius Costa Gomes 97ea9b19ea samples/net: Add a sample for a CoAP server
Change-Id: Ibca646d9c9f85a14939e1cf488eee7a41f688fd2
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-09-12 12:25:25 +00:00
Flavio Santes 13a75b7e42 dns: Remove deprecated functionality
This commit removes deprecated APIs and replaces them with routines
that provide similar functionality without the flexibility originally
offered by the deprecated APIs.

Removing deprecated routines will help us to be prepared once the
new IP stack is ready (ZEP-793). Furthermore, this commit will also
help us to move our current DNS Client implementation to the lib/iot
directory, as specified by ZEP-847.

This commit removes the netz library from the DNS client sample
application. UDP functionality is replaced by primitive routines.
Specifically, the following changes are applied by this patch:

- Remove netz routines
- Remove app_buf data structure
- Introduce primitive data types in the DNS client code
- Introduce primitive network routines
- Add a header file containing configurable parameters

Jira: ZEP-793
Jira: ZEP-847

Change-Id: I0302133da77308f0cdd9ace2c0265e6b77673ff0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-12 02:15:44 +00:00
Jukka Rissanen 4a088a1259 net: apps: Example app for Trickle algorithm
This is only meant for Contiki based IP stack.

Change-Id: I53cbcb7da0bd13ad87243fd70974cec0bd31072e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-09-12 02:00:12 +00:00
Andrew Boie e220bc543c samples: zperf: fix incorrect printk() usage
Change-Id: I0f7a9fcc6ed75013c388a14142aaad8e8243c8b5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Anas Nashif 47edaa343b net: For 15.4 sample, whitelist the supported boards
Jira: ZEP-739

Change-Id: I6c58b4b7dbd227364503023e7a443d2441a19701
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-25 06:06:52 -04:00
Flavio Santes e288040b7b samples/net: Add KNOWN_ISSUES file for NATS and DNS sample apps
The KNOWN_ISSUES file describes issues and workarounds for the NATS
and DNS sample applications.

Change-Id: I9a33a82073707dbdd4109e0740108b99c42ad772
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-24 23:36:45 +00:00
Javier B Perez 8c55291e83 sanity: exclude boards for samples/net/test_15_4
Excluded Quark D2000, Nucleo F103RB, Olimexino STM32 for the
sample test_15_4. Boards doesn't have support for 15.4 neither
enough space.

JIRA: ZEP-738
Change-Id: I963509a77cdf6a8ff2efee2f2d4a498e3c07f9b5
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-24 10:53:38 -05:00
Andrew Boie bc94f7c723 Revert "misc: Remove generic PRINT macros from net samples"
This reverts commit 4dc93fed2f.

Change-Id: I35f7e355f1b9cfcfdf933a26cc30e0f92680079d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:44 -07:00
Jaakko Hannikainen db493450ac net: ip: Fix compiling with 15.4
Kconfig allows selecting NETWORKING_WITH_15_4_TI_CC2520 even if the
current board doesn't support it, and also selects it by default. This
breaks building the 15.4 sample with qemu_x86. Add a config option for
having CC2520 support and enable the choise only if it is available.

In addition, remove unused function from iee802154 code, as it now
fails the tests.

Jira: ZEP-697

Change-Id: Ib082f82acdd0f86d3306bbd3bb827f61b0fd0be1
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
2016-08-23 13:13:59 +00:00
Flavio Santes 74980d02f4 mqtt: Add KNOWN_ISSUES file
The KNOWN_ISSUES file describes the following:

- "Unable to connect" and timeout errors
- Publisher and Subscriber limitations

Jira: ZEP-428
Jira: ZEP-632
Jira: ZEP-669

Change-Id: I10591a1fd14bccbeb0b7f3876549d29ddf8ffd1f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-18 23:56:05 -05:00
Flavio Santes 29fc59e535 samples/net: Remove call to unref routine when net_send returns >= 0
According to last comments posted in ZEP-632, the unref routine must
be called only when net_send reports an error.

Jira: ZEP-632
Change-Id: I11553edf2c7d686c3e58617c2e05b6f18962955e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-18 16:08:11 +00:00
Andrew Boie fee8fabf2b samples: net: zperf: build for sanitycheck runs
Change-Id: I147b042bac229472238d02233d1c220aa5c1b4b9
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-15 09:38:53 -07:00
Andrew Boie 9d5941c843 samples: net: loopback_test: build for sanitycheck runs
Change-Id: I3d275d754860b2471b3531eaeb70b70bdf0759cb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-15 09:38:53 -07:00
Andrew Boie fc605405f9 samples: test_15_4: fix build warning
Change-Id: I10a6fc3f16da9f821a34d798fd00018bd662e41b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-12 22:57:57 +00:00
Ravi kumar Veeramally c5c1ddcf7d net: samples: Fix Rx buffers count.
Incase of slip or ethenet use, if these is too much incoming data
current buffer count is not sufficient. Noticed with TCP client
and server example. So increasing it to avoid not enough Rx buffers
issue.

Change-Id: I6eef51c28c7c4751955aa4403122bf17d55ce12c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-08-12 20:37:25 +00:00
Inaky Perez-Gonzalez d7c37f6748 samples/net/loopback_test: fix testcase markup
The app has updated the text it prints (which we were looking for) so
this was causing a false negative.

Change-Id: I3223a0dec8e44b0f89caf73626ffff82d74ab24d
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-08-12 20:35:13 +00:00
Flavio Santes d7555dbe21 samples/net: Update README file w.r.t compiler warnings
README files are updated to include information about the
warnings displayed by the compiler.

Applications affected: DNS, NATS and MQTT.

Jira: ZEP-681

Change-Id: I482c3bbf37c5d9af3bb43b7ef5e58957bac2852a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-11 17:43:16 +00:00
Ravi kumar Veeramally 5cabc0e048 net: samples: Fix RFC3849 address config option.
NET_TESTING_USE_RFC3849_ADDRESSES not defined as a Kconfig option.
Enable this in Makefile like this
ccflags-y +=-DNET_TESTING_USE_RFC3849_ADDRESSES=1 incase if you need
it.

Change-Id: I96b05d069cf5baa56cc27489b3c38b84412eec97
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-08-10 15:14:44 +00:00
Flavio Santes b564ee6d76 mqtt: fix: Remove ping function call
Zephyr's MQTT does not implement a client's message queue.
So, a race-condition may be present when multiple messages are
received and processed.

We remove the pinreq function call to allow the mqtt_read function
to handle all the incoming messages.

CONFIG_IP_BUF_RX_SIZE is also updated to allow more messages to be
queued by the IP stack.

Jira: ZEP-669

Change-Id: Ie3ef55b17020e04c6540adf975a66fb004933914
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Flavio Santes 97e1beaf52 mqtt: fix: Eliminate redundant lines by using a common exit point
Use the goto statement to create a common exit point.
Remove redundant code when possible.

Change-Id: I2e22483c6fca4cb501b401164faf97d585ecec3c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Flavio Santes f8b30eada7 mqtt: fix: pinreq handler function exit condition
The previous version of the pingreq handler function leaves
the semaphore blocked if an error condition is detected.

This patch solves the above described situation.

Change-Id: I4897609fae3f6523244892ae38ffdc5ae85f852d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Flavio Santes a7362cf77f dns: FIX: use byteorder.h functions
The previous version of the DNS Client sample code assumes a
little-endian machine as a target. In this patch we use the byteorder.h
functions to handle the cpu to network order conversions.
Theoretically, this code must run on little and big endian machines.

Cosmetic changes are also applied to other files.

Change-Id: I2b47f6252fa070e0a0253666fde1785530d6aebf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:15:50 +00:00
Flavio Santes 0aa191389c dns: FIX add README_API file and improve sample code
README_API file is added in this patch.

Inline code documentation is improved. More test domains are added.
The README file is also updated to reflect these changes.

Change-Id: Ie670a6559611c6a8d216470e245dbea48369696f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:15:39 +00:00
Flavio Santes df22e226f0 mqtt: FIX: add unsubscribe function and update return codes
MQTT unsubscribe message was not included previously. See ZEP-623.
So, this commit adds the handling functions for the MQTT UNSUBSCRIBE
message.

MQTT high-level API return codes are now unified to only return:
- 0 on success
- -EINVAL when invalid parameters are received
- -EIO on network error

API documentation is also updated to reflect the previous changes.

Jira: ZEP-623

Change-Id: I04d65c303762ce2ecaca73a4f222f0b77fe70503
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Flavio Santes 5280beffab mqtt: FIX: add MQTT unsubscribe/pingresp handling functions
The UNSUBSCRIBE and UNSUBACK functions are added. These functions allow
to create the UNSUBSCRIBE message and to read the UNSUBACK message,
repectively.

Another function to create the PINGRESP message was also added.

Jira: ZEP-623

Change-Id: Ic055e5762051cc9fb5d59a19c6eb974e34014d7e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Flavio Santes 6503654e75 mqtt/subscriber: FIX: update README file
README file now has a Troubleshooting section. It could be useful during
tests.

Change-Id: I925812b9bd62ac00a2f404939c1c0b7d9cf4dfd2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Flavio Santes fb080a3211 mqtt: FIX: update sample code to include MQTT UNSUBSCRIBE message
This patch demonstrates how to use the MQTT UNSUBSCRIBE message.

The publisher application is updated to fix a typo.

Jira: ZEP-623

Change-Id: I2c302c9f9320687fc39f36726394417db89f06d8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 16:54:54 -05:00
Flavio Santes dde410e2a6 mqtt: FIX: update hack to handle dummy packet for TCP connect
The zero bytes hack to connect was deprecated by last
commits, so now we send 1 byte initialized to 0 :).

Jira: ZEP-612

Change-Id: I372964bbb102811d33509ad9386d9b360032a180
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 16:53:32 -05:00
Flavio Santes 57cf077e9c nats: FIX: update hack to handle dummy packet for TCP connect
The zero bytes hack to connect was deprecated by last
commits, so now we send 1 byte initialized to 0 :).

Jira: ZEP-612

Change-Id: Ie9e65fad3945d0babc4287e287be3aa57d68ed5a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:20 +00:00
Flavio Santes b0cd36040c nats: FIX: add README file
This patch adds a README file describing the known-limitations of our
implementation.

Change-Id: I174db79783861f145ae224eca86f3fe4968e0205
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:20 +00:00
Flavio Santes 9676df04d1 nats: FIX: homogenize return codes and update API documentation
This patch standardizes the return codes:
- 0 on success
- -EIO on network error
- -EINVAL if an invalid parameter was passed as argument or
   received from the server

API documentation is also updated to reflect those changes.

Change-Id: I076d195fde7c6b32b4a52454f312fb8cd8ce2332
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:19 +00:00
Juan Manuel Cruz Alcaraz 4dc93fed2f misc: Remove generic PRINT macros from net samples
Remove generic PRINT macros from net samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I4bec179c99056cce41e1f3495c162f25c3cd2364
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:52 +00:00
Flavio Santes e22df46b61 samples/net: Add network-related functions to MQTT Subscriber
Add TCP/IPv4 routines to this sample.

This MQTT sample code demonstrates how to implement an MQTT subscriber
application.

To build this sample, the Paho's MQTT Packet Library is required. See
the README file.

For network application development, see:

* samples/net/echo_server
* samples/net/echo_client

Change-Id: Ibeb175ee2c4594b8961c60f2a0d25296c238401c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-02 01:59:13 +00:00
Genaro Saucedo Tejada 67c465d2cc sys_log: replace old debug macros at ieee802154 driver
ieee802154 driver is now using new system log macros, update the
Kconfig variable to be a level rather than a bool and the .conf
files at samples.

JIRA: ZEP-311

Change-Id: I640e973d880c3a222cd7c13a72d35edf49ada3a8
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-01 22:03:45 +00:00
Flavio Santes 54bfc3cc63 samples/net: Add network-related functions to NATS Subscriber
- Add TCP/IPv4 routines to this sample.
- Add a testcase.ini file.

This NATS sample code demonstrates how to implement a NATS subscriber
application.

Change-Id: I25a7465b7163a09a0163859076a97b1e258a06f1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 14:31:27 -05:00
Flavio Santes 8f54ece6e6 samples/net: Add network-related functions to NATS Publisher
- Add TCP/IPv4 routines to this sample.
- Add a testcase.ini file.

This NATS sample code demonstrates how to implement a NATS publisher
application.

Change-Id: Ifeac3bf03b7febafcee927b1d2ec256685885fd8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 14:21:51 -05:00
Flavio Santes e240f84c75 samples/net: DNS client application
This sample code shows how to write a DNS client application.
Only client functionality is implemented in this sample.

The code is self-documented. Read the README file for more information
about the network setup.

See https://tools.ietf.org/html/rfc1035 for more information about the
DNS protocol.

Origin: Original

Jira: ZEP-500
Jira: ZEP-501

Change-Id: Ibcfa4e392143fdc2258971304d5296d70c1c9423
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 18:54:07 +00:00
Flavio Santes 8ba4f26e5f samples/net: Add network-related functions to MQTT Publisher
Add TCP/IPv4 routines to this sample.

This MQTT sample code demonstrates how to implement an MQTT publisher
application.

For network application development, see:

* samples/net/echo_server
* samples/net/echo_client

Change-Id: I13ac5ca1da2cd4d984fb595b599c3eab4edc5bf0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-01 18:28:38 +00:00
Sergio Rodriguez 259c24397d samples/net : Adding mbedTLS sample client
This is a client that uses shared keys to execute a TLS handshake and read
info from the server, information on how to run the test is in the README
file.

Jira: ZEP-327
Jira: ZEP-340
Jira: ZEP-495

Origin: https://tls.mbed.org/download/start/mbedtls-2.3.0-apache.tgz

Change-Id: I10f31f3635f346936807b7c8470b3d6ffb3af283
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-07-31 17:00:45 +00:00
Flavio Santes f61574eef7 samples/net/mqtt: Update README file for Debian/Ubuntu users
Debian and Ubuntu distributions come with an old version of the
mosquitto server that does not support MQTT 3.1.1.

So, the MQTT applications' README file is updated with this
information.

Change-Id: I1c76c757b5a15aa2bdd192bd912835a417cb0031
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-29 19:14:42 +00:00
Flavio Santes 4172b3afab samples/net: Add a NATS subscriber application
This sample code demonstrates how to write a NATS subscriber
application. Code is self-documented and a README file is also
included.

This sample code uses the netz API.

The NATS protocol specification is available at:
http://nats.io/documentation/internals/nats-protocol/

Origin: Original

Jira: ZEP-415
Jira: ZEP-573
Jira: ZEP-597

Change-Id: I4b7e56bb6c2a934012b33039ea5b313b14f3b4c5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-28 15:40:46 +00:00
Flavio Santes 78aa6ea050 samples/net: Add a NATS publisher application
This sample code demonstrates how to write a NATS publisher
application. Code is self-documented and a README file is also
included.

This sample code uses the netz API.

The NATS protocol specification is available at:
http://nats.io/documentation/internals/nats-protocol/

Origin: Original

Jira: ZEP-415
Jira: ZEP-573
Jira: ZEP-596

Change-Id: Ieb6e6e5f9bd48f34246b6d8c1bd9af3bbbe016bb
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-28 15:40:26 +00:00
Flavio Santes bbd4d4cb1f samples/net: MQTT subscriber with QoS
This sample demostrates how to write a subscriber application that is
able to receive messages with different Quality of Service values.

The code is self-documented. Read the README file for more information
about the network setup.

This sample code uses the Network for Zephyr API (netz).

More details about MQTT can be found in the official documentation:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html

Jira: ZEP-416
Jira: ZEP-568
Jira: ZEP-573
Jira: ZEP-594

Change-Id: Ia660313439c0c61c2210abbf8ce09ff278d11a1a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-28 15:37:24 +00:00
Flavio Santes cc2804f2b6 samples/net: MQTT publisher with QoS
This sample demostrates how to write a publisher application that is
able to send messages with different Quality of Service values.

The code is self-documented. Read the README file for more information
about the network setup.

This sample code uses the Network for Zephyr API (netz).

Old mqtt applications (paho_mqtt_client and paho_mqtt_shell) are now
deprecated.

More details about MQTT can be found in the official documentation:
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html

Jira: ZEP-416
Jira: ZEP-568
Jira: ZEP-593
Jira: ZEP-573

Change-Id: I31f8a01e143e5d446f2fb4055c1cacb9d7174517
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-28 15:37:11 +00:00
Andrew Boie 18aac630ef Revert "samples/net: Add netz_client sample code"
This reverts commit a3c0b2c00f.
The status of the 'netz' library is still under
consideration.

Change-Id: Ifde93465da306d86aec8a71d02a16653eb7cef9c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 07:33:11 -07:00
Kumar Gala 62ca7ef1fc samples/net: Fix typo in comment
Fix comment that had CONFIG_MICROKERNE should be CONFIG_MICROKERNEL

Change-Id: Ic7ad63350abe92e9f1b84f4de0d6d3bb1b43dc77
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-27 16:20:55 +00:00
Flavio Santes a3c0b2c00f samples/net: Add netz_client sample code
This sample code demostrates how to use the netz API. A basic
IPv4/TCP/UDP client application is provided.

The README file describes the basic setup.

Origin: Original

Jira: ZEP-567
Change-Id: I1c7d2454336dc00747044c5fc330f9ab6457ecf1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-07-27 14:45:32 +00:00
Inaky Perez-Gonzalez eb2d8b418c testcases: add automation markup to samples/
Code in samples does not follow an standarized format for reporting
success or operation failure -- thus we use markup (in file sample.tc)
to specify what shall be found in the console to consider execution a
success.

There is a few functional code modifications that add/extend console
messages so verification is possible or easier:

 - hello_world, synchronization: extend the success message to also
   print which core is running the testcase

- pci_enum: print message on success.

Change-Id: Idb6cea03adebe97d97854603f963f4e3d4cb856a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-26 08:32:24 +08:00
Inaky Perez-Gonzalez 3e63a74514 net/yaip: revert merge
Follow up to TSC decission for further discussion in the networking
WIG.

Change-Id: I148b484dfe308661573e47ed3e60cceed673bddf
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-22 04:43:09 +00:00
Tomasz Bursztyka bb1fe0c147 net: yaip: Make net_core.h include the least amount of necessary header
net_core.h is the ground brick of the IP stack, and thus should not
include other headers that might include net_core.h also: this would
create circular dependencies.

Change-Id: I70c17b736788528e4e0b4b5b2c478098b049c9b1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-07-13 14:06:19 +00:00
Jukka Rissanen 1145bd43a1 net: yaip: Setting static IP addresses for echo-server
Makes it possible to test things between qemu and host when
using slip.

Change-Id: I27e17de9f0d8c2c8406f0afdd66c295e827f87a0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:14 +00:00
Jukka Rissanen 8a9f8d17b9 net: yaip: Make echo-server to use documentation IPv4 addresses
Use 192.0.2.0/24 address space specified in RFC 5737.

Change-Id: Iff2545f5b0f4817c99813c986d57801e166967a3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-13 14:06:09 +00:00
Jukka Rissanen fbb940d9f0 net: yaip: Receive IPv4 packet
Check if we have received IPv4 packet and call a handler
function to process it.

Change-Id: I9f9e5f0888d2c3b91401c98f4925647ddce09962
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 19:20:50 +00:00
Jukka Rissanen cba9d3096c net: yaip: apps: Create a skeleton echo-server for new IP stack
This echo-server does not yet do anything useful.

Change-Id: I317051b3a2bfb0a80584ad385c2f308978a243cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-07-12 07:21:03 +00:00
Javier B Perez 22c68169fd samples: testcases.ini change tags separated with commas
Tags should be separated with spaces no with comma.

Change-Id: I5381200bcd0caf59f3601ec849d698966c734a28
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-07-08 18:20:08 +00:00
Kumar Gala 7dcbbc39e7 build: move from srctree to ZEPHYR_BASE for app include paths
$srctree for the application might not be set to be $ZEPHYR_BASE, use
$ZEPHYR_BASE instead to be more explicit in the build.

Change-Id: Iefa5ff59f246b584949329044f7a6531adc6ed62
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:39 +00:00
Fabrice Olivero c66ed19dea samples/net/zperf: add task profiler support
Change-Id: I199e4b5aca0b0793e18149a758c430d01b5aabd4
Signed-off-by: Fabrice Olivero <fabrice.olivero@intel.com>
2016-06-16 18:10:29 +00:00
Ravi kumar Veeramally 5d98ba37f6 net: apps: Fix ip buf application data length
ip_buf_appdatalen is not set while sending buffer.

Fixes: RTOS-1562

Change-Id: Id423ba5898b9b405d0ca027a74a06a19708841fe
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-06-09 08:53:16 +00:00
Luiz Augusto von Dentz f6dd1e4144 Bluetooth: Add support for using SYS_LOG
This add CONFIG_BLUETOOTH_DEBUG_LOG which depends on SYS_LOG since the
later can actually use either CONFIG_PRINTK or CONFIG_STDOUT_CONSOLE.

Change-Id: Ib2974d1331f6c91d119a218ec95e8bf01069377b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 05:04:10 +00:00
Flavio Santes 65ccf8330f samples/net/mqtt: Fix mqtt_connect function
Remove erroneous initialization of 'data' via memset.
Set keep alive interval to 0.

Change-Id: I5da4649985efd39b37bbbdc6ae21a856f9e40b13
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-31 11:22:01 -05:00
Flavio Santes 0224e3577e samples/net/mqtt: Add a MQTT interactive shell
Add a MQTT interactive shell that can connect, disconnect, subscribe,
publish, read published messages and ping to the MQTT gateway.

Origin: Original

Jira: ZEP-364
Change-Id: Ie85e7b8b9290cb8e80548886aea74a8427b2323b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 20:23:53 -05:00
Flavio Santes 4a320be8a2 samples/net/mqtt: Reduce tx/rx buffer size and update mqtt_publish_read
Set CONFIG_IP_BUF_RX_SIZE and CONFIG_IP_BUF_TX_SIZE to 4.
Modify mqtt_publish_read to retrieve topic name and message as strings.
Change printf for printk.

Change-Id: I6746846cb3359096d87dfbb3134d6a3a95bf087e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 17:26:02 -05:00
Flavio Santes 2df4a0f9e2 samples/net/mqtt: Update README file and code cleanup
Add instructions to download Paho's MQTT Library.
Simplify if statement.

Change-Id: Iba500c47a56896f9c9b726751933443a5318ced7
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 10:11:38 -05:00
Flavio Santes f194272c41 samples/net/mqtt: MQTT publisher and subscriber
This sample shows how to integrate Paho's MQTT Packet Library to create
a MQTT publisher and subscriber application with Zephyr.

Change-Id: I1cb4124386752eef6187a56ccc9f6fd7fe7175a3
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-29 22:24:26 +00:00
Ravi kumar Veeramally 6a9817a091 net: apps: Add DHCP client sample application
Change-Id: I9c3f317fb13bce56ee93d66d692618145087a6a9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 11:09:31 +00:00
Ravi kumar Veeramally 2c6de48374 net: apps: Provide pcap support for echo apps
Provide pcap support for echo-apps with PCAP=<filename> option.

For pcap support:
make server NET_IFACE=qemu PCAP=sample.pcap.

without pcap support:
make server NET_IFACE=qemu

Change-Id: Iad90064e0c32134f9c2fda7b28e2cbca1e4e931c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-27 13:13:47 +03:00
Jukka Rissanen 2dab1d7371 net: apps: Ignore multicast context get fails in echo-server
The echo-server should work just fine even if the multicast
context cannot be get. By default there are only two contexts
so the multicast would fail always anyway and the program
would not run properly.

Change-Id: Ia9737cbda4a933a208aae020f055f0b6062b4f47
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-27 06:15:22 +00:00
Jeremie GARCIA 9891d1e12b net: apps: zperf - add TCP client
Change-Id: I292e03c28169ca05f6b982a36be2ed618f8455bb
Signed-off-by: Jeremie GARCIA <jeremie.garcia@intel.com>
2016-05-26 00:47:01 +00:00
Luiz Augusto von Dentz 7941630e17 console: shell: Add return to command callback
This enable checking for errors and automatically print help string:

btshell> connect
connect <address: XX:XX:XX:XX:XX:XX> <address type: (public)>

Change-Id: Ie097ecddb72ab15bf6192e310d0bd839bfd251d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-23 11:00:21 +03:00
Sebastien Griffoul 818875f364 net:apps: Add ipv6 support for zperf
Update the zperf app in order to support ipv6.

Change-Id: I137af07bbd739cf4bfe60bd13bdb06cf939c6c55
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-17 20:13:13 +00:00
jgarcia 1ebed467bf net:apps: zperf - add TCP server
This patch adds the TCP server capability
to zPerf tool.

Change-Id: I8e4d92b10079a7c4b4bddab8d78655031ca6125c
Signed-off-by: jgarcia <jeremie.garcia@intel.com>
2016-05-17 20:09:06 +00:00
Jukka Rissanen 1f10410076 net: apps: Add IPv4 client support to echo-client
Change-Id: Ic879b64f22e0a2a1edbeaa1a6315a605993a09a4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:29 +03:00
Jukka Rissanen 7bb3f2e01a net: apps: Add TCP client support to echo-client
The echo-client can now initiate a TCP connection.

Change-Id: I8223ef377127319dd1791497675a4abe8b382365
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen d57c2d35df net: apps: Quit echo-client if TCP connection fails
If the active connection to another TCP host fails, then
quit as it is no point continuing.

Change-Id: I21317d7062d4ac93c342834a2503139fe27076e7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Jukka Rissanen 0a12b4768c net: apps: Add TCP support to echo-client application
If TCP is activated, then the echo-client application opens
a TCP socket and starts to send data to server. For TCP
connections, the application data is not reversed because
it would make it difficult to verify the data in the sender
side.

Change-Id: I35306b8ecd6794365086a23bf6a17f5103d7ac80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-05-17 09:57:28 +03:00
Flavio Santes 7e32716d25 samples/net/loopback: Add helper functions to handle app data
Add two helper functions to simplify the use case.
Add comments to clarify the use of the networking API.

Change-Id: I60c58296b77d724b7094b90e153b50dfc0b58135
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-16 14:54:24 +00:00
Flavio Santes e5d0b8f93e samples/net/zperf: Delete symbolic link
Remove the symbolic link.
Update the Makefile.
Rename README as README.rst and restructure its content.

Change-Id: Ic74e91749fc0bbf728e528b49e99a87188f84e6d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-15 01:16:55 +00:00
Anas Nashif f62d86c42b samples: get rid of obsolete usage of ARCH variable
Using ARCH variable to select different configurations for the different
architectures is misleading and conflicts with the variable ARCH being used by
the build system.  The variable is not needed, it is application specific and
an application can be built without the need to specify ARCH on the command
line.

This is yet another item specific to samples and test cases that
wrongfully being used and documented for every application.  We need to use
another variable and just make it clear it is specific to samples and how they
are written.  One possible solution is to have a script that gets the
architecture based on the board being used.  Attachments

Jira: ZEP-238
Change-Id: Ieccbc087a41858fb96fb361c0aaa04705e968a4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:28 +00:00
Flavio Santes 05bd623aa1 net: apps: Break long strings in loopback test
Use string literal concatenation to break the sample text.

Change-Id: I0729b113e80d3efec909603fbb143d1bc515f165
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-04-26 08:09:01 +00:00
Jukka Rissanen cdb296a51f net: apps: Set IPv4 configuration when doing automatic testing
Set the IPv4 address, netmask and default router addresses
that are used for automatic testing.

Change-Id: Iebddc42c56dceeb089af7878102f8a73c30f0b74
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-04-25 09:40:34 +03:00
Jukka Rissanen 7e91a42ced net: apps: Fix IPv4 support in echo-server
The IPv4 address is set properly for testing purposes.

Change-Id: I996e7435276f65dbb642aa9ab99c37cd842d4b39
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-04-25 09:40:34 +03:00
Jukka Rissanen 74d6563627 net: apps: Add TCP support to echo-server application
If TCP is activated, then the echo-server application starts
to listen TCP socket and reply data to caller. For TCP
connections, the application data is not reversed because
it would make it difficult to verify the data in the sender
side. The TCP packets might be split into smaller chunks by
echo-client so client would have some unnecessary difficult
to verify the data it sent if we reverse it.

Change-Id: Ic146dfc75825bc8057968c581bfe9d3285e0d7b4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-04-25 09:40:34 +03:00
Jukka Rissanen ad2e661569 net: Enable TCP support
User can enable TCP server (listening socket) support in the
IP stack. This commit does not yet have TCP client (connecting
socket) support.

Change-Id: I75dd02a81addc1d1e026463b53631d56378157df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-04-25 09:40:32 +03:00
Johan Hedberg 560956c54d Bluetooth: Kconfig: Split debug selection into a choice
This prepares for adding other debug types besides the printf-style
logging to the console.

Change-Id: Ic2ed305192491734da991c4f61fdaace03fd60f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-20 17:46:09 +03:00
jgarcia 7b8d89d921 net:apps: zperf application
zperf is a network traffic generator for Zephyr.
Same application is able to work dynamically in client or server mode.
It allows to assess network bandwidth.
zperf is compliant with iperf_2.0.5.
zperf can be run in micro or nano kernel.

Change-Id: Icbd69e1ad56ad29c678b098e7a2e07c44f90e48e
Signed-off-by: jgarcia <jeremie.garcia@intel.com>
2016-04-18 06:07:02 +00:00
Tomasz Bursztyka af33e21017 net: Test random is necessary to use CC2520 as radio driver
It will not build without it. Generalize it then.

Change-Id: I334586f629de1f057e654a13a1c705cd559b44d8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-14 07:49:22 +00:00
Ravi kumar Veeramally 61372c4ece net: apps: Move Makefile.ipstack to common folder
Makefile.ipstack is more generic to net applications which
communicate through slip or between two qemus. So net apps
common folder is right place for it.

Change-Id: I57ca1eeaff28b853609daf92772361406131aa7e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-16 11:40:17 +00:00
Ravi kumar Veeramally b19f7fe5f4 net: apps: Add prj_qemu.conf files for dtls apps
Add prj_qemu.conf files for dtls_server and dtls_client. Now
it can be tested between two qemus running 802.15.4 dummy driver.

Change-Id: Id94492f90539025854063662c2f0750a0b9ca845
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-16 11:39:06 +00:00
Jukka Rissanen c07ac4d072 net: apps: Change dtls-client to use common testing header file
Move network testing setup from dtls-client to common net_testing.h
file which makes the application much simpler.

Change-Id: I5a727325c22f98170f12620629898e5ed052b707
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:46 +00:00
Jukka Rissanen 8399fc4b3d net: apps: Change dtls-server to use common testing header file
Move network testing setup from dtls-server to common net_testing.h
file which makes the application much simpler.

Change-Id: Iacd99917cda3efc4cd92d0f48a8cbbc259ef7a84
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:23 +00:00
Jukka Rissanen d8c495f24b net: apps: Fix connectivity between echo-server and client
If the echo-server and echo-client are run in real hw, then
we need to add the used IPv6 prefix to the system. Otherwise
the client is not able to send anything because there is no
route to 2001:db8::/64 network that is used in these examples.

Change-Id: I3a00b77acf1329b3e448bd62ec38cc408c0bd086
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 15:11:23 +00:00
Ravi kumar Veeramally a77ab4f4e2 net: apps: Update CoAP apps to use net_testing header file
Update CoAP apps project configuration files and also update
according to common net_testing header file.

Change-Id: I09294dfd71e3d0cac980be4ae6d142cc3a59d85c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-14 16:11:51 +02:00
Jukka Rissanen b650e8edb1 net: apps: User can set the loopback test count
User can set the desired number of network packets that are
sent. There is an example config that sends 10000 packets
and then stops the test application.

Change-Id: I5aa9049236f7bebdc9ea9997b9eb1f672c6adcbf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 12:45:07 +00:00
Jukka Rissanen b8f28079ec net: apps: Fix the loopback test application
The loopback test application works now and it verifies that
the data sent is the same as data received. This fixes the
issue described in bug ZEP-101.

Change-Id: I1babfab4db9d4df0e769711aa41983366a8b5065
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-14 12:44:58 +00:00
Luiz Augusto von Dentz 1d523c3faf Bluetooth: IPSS: Move sample service to gatt
This moves IPSS sample code to samples/bluetooth/gatt which shall become
the default place for GATT related samples that can be reused.

Change-Id: I04089f6e43bfcc30ee1c7cc766620f19e3dad08e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-03-11 11:29:13 +02:00
Jukka Rissanen efe0d36c7d net: apps: Change echo-client to use common testing header file
Move network testing setup from echo-client to common net_testing.h
file which makes the application much simpler.

Change-Id: Ib1a90b9d87014b7f9adc5f6865ce0fc9faa13422
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-11 07:26:12 +00:00
Jukka Rissanen ed4f794ac8 net: apps: Change echo-server to use common testing header file
Move network testing setup from echo-server to common net_testing.h
file which makes the application much simpler.

Change-Id: I6f68826916c870ad7db597d30f20245bada70091
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-11 07:26:12 +00:00
Jukka Rissanen b3c8b5fa19 net: apps: Common routines used in qemu testing
Collect common routines used in every network sample application
into same file. These routines are used when testing with
qemu and slip.

Change-Id: I02f20b3a9bfa1e886846801b22f43a1d06c59930
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-03-11 07:26:11 +00:00
Ravi kumar Veeramally 325eb61a6d net: apps: Add qemu support without monitor tool
Echo-server and client will exchange data without monitor
tool support.

Change-Id: I3cf73a4baf025bf7e5fc634bef696d5f0e6b4c57
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-09 08:36:46 +00:00
Ravi kumar Veeramally fe67b69cd0 net: apps: Add separate prj_qemu.conf for board type qemu
Add separate prj_qemu.conf files for qemu_86 board type. Also
remove set_options from Makefile.ipstack which is not required now.
Now build the echo-server with "make server NET_IFACE=qemu" and
echo-client with "make client NET_IFACE=qemu" command options.

Change-Id: I1f3c9c6a198f2b6cae54ae4a5da970b284ef84de
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:30 +00:00
Ravi kumar Veeramally 4e2023c663 net: apps: Fix echo apps Makefile
Add bt related qemu flags only when BT is enabled.

Change-Id: Idc611dcf7726829ed77c3f4898abd794a825212f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-03-03 07:17:29 +00:00
Luiz Augusto von Dentz 0401d5a54a net: dtls_server: Add support for Bluetooth
This enables using dtls_server with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
dtls-server are actually tested with NETWORKING_WITH_BT.

Change-Id: Ice4f409c8e2d9e97856159482969f6352264864b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:35 +00:00
Luiz Augusto von Dentz 758b159120 net: dtls_server: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: Ia8ab6898d340967759a8ecbda65c4bcacdc0293e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:20 +00:00
Luiz Augusto von Dentz f32a837c9b net: coap_observe_client: Add support for Bluetooth
This enables using coap-observe-client with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
coap-observe-client are actually tested with NETWORKING_WITH_BT.

Change-Id: I02705f855c1974b065557986f9b231201ba310a7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:03:08 +00:00
Luiz Augusto von Dentz 86a4eeb740 net: coap_observe_client: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: I80b97d51cb321d84df417f8722e661d944504d4f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:02:52 +00:00
Luiz Augusto von Dentz 59fa70e8ff net: coap_server: Add support for Bluetooth
This enables using coap_server with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
coap_server are actually tested with NETWORKING_WITH_BT.

Change-Id: I58b286520da0e0e4cba77dd52ea3f64f0268582a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:01:34 +00:00
Luiz Augusto von Dentz c21de2eeb5 net: coap_server: Avoid using #ifdef and #ifndef
It is prefered to use #if (!)defined form for checking defines since it
can actually check more complex conditions.

Change-Id: I2080377b4b95e9d973e8c0753ae66dba151372e6
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-29 13:01:22 +00:00
Luiz Augusto von Dentz ccb00e01b0 net: echo_client: Add support for Bluetooth
This enables using echo_client with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
echo_client are actually tested with NETWORKING_WITH_BT.

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

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

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

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

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

Change-Id: I9aa817c388e3f673a6597801813dd1d0a8feb6b5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-19 12:35:12 +00:00
Jukka Rissanen 1b4271baef net: apps: Fix style issue
Add spaces after a list of values as required by checkpatch script.

Change-Id: I04bd8af8195e3966fd2b9c36ead49483030eae18
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-18 12:51:27 +00:00
Luiz Augusto von Dentz ce83b0f955 net: echo_server: Add support for Bluetooth
This enables using echo_server with Bluetooth by passing
CONF_FILE=prj_bt.conf, it is also enabled for testing so changes to
echo_server are actually tested with NETWORKING_WITH_BT.

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

Change-Id: I59c6fff1f2d4e950f9ae64adb9f8833ef0fea4d0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-18 12:16:18 +02:00
Jukka Rissanen a63f175d44 net: apps: Resend failed message once in echo-client
If the reply for a sent message is not received, then try
to send it once again. If the second resend fails, then mark
the packet as failed.

Change-Id: Ibe9b9384e2e84f055c6486a5bd4d7293675e5d42
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-17 13:07:54 +00:00
Jukka Rissanen feff518981 net: apps: Disable multicast sending in echo-client
In order to test unicast sending properly, disable multicast
sending temporarily.

Change-Id: If90acf003910a954770caa53825116d2a9ddadc1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-17 13:07:18 +00:00
Jukka Rissanen 36605e6182 net: apps: Make sure CoAP server works with IPv6 ND
Fixed the IPv6 address handling so that CoAP server works
with default settings when IPv6 neighbor discovery is enabled.

Change-Id: Idd0b0df61aaebed43a9c5a408a192add445cacfe
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-12 15:36:55 +00:00
Jukka Rissanen 5c72abe769 net: apps: Make CoAP server to accept different bearer config
User can now say "make BOARD=xxx NET_IFACE=802154" to compile
IEEE 802.15.4 support into the CoAP server application.
The default is to compile for qemu and use slip.

Change-Id: I2c61ac91d4ae7b2c3611567646028bc751e0419e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-12 15:27:44 +02:00
Anas Nashif 3bf7ee01ea net: apps: Move net samples to one directory instead of per kernel
Consolidate networking tests into 1 directory where possible and put
files under samples/net where possible.

Change-Id: Ieb65e000e1717f4d53058f87e36840a0786d467b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Jukka Rissanen 1fe7ae910a net: apps: Remove obsolete listener application
Change-Id: If26ed436211b40a009f60275ef64bfc9de5da066
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 74df249dd8 move net/buf test under tests/
This test should be under tests and is not a sample.

Change-Id: Ibb42207f72554516a650625a2cf4cc9cb7a0b021
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Jukka Rissanen bef69b7b96 net: apps: Add the non link local IPv6 address in routes
For this demo app, set the 2001:db8::/64 address in routing
table. This way we will be able to pass data using these
addresses. Something like this should not be done in real
networking environment.

Change-Id: I1764d5ae09ab95dd580c6b48d6f368bfe283a6a3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen 5e16d7a355 net: apps: Make echo-client to timeout packet receive
The echo-client will timeout the packet receive after 5 seconds.
This way we at least send something instead of waiting forever
if the packet is lost.

Change-Id: Idc332965786797df4ed04dc8b3ef49af32a3f436
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen 9e79aa6f9d net: apps: echo-server refactoring to work in microkernel
The echo-server uses only one code base for both microkernel
and nanokernel.

Change-Id: I7abdf76dc13c31e4f91d0fd9d3b870ffe20ac71b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen 40bef01a5f net: apps: echo-client refactoring to work in microkernel
The echo-client uses only one code base for both microkernel
and nanokernel.

Change-Id: Ieaf9a969319537286181ba333e3a05bfa0e9363a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen de767512d7 net: apps: Refactor echo-client compilation
Separate setup for different low level bearer. By default the
Makefile will create version suitable for qemu testing using
slip. If one writes "make NET_IFACE=802154" then IEEE 802.15.4
radio specific settings are activated.

Because echo-client does not contain any processor specific
settings, remove the ARM config files and rename the x86
specific ones.

Change-Id: I0608b6172bdd044dd49dedf86477ef8a31391a23
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen 396766531e net: apps: Refactor echo-server compilation
Separate setup for different low level bearer. By default the
Makefile will create version suitable for qemu testing using
slip. If one writes "make NET_IFACE=802154" then IEEE 802.15.4
radio specific settings are activated.

Because echo-server does not contain any processor specific
settings, remove the ARM config files and rename the x86
specific ones.

Change-Id: I2caf26979f32496c6efb4dd1f625a60e3e5f6744
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Ravi kumar Veeramally a4963cea35 net: apps: Update echo-server and echo-client IPv6 address
Address configurations for different Kconfig options is difficult
to test under different environments. Make it simple at the moment.

Change-Id: I689649b11b4ccb1cf1ff0e90720fa03b6dc3656b
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:25:32 -05:00
Ravi kumar Veeramally 838961af9a net: apps: Modify echo-client to send data only after reception
Modify echo-client to send packet after packet received from
server and wait unlimited ticks. Current behaviour flood messages
to server irrespective of reception at server end. Modified
behavior only for nanokernel at the moment.

Change-Id: I6aa20c5b9fc9d6d1cf8f996e90735f5d2b986e5a
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:25:32 -05:00
Jukka Rissanen 6956fe1670 net: samples: Fix echo-client compile error for microkernel
Change-Id: Id1a40244543744b60971dd6321edf1aadd02108a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:25:32 -05:00
Ravi kumar Veeramally 0a97b09b0e net: samples: Fix BOARD to qemu_x86
Emulation is not supported on basic_minuteia, only qemu_86
supports emulation.

Change-Id: Id1adc6db02aa22c86207db77fb16ac7548e09dac
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:25:18 -05:00
Peter Mitsis d63a4f7bf7 nano_timers: Simplify nano_xxx_timer_test() API family
Simplifies the nanokernel timer API so that the timeout parameter must be
specified when invoking nano_isr_timer_test(), nano_fiber_timer_test(),
nano_task_timer_test() and nano_timer_test().

This obsoletes the following APIs:
	nano_fiber_timer_wait()
	nano_task_timer_wait()
	nano_timer_wait()

Note that even the though the new API requires that the timeout parameter
be specified, there are currentl only two acceptable values:
	TICKS_NONE and TICKS_UNLIMITED

Theoretically, the current implementation would allow one to supply a
finite positive value for the timeout and the system would wait up to
that many ticks for the timer to expire. However, it is thought that
that unnecessarily complicates the nanokernel timer model and so it is
left as an unsupported option.  Should that change, then that feature
could be enabled by updating the documentation.

Change-Id: I8835c5342ab5025d6f70fdfbed54a50add7568d7
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:15 -05:00
Peter Mitsis 54b782a88b nano_sema: Simplify nano_xxx_sem_take() API family
Changes the nanokernel semaphore API so that the timeout parameter must be
specified when invoking nano_isr_sem_take(), nano_fiber_sem_take(),
nano_task_sem_take() and nano_sem_take().

This obsoletes the following APIs:
	nano_fiber_sem_take_wait()
	nano_fiber_sem_take_wait_timeout()
	nano_task_sem_take_wait()
	nano_task_sem_take_wait_timeout()
	nano_sem_take_wait()
	nano_sem_take_wait_timeout()

Change-Id: If7a4bce1bd8ec8d6410d04f3c16ff1922ff0910e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:14 -05:00
Anas Nashif 10bb38c186 Use SoC instead of platform.
Change terminology and use SoC instead of platform. An SoC provides
features and default configurations available with an SoC. A board
implements the SoC and adds more features and IP block specific to the
board to extend the SoC functionality such as sensors and debugging
features.

Change-Id: I15e8d78a6d4ecd5cfb3bc25ced9ba77e5ea1122f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif dcf046c72d rename basic_atom with minnowboard
Use a real board name that can run this kernel instead of a generic
name. Basic functionality exits on this board with Zephyr.

Setup of the board is mostly similar to what we have in galileo (EFI
based)

Change-Id: Ic8554f26dcac0dbbbb6d35d863482f6207dc63c5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Anas Nashif c740608ce5 Use BOARD instead of PLATFORM_CONFIG
Change-Id: I14db0087cd705df0db8a911071bc3949b5c79314
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:11 -05:00
Peter Mitsis 40eba989e2 semaphore: Simplify task_sem_take() API family
Changes the semaphore API so that the timeout parameter must be specified
when invoking task_sem_take() thereby obsoleting the following APIs:
	task_sem_take_wait()
	task_sem_take_wait_timeout()
	_task_sem_take()

Change-Id: I746d5c966a3b81ffe014333af51aa10ea8a63263
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:25:05 -05:00
Anas Nashif f6f81868f8 build: Remove PROJECTINCLUDE from application makefiles
PROJECTINCLUDE is not required in app makefiles.

Change-Id: I3751b7c51c453dfe47d207bb11d171138668c4e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:25:04 -05:00
Sergio Rodriguez 2e2ad8166e qemu: Creation of QEMU specific platforms
Setting up new platforms to handle emulation, and make them the only
ones able to run on QEMU from the Makefile "qemu" target to avoid
confusion with other platforms. We have now platform qemu_x86 and
platform qemu_cortex_m3, also modification to the sanity checks to have
qemu support only on those platforms

Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I9291918a1d58fea4f37750ada78234628f9a5d98
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:56 -05:00
Jukka Rissanen 36c372d8cd net: 802.15.4: Loopback test app needs bigger TX fiber stack
Because of the way the loopback tester works, it needs much
bigger stack when sending packets in TX fiber.

Change-Id: I360f0cf1f35e654cb139565f19f24628fb5ab5ee
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:51 -05:00
Ravi kumar Veeramally ef017fe761 net: apps: Fix incorrect ip buf app data length
ip_buf_appdatalen should be user_data->expecting otherwise
it is zero.

Change-Id: Iedb61a7f0e3516a5643da04b5963a2e241fd8bc9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:47 -05:00
Ravi kumar Veeramally 743de006ad net: apps: Fix function name in dtls-client
Change the init function name to have client string in it,
it is more logical that way.

Change-Id: Ie282151562620858dc78563f2a4e63f7fb4fc472
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-02-05 20:24:47 -05:00
Jukka Rissanen 809f8ca16e net: apps: Fix compile error of coap-observe-client
Include path was missing.

Change-Id: I29c1b31143fe4d03cde5bd0cd63319960b817322
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Jukka Rissanen 0179583391 net: Fix the include paths in Contiki sources
Fix the include paths in Contiki sources so that we do not
have to create links to include directories during compilation.

Change-Id: I9316f1e90474e0ee563557deadd0bdc321cbb0fa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Jukka Rissanen 2272312b8d net: Refactor code to use new generic net_buf API
Change-Id: Id008bbf43062ca0641a76edaabef47c650287444
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:46 -05:00
Jukka Rissanen 736e8b1bf9 net: test: Remove the test_15_4 testcase temporarily
The test causes random failure so remove it temporarily.

Change-Id: I0b74877ad27d673099d0eecb191b6978bf9b40ee
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:40 -05:00
Johan Hedberg b620f6a5ae net: samples/buf: Fix Kconfig option name
Change-Id: Ib120b2a746aa319b7c0ea943e23a83b45aefaf31
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:24:40 -05:00
Jukka Rissanen bd5d503fc6 net: Rename samples/network to samples/net
Networking code is in net directory in other parts of the
code base so rename network -> net in samples directory.

Change-Id: I0ca0188c6844b0957270398d08b85a3153819e97
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:24:39 -05:00