The code was missing the sending of the Input Complete PDU, and was
also setting the link.auth value too late.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The ping command was not checking if the user gave target
host as a parameter. This would lead to NULL pointer access.
Fixes#4827
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The parameter structs for advertising and scanning contain many
members that may not get explicitly set when enabling these states. Do
a memset to zero on them to make sure we don't operate on
uninitialized memory.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove references to make-centric build process, and refer to the
steps in a more neutral way (which is equally applicable to using
either make or ninja as the generator type).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The needed options to QEMU_EXTRA_FLAGS now get set from a single
central place, so applications don't need to do it anymore.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The qemu option to access the host's Bluetooth controller is now
automatically added to QEMU_EXTRA_FLAGS whenever Bluetooth support is
enabled in the application. Update the documentation to reflect this.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
After the cmake conversion, the SimpleLink WiFi host
driver would not build, and compiler flags like -Wno-strict-aliasing
were not being applied as they got spliced in before
-Wall rather than after.
This fixes those issues, using the set_source_files_properties()
method as suggeted in the CMakeLists.txt TODO comment.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Update the sample README with the latest changes during the
1.10 development cycle. We removed the 2 concurrent IPv4
and IPv6 connections and now the sample will make a single
connection based on whatever is configured (currently IPv6
takes precedence over IPv4).
Added instructions for how to switch the sample to IPv4.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Rather than continuing to add build system goals, let's just trust the
user to do the right thing. The only special case is build, which is
the default goal.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Use the default values for scan latency and receive delay, and enable
useful logging, like that for LPN.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
A value of 20ms means it's possible the LPN will end up doing
simultaneous advertising & scanning, which increases the risk of lost
packets. Use a default of 100ms to keep these separate.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Handling Friend Clear messages and sending the Friend Clear
Confirmation responses wasn't so far properly implemented. One of the
requirements is to keep sending the reponses even though we no-longer
have a friendship. This means that we need to keep the net_idx, frnd
and lpn_counter values valid, which in turn requires the introduction
of a separate "valid" boolean value.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The PTS tests for the Friend node expect a minimum of 16 queued
messages and the ability to have two LPNs. Set these as defaults.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When sending PDUs from Friend to LPN we should adhere to the
configured network transmit count & interval to get better
reliability for the PDUs to be received by the LPN.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When a Friend Node receives a Friend Request with a unicast
PreviousAddress that's not an element on the Friend Node, it needs to
start the Friend Clear procedure. This procedure involves sending
periodic Friend Clear messages to the old Friend of the LPN.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The only messages that should be encrypted using the friendship
credentials are those coming through the Friend Queue on the Friend
node, most request-response pairs between LPN & Friend (exceptions are
Friend Request - Friend Offer, and Friend Clear - Friend Clear
Confirm), as well as Model Publication messages when the Friendship
Credentials Flag has been enabled in the model publication.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When the node is in LPN node, the LPN-Friend messages has its own
retries, so doing this on the advertising level (i.e. following the
network transmit state) is sub-optimal.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes it possible (in a subsequent patch) to fine-tune some
special cases, like the LPN poll messages.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the advertising callback to include the exact duration that we
will be sending out the packet. This is useful since sometimes we want
to use the end point of the advertising as the reference time to count
when some other action should take place.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Lower the attempts and make sure we track the old Friend address for
subsequent Friend Requests, in case we never receive a Clear
Confirmation.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The default of the stack is now to automatically enable LPN
functionality after a given timeout.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add some automated policies for starting LPN establishment and make it
possible to perform the establishment in a "low power" way, i.e.
switching to low duty-cycle already when starting to send Friend
Requests.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Even if endpoint addresses are configurable by each platform,
it would be better to make the default configuration compatible
with a larger board range.
e.g. STM32 OTG FS device has only four endpoints (0x84 is out).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
https://github.com/zephyrproject-rtos/zephyr/issues/4864 revealed that
calling zephyr_sources() on a directory will silently omit the
directory. This is a clear user error and should be immediately
flagged as such.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>