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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
We do not need the return values from various calls to pthread_*()
functions.
Coverity-CID: 203462
Coverity-CID: 203535
Fixes#18376Fixes#18377
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>