Coverity complains about reversed src and dst fields when sending
DAO ack back to originator. This is false positive.
Coverity-CID: 173650
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Check the return value of k_poll() as instructed by Coverity.
If debugging is enabled we print error if this happens, otherwise
this error is ignored. In our case the return value should always
be 0.
Coverity-CID: 173652
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is be possible that the local address was not properly
resolved in which case the local_addr variable could be NULL.
This will cause NULL pointer access if the variable is used.
Coverity-CID: 173656
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The RPL route entry variable "extra" was resolved inside an
if-statement and the code was always returning from it.
This meant the the later code dealing with "extra" was never
executed. Fixed by moving the resolving of "extra" a bit
earlier so that the "extra" variable has always a proper value.
Coverity-CID: 173659
Coverity-CID: 173654
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The TX send function will return status < 0 if there is an error
when sending. This status value was incorrectly checked.
Coverity-CID: 173660
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This introduces an schema-based YAML validation process when loading
any YAML file, before doing any operations on them. An exception will
be raised at SanityConfigParser() if the file fails to verify with the
given schema.
Schemas are defined for the platform files in board///*.yaml and for
the (sample|testcase).yaml files. The verification is done using the
pykwalify python library. If not installed, a warning is printed and
the verification schema is skipped. At some point, we might want to
force it being installed.
The verification library is made a separate module (scl.py) so it can
be easily imported by others.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
AFAIK an ini file system was ported to a yaml file system. But some
ini file references still remain.
This patch changes all ini file mentions into yaml.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix compiler warnings resulting from passing C string literals to
functions expecting an unsigned char pointer.
Jira: 2443
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To be able to get a hit on the AAR whenever a Scan Response is received,
enable it in the state transition.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add missing checks for the logic that discriminates between whitelisting
and non-whitelisting filtering, so that we do not fall into an
unsuspected false positive.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Don't call net configuration explicitly, instead rely on net_app
auto init service.
Thus, the only difference between POSIX and Zephyr versions of these
samples are different include files. The application code is 100%
the same.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Using bullets was too dense and not easy to read. Definition lists makes
this document more pleasant to read.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As we buffer incoming packets in receive callbacks, we must decrease
receive window to avoid situation that incoming stream for one socket
uses up all buffers in the system and causes deadlock. Once user app
consumes queued data using recv() call, we increase window again.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This fixes the existing situation that "if application buffers data,
it's the problem of application". It's actually the problem of the
stack, as it doesn't allow application to control receive window,
and without this control, any buffer will overflow, peer packets
will be dropped, peer won't receive acks for them, and will employ
exponential backoff, the connection will crawl to a halt.
This patch adds net_context_tcp_recved() function which an
application must explicitly call when it *processes* data, to
advance receive window.
Jira: ZEP-1999
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The led demo does not even enable Bluetooth by default, and in case a
custom enables it shall use CONFIG_NET_APP_BLUETOOTH_NODE.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables IPSP node role which requires IPSS GATT service to be
registered.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds NET_REQUEST_BT_ADVERTISE which can be used to advertise
IPSS service so the remote devices can connect to it.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some network interfaces such as bluetooth 6lowpan can start without
an assigned IP address and then later once the connection is up a
router advertisement broadcast will assign the IP address.
The net_app framework will timeout out during network init if a value
cannot be parsed from CONFIG_NET_APP_MY_IPV6_ADDR. Let's adjust
the framework to handle a missing value there and fill it in later
when the IPv6 address is added to the interface.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Rework the ctrl_lrpa_get() function so that it doesn't require an
assignment to be present inside the if statement, yielding smaller and
safer code.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Advertising reports generated by a scanner require the controller to
look up the resolving list to supply the host with an ID address instead
of the RPA that has been sent over the air.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use the actual scanner address to copy the generated RPA into, instead
of mistakenly copying it into the advertiser's address.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Whenever trying to generate a local RPA to send a scan request or a conn
ind, verify that it can be generated (i.e. no NULL IRK provided by the
Host) and fall back to using the public/random address if required.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The ESP32 UART driver can only be used on the ESP32 SoC AFAICT. But it
did not have a depend clause so it was polluting the options of other
platforms.
With this patch the ESP32 driver will no longer be exposed to users of
non-ESP32 devices.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Since the hardware expects big-endian IRKs but the common generation
function expects it in little-endian, copy and reverse the peer IRK
before generating RPAs.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Sample can be used to test ambient light, RGB and proximity
functionality of APDS9960 sensor in polling mode.
Remove old sample which is not using sensor API.
ZEP-1552
Signed-off-by: Punit Vara <punit.vara@intel.com>
This patch implements following functionality in polling mode.
Ambient light
RGB light
proximity sensor
Following datasheet has been used to develop driver
https://docs.broadcom.com/docs/AV02-4191EN
Jira: ZEP-1552
Signed-off-by: Punit Vara <punit.vara@intel.com>
This commit adds new sensor channel macro SENSOR_CHAN_BLUE which can
be used for RGB sensors to get illuminance in Blue spectrum.
Signed-off-by: Punit Vara <punit.vara@intel.com>
Contributions of 3rd party code and external HALS should have
information about the license of the code being contributed.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>