Check whether the connection response parameters both with and without
ECRED are within the valid ranges from the Bluetooth Core Specification
(part 3.A.4 v6.0). Changes validation checks in requests to match the
same pattern.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Device tree and/or automount support was not present and might be useful
when for example the settings module needs early access to a filesystem.
This patch adds support to mount an EXT2 filesystem automatically. The
implementation chosen is to provide the drive name matching a disk
drive specified in the device tree ie on an (e)MMC or SD card.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
ZMS does not work without this and gives compilation errors, fix
this by adding the correct dependency
Signed-off-by: Jamie McCrae <spam@helper3000.net>
In the metadata, found that timer_status_sync_pending was missing the
timeout parameter. Noticed when tracing tests/kernel/common.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In a096b34835 which introduced tracing of k_sleep, the events in the
metadata file were missed causing issues when running with babeltrace.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The codec configuration operation for unicast (ASCS) contain
both a target PHY and a target latency value that was previously
just hardcoded by the client and unavailable by the server.
This commit adds them to the bt_audio_codec_cfg struct so that
applications can both set and get these values.
The default values used by BT_AUDIO_CODEC_CFG use the same
values as the client would previously set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds fixes to get LLEXT tests to work for NSIM VPX on MWDT.
Excludes prelocated extensions for MWDT for now.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Splits LLEXT static heap into an instruction heap placed in
instruction memory and a data heap placed in data memory.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Allow users to compile LLEXTs with the MetaWare Design Toolchain.
Provides utility to dramatically shrink bloated extensions by removing
unused section names left behind by MWDT strip. Test extensions will
not fit in NSIM VPX5 memory otherwise; each is reduced from ~16k to ~1k.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Adds a missing requirement from Core Spec V6.0 Vol 3.A chapters 10.1
and 10.2 to ignore L2CAP_FLOW_CONTROL_CREDIT_IND packets with the
credit value set to 0.
Matches existing credit-related functions by checking that the CID
is in the dynamic range (you can't add credits to fixed channels).
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Move it to a separate Kconfig file and move it under the net/lib/shell.
When using menuconfig, it helps to reduce the confusion of network
configuration options.
Signed-off-by: WenBin Zhang <freey7955@gmail.com>
The LwM2M RD client state machine have no knowledge of ongoing
observations or any other CoAP traffic and might trigger
QUEUE_RX_OFF state while engine is still waiting for Ack.
This can happen if CoAP Ack timeout is longer than
CONFIG_LWM2M_QUEUE_MODE_UPTIME and response is lost or taking
longer than QUEUE_MODE_UPTIME.
When observation is lost, CoAP Ack may be send, but socket is not
listening anymore if its closed or not polled while in RX_OFF and this
stops observation.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
BIS termination as broadcaster is handled different
than ACL and CIS, and in rare chances the
tx_complete for BIS may not have been completed in
the system workqueue before iso_new was called for the
same bt_conn struct (e.g. via bt_iso_cig_create), which
would perform
k_work_init(&conn->tx_complete_work, tx_complete_work);
but where conn->tx_complete_work still existed in
the system workqueue, which would cause the list
of pending items on the system workqueue to be removed
as the `next` pointer would be NULL.
This also adds an assert in bt_conn_new to prevent this
issue from appearing again.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The minimum 1 sec timeout for getaddrinfo() call is too long
when executing queries from network tests. So allow test to override
the minimum and set it to very low value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allow user to query localhost name and get a localhost address
127.0.0.1 or ::1 back. This is only enabled if loopback driver
is used as the use case does not make much sense otherwise.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that if user has enabled hostname support, we are
able to query it and get a local IP address back.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
* Remove `RTIO_WORKQ_STACK_SIZE` as it is no longer used.
* Fix description of `RTIO_WORKQ_THREADS_POOL_STACK_SIZE`.
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
With this changes, device will check if AP support Neighbor Report or
not before trigger roaming. No need to issue 11k command to enable 11k,
if AP supports Neighbor Report, device will trigger 11k roaming with
priority.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
As an error-handling strategy. The client then can recover from this
depending on the error and the number of occurrences.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
As their handling is not that similar and mixing them both affects
code readability. This patch does not affect functionality and does
not break any testsuite under rtio API.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
There's no use-case covering this case and enforcing it will allow
simplify the logic for processing items with each of these items when
mutually exclusive.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Update the HTTP service API to allow setting per-service configuration,
currently it is only custom socket creation callback,
but in the future it can be extended with other parameter
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Introduce pm_device_driver_deinit() which is required to fully
support device_deinit(). This function shall be called by drivers
when device_deinit() is called.
If PM_DEVICE is enabled, it will
simply check whether the device is either SUSPENDED or OFF, this
will prevent device_deinit() on a device which is currently in
use, and ensure the device is in the correct state if device_init()
is called later.
If PM_DEVICE is not enabled, it will invoke the SUSPEND action which
mirrors the pm_device_driver_init() behavior. Note that TURN_OFF
action is not called since the device is deinitialized after this
call.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The client list is filled from the bonding table at registration
but this should only be done once like the callback registration
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
In current implementation, the UUID 128 is not well supported. The
found issue includes,
Issue 1: No clear byte order of the UUID 128 in local SDP record.
Issue 2: No clear byte order of the UUID 128 of the SDP discover
parameter.
For issue 1,
Add the description to note that if the SDP attribute type is
`BT_SDP_UINT128`, `BT_SDP_INT128`, and `BT_SDP_UUID128`, the byte
order should be little-endian.
And swap the 128bit from little-endian to big-endian when responding
the peer SDP discovery request.
For issue 2,
Add the description to note that if the SDP discovery type is
`Service Search` and `Service Search Attribute`, and UUID is UUID 128,
the passed UUID data of the discovery request parameter should be
represented as the little-endian byte-order sequence.
And swap the 128bit from little-endian to big-endian when packing the
SDP discovery packet.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Enable double buffering on isochronous feedback endpoint to avoid
sending ZLP instead of feedback information.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Enable double buffering on data OUT endpoints to allow USB stack to
enqueue next transfer as soon as possible. This is especially useful
when operating at High-Speed where there is significantly less time
between subsequent SOF packets.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Change the macros to have only one plus operator per term. This is
purely stylistic change, no functional changes.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
In case of fatal network error (i.e. when the LwM2M client runs out of
retries), call lwm2m_engine_stop() to cleanup any allocated resources
for the client. The engine is dead at that point anyway so the
application needs to recover.
If this isn't done, it is theoretically possible to restart the LwM2M
client (with lwm2m_rd_client_start() which does not report an error in
such case), which in turn could lead to resource leaks (like for
example the observer list is reinitialized) if the application
didn't call lwm2m_rd_client_stop() first. Calling lwm2m_engine_stop()
ensures that all resources are freed even if the application doesn't
call stop before restarting.
Stopping the engine is also needed when the network error occurs when
de-registering - in such case the engine goes straight into the IDLE
state, where it's possible to restart the client and thus reinitialize
the observer lists.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add missing error checks for mutex locks after the mutexes
were changed to not use K_FOREVER which should not be done in
the BT RX thread.
A larger overhaul of how mutexes are using within the scan delegator
should be considered, as there are a lot of locks and unlocks when
handling the callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Error codes fall into two main categories:
case 1: NOT_SUPPORT_XXX. This means that the configuration of the
parameter is not supported locally.
case 2: INVALID_XXX. This means that the parameter is not configured or
duplicated in the set_config_req command.
Currently the protocol only supports SBC, so it is only checked for SBC
parameters.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Add tests to make sure that if neighbor cache does not contain
info for neighbor link layer address, we can queue packets
and re-send them when the neighbor cache contains the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>