Avoiding segmentation in the GATT-based Mesh Proxy protocol requires
having an RX buffer length of at least 77. We could round it up to 80
since there's otherwise wasted space, however there's also
BT_HCI_RESERVE to consider, so to avoid pushing over the 4-byte
boundary for certain HCI drivers just leave the size at 77.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is needed in order to get information which function is
doing the ref. With inline function this was not possible.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of printing [net/net_pkt], print [net/pkt] if debug log
is enabled for network packet allocator. The double net in earlier
print is redundant information.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of always have CONFIG_NET_IPV6_MAX_NEIGHBORS parents,
use CONFIG_NET_RPL_MAX_PARENTS when creating the parent table.
Default value for max parents is the max neighbors so no
functionality changes are introduced here.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of always having CONFIG_NET_IPV6_MAX_NEIGHBORS number
of items in neighbor pool, store the neighbor count in the pool
and use that value when traversing the neighbor table.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow user to define what kind of network the RPL should serve.
Currently options will be either ANY or IEEE802154. If there
is only one network interface in the system, then ANY will take
the default network interface and use that. If there are multiple
network interfaces, then one should not use ANY as the default
network interface might not be the expected one.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print network interface where the DIO, DIS or DAO was sent. This is
useful if we have multiple network interfaces in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When printing network interface specific data, print also
the type of the network interface (ethernet, bluetooth etc).
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the user has not specified CONFIG_NET_APP_MY_IPV4_ADDR or
CONFIG_NET_APP_MY_IPV6_ADDR, the value is set to "" in this case.
This will be converted to ANY IP address which is not useful
to be set to the network interface. So check this and just
continue the init in this case without setting the IP address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The documentation says that the API will automatically append the
net_buf fragment to the end of network packet fragment chain.
This was not the case and current only user for this API in
echo-server sample appended the fragment itself. The fix is to
automatically append the fragment to the end of fragment chain.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
1. According to the specification 5.3.1, it's a MUST to specify
(1) content format: app link format (2) supported lwm2m version.
Also, we should use text/plain instead of LWM2M's (obsolete).
2. Use LWM2M_FORMAT_OMA_TLV as default accept format when accept option
is not given from the caller for TLV is a MUST have in LwM2M spec and
it can deals w/ multiple resources read
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Right now we have various type conflicts between the json library and
newlib. Until these are resolved only build the json test if newlib
isn't enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some boards had HAS_DTS in the defconfig which is dropped if the Kconfig
variable does not have a prompt.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The JLinkGDBServer was printing log messages that messed with debugging
in -tui mode. Run it in silent mode instead.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
LF is requesting a Core Infrastructure Initiative evaluation
and badge on our website. This PR introduces that into our
README.rst on GitHub and also merges content from the
README into our introduction document.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Save in observe_node_data so that later on we can select the correct
content format requested by the caller at the first time
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Function do_write_op_tlv() uses in->inbuf and in->insize as a looping
condition to iterate through items in TLV payload and call
do_write_op_tlv_item() to update the value.
However, do_write_op_tlv_item() will override the value before calling
for fitting the usage of lwm2m_write_handler() function without restore
them. (lwm2m_write_handler() is also called by plain text/json writer
and is expecting in->inbuf is the start of buffer and in->insize as the
length of the buffer)
This will result in errors in do_write_op_tlv().
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
RFC-7230 "HTTP/1.1 Message Syntax and Routing" Section 5.4
describes the "Host" header formatting. If Zephyr user
specifies a host string as a part of the HTTP client request
structure, we end up sending an incorrect HTTP header due
to a missing "Host :" text.
Fix this by prepending "Host: " to the header data before
the user supplied host string.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Save some memory for small memory systems when running ztests. We have
our own stack in ztest so we should be able to get away reducing down
the main stack.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The SimpleLink host driver comes with its own definition of
__errno, which conflicts with Zephyr's definition, but has
a mechanism to enable use of the porting OS's __errno variable.
This patch enables SimpleLink to use Zephyr's __errno
via the DPL porting layer.
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This ports the SimpleLink WiFi host driver via its OS adaptation
layer to Zephyr OS primitives.
This was validated using an out-of-tree SimpleLink shell
application including functions for:
* WLAN connect, disconnect and scan
* Socket: UDP server and client
* NetApp: pinging an external host.
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Previously, calling NVIC_SetPriority(IRQn_Type irqn, ....) with
the NWP interrupt number of 171 caused a hard fault during a
subsequent svc #0 instruction during _Swap().
GNU compiler is generating a bit extension instruction (sxtb) which
converts a positive IRQ value argument to a negative value when
casting to the CMSIS IRQn_Type enum parameter type.
This generates a negative index, which then writes to an SCB
control register instead of NVIC register, causing a hard
fault later on.
This issue only occurs when passing interrupt numbers > 0x80
(eg: 171 (0xab) for the NWP) to the CMSIS NVIC apis.
The solution here is simply to redefine IRQn_Type to be an
unsigned 32 bit integer, while redefining the CMSIS IRQn_Type
enum definitions for interrupts less than zero.
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This patch enables and builds the SimpleLink host driver
for Zephyr introduced in a previous patch.
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The SimpleLink SDK provides a WiFi host driver to access the
network coprocessor over a dedicated SPI.
This patch imports the host driver plus other driver files
required to communicate with the network coprocessor.
All files have been copied from a Linux SDK installation, without
modification (except for whitespace cleanup and file mode fixes).
Note that one of the imported files, wifi/porting/user.h, has to
be modified to enable the DPL (Driver Porting Layer) port to Zephyr.
This is provided in a follow-on DPL porting patch.
Origin: Texas Instruments SimpleLink CC3220 SDK URL:
http://www.ti.com/tool/download/SIMPLELINK-CC3220-SDK Purpose:
Provide WiFi host driver for TI CC32XX SoC
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
pin-controller reg is already set in stm32f407.dtsi which we include in
stm32f469.dtsi so no need to set it again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add support for TICKLESS KERNEL in nrf_rtc_timer for Nordic family of
processors. This patch includes :-
1. Programming RTC based on "next timer" value from timeout queue while
A. exiting idle_exit.
B. on RTC interrupt.
2. Impliments some of functions which will be required by sys_clock and
scheduler.
ZEP-1819
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Previous stack definition caused following warning: passing argument 2
of 'k_thread_create' from incompatible pointer type.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
This patch fixes the read operation of the I2C driver
for all the receptions (1-byte, 2-bytes, N-bytes when
N > 2)
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Tested-by: Yannis Damigos <giannis.damigos@gmail.com>
Tested-by: Martin Iñaki Malerba <inakimmalerba@gmail.com>
In interrupt mode, the drivers entered a forever loop if the
I2C_MSG_RESTART flag was set. This patch fix this issue.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
The EVENT interrupt is generated when:
– SB = 1
– ADDR = 1
– ADD10= 1
– BTF = 1 with no TxE or RxNE event
– TxE event to 1 if Buffer interrupt enabled
– RxNE event to 1 if Buffer interrupt enabled
We need to disable and enable the Buffer TxE and RxNE interrupt
inside the EVENT ISR. The LL_I2C_{Enable,Disable}IT_TX and
LL_I2C_{Enable,Disable}IT_RX functions, used now, enable and
disable both Buffer and Event interrupt. This patch uses the
LL_I2C_EnableIT_BUF and LL_I2C_DisableIT_BUF functions to
enable and disable the Buffer interrupt (TxE, RxNE).
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
* add nested interrupt support for interrupts
+ use a varibale exc_nest_count to trace nest interrupt and exception
+ regular interrupts can be nested by regular interrupts and fast
interrupts
+ fast interrupt's priority is the highest, cannot be nested
* remove the firq stack and exception stack
+ remove the coressponding kconfig option
+ all interrupts (normal and fast) and exceptions will be handled
in the same stack (_interrupt stack)
+ the pros are, smaller memory footprint (no firq stack), simpler
stack management, simpler codes, etc.. The cons are, possible
10-15 instructions overhead for the case where fast irq nests
regular irq
* add the case of ARC in test/kernel/gen_isr_table
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix misspellings in .h files missed during code reviews
and affecting generated API documentation
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
openocd object was put in a library causing it to be stripped. We want
those symbols in the final ELF to allow debugging with openocd, building
those as objects like the rest of the kernel keeps the symbols in the
kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
sprint_token is only used by SYS_LOG_DBG, so only build it when
CONFIG_SYS_LOG_LWM2M_LEVEL > 3.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Separate response can happen when handling block transfer for firmware
updates, and to avoid duplicating the lwm2m_udp_receive function, create
and additional flag to allow handling CoAP separate response messages.
This is required to avoid removing the reply callback, since a new
message (with a valid token) will be received later from the server.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Simplifly net_context_sendto calls and also allows to easily debug every
send/receive lwm2m call.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Implement the 4.2 event LE Directed Advertising Report, used for
scanners in a privacy-enabled controller to report directed advertising
events whose TargetA cannot be resolved by the local controller.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add implementation to support PHY update procedure with
packet transmit time restrictions.
This fixes:
TP/CON/SLA/BV-49-C [Initiating PHY Update Procedure Packet
Time Restrictions]
TP/CON/SLA/BV-50-C [Responding to PHY Update Procedure
Packet Time Restrictions]
TP/CON/SLA/BV-52-C [Initiating PHY Update Procedure Packet
Time Restrictions, No Change]
TP/CON/SLA/BV-53-C [Responding to PHY Update Procedure
Packet Time Restrictions, No Change]
TP/CON/MAS/BV-49-C [Initiating PHY Update Procedure Packet
Time Restrictions]
TP/CON/MAS/BV-50-C [Responding to PHY Update Procedure
Packet Time Restrictions]
conformance tests in LL.TS.5.0.0.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>