Commit graph

1640 commits

Author SHA1 Message Date
Ulf Magnusson 9c9eb3452b kconfig: Fix some formatting nits
Same deal as in commit bd6e04411e ("kconfig: Clean up header comments
and make them consistent") and commit 1f38ea77ba ("kconfig: Clean up
'config  FOO' (two spaces) definitions"), for some newly-introduced
stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-21 10:30:02 -05:00
Andrei Emeltchenko cd7fdd7d58 samples: wpanusb: Allow to build for general boards also
This enables build for boards with usb and ieee802154 like reel_board,
etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko c87384875c samples: wpan_serial: Allow to build for more boards
Allow to build also for general boards with supported ieee802154 and
usb, like reel_board, etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko d78a06428a samples: wpan_serial: Refactor wpan_serial
Refactor code simplifying packet processing, removing unneeded
semaphore, etc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 292efefaf3 samples: wpan_serial: Use logger hexdump helper
Remove hexdump() based on printk and use standard logger helper.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 8315420df0 samples: wpan_serial: Take into account bytes written
uart_fifo_fill() returns number of bytes written, use helper to write
all bytes.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko f4f9dc6005 samples: wpan_serial: Update README
Update README and reformat it to rst.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 80e4321a5b samples: wpan_serial: Create cc2520 overlay
Create cc2520 overlay file. Can be used with:

cmake -DBOARD=quark_se_c1000_devboard \
  -DOVERLAY_CONFIG=overlay-cc2520.conf ..

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Andrei Emeltchenko 095d8070db samples: wpan_serial: Allow to use other 15.4 devices
This allows to select different IEEE802.15.4 chips instead of
hardcoded cc2520.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-12-20 23:02:42 -05:00
Emil Obalski d65027d8c0 usb: samples: Application calling usb_enable by itself
User app is reponsible for issuing usb_enable and
making USB hardware operative.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2019-12-19 13:08:55 +01:00
Paul Sokolovsky feac5c1c45 Revert "samples: sockets: Don't open the socket if the test protocol is enabled"
This reverts commit da0f3311ff. It was
clearly intended to be a debugging aid when developing TCP2, not
intended for mainline. This fixes building this sample on POSIX
systems with Makefile.posix.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-12-17 18:09:19 +02:00
Jukka Rissanen 51fc680ba2 samples: net: google_iot_mqtt: Do not compile by sanitycheck
The sample needs key.c file but that cannot be generated by
sanitychecker. So disable compilation by sanitycheck.
Eventually we should make it possible to compile the sample
using some pre-defined values so that the sample will not
bit-rot but that is for later.

Fixes #21450

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-17 15:44:55 +02:00
Ravi kumar Veeramally 523a88ea4f samples: net: cloud: Move cloud based samples
MQTT Azure and Google IoT samples are based on cloud
infrastructure. It would be nice to place all cloud
based samples in one single folder.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-12-17 08:33:52 +02:00
Alberto Escolar Piedras 0b8678a2b0 samples & tests: Correct main() type
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).

So, correct the different samples and tests that were defined
otherwise.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-12-16 11:27:56 +01:00
Ravi kumar Veeramally f1a1e5382e samples: net: mqtt: Add a sample to connect to Azure
This samples demonstrates how to connect to Azure Cloud
IoT hub which is based on MQTT protocol. User has to
create an account in Azure Cloud and provide those details
using Kconfig options. This sample first acquires DHCPv4
address and opens a secure connection with Azure cloud.
Then opens a MQTT connection and publish messages randomly.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-12-16 11:42:06 +02:00
Vincent Wan f1c0eb915b samples: http_get: connect without TLS by default on cc3220sf_launchxl
The example should work on the cc3220sf_launchxl by following the same
flow as on other boards, ie. by connecting with plain http by default
and use TLS only when an overlay is specified. We update the
configuration for cc3220_launchxl to not use TLS by default and the
README to point users to the right overlay file to use.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-12-12 10:53:26 -06:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Kumar Gala 9415a114a0 include: Fix use of <json.h> -> <data/json.h>
Fix #include <json.h> as it has been deprecated and
should be #include <data/json.h>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-12-10 08:39:37 -05:00
Jukka Rissanen 0297e7ec15 samples: net: zperf: Ignore out of net_buf issue
If we ran out of net_buf's while sending, ignore the issue
and try to finish the test instead. Solving the "running out
of network buffers" case would require careful tuning of
number of network buffers, buffer size, upload speed etc. which
is difficult to solve with generic buffer count options.

The user should tweak mainly the CONFIG_NET_BUF_TX_COUNT option.
Optionally CONFIG_NET_PKT_TX_COUNT can be changed too. Information
about these options is printed to console after the test is finished.

Fixes #20315

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-10 10:00:53 +02:00
Jukka Rissanen 3dcefbb316 samples: net: echo-server: Generate coverage report
Add "sample quit" shell command which can be used to stop the
sample application and allows the generation of coverage report.

