Commit graph

1640 commits

Author SHA1 Message Date
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