Commit graph

188 commits

Author SHA1 Message Date
Tomasz Bursztyka
7a19370f84 sample: net: Updating qemu config for 802.15.4 testing
Removing useless options, refining the logging and of course setting the
right IP to make it work.

Change-Id: I0c0c1979d590bc4c4fcb3a1d1a252b87b0153511
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:56 +01:00
Tomasz Bursztyka
e7af4b8947 samples: net: Fix echo applications setting for 15.4
When zephyr receives a 15.4 frames it allocates 1 RX buf (nbuf) and 1
DATA (buf), and it gets queued on net stack for post processing.

Problem: receiving a lot of frames is just completely nominal and very
fast (timing is critical in radio, and the rx thread of the radio driver
has a high priority, much higher than net stack's rx post processing).
So guess what happens when CONFIG_NET_NBUF_RX_COUNT=10 though let's say
12 packets are coming in?

The RX buffer pools gets empty and soon the system hangs on getting a
newly allocated one.

This proper CONFIG_NET_NBUF_RX_COUNT tweak fixes the issue, however some
future work will reduce the need of so many RX meta buf:
- l2's recv could be called right away at net_recv_data, before queuing
  the buffer for post-processing, but this could affects reception
  timing on radio side, which is critical.
- An l2 pre-processing (in the middle of what current l2 recv does)
  could be implemented, it would be technology depenedent (aka: not
  mandatory on all l2) and could quickly decide what to do and at best
  drop the whole, or at least drop the RX meta buf (frag would still be
  kept). Let's see.

Jira: ZEP-1427

Change-Id: Ic75b02efa36e35b450c02b3e6439a8d73f03f839
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:56 +01:00
Andrei Emeltchenko
e27e1e73e1 samples: net: Fix compile error following frdm pinmux change
Fixes echo_client and echo_server samples.

Fixes compile error:
...
src/built-in.o: In function `fdrm_k64f_cc2520_pinmux_setup':
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
...

Change-Id: I590f88f6bd083a30deea77fa860f001a3a55b278
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-12-16 19:14:53 +01:00
Tomasz Bursztyka
89dc7ed78a samples: echo apps: Use Kconfig options to setup IPv6 on cc2520 config
Change-Id: If2e6f577cee53e0a4362c4b6ba12886ff1cfdcdd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:52 +01:00
Luiz Augusto von Dentz
88bd2f9560 net: echo_server: Enable Bluetooth support
This enables Bluetooth L2 driver with CONFIG_NET_L2_BLUETOOTH and
removes CONFIG_NETWORKING_WITH_BT which has been deprecated.

Change-Id: I6f8b0e756f6e066b4b9cf9dec22f52fd72155c98
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-12-16 19:14:52 +01:00
Tomasz Bursztyka
572f41a464 samples: net: echo apps: Add cc2520 configuration for frdm_k64f
Common code found in samples/net/common
App is built with:
make BOARD=frdm_k64f CONF_FILE=prj_frdm_k64f_cc2520.conf

Note: debug messages are enabled on many parts of the system, and these
are killing the timings. So it's not unusual at all to see rx errors on
cc2520 side. Without most of the debug, much less error will occur (if
any when dbg is fully disabled).

Change-Id: Ib6f0868c300652270661e72e80108804308164ab
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-16 19:14:52 +01:00
Tomasz Bursztyka
f3c1b442ba samples: net: echo apps: Add cc2520 configuration for arduino_101
CC2520 is not embedded on an arduino_101, it is however possible to wire
one, and thus it requires to provide cc2520_configure_gpios() function.
This one, being common to a101 is found in samples/net/common.

Change-Id: I86f2734847edb3f6a968522afccc3099ed854d13
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:20 +02:00
Jukka Rissanen
79e2178040 samples: net: Do not quit echo-server if sending fails
If we cannot send a network packet, do not quit as that is
really not necessary here.

Change-Id: I7613d46bdbc849b75aaf0fc71c58beba810fd658
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:19 +02:00
Jukka Rissanen
6c02719125 samples: net: Use qemu_x86 config file by default for echo apps
As the default board is qemu_x86, make sure there is similarly
named config file that can be used by default.

Change-Id: Ibc480d3b4eecc2601e3670c8da19be9c01833c36
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:19 +02:00
Jukka Rissanen
2631995fa9 samples: net: Use board specific conf file for echo apps
Use by default a board specific config files for both
echo-server and echo-client sample applications.
This makes more sense than using the network technology specific
config file that was used earlier.

Change-Id: I155fc138f4b0ed1166f4e25267513afc3fb6fd76
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:19 +02:00
Jukka Rissanen
7ebcf7398a samples: net: Remove prj.mdef file from echo sample apps
Change-Id: I6edb869a5998d47338dfb04e7ed8ee1aee8c1cb8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:18 +02:00
Jukka Rissanen
7048c992fb samples: net: Convert the echo apps config files to native stack
Remove legacy stack artifacts from the echo-server and echo-client
config files.

Change-Id: Icc591b9540495c4ee181517369b0df9bb91972bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:18 +02:00
Jukka Rissanen
68ea9377e6 net: Make native IP stack the default
As the native IP stack is now the default, there is no need
for corresponding Kconfig option.

Change-Id: I08e4992f540f928a2b7378e8803e634e38725348
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:17 +02:00
Jukka Rissanen
6b43821f20 net: Remove legacy Contiki based uIP stack
This commit removes the legacy Contiki based uIP stack.
The new native IP stack must be used after this commit.

The commit also removes following things:
- legacy cc2520 driver
- legacy ethernet drivers
- legacy IP stack samples

and changes these things:
- disabled tests that only work for legacy IP stack
- select new IP stack by default
- enable random number generator by default as it is needed
  by the new IP stack

Change-Id: I1229f9960a4c6654e9ccc6dac14a7efb9394e45d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:17 +02:00
Jukka Rissanen
b3077ab4e7 samples: net: Fix echo-server compilation error
My IPv4 address was missing because of complex set of #ifdef's.

Change-Id: I6768587d3e104a57c10756bc43267f26068aa3cb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:15 +02:00
Jukka Rissanen
a870dffa7f samples: net: echo apps can use IP address set in config file
The used IPv6 or IPv4 address can be set in the config file.
This way one does not need to edit the source file to setup
the desired IP address.

Change-Id: Ic900bd4694481b4b035026ad0ba7b9280eb84e4a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:14 +02:00
Jukka Rissanen
876b7a9b10 samples: net: Bind to any IPv4 address by default
Let the echo-server listen any configured IPv4 address
by default.

Change-Id: Ib83c5e069ae1e26615c37fa980bc4009b5a5e40c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:14 +02:00
Jukka Rissanen
0cc43a62ac samples: net: Do not use static address in DHPCv4
If user has enabled DHCPv4 support, then do not try
to set static IPv4 address.

Change-Id: Ia359f578044d72b951f53c509c92c09d575207f0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:14 +02:00
Leandro Pereira
2543b2f6ee samples: net: Finish TCP support in echo server
This adds the required code to echo server so that it works with TCP as
well.

Change-Id: Ib45dd91a52a60ddb4d8f0ae11175ceb52199c398
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2016-12-02 12:41:12 +02:00
Tomasz Bursztyka
2dd1b5df0f samples: net: Use uart-pipe for 802154 iface in echo apps
This is meant to test echo applications with 802.15.4 L2 directly in
qemu.

Change-Id: I0edccd8c39360421dc77e0064147221d86877bdf
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:09 +02:00
Jukka Rissanen
26ea431c5f samples: net: echo apps: Do not set preferred IPv6 address
Previous commits support auto configured IPv6 addresses so no
need to manually tweak the address settings.

Change-Id: Ie641212981a04229721c84990a54876977d9cfc4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:08 +02:00
Jukka Rissanen
7e9eaaacb9 samples: net: Fix echo-server UDP packet sending
This commit fixes the case when we receive large amount of
data and then copy it into new fragments. If the MTU is larger
than the fragment size, then it is possible that we might
overwrite net_buf memory and crash. This is typical in ethernet
network.

Change-Id: Ib1c65819c3bc718ec04f558e3df235246b5655dd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:08 +02:00
Jukka Rissanen
f836032d39 samples: net: Bind any IPv6 address by default in echo-server
This commit allows echo-server to listen all defined addresses
specified to its network interfaces.

Change-Id: I52874210f6987c75d7921e514399a9eda55911bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:07 +02:00
Tomasz Bursztyka
3964a6cef3 samples: net: echo apps: Using unified kernel API
Dropping legacy API.

Change-Id: Ib1f2fbffddde02ea97ad2cb665d7fda77248d936
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:07 +02:00
Tomasz Bursztyka
d604bb98c3 samples: net: Add CC2520 dedicated prj.conf files for echo apps
Change-Id: I264a1577a176d37793a475e9605694d9d988fc69
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02 12:41:04 +02:00
Jukka Rissanen
06a408e16c net: apps: Set the IPv6 source address preferred for echo-server
Forcefully set the IPv6 address in echo-server so that we
can use that address when sending data. Normally this should
not be done like this as the system should autoconfigure itself.

Change-Id: I99041539c50f994f5d3ddaabaf5cac8599d82078
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:41:03 +02:00
Jukka Rissanen
5f3f331d48 net: Adapt to new behavior of net_buf_frag_add v2
This change is related to patch called
"net: Adapt to new behavior of net_buf_frag_add"

This version removes extra net_nbuf_unref() from
the code. The unref was done because net_buf_frag_del()
did not remove the double ref from the list element.

Because of the other patch, the list does not have
double ref any more, so we need to remove the extra
unref in couple of extra places.

Change-Id: If90e01c24b9b4e68afbfa283850d2a1ecb3065ed
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:54 +02:00
Jukka Rissanen
ddda50c214 net: tcp: Initial TCP functionality
This creates initial TCP handling logic but does not yet
enable fully working TCP connection.

Some of the connection logic is taken from FNET TCP
implementation.

Origin: FNET 3.6.1
URL: https://github.com/butok/FNET/blob/master/fnet_stack/stack/fnet_tcp.c

Change-Id: I1e100d9fa9c91437562b933d94d0bd3db1a5885e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:51 +02:00
Paul Sokolovsky
4de34b3914 net: apps: Fix echo-server where IPv6 TCP context was used instead of IPv4
Apparently a copy-paste error.

Change-Id: I55aac4231384cbd95394f08a4c4f9c717aae5248
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-12-02 12:40:51 +02:00
Juan Manuel Cruz Alcaraz
92539f21fc enc28j60: Modify echo server and client samples to support enc28j60
Extends the echo server and echo client samples to work with YAIP
network stack with ethernet L2 layer and ENC28J60 ethernet device
on Arduino 101 boards.

Jira: ZEP-859

Change-Id: I242e5555aff18741bf00a551424b081b5396f4b3
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-12-02 12:40:50 +02:00
Ravi kumar Veeramally
eff902b4c7 net: tests: Add include dir only when specific options enabled
Change-Id: I2119c6e08b0d13c6a6849b46f210196b07b8d51e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-12-02 12:40:26 +02:00
Jukka Rissanen
58a7ada44c net: Add network address length to user API
Add socklen_t addrlen parameter to net_context_bind(),
net_context_sendto() and accept callback.

Currently the address length option is not really mandatory
as we can figure out the length from the address family.
But if we are going to support other protocol address families
it might be needed.

Change-Id: I59206465c3259050c469c5b2150221646a9a08d7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:24 +02:00
Paul Sokolovsky
5d7be031f3 net: samples: Fix the echo-server IPv4 address
When running echo-server in the Zephyr device (either a real
device or qemu), set the IPv4 address to be 192.0.2.2. The host
IPv4 address should be set to 192.0.2.1 in this case. This change
is similar to IPv6 address change made earlier (now both IPv4 and
IPv6 addresses on device side end with "2", on host side, with "1").

Change-Id: I639b7be4403b4b2f38f01675d0ef56eaabf0f82c
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-12-02 12:40:23 +02:00
Jukka Rissanen
9231f41f52 net: samples: Fix the echo-server IPv6 address
When running echo-server in the Zephyr device (either a real
device or qemu), set the IPv6 address to be 2001:db8::2.
The host IPv6 address should be set to 2001:db8::1 in this case.

Change-Id: Ia967cecabece4b06a2f5a12b11c68a9de4aeb2af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02 12:40:22 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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