Fixes #21099

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-09 16:34:18 -05:00
Ulf Magnusson 2bd6858db4 samples: syslog_net: Remove ref. to CONFIG_SYS_LOG_BACKEND_NET_SERVER
The definition was removed in commit 7ccc7889fa ("logging: Remove
SYS_LOG implementation").

Adding detection of unused symbols in samples and tests to CI.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-09 12:55:07 -05:00
Robert Lubos 6b2a371272 samples: net: Remove redundant frdm_kw41z configs from echo samples
echo_client and echo_server configuration for 802.15.4 and OpenThread is
covered by overlay files and default board configuration. Board-specific
configuration for frdm_kw41z was redundant in this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-12-09 12:47:45 -05:00
Erwan Gouriou fc65ab137e samples/net: civetweb: Remove SOC_SERIES_SAME70=y in prj.cnf
For some reasons SOC_SERIES_SAME70 was selected in civetweb sample,
which prevents build on other platforms.
This issue was silent since sample yaml file limits sample testing on
sam_e70_xplained.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-11-27 15:18:31 -05:00
Oleg Zhurakivskyy 516525fcd8 samples: net: echo-server: Increase the stack size for the coverage
echo_server crashes if the coverage is enabled due to the insufficient
stack size.

Use bigger stack size when the coverage is enabled.

Fixes #20797

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-11-27 10:14:20 +01:00
Ravi kumar Veeramally bb40f9b0cd samples: net: Fix WS client Coverity issue
Close the socket and return the error.

Fixes #20508
Coverity CID :205634

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-11-26 08:22:35 -05:00
Peter A. Bigot a58d8ebaa6 driver: uart: make deprecation effective
Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings.  Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.

Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-11-07 12:44:15 -06:00
Jukka Rissanen c03af056a0 samples: net: zperf: Clarify that only iPerf 2.0.5 is supported
As the iPerf2 protocol is not documented properly, depend on
exact iPerf 2.0.5 version when testing.

Fixes #20313

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-11-05 09:29:15 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Jukka Rissanen 0f30bb23ab samples: net: echo-server: In case of socket error quit the app
Quit the accept loop if there is a socket related error as there
is no point of continuing in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-28 13:58:59 +02:00
Torstein Grindvik b422e4a8ea samples: Add PSK support for echo client/server
PSK support is added to echo-client.c and echo-server.c.
If enabled, a header is included which contains the PSK.
If the default dummy PSK header is used, a warning is issued.
The header can be changed via Kconfig.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2019-10-28 13:02:29 +02:00
Anas Nashif 8d22fd9263 updatehub: move header to library
Not a top-level zephyr core API and tied to third party environment, so
move it to where the code is in lib/updatehub.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-10-25 18:20:20 -04:00
Daniel Leung b7eb04b300 x86: consolidate x86_64 architecture, SoC and boards
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.

() Removes the x86_64:x32 architecture and SoC, and replaces
   them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
   qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-10-25 17:57:55 -04:00
Oleg Zhurakivskyy 807662bf52 samples: net: echo-server: Increase the stack size for TCP2
Executing on qemu_x86 leads to stack overflows.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy da0f3311ff samples: sockets: Don't open the socket if the test protocol is enabled
In order to be able to run the sanity check, don't open the socket
if the test protocol is enabled.

Also add a debug print at the recv().

This commit will be dropped:

- As soon as the sanity check site accomodates
- As soon as the integration is complete

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy 2435629f61 net: tcp2: Add an overlay to enable E1000 Ethernet
This overlay is for the validation purpose.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy c08ebf6726 net: tcp2: Add an overlay to set the debug log levels
This overlay is for the validation purpose.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Oleg Zhurakivskyy 3dbbafb1d5 net: tcp2: Add an overlay for TCP2
Add an overlay for TCP.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2019-10-25 14:33:37 +03:00
Jukka Rissanen 50f30919df samples: net: Add a multithreaded dumb HTTP server
This adds a multithreaded dumb HTTP server sample application similar
to dumb_http_server with following differences

* support both IPv4 and IPv6 simultaneously
* support multiple incoming connections
* support TLS connections
* ignore POSIX compatibility

This app can be used for testing. Note that the app will always
serve a same static HTML page to caller regardless of HTTP request
parameters.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-23 14:43:25 +03:00
Jukka Rissanen 25c8f60fc3 samples: net: dumb_http_server: Using code block when needed
The ab command example needs to be inside code-block.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Jukka Rissanen 41202ba928 samples: net: sockets: Do not reference default board in docs
Some of the socket samples had wrong information about what default
board to use. Currently there is no default board and user must
select the board when building the application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-16 16:47:37 +03:00
Andrei Emeltchenko 3fac9c183a samples: usb: wpanusb: Update documentation
Add sample location and fix incorrect goal for the
zephyr-app-commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-09 17:16:41 -05:00
Peter Bigot 6e5db350b2 coccinelle: standardize k_sleep calls with integer timeouts
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
Jukka Rissanen f2af3b66ff samples: net: mqtt_publisher: Use logging macros for output
Instead of printk(), use logging macros so that all the output
from IP stack and sample is nicely interleaved.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Jukka Rissanen 38f1357780 samples: net: mqtt_publisher: Enable net shell
Network shell is useful to have in order to debug things so
enabling it for this sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Jukka Rissanen cc76c75272 samples: net: mqtt_publisher: Add support for Websocket
Add a possibility to run MQTT over Websocket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 18:48:10 -07:00
Peter Bigot 66c8756956 coccinelle: standardize kernel API timeout arguments
Re-run with updated script to detect missed cases.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-04 16:23:57 -04:00
Andrei Emeltchenko 299c9fedd4 samples: net: Clean up netusb overlay configuration
Clean up configs which do not belong to Ethernet over USB.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 21:23:53 +03:00
Jukka Rissanen b031a5a163 samples: net: websocket: App for doing Websocket client requests
This is BSD sockets based application for connecting to
Websocket server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 16:38:34 +03:00
Jukka Rissanen a07045d8b2 samples: net: http_client: HTTP client sample application
Simple HTTP client sample that connects to HTTP server and does
GET and POST requests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-04 16:38:34 +03:00
Andrei Emeltchenko 3c08b27ddf samples: net: dumb_http_server: Add zero configuration
Adds zero configuration based on LLMNR. This should be working in
Windows out of the box, zephyr can be accessed with http://zephyr/.
Can be combined with netusb configuration (RNDIS is supported in
Windows).

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 10:24:56 +03:00
Andrei Emeltchenko a080154584 samples: net: dumb_http_server: Add netusb configuration
Add configuration for netusb.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-10-04 10:24:56 +03:00
Jan Van Winkel 391076c73e samples: net: echo-server: Init tcp6_handler_in_use for IPv6
Initialize tcp6_handler_in_use instead of tcp4_handler_in_use for IPv6
in start_tcp.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-10-02 10:07:03 +03:00
Jukka Rissanen 7e0d8bcf7a samples: net: echo-server: Add support for multiple listeners
By default only one listener is enabled, but if user specifies
CONFIG_NET_SAMPLE_NUM_HANDLERS with value larger than 1, then
multiple threads are created, and each will be able to accept
connections.

Fixes #19374

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-01 14:21:38 +03:00
Charles E. Youse ce46e0df4d cmake: samples/tests: update cmake_minimum_required() to 3.13.1
Some samples/tests are still referring to 3.8.x versions.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-09-27 23:09:24 -04:00
Vincent Wan 17d0d8e1b3 modules: Kconfig.simplelink: Remove POSIX_API, use fine-grained opts
PR #18780 introduces a way to decouple pthread support from the general
CONFIG_POSIX_API global switch. This commit modifies the build of
SimpleLink components to take advantage of it, since SimpleLink
libraries only require pthread, sem, clock, and sleep support, not
entire POSIX API.

This fixes the build errors in the http_get sample introduced
by the merge of #18736. As such, this patch also removes
cc3220sf_launchxl exclude from sample.yaml of that sample.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-25 20:56:29 -07:00
Paul Sokolovsky be1eac6058 samples: sockets: Fix syntax of combined "filter" clauses in sample.yaml
Now that we have support for properly combine conditions from multiple
"filter" clauses in one sample.yaml file (e.g. from "common" and
test-specific sections), use it instead of previous adhoc syntax
relying on string concatenation.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-19 00:29:41 -04:00
Robert Lubos 324f99e0ac samples: net: Add mbedTLS tweaks in overlay-ot.conf
Add some mbedTLS tweaks for OpenThread in overlay-ot.conf.
Add sample configuration to enable Commissioner/Joiner, disabled by
default.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-09-17 20:07:58 +08:00
Jan Van Winkel 6a6c034749 samples: net: Moved declaration of packet_data
Move declaration of struct packet_data before definition of a variable
of its type.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-09-17 11:27:19 +02:00
Paul Sokolovsky 1858b31536 samples: sockets: sntp_client: Build for both native Zephyr and POSIX
To make sure sntp API plays well with CONFIG_POSIX_API.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-09-12 17:30:29 +03:00
Johann Fischer 75b490efc2 sample: zperf: enable test for the shield link board ETH
Enable test for the shield link board ETH.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-09-12 11:30:19 +03:00
Ravi kumar Veeramally e2b1ec8565 samples: net: coap_client: Fix coverity issue
Ignore socket close() return value in this sample.

Fixes #18961

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-09-10 22:17:54 +03:00
Vincent Wan 3142503ecb samples: net: sockets: disable http_get in test build
Build errors were introduced by the merge of #18736. Until PR #18780 is
approved to allow the SimpleLink libraries to build without
CONFIG_POSIX_API, this patch excludes cc3235sf_launchxl from the test
build.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
Vincent Wan fb0c846db9 samples: net: Adding board config files for CC3235SF
Config files are added to support cc3235sf_launchxl as a new board.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-09-10 10:22:30 +03:00
David B. Kinder 60136f00cb doc: add how to exit from QEMU in samples
While trying out the hello_world sample built for QEMU, I was expecting
the sample app to exit and I'd return to a command prompt.  Nope.  You
need to exit QEMU manually, so add that step to the sample instructions.
Looking around, there are more uses of QEMU like this that could use
this added step after running the sample app.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-02 12:06:08 -04:00
Paul Sokolovsky 5eb974d8e7 samples: net: sockets: Allow to build and test with POSIX subsys
With CONFIG_POSIX_API enabled, these samples now build under Zephyr
with exactly the same source as e.g. Linux (or in general, other POSIX
systems). However, building without CONFIG_POSIX_API (i.e. with
CONFIG_NET_SOCKETS_POSIX_NAMES aux option) is retained for now.

Add testcase definitions to build these samples with CONFIG_POSIX_API
in CI.

Fixes: #17353

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-08-30 07:37:18 +02:00
Jukka Rissanen efecc28609 samples: net: dns: Do mDNS query always if mDNS is enabled
If mDNS is enabled, then do the mDNS query always. Earlier we did
the query after we had received response to the normal DNS query.
Also there is no need to print DNS id for mDNS queries as the id
is always 0.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-29 19:47:07 +02:00
Jukka Rissanen cac26db2bc samples: net: civetweb: Ignore return values
We do not need the return values from various calls to pthread_*()
functions.

Coverity-CID: 203462
Coverity-CID: 203535

Fixes #18376
Fixes #18377

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-27 17:47:27 +02:00
Michael Scott 7492555f88 samples: net: lwm2m: bootstrap support changes:
When LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP is enabled:
- Mark the first server as a bootstrap server
- Create second server and security instances (used by bootstrap
  server)

This allows bootstrap support to be tested out of the box with
the following:
- setup Leshan bss-server-demo (bootstrap server) on port 5783
- setup Leshan server-demo (lwm2m server) on port 5683
- add an entry into the bootstrap server:
  LWM2M Server=coap://[2001:db8::2]:5683
- build the sample like so:
  west build -t run -b qemu_x86 \
    -s zephyr/samples/net/lwm2m_client/ -- \
    -DCONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y \
    -DCONFIG_LWM2M_PEER_PORT=5783

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-24 11:04:25 +02:00
Piotr Zierhoffer 0c378149c4 samples: net: civetweb: Remove an unnecessary config option
CONFIG_NET_SOCKETS_POSIX_NAMES is incompatible with POSIX_API, so it's
disabled by the build system. It's no longer required anyway.

It is a leftover from before #16557 was merged.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-08-23 21:14:16 +02:00
Ravi kumar Veeramally 85ef00deb4 samples: net: echo_client: Add SOCKS5 support
SOCKS5 support added to echo_client. Details are added
in README file about how to verify this feature using
echo-client with echo-server running on Linux host.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-08-17 23:22:06 +02:00
Tomasz Gorochowik 0409dd1ce8 Samples: net: civetweb: add README
Closes: #18212

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-08-16 11:37:54 +02:00
Jan Van Winkel 440aae75c7 samples: Corrected typos in updatehub sample
Corrected typo in board name in updatehub sample

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-08-15 23:11:53 +02:00
Alexander Wachter f8a5b013d7 samples: net: echo_client and echo_server: Add 6LoCAN config
This commit adds a sample configuration for 6LoCAN to the
echo_client and echo_server example.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-08 13:25:01 +03:00
Alexander Wachter 35f01673ac net: l2: 6LoCAN implementation
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-08-08 13:25:01 +03:00
Jukka Rissanen 1c65789d85 samples: net: zperf: Use proper value in k_busy_wait()
The wait time value should be in microseconds.

Fixes #18059

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-08-07 12:24:23 +02:00
Ravi kumar Veeramally fa7a5db12e samples: net: Modify mqtt_publisher to use set proxy
Modify mqtt_publisher sample to use mqtt_client_set_proxy().
Removed CONFIG_MQTT_LIB_SOCKS based setup.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-08-05 13:26:11 +03:00
Michael Scott efa1679806 samples: net: lwm2m_client: support for compiling in new objects
Let's add support for recently added LwM2M objects:
- Connectitiy Monitoring
- Location
- IPSO Accelerometer
- IPSO Buzzer
- IPSO On/Off Switch
- IPSO Push Button

Currently, this is limited to compile enabled and manual creation
of objects via LwM2M server.  Objects will respond to read/write
operations, but not have real HW backing.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 8817d930a8 net: lwm2m: rework resource instance storage / access methods
LwM2M allows for multiple instance resources such the power source
resources in the device object.  These types of resources have
always been very hard to work with, and frankly were poorly
implemented.

This led to other issues where it was very hard to have
non-sequential resource instances, and each resource of this type
needed special getter / setter methods such as:
lwm2m_device_add_pwrsrc()
lwm2m_device_set_pwrsrc_voltage_mv()

Going forward, as more LwM2M objects are implemented this just
doesn't scale well.

To fix this:
- split the resource instance data out from the resource data.
  This includes the data pointer information and resource
  instance id.
- add resource id and resource instance id to the event callback
  functions so user's can see in more detail what resources and
  resource instances are being handled.
- allow generic functions like lwm2m_engine_get_*() and
  lwm2m_engine_set_*() to access resource instance data.
- adjust object resource initialization  macros to map resource
  instances to resources at the time of object instance
  creation.
- fix up the lwm2m_client as a reflection of all of these changes.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 3217129f5d samples: net: lwm2m_client: send temp value back to engine
By sending the temp value back to the LwM2M engine, it allows all of
the min/max values to be updated over time.

Fixes an issue where min/max values were not being updated.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 7ac1cbfe21 samples: net: lwm2m_client: set LWM2M_COAP_BLOCK_SIZE to 512
The native Zephyr LwM2M client enables the JSON formatter which
can use more of the packet buffers than the default 256 with
TLV formatting.  Let's set the default to 512 in order to avoid
cutting off the output of larger READ operations.

In the future, we should establish block transfer buffers to
handler longer READ ops.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott 9534bbd991 net: lwm2m: add missing application type to IPSO Light Control
Per IPSO Light Control definition from the OMA LwM2M registry:
http://www.openmobilealliance.org/tech/profiles/lwm2m/3311.xml

There is an optional "Application Type" string resource (5750) in the
Light Control object.  This was missed in the initial implementation.

NOTE: sample will assign reference if needed.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Michael Scott a33a6f7754 net: lwm2m: remove data storage for IPSO Timer application type
We are pre-allocating a storage variable for the application type
resource in the IPSO Timer object.  This is an optional resource
which won't always be set by samples.

Let's leave out the pre-allocated variable and let the sample set
this reference if needed (it's optional).

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-02 12:00:35 +03:00
Carles Cufi 26b438042c samples: net: civetweb: Remove strcspn() implementation
Now that strcspn() is implemented in our minimal libc, remove it from
the civetweb sample to avoid the linker complaining about multiple
definitions.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-07-31 16:30:32 -05:00
Tomasz Gorochowik f2bf9a17c5 samples: net: Add civetweb HTTP sample
This commit adds civetweb as a west module and a sample that uses it.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2019-07-30 13:17:55 +03:00
Anas Nashif 578ae40761 boards: remove quarl_se_c1000
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Anas Nashif ffaba63b10 boards: remove arduino 101 and related boards
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-29 21:30:25 -07:00
Jukka Rissanen a62c6b2b04 samples: net: echo-server: Add PPP overlay config file
A sample overlay config file for PPP added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-29 10:24:46 +03:00
Robert Lubos 54eb4adff9 samples: net: echo_client: Fix bug in workqueue processing
The `start_udp_and_tcp` funcion is a blocking function, therefore it
should not be called from the system workqueue, as it would stall it.
Because it was called in such a way, the retry mechanism, which
also relied on the system workqueue did not work properly.

This commit fixes the issue, by keeping the main application processing
in the main thread, and using a semaphore to synchronize with the
connection manager.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-07-25 14:26:27 +03:00
Peter A. Bigot 0626c8f1d3 samples: add board customization for native_posix_64
Sample applications for display functions do not work on native_posix_64
due to missing overrides.  Clone the native_posix_64 Kconfig override
for all samples that have a native_posix Kconfig override.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-17 15:29:42 -07:00
Nicolas Pitre 6609c12516 tests: enable native_posix_64 testing
Whenever conditions are applied to native_posix, they should apply to
native_posix_64 too.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-16 10:41:11 -07:00
Marc Herbert c429051380 tests/net/: samples/net/: add a few 'userspace' tags
See commit message 4afcc0f8af for the long story.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-07-15 09:05:10 -04:00
Anas Nashif 84e87a1eb4 samples: net: quark/arduino 101 do not have ethernet support
Remove old configurations of boards that do not support networking
natively and very custom and difficult to test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Anas Nashif 66b081d24a samples: quark_se_c1000_devboard does not have Wifi
Remove custom configuration that does not support Wifi natively.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-07-12 05:54:16 -07:00
Jukka Rissanen a845c57bd7 samples: net: echo-client: Start service in correct time
Start to monitor Connected and Disconnect events and then start
and stop the echo service according to system connectivity status.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-12 12:33:19 +03:00
Nicolas Pitre 0aa796cbaa print format: adjust specifiers to be compatible with a 64-bit build
The size_t type is either compatible with an int on 32-bit target, or
a long on 64-bit targets. It could even be a long even on some 32-bit
targets. Let's use the z qualifier in the printf format to be compatible
with whatever flavor in use.

In case of pointers, let's just use %p with pointers directly and
avoid casts altogether.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-11 20:12:26 -07:00
Maureen Helm 4d5ee282be samples: net: Convert mcr20a samples to use the frdm_cr20a shield
Converts all net samples that enable the mcr20a 802.15.4 driver to use
the frdm_cr20a shield instead of hardcoding configs for the frdm_k64f
base board. This makes it possible to build mcr20a samples for other
base boards with compatible arduino headers.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-07-09 18:15:45 -07:00
Michael Scott 13086ccda8 net: lwm2m: dont select MBEDTLS or set MBEDTLS options in subsys
If a sample wants to use the Zephyr implementation of mbedtls, it
enables CONFIG_MBEDTLS and sets any needed Zephyr-specific mbedtls
options.

Currently, the LwM2M subsystem selects MBEDTLS automatically when
LWM2M_DTLS_SUPPORT is enabled.  Let's remove this and let the
LwM2M client sample enable mbedtls and it's options.

This mimics the behavior of several other network-related samples
and removes conflicts when selecting alternate implementations of
MBEDTLS.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/17399

Signed-off-by: Michael Scott <mike@foundries.io>
2019-07-09 21:08:47 +03:00
Nicolas Pitre d19a5f9119 net: socket: mgmt: use uintptr_t for the nm_pid field
This may contain a pointer so make sure it is sufficiently wide
on 64-bit targets.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-05 10:06:23 -04:00
Jukka Rissanen 530a1e5415 samples: net: echo_server: Enable SO_TIMESTAMPING if needed
If user has set CONFIG_NET_CONTEXT_TIMESTAMP then enable
network packet throughput collection for UDP packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-03 09:42:45 +03:00
Kumar Gala db167c606d dts: Rename LED._GPIO_* -> DT_ALIAS_LED._GPIOS_*
We use the following commands to rename any
LED._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_LED._GPIOS_{CONTROLLER,PIN,FLAGS}

git grep -l LED._GPIO_CONTROLLER | xargs sed -i 's/LED\(.\)_GPIO_CONTROLLER/DT_ALIAS_LED\1_GPIOS_CONTROLLER/g'
git grep -l LED._GPIO_PIN | xargs sed -i 's/LED\(.\)_GPIO_PIN/DT_ALIAS_LED\1_GPIOS_PIN/g'
git grep -l LED._GPIO_FLAGS | xargs sed -i 's/LED\(.\)_GPIO_FLAGS/DT_ALIAS_LED\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-02 08:26:37 -04:00
Daniel Egger 08d10e1793 samples: net: lwm2m_client: If hwinfo interface is enabled, use it
Previously we always used the board identifier (via CONFIG_BOARD) as
identifier, however this causes troubles in case of tests with multiple
boards of the same kind on the same server. The device_id addresses that
problem nicely if enabled and supported by the architecture.

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2019-07-02 11:36:26 +03:00
Jukka Rissanen 645d2b204b samples: net: sock: mgmt: Print IP addresses for each event
Print IP address for added or removed IP address. This helps
to understand what IP address is being removed or added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-01 13:50:08 -07:00
Jukka Rissanen c283016f3d samples: net: sock: mgmt: Add network management socket app
A simple application that listens network management events
using BSD socket API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-01 13:50:08 -07:00
Anas Nashif a2fd7d70ec cleanup: include/: move misc/util.h to sys/util.h
move misc/util.h to sys/util.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 9ab2a56751 cleanup: include/: move misc/printk.h to sys/printk.h
move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 5d001f3e41 cleanup: include/: move misc/byteorder.h to sys/byteorder.h
move misc/byteorder.h to sys/byteorder.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif d1b2718687 cleanup: include/: move uart.h to drivers/uart.h
move uart.h to drivers/uart.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 8c1f89fa99 cleanup: include/: move sensor.h to drivers/sensor.h
move sensor.h to drivers/sensor.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 6aa9c3a68f cleanup: include/: move gpio.h to drivers/gpio.h
move gpio.h to drivers/gpio.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 969f8f1c68 cleanup: include/: move entropy.h to drivers/entropy.h
move entropy.h to drivers/entropy.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 4be2e9ebb6 cleanup: include/: move zephyr/jwt.h to data/jwt.h
move zephyr/jwt.h to data/jwt.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Anas Nashif 0abdacf3a4 cleanup: include/: move json.h to data/json.h
move json.h to data/json.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Johann Fischer abaeaed2af usb: sort usb config data by section
USBD_CFG_DATA_DEFINE macro has not consider that a class
could have more than one set of usb_cfg_data struct.
If a class has more than one set of usb_cfg_data
then they should be sorted the same way like by
USBD_DEVICE_DESCR_DEFINE macro.

Fixes: #16240

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-06-27 12:18:05 +02:00
David B. Kinder 6b2cd29223 doc: fix misspellings in documentation
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-06-18 15:08:19 -04:00
Jukka Rissanen 404ac51055 samples: net: socket: can: Close the socket periodically
This is done only for testing purposes, in real life the socket
would be closed if it is not used or needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-06-18 17:58:00 +03:00
Jukka Rissanen ae89c2239b samples: net: can: Add second RX socket receiver
This is done so that we can test socket CAN dispatcher.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-06-18 17:58:00 +03:00
Carles Cufi b476643695 doc: Cleanup references to cmake
Clean up some stray references to cmake in doc, boards and
samples that don't make explicit use of the zephyr app extension,
as well as other minor doc fixes.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-06-17 10:09:57 -07:00
Ulf Magnusson a84ded74ea dts: Replace status = "ok" with status = "okay"
The DT spec. only has "okay" and not "ok". The Linux kernel has around
12k "okay"s and 300 "ok"s.

The scripts/dts scripts only check for "disabled", so should be safe re.
those at least.

The replacement was done with

    git ls-files | xargs sed -i 's/status\s*=\s*"ok"/status = "okay"/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-06-14 19:51:13 -05:00
Kumar Gala a2693975d7 dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...
Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-14 08:02:15 -05:00
Anas Nashif efb47ace39 doc: samples: cleanup board reference and layout
Cleanup references to boards in some of the example and use the same
boards through the examples. Other minot cleanups and make the text more
generic and not specific to certain boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-13 16:09:02 -04:00
Jukka Rissanen 104014154e samples: net: echo-server: Ignore the return value of close()
We are not interested in whether the close() call succeeds or
not when the connection is terminated.

Coverity-CID: 198878
Fixes #16569

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-06-09 10:23:57 +03:00
Anas Nashif 2fb19fcbdd style: samples/tests: add braces around if/while statements
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-06 15:20:21 +02:00
Christian Tavares 543de09357 lib: updatehub: add support ipv6
This extends the UpdateHub library code to allow the
use of IPV6 for communication.

Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
2019-06-05 00:20:37 +02:00
Christian Tavares c5d74eccda lib: updatehub: add suport a CoAPS/DTLS
This extends the UpdateHub library code to allow the
use of CoAPS/DTLS for communication.

Refs: #13039.

Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
2019-06-05 00:20:37 +02:00
Christian Tavares 297ac3765f lib: updatehub: Add UpdateHub.io support
UpdateHub is an enterprise-grade solution which makes simple to
remotely update all your embedded devices in the field. It
handles all aspects related to sending Firmware Over-the-Air(FOTA)
updates with maximum security and efficiency, while you focus in
adding value to your product.

Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2019-06-05 00:20:37 +02:00
Daniel Egger 280daa3941 samples: net: lwm2m: use real temperature values instead of dummy
This changes the use of a static and fixed temperature value to using a
read_callback which will either return the previous dummy value or
gather real temperature data from a supported sensor (for now only
FXOS8700 which is available e.g. on a FRDM-K64F).

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2019-05-28 21:11:05 -04:00
Andrei Emeltchenko 953728b241 samples: usb: wpanusb: Refactor sample using new API
Refactor wpanusb sample using new descriptor API, use endpoint index
instead of hardcoded endpoint address.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Andrei Emeltchenko de26f76ef2 samples: net: echo_server: Fix usbnet configuration
This patch enables USB tests.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Aurelien Jarno 819e749ccd usb: move the request handler buffer to the USB device code
In order to unify the legacy and composite code, move the class and
vendor request handler buffer into the USB device code, just like in
composite mode. The option is renamed from USB_COMPOSITE_BUFFER_SIZE
into USB_REQUEST_BUFFER_SIZE and also replaces the USB_DFU_MAX_XFER_SIZE
and USB_HID_MAX_PAYLOAD_SIZE options.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-05-27 09:25:06 -04:00
Jukka Rissanen 4bd654d8c1 samples: net: gptp: Fix compilation instructions
As the prj_base.conf was renamed to prj.conf by commit
4e5300ba7f, the documentation
needs some fixing too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-05-23 22:13:11 +03:00
Michael Scott 3fce0f214e samples: lwm2m_client: re-add sanity check for WNC-M14A2A build
Instead of using the now removed overlay files, use the SHIELD=
command-line option for testing the WNC-M14A2A modem.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-21 08:17:20 -04:00
Michael Scott 21e9b0f510 samples: lwm2m_client: cleanup shield overlay files
Let's remove the sample-specific overlay files dealing with the
WNC-M14A2A modem.

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-21 08:17:20 -04:00
Paul Sokolovsky 6f6b46971a samples: google_iot_mqtt: Explicitly cast socklen_t to int in printf
Otherwise, it can lead to warning like:

main.c:80:10: warning: format '%d' expects argument of type 'int',
but argument 2 has type 'socklen_t' {aka 'long unsigned int'}
[-Wformat=]

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-11 13:25:58 +03:00
Paul Sokolovsky 220fba3b5d samples: google_iot_mqtt: Switch from sntp_request() to sntp_query()
sntp_request() was deprecated and superceded by sntp_query(), which
provides better time resolution.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-11 13:25:58 +03:00
Paul Sokolovsky 08be81d949 samples: sntp_client: Switch from sntp_request() to sntp_query()
sntp_request() was deprecated and superceded by sntp_query(), which
provides better time resolution.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-05-11 13:25:58 +03:00
Jukka Rissanen 59eb48329e samples: net: can: Add missing tag to SocketCAN sample
We should have "net" tag as this is a networking sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-05-10 22:43:27 +03:00
David B. Kinder c5112327a7 doc: fix mentions of Wi-Fi trademark name
The approved trademark name is Wi-Fi so update references to WiFi and
other spellings to Wi-Fi in documentation and Kconfig help strings.
(Note that use of spelling variatios of "wifi" in module names, CONFIG
names, link names and such are untouched.)

https://www.wi-fi.org/

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-06 20:10:59 -04:00
Andrei Emeltchenko 995b568b14 samples: cdc_acm: Update CDC ACM Device name
Update device name for USB CDC ACM.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-28 12:22:23 -04:00
Benjamin Valentin 7c09695344 net/icmpv6: Allow for arbitrary payload data in ICMP echo
Allow for including arbitrary data in net_icmpv6_send_echo_request()
that will be echoed verbatim by the receiver.

This allows to use ICMP echo for diagnostic use cases, e.g. by testing
packet framentation (large payload) or measuring round-trip-time.

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-04-26 09:05:14 +03:00
Bub Wei 57e7ddb7b0 samples: net: zperf: Remove unnecessary main
main function is not necessary.
And without main here, it is possible to import these
samples zperf files in another project.

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2019-04-25 16:18:49 +03:00
Paul Sokolovsky 901d85bde0 samples: sntp_client: Elaborate sample to workable state
1. Output what steps the app performs, so it doesn't look to user
that it simply hanged.
2. Don't use infinite timeouts, because that will hang.
3. Clearly note which requests are for IPv4 vs IPv6 server.
4. Define IPv4 gateway. This sample is configured to run against
SNTP on local Linux host, but standard distros (e.g. Ubuntu) don't
run SNTP server by default, so usual outcome for running this sample
will be timeout. A realistic way to get successful output would be
to run it against a server on the Internet, for what a gateway is
required.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-04-24 12:50:12 +03:00
Bub Wei ee442c2b66 samples: net: zperf: Add __packed for zperf_udp_datagram
UDP packet from net is not 4-byte aligned.
So we have to add __packed for zperf_udp_datagram.

Fixes #15605.

Signed-off-by: Bub Wei <bub.wei@unisoc.com>
2019-04-23 13:14:35 +03:00
Jukka Rissanen a9395157a3 samples: net: dumb_http_server: Check EOF while skipping headers
If recv() returns 0 bytes, then terminate the connection.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-04-23 13:13:35 +03:00
Jukka Rissanen 3d6ce30f29 samples: net: dumb_http_server: Add net_pkt.h file inclusion
The function net_pkt_get_info() is found in net_pkt.h and not
in buf.h. This caused
"implicit declaration of function ‘net_pkt_get_info’"
warning if CONFIG_NET_BUF_POOL_USAGE was enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-04-23 13:13:35 +03:00
Charles Youse 8e307a3ad9 ethernet/eth_e1000.c: change to new PCI(e) functions
Migrate from "legacy" PCI support (drivers/pci) to new PCI(e) support.

The e1000 driver is merely for testing with QEMU and so should not be
a model for the use of PCI(e) functions. Consult instead "real-world"
PCI(e) drivers like the NS16550 UART (drivers/serial/uart_ns16550.c).

Signed-off-by: Charles Youse <charles.youse@intel.com>
2019-04-22 09:34:00 -07:00
Vincent Wan 751025957a samples: sockets: sntp_client: Add support for cc3220sf_launchxl
This commits adds a configuration file for cc3220sf_launchxl
suitable for the example.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-04-19 13:54:21 -05:00
Vincent Wan be5bfb6169 samples: sockets: sntp_client: make IPv6 & NET_CONFIG_SETTINGS optional
In this commit, a config.h header file is added to support the case
when the NET_CONFIG_SETTINGS is not used. main.c is also modified to
enable platforms that do not support IPv6. These changes are necessary
in order to allow cc3220sf_launchxl support.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-04-19 13:54:21 -05:00
Johann Fischer c13e201b18 usb: replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS
Replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-11 13:35:24 -04:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Andrew Boie 7b1ee5cf13 tests: CONFIG_TEST_USERSPACE now off by default
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.

Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.

This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.

tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.

Fixes: #15103 (and probably others)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Ravi kumar Veeramally 06159d3bcf net: samples: ipv4_autoconf: Need more buffers for same_70
More buffers are need to build for sam_e70_xplained board
to work out of the box. Added board specific conf file.

Fixes #15096

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-04-05 16:11:37 -04:00
Andrei Emeltchenko 0f03730882 usb: wpanusb: Simplify and cleanup sample
Remove old unused code blocks and simplify initialization.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko ed97cb7601 usb: wpanusb: Use usb_transfer mechanism
Refactor wpanusb to use usb_transfer().

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko 08da6b261a usb: wpanusb: Fix crash in the sample
Patch 8af3df3519 changed logic and did not take into account 2 extra
bytes.

...
  Precise data bus error
  BFAR Address: 0x766e4900
***** Hardware exception *****
Current thread ID = 0x200004e8
Faulting instruction address = 0xddf4
Fatal fault in thread 0x200004e8! Aborting.
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Andrei Emeltchenko 721f3d1cd0 usb: Refactor USB status callback
Merge cb_usb_status_composite and cb_usb_status and use common
forward_status_cb for both composite and normal devices.

Fixes #14882

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-05 12:23:57 +02:00
Jacob Siverskog 50c2a735e2 doc: Fix typos in MQTT sample documentation
Fix typos and file reference.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2019-04-01 18:38:42 -04:00
Robert Lubos 16d2b11041 samples: net: Update TELNET sample to use shell TELNET backend
telnet_console driver is not compatible with new shell module, hence is
not working. Switch the telnet sample to use new TELNET shell backend.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-04-01 10:26:13 -04:00
Anas Nashif da5f185e06 samples: add test identifier
Add unique identifier instead of just 'test' for samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-29 17:44:11 -04:00
Patrik Flykt 21358baa72 all: Update unsigend 'U' suffix due to multiplication
As the multiplication rule is updated, new unsigned suffixes
are added in the code.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Ulf Magnusson d5b0bd14e3 scripts: Remove unused imports in all Python scripts
Discovered with pylint3.

Upstream open-amp PR: https://github.com/OpenAMP/open-amp/pull/168

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 11:06:20 -05:00
Ulf Magnusson 7ccc7889fa logging: Remove SYS_LOG implementation
Replaced by the new CONFIG_LOG system.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 09:30:29 -04:00
David B. Kinder 5d8e367efe doc: fix misspelling in docs and API comments
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-27 15:59:09 -04:00
Tedd Ho-Jeong An b43ef2f4d9 samples: net: nats: Check null before dereferrencing the variable
This patch checks null before deferencing the variable.

Fix Bug: #14815
Coverity CID: 196641

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-03-26 14:13:24 -05:00
Vincent Wan 11739f72df samples: net: mqtt_publisher: Add section on connecting with TLS
Adding a section to the sample's documentation to give some specific
instructions on how to try it with TLS enabled. This should be helpful
for users who are not knowledgeable with regards to creating/setting up
TLS certificates.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-26 14:22:57 -04:00
Ulf Magnusson d83141535c scripts: Remove accidental semicolons in Python scripts
Making a clean slate for some pylint CI tests. Only enabling relatively
uncontroversial stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-26 07:57:52 -05:00
Paul Sokolovsky 946836577b samples: sockets: Add e1000 and stellaris ethernet drivers overlays
Add qemu ethernet driver overlays for big_http_download and
dumb_http_server samples, which are default integration samples/
tests for TCP stack. This change follows up after similar addition
of such overlays to other samples (and smsc911x overlay addition
to these samples).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-03-26 07:29:40 -05:00
Jukka Rissanen 059a14e166 samples: net: zperf: Update the README file
Clarify what iPerf version was used when testing this sample
application. It was iPerf 2.0.9 which worked ok, for example
iPerf 2.0.13 did not work properly with UDP uploader (client)
mode.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-25 22:48:32 -04:00
Jukka Rissanen 24de2f7e01 samples: net: zperf: Fix TCP uploader
Try to construct a proper iperf client header to the payload
as the server expects that. It is not sure if this is needed
or correct as there is no proper documentation for the iPerf2
protocol.

Fixes #14665

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-25 22:48:32 -04:00
Jukka Rissanen cbeeb510c0 samples: net: zperf: Fix UDP uploader
Try to construct a proper iperf client header to the payload
as the server expects that. It is not sure if this is proper
way to do the iperf header as there is no documentation about
iPerf protocol anyway (except the iPerf source code).

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-25 22:48:32 -04:00
Tedd Ho-Jeong An 5d35b66327 Samples: net: can: initialize the variables
Initialize the variables.

Fix Bug: #14819
Coverity CID: 196637

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-03-24 10:55:06 -05:00
Jukka Rissanen cda61d2a63 samples: net: dhcpv4: Add net-shell and e1000 driver support
The dhcpv4-client is more usable if it has net-shell. For testing
with qemu_x86, the e1000 overlay config is very useful.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-21 09:03:26 -05:00
Vincent Wan 111dab4a25 samples: sockets: echo_async: Add support for cc3220sf_launchxl
Adding support for cc3220sf_launchxl by introducing a board-specific
Kconfig file.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-20 11:36:18 -05:00
Vincent Wan 734e247d02 samples: sockets: echo_async: Make IPV6 optional
Changing the example to not use IPv6 when it is not configured,
given IPv6 is not enabled on some platforms such as cc3220sf_launchxl.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2019-03-20 11:36:18 -05:00
Robert Lubos e39aed53a2 samples: net: Update overlay-bt.conf in various samples
`CONFIG_NET_L2_BT` no longer forces required BT configuration, but
depends on a user to set a valid configuration instead. Hence, we
need to select a proper configuration in the overlay config file.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-03-20 11:32:40 -05:00
Tedd Ho-Jeong An 980cf393f0 Samples: echo-client: Add overlay when echo-server is running on Linux
This patch adds the overlay when the echo-server is running on Linux and
echo-client is running on Qemu.

Fix: #14654

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-03-20 11:31:57 -05:00
Tomasz Bursztyka 03bfc5dd0f net/context: Remove token parameter from net_context_send/sendto
And also to the relevant callbacks.

That parameter is not used anywhere so it is useless.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-20 10:27:14 -05:00
Tomasz Bursztyka d6d52ce9e5 net/pkt: Remove _new suffix to net_pkt_write functions
Suffix is now useless, as these functions are now the only ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-20 10:27:14 -05:00
Tomasz Bursztyka a25f054cbd net/pkt: Remove _new suffix to net_pkt_read functions
Suffix is now useless, as these functions are now the only ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-20 10:27:14 -05:00
Tomasz Bursztyka f8a091104e net/pkt: Remove _new suffix to net_pkt_get_data_new function
Now that legacy - and unrelated - function named net_pkt_get_data has
been removed, we can rename net_pkt_get_data_new relevantly.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-20 10:27:14 -05:00
Tomasz Bursztyka 172fe5a87b net/context: Remove _new suffix on net_context_send/sendto functions
Now that legacy functions are removew, let's rename the new functions by
removing the _new suffix.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-20 10:27:14 -05:00
Marcio Montenegro 69613cad6a samples: net: sockets: echo_client : Fix tcp_stop() error
Check for an open socket, 0 is a valid file descriptor.

Signed-off-by: Marcio Montenegro <msam@cesar.org.br>
2019-03-18 11:34:47 -05:00
Jukka Rissanen ebce5601c0 samples: net: promisc: Fix compile error
The sample was bitrotted because sample.yaml was missing and no
build checks were done, so we missed the case when TCP header
API function was removed. This is now fixed by using still available
UDP header API (to get the port numbers). Also fixing debug print
as it were giving compile warnings.

Fixes #14608

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-18 11:31:01 -05:00
Jukka Rissanen c5d3cfa93a samples: net: promisc: Add sample.yaml file for build time checks
The sanitychecker needs sample.yaml in order to compile test
the promiscuous mode sample application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-18 11:31:01 -05:00
David B. Kinder 6000a6205a doc: prepare for improving doc API linking
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all".  This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.

This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Tomasz Bursztyka fa58d1e6ce samples/net: Switch zperf sample to new net_context API
No need to build the net_pkt, just send the buffer directly.

Let's reuse already parsed ip/proto headers as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-14 08:41:08 +01:00
Tomasz Bursztyka 4ab0e5a3b7 samples/net: Switch lldp sample to new net_pkt API
Use new net_pkt r/w API functions.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-14 08:41:08 +01:00
Tomasz Bursztyka b517247835 samples/net: Switch wpan_serial to new net_pkt API
Minor changes, as wpan is low level and make use of the bare minimum
API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-14 08:41:08 +01:00
Tomasz Bursztyka 8af3df3519 samples/net: Switch wpanusb sample to new net_pkt API
Minor changes, as wpan is low level and make use of the bare minimum
API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-14 08:41:08 +01:00
Tomasz Bursztyka 3b1c91732d samples/net: Switch nats samples to new net_pkt/net_context API
Using new net_pkt r/w API and so on.

This sample would still need to be using socket API instead.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2019-03-14 08:41:08 +01:00
Jukka Rissanen e7107ba562 samples: net: can: Readme file was missing
The socket CAN application was missing a README.rst file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 15:57:48 -05:00
Jukka Rissanen e7ce08a2ac samples: net: can: Send and receive can_frame type of data
The CANBUS sockets require "struct can_frame" to be used in order to be
compatible with Linux code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 05:58:30 -05:00
Jukka Rissanen d2ce588441 samples: net: can: setsockopt() requires can_filter
The CANBUS sockets require can_filter to be used in order to be
compatible with Linux code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 05:58:30 -05:00
Paul Sokolovsky 7e81aca961 samples: sockets: echo: Better error checks
Check socket fd return results.

Fixes: #11086, #11087
Coverity-CID: 189519, 189520

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-03-13 05:38:10 -05:00
Tedd Ho-Jeong An 19ed83c723 samples: sockets: echo_async: Check return value of setsockopt
This patch checks the return values of setsockopt.

Fixes: #14392, #14402
Coverity-CID: 195897, 195848

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
2019-03-13 05:37:28 -05:00
Jukka Rissanen 6368ed4edf samples: net: zperf: Fix the readme file
As there is no shell submodules any more, the "zperf" command
needs to be written in every command.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 01:52:09 +01:00
Jukka Rissanen b9f6bdfe08 samples: net: zperf: Fix TCP download command
The TCP download command was not handling TCP session and
connection closing properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 01:52:09 +01:00
Jukka Rissanen 0cd9b3e267 samples: net: zperf: Make client work in native_posix
As the clock does not run same way in native_posix, do some
tricks here.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-03-13 01:52:09 +01:00
Ravi kumar Veeramally 718dd56d38 net: samples: Fix packet socket sample iface index
Patch (3206568e43) changed network
interface numbering starts from 1. The index 0 is reserved.
So use api to get default interface index for packet socket sample.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-03-11 20:56:11 -07:00
Tomasz Gorochowik 9115386e4d samples: net: mqtt: update readme with SOCKS5 info
This commits adds an overlay file with the SOCKS5 symbol that is needed
to run MQTT with a proxy, and extends README with instructions on how to
use it with the default and custom settings.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
2019-03-11 20:36:39 -07:00