ZoAP tests are modified to use new CoAP API. Also modified tests
name from 'zoap' to 'coap'.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Current coap library fails to parse or prepare if packet is more
than one fragment. Added support to handle multi fragment packet.
Also well-known/core api used to prepare coap packet and send it
through net context api immediately. This is goind to be problematic
if user doesn't enable net context. Also user can not encrypt coap
packets. Now api will return prepared coap packet to application.
Application will send it to peer.
Jira: ZEP-2210
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
ZOAP library has certain limitations in parsing and preparation of
coap messages. It can handle only on single network fragment. If
network packet is split between multiple fragments it fails. This
patch is just copy and rename of 'zoap' to 'coap'.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
At 32 bytes the snprintk call to fill the help buffer was most often
running out of room and returning an error. Let's expand it to 64.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Users can private message the bot and the bot should respond directly
back to that user rather than rudely ignoring them.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's create a static global var for nickname so that we can use it
later without having to pass it all the way through callbacks, etc.
Also limit the size to 16 bytes as IRC servers will truncate anything
beyond.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
These structures were originally intended to prototype an IRC library
which would be later moved into the subsys/net/lib/irc folder.
Unfortunately, that effort has faded and they make this code much more
complex than necessary. Let's remove them in favor of simplicity.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
For style points let's declare the text shown at the beginning
of main() function to the top of our source as APP_BANNER so that
it's obvious and presents nicely.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's simplify the parsing function which scans incoming traffic
for carriage returns and let the net_pkt_read() function cross
multiple buffers if needed. Also, gracefully skip lines which
are longer than the command buffer.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Some L2 layers such as bluetooth need to have extra buffer pools to
hold copies of packets for use with TCP. Let's add support for that
so that future enablement of other boards won't get bitten.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's migrate from using NET_LOG_* functions to the SYS_LOG
facility which allows for granular control over the display
of info, debug and error messages unique to the file that
you're in.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's remove all of the extra coding to handle DHCP, DNS and event
management. This is all handled by the net_app API.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
802.15.4 is the networking hardware available in KW41Z SoC (and
supported by Zephyr). So, if networking in enabled, automatically
select the corresponding driver. This is similar to how frdm_k64f
automatically selects Ethernet driver, 96b_carbon selects BLE/IPSP
drivers, etc. (But we apply it on SoC level to reuse across the
boards.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
802.15.4 IP-based networking requires 6LoWPAN layer and won't work
correctly without it. So, if NET_L2_IEEE802154 is select,
automatically select NET_6LO. This is similar to what BLE L2
does (NET_L2_BT causes selection of NET_6LO).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When we merge something, verify that the build succeeds. This is to make
sure we did not have conflicting commits that pass individually but fail
when merged on top of each other.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
For 'rep stosl' ECX isn't a size value, it's how many times to repeat
the 4-byte string copy operation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead of having a board-specific config for this adc test, enable the
required battery-sense circuit by default at the board level when the
adc driver is enabled.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
These modify kernel object metadata and are intended to be callable from
user threads, need a privilege elevation for these to work.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
It's useless now, arduino_101 has proven not working very well with x86
gpios and CC2520 never got to work properly there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Only ieee802154 should have been using it, but it ended in various
samples that did not require it anymore once they've been using
net_app. Unlike former samples settings, net_app settings are tied to
net_app, so let's just forget about all of it and silently use net_app.
If something goes wrong in setting net options, it will be a unique
place.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is similar to the changes made previously to other network
components: if user selected NET_LOG_GLOBAL, they really mean
they want logging (first of all, error/warning logging) across
the entire network stack.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Due to timeout checking the minimum lifetime must be 15 seconds,
and we're storing the lifetime as an unsigned short so set the
maximum to 65535.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Callbacks are setup for the following states:
- ENGINE_DO_BOOTSTRAP
- ENGINE_DO_REGISTRATION (first registration)
- ENGINE_REGISTRATION_DONE (subsequent client updates)
- ENGINE_DEREGISTER
In most cases, if a timeout occurs the registration engine goes back to
ENGINE_INIT. The exception is a timeout during client update, which
forces the state machine back to ENGINE_DO_REGISTRATION (skipping a
boostrap).
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Sending an lwm2m message is too difficult. It requires pending / reply
and other structures to be configured and set by various portions of
the library. There is also no way to know if a pending message ever
encounters a timeout.
Let's fix this by simplifying the internal LwM2M engine APIs for
handling lwm2m messages:
1. A user calls lwm2m_get_message(lwm2m_ctx) which returns the first
available lwm2m message from an array of messages
(total # of messages is set via CONFIG_LWM2M_ENGINE_MAX_MESSAGES).
2. Next the user sets all of the fields in the message that are
required (type, code message id, token, etc)
3. Then the user calls lwm2m_init_message(msg). This initializes the
underlying zoap_packet, pending and reply structures.
4. Once initialized, the user creates their payload in msg->zpkt.
5. When the user is ready to send, the call lwm2m_send_message(msg).
6. And if for some reason an error occurs at any point, they can free
up the entire set of structures with: lwm2m_release_message(msg).
Included in the refactoring is a timeout_cb field which can be set in
the LwM2M messages. If a pending structure ever expires the engine
will call the timeout_cb passing in the msg structure before it's
automatically released.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Instead of using a magic reference to 8 for token length, let's
establish a define for MAX_TOKEN_LENGTH and then use it for both
variable definitions and to make sure tokens are valid. Also,
Correct the handling of a special token length value (0xFF) which
lets lwm2m_init_message() know to skip token generation. We were
using a -1 value here previously (on a u8_t variable).
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The sanity test script needs to have ccache installed on the Ubuntu
and Fedora developement environments.
Signed-off-by: David Leach <david.leach@nxp.com>
We want applications to be able to enable and disable userspace without
changing any code. k_thread_user_mode_enter() now just jumps into the
entry point if CONFIG_USERSPACE is disabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This includes:
- peripheral drivers
- driverlib (HAL)
- WiFi host driver and porting layer interface headers
See README in this patch for details.
Origin: Texas Instruments cc32xx SimpleLink SDK
URL: http://www.ti.com/tool/download/SIMPLELINK-CC3220-SDK
Purpose: Provide driver libraries and HAL for TI CC32XX SoC
Maintained-by: External
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
When the net-shell needs to send something to network interface,
it will check if the target address is found in neighbor cache and
then use that network interface. If the address is not found in nbr
cache, then the default interface is used.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This app now depends on net_app API, so it must be enabled for all
project configs we have.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Some our Zephyr tools don't like seeing UTF-8 characters, as reported in
issue #4131) so a quick scan and replace for UTF-8 characters in .rst,
.h, and Kconfig files using "file --mime-encoding" (excluding the /ext
folders) finds these files to tweak.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>