This replaces the cc3220s_launchxl board with the cc3220sf_launchxl
board directory.
Jira: ZEP-1958
Change-Id: I550061319d458d6ba694dbf26082f14666dd150e
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
CC3220SF_LAUNCHXL effectively replaces the CC3200_LAUNCHXL,
with support for the CC3220SF SoC, which is an update for
the CC3200 SoC.
This is supported by the Texas Instruments CC3220 SDK.
Jira: ZEP-1958
Change-Id: I2484d3ee87b7f909c783597d95128f2b45db36f2
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The CC3220SF is a replacement for the CC3200 SoC, comprising
a network coprocessor and Cortex-M4 MPU.
This leverages the CC3220 SDK driver peripheral library in ROM,
and some files built from ext/hal/ti/.
Jira: ZEP-1958
Change-Id: I892b212c178e05d84ff1d716dde593ced653ae6d
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Devicetree.org specifies that serial devices property used to set
baud rate is "current-speed", while zephyr uses "baud-rate".
Align property name in order to keep zephyr dts files compatible
with device tree specification and could be re-used from/to
Linux for instance. We also cleanup a few SoCs that set "baud-rate" in
the SoC dts and not the board.
Jira: ZEP-2048
Change-Id: I097e7439ee46fe77c628b56531772950382fafcc
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This in preparation for adding a cc3220sf DTS file, which
has a different address for sram0 than the cc3200.
Also moved baud-rate out of soc dtsi file to board dts.
Jira: JEP-1958
Change-Id: I641452c0a8a6d1ad4424e132d6ef2de71d8545b4
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Update Cube version for STM32F1XX family
from version: V1.14.0
to version: V1.15.0
Add support for Low Level API on stm32f1 family
Change-Id: I8cb5fe2fd94be3a320e863c7b5ed59e4c2312e87
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The highest endpoint number supported by the STM32F4xx USB device
controller is 3. Change the cdc_acm driver to use endpoint 2
instead of endpoint 4 so that it will work with this platform.
Change-Id: I4a3cd08f546a7fe01558528de0990156f642d93b
Signed-off-by: Christer Weinigel <christer@weinigel.se>
This fixes ZEP-1955. The issue was that the interrupt stack frame only
allocates 4 registers. This means that if any window overflow happens,
only 4 registers can be saved. This implies that the interrupt handler
can not call functions other than using call4. If this rule is not
honored, then it will result in the registers being overwriting other
context information and thus a stack corruption.
The fix consists on using call4 for calling even t logger function,
which is by the way more optimal as the interrupt handler does not need
to save more than 4 registers when these functions are called.
Issue: ZEP-1955
Change-Id: Iacea626443d1d61d95a52253ac8ff15fc3722d2c
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
The installation instructions for Ubuntu 16.04
needed to be updated to use the correct packages
rt:40021
Change-Id: Ia6bfb66b7d24dda2556b76a495988eea20037607
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Using MPU enabled HW it was evident that a NULL access
(with offset) was happening in the TCP stack due to the
following message:
***** MPU FAULT *****
Executing thread ID (thread): 0x20009b0c
Faulting instruction address: 0x8034496
Data Access Violation
Address: 0x34
Fatal fault in essential thread! Spinning...
Turns out we are referencing a potentially de-referenced
NULL pointer in the SYS_SLIST_PEEK_NEXT_CONTAINER macro.
Let's avoid this by checking the container node for NULL.
Also fix dlist.h SYS_DLIST_PEEK_NEXT_CONTAINER with the same
issue.
Change-Id: I2e765b9af7bcaf8fb13f7c9b7e081f9e6d4928f2
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The TX side of network data flow was changed so update the
network architecture documentation.
Change-Id: I88680a776dfe87a8dac868cba1b536f2c926c0cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of returning EIO let's bubble the error from net_context_send
back up to the caller in the following functions:
mqtt_tx_connect()
mqtt_tx_disconnect()
mqtt_tx_pub_msgs()
mqtt_tx_publish()
mqtt_tx_pingreq()
mqtt_tx_subscribe()
mqtt_tx_unsubscribe()
Change-Id: I9bb4396b227b8902ac1195a97bc37eb1959b643e
Signed-off-by: Michael Scott <michael.scott@linaro.org>
With CONFIG_NET_DEBUG_NET_PKT enabled, the log messages are full of
errors regarding NULL parameters passed into net_pkt_unref in almost
every TX function for handling MQTT messages:
mqtt_tx_connect()
mqtt_tx_disconnect()
mqtt_tx_pub_msgs()
mqtt_tx_publish()
mqtt_tx_pingreq()
mqtt_tx_subscribe()
mqtt_tx_unsubscribe()
mqtt_parser()
Let's clean up the unref handling so that our debug log isn't quite
so full of error spam (as opposed to the normal amount of spam from
the net buf log).
Change-Id: Ib49d1192f51abe4329e6dc9da3c51a4a36290082
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The data->len of an inbound netbuf can be larger than a single
MQTT packet. For instance when a PINGRESP is also included
in the same netbuf. For this reason we should not be using
the data->len to determine how large the rest of the MQTT data is.
Specific Example: we've seen in testing that PINGRESP packets
can be included with a SUBACK packet in the same netbuf. Under
this case the current code uses the data->len incorrectly and
tries to find 3 QoS elements for the SUBACK packet when there
is only 1 (the rest of the data is for PINGRESP).
NOTE: A larger patch to iterate through the netbuf data parsing
individual MQTT packets will be needed to fix the MQTT subsys.
This patch only corrects the SUBACK parsing.
Change-Id: I7f6cebaaed9570b778d466de84331cf8c5060755
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Currently, app type MQTT_APP_PUBLISHER_SUBSCRIBER is not supported.
mqtt_init() will return EINVAL because the context rcv function is
either mqtt_publisher_parser or mqtt_subscriber_parser (not both).
Let's combine these functions into mqtt_parser and remove the app
type check from mqtt_init().
Change-Id: I60460e011395864706e293c997e9f8a65681b368
Signed-off-by: Michael Scott <michael.scott@linaro.org>
We need to set the mqtt context recv function prior to calling
net_context_recv which installs the mqtt_recv callback.
If not, we risk a race condition where an unprotected reference
to mqtt->rcv(mqtt, buf) is made in mqtt_recv().
Change-Id: If90ee58f4ea6f7879ef7c12b969ba27647426acc
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Some applications may want to reuse implementations of these
commands for debugging/diagnostics purpose even if they don't
use net shell per se, or implement an alternative shell.
Jira: ZEP-2064
Change-Id: I48cb66ccc41bd41a75a4eb8eb3c366316ec5a096
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The sample in its default configuration waits for DNS server
configuration via IPv4 or IPv6 specific means. Until this
information is receives, DNS querying won't even start. Make
diagnostic messages explicit of this fact, because if user
doesn't have required services available in the network, the
sample will appear to just hang.
Jira: ZEP-2061
Change-Id: I56a5b7354a2d1239a35d8334ed95a15ebd19254f
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
net_pkt_get_len() is the correct API to get network packet
length.
Jira: ZEP-2076
Change-Id: Ifff6f3d5df28b3684cc8bb3758f9e8bccd5d4534
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
net_if_ipv6_router_add() will return router pointer on success.
This information must be cached in RPL instance, otherwise RPL
instance doesn't know about default route.
Change-Id: Ic6d80ebfa95c9a64df9adf2621ae2631d9bdb990
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
When router or default router timer expired, interface will remove
router from the list. In this case RPL does not know about this.
When RPL node receives DIO messages it only verifies whether parent
exists or not. This extra checks will verify whether router really
in "used" state or not.
Jira: ZEP-2080
Change-Id: I4b36b3a2d495e76a38caddd058451daff08fab0c
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
net_if_ipv6_router_rm() is the correct API to remove IPv6 router
from the interface as it also cancels the timer and raises a mgmt
event. The net_if_router_rm() only sets router as unused and
nothing else.
Change-Id: I55114288c9ae748520b67b206edcd4f5e420b1af
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If the ./well-known/core response is bigger than L2 MTU then
response will be sent in multiple fragments. In mesh kind of networks
getting response from farthest node might loose packets. So better to
send response in a block wise fashion. Block size is configurable.
Change-Id: Id421c66597fe448c12a7215f04f63f4a284c14ab
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Value 0xFF represents End Of Options marker in CoAP message.
Use #define than magic numbers in code.
Change-Id: I3bef21ea827987f7c2e670447ee20574cb6288ae
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add timeout for packet and buffer requests. If there are no
buffers available gracefully drop the request.
Change-Id: I56fe2b606556149c83751aadc1c5eee7828a84a8
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Bluetooth only cares about the actual payload so net_pkt can be unref
as soon as the data fragments are detached.
Jira: ZEP-2070
Change-Id: Id528d5440f42903378883f5e696b3f663bbfa313
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add config file to be used for testing KW41Z's IEEE 802.15.4 driver.
Jira: ZEP-2026
Change-Id: I7042c57ad33ff72b35d24fbf28085b99b2301726
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Implement just the OSA_InterruptEnable and OSA_InterruptDisable functions
as only these two are needed to build the XCVR driver.
Jira: ZEP-2026
Change-Id: I49e0cedd3a2553a59b667a2b9945db6b8d0be0d2
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Import the XCVR driver from Kinetis SDK, which is needed to setup the radio
on the FRDM-KW41Z board. Also import EmbeddedTypes.h and the OSAbstraction
interface, as they are needed to build the XCVR driver.
Origin: https://www.nxp.com/webapp/sps/download/license.jsp?colCode=KW41Z-CONNECTIVITY-SOFTWARE-LIN
Maintained-by: External
Jira: ZEP-2026
Change-Id: Iee0acb2320f7bec887d8d2342772dde18b11b12f
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Many OSes use values SOCK_STREAM = 1, SOCK_DGRAM = 2, apparently
inherited from the original BSD Unix, which introduced Sockets API.
These values are exposed as numbers in many places, e.g. with a
debugger, when printing just as numbers, etc., so use the above
common values to avoid possible confusion.
Jira: ZEP-2066
Change-Id: I0477abc79e2b43ef83f9fb11a66092f2b41f75fa
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The ai_flags, ai_socktype and ai_protocol fields are removed as there
is currently no use for them. These can be added back later if really
needed.
Reordering the fields at the same time which caused 4 bytes to be saved
in storage space.
Jira: ZEP-2065
Change-Id: Ida1dcfb6afed73733d3db9cf4d07e771d31ee314
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The dns_resolve sample application did not had project file for
two boards that the README file is talking about, so adding them here.
Jira: ZEP-2040
Change-Id: I68e825854a171b09d56df91ab80ce5d9349733f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The data fragments were stored in reversed order when the RX
data was saved into network buffers. This was caused by net_pkt
changes in commit "net/net_pkt: Fully separate struct net_pkt
from struct net_buf".
Change-Id: I8ad2cfc23b2cb90896b0548eab168895b0d7421d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
For stream-based protocols (TCP), adding less data than requested
("short write") is generally not a problem - the rest of data can
be sent in the next packet. So, make net_pkt_append() return length
of written data instead of just bool flag, which makes it closer
to the behavior of POSIX send()/write() calls.
There're many users of older net_pkt_append() in the codebase
however, so net_pkt_append_all() convenience function is added which
keeps returning a boolean flag. All current users were converted to
this function, except for two:
samples/net/http_server/src/ssl_utils.c
samples/net/mbedtls_sslclient/src/tcp.c
Both are related to TLS and implement mbedTLS "tx callback", which
follows POSIX short-write semantics. Both cases also had a code to
workaround previous boolean-only behavior of net_pkt_append() - after
calling it, they measured length of the actual data added (but only
in case of successful return of net_pkt_append(), so that didn't
really help). So, these 2 cases are already improved.
Jira: ZEP-1984
Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Instead of just plain assert, check that the packet we receive
is ok before passing it to processing function.
Jira: ZEP-2057
Change-Id: I5754c82d16e1522d8fcee561eea280eadeec31ee
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The TCP trace values were not printed because of incorrect
config option used. Print also seq and ack values in decimal
in order to make it easier to correlate the values in other
prints in tcp.c.
Change-Id: I44d1535a84dcba8c6c937d348516ba801193ca23
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use ready-made utility function which can take care of endianness
Change-Id: I1edd0b2ce1a086dd637e97308145f9b434e48a1f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This patch adds support for reading MAC address from I2C EEPROM.
Only chips with 7-bit I2C device address are supported.
Change-Id: Ibedc33e54e33bdb901840e104063e2f4752b9123
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Otherwise they are send as is and stripped by tunslip6, resulting in
malformed packets.
Jira: ZEP-2037
Change-Id: I1267b9ac956f3cd7aa3456ce20447ef97281d7a8
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>