According to AVCTP v1.4: On the controller and the target side,
handling of transaction labels is dependent on the application.
Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
Remove the transaction label mechanism because:
1. Not necessary at stack, typically an application can handle the
timeout mechanism if required (very rarely).
2. It is a burden on memory size to record all pending commands.
Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
This patch allows the upper layer to acquire the remote AVRCP
capabilities. These capabilities can be further used in register
notifications.
Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
Update release_rx_buffer return value to match API documentation.
Cleanup register_ept workflow - remove unused variable.
Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
sizeof('\0') is misleading as it will return 4 instead of 1,
since it will evaluate to sizeof(0), which returns the size
of the `int` type. Modify the expression to use sizeof(char)
with a comment.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes typos in the BT_DEVICE_NAME_GATT_WRITABLE_SECURITY and
BT_DEVICE_APPEARANCE_GATT_WRITABLE descriptions.
Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Fix compiler warning by adjusting the number of chars copied to the
destination. Compiler does not like if the destination size of the
`strncpy`-operation is the same as the number of characters written. Even
though it is not a bug in this case. Only copying size-1 characters fixes
the warning and exhibits the same behavior.
Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
When the board has been provisioned and the board is rebooted
it was not possible to connect to the board through the proxy
servcie. This fixes that the Mesh Proxy servive is restarted
after the board is rebooted.
Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Make Xtensa simulator logging backend depend on more generic
SIMULATOR_XTENSA setting instead of individual SoCs.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The LoRaWAN SMP transport uses MCUMGR_TRANSPORT_LORAWAN_REASSEMBLY to
enable reassembly. It selects MCUMGR_TRANSPORT_REASSEMBLY, which causes
smp_transport_init to call smp_reassembly_init on the passed transport.
This makes the subsequent call to smp_reassembly_init in the LoRaWAN
transport initialization redundant.
Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Before the fix for #77150 was merged, with LOG_BACKEND_SHOW_COLOR=n and
CONFIG_SHELL_VT100_COLORS=y the shell would still display colors by
enabling the flag in the shell_log_backend.c.
Now, LOG_BACKEND_SHOW_COLOR has to be enabled to allow shell logging
color, but that writes ANSI escape sequences to the log files.
Explicitly disable ANSI color output for the filesystem logging backend.
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
If socket call fails when mdns_responder creates listeners, then
print the return value to make it easier to figure out what is
wrong. Typically one needs to increase the size of
CONFIG_ZVFS_OPEN_MAX if errno is ENFILE.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The simple backend returns the size of the credential,
even if it is too big.
The secure backend should do the same,
our libraries depend on this behaviour.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
The help text for connect says
[-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz]
but it disallows setting band to 0. Change this and allow
band 0 option when doing normal connect. Disallow setting
the band 0 when enabling AP mode.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The negative status code is actually the errno which we might
get returned from lower levels. For example if user sets -t
(timeout) option, the -ETIMEDOUT might be returned. In this case
map the errno value to connection timeout status value.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If "wifi connect" fails, tell user why in textual format.
This helps debugging connectivity issues.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
As MQTT 5.0 allows to specify the disconnect reason in the Disconnect
packet, use this new feature to improve error notification to the
broker, according to the error guidelines in the MQTT 5.0 spec.
For most cases, a generic arbitrary mapping between errno values and
reason codes is used, however the parser can specify the disconnect
reason code manually to better handle certain corner cases (like invalid
topic alias used).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for handling topic aliases received from the broker.
The MQTT client implementation will store received topic for further use
in case consecutive PUBLISH received from the broker contains no topic
but alias only.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for a new AUTH message introduced in MQTT 5.0.
This is a new mechanism specified by MQTT 5.0, which allows clients and
brokers for enhanced authentication in between CONNECT and CONNACK
exchange. An additional MQTT event (MQTT_EVT_AUTH) was specified which
is triggered when the AUTH packet arrives from the broker.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for DICONNECT message specified in MQTT 5.0.
As with MQTT 5.0, the disconnect can now also be initiated by the
broker, it was needed to add decoder support for the message.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for PUBACK, PUBREC, PUBREL and PUBCOMP specified in MQTT
5.0. As all of these acknowledgment packets have similar format,
introduced a common encoder/decoder to handle ACK packets.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for PUBLISH message specified in MQTT 5.0. The message
encoder and decoder were updated to support MQTT properties.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for CONNACK message specified in MQTT 5.0, along with
property decoders required to decode MQTT properties. Decoded properties
are provided to the application within mqtt_connack_param structure,
accompanying the CONNACK event.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for CONNECT message specified in MQTT 5.0, along with
property encoders required to encode MQTT properties which is a new
concept in MQTT 5.0. Connect and will properties can be specified by the
application in the mqtt_client structure before connecting.
Introduce a helper function which allows to verify whether MQTT 5.0 is
used or not, so that it's still possible to use MQTT 3.1 even if MQTT
5.0 support is enabled in Kconfig.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The macro did not take into account the 2-byte binary data length
encoded before the actual binary data.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
It should be possible to select maximum supported MQTT version, so that
for example MQTT 5.0 features can be compiled-out in case they're not
needed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Previously, PB-GATT unprovisioned advs would continue being sent if a
device is provisioned or in the process of being provisioned (an active
provisioning link) over PB-ADV.
This commit introduces the `link_cancel` callback for the `prov_bearer`
struct. When a provisioning link is established over a prov bearer, all
other (active) prov bearers will be suspended through this callback, and
re-enabled when the link is closed. An exception is made for PB-REMOTE,
which can utilize the other bearers.
The call to `bt_mesh_pb_gatt_srv_disable` in settings.c is removed. This
is called in `mesh_commit`, and is not needed as this is only used
during boot, at which point the Mesh provisioning service has not yet
been enabled/registered, meaning the function does nothing.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Fix ull_hdr_get_cb() for advanced scheduling to return
ticks_slot for Peripheral role.
Relates to commit d6c3e04eb8 ("Bluetooth: Controller:
Central maximum data PDU size time spacing").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
For many devices iSerialNumber is not required. The only device class
currently supported in Zephyr that requires iSerialNumber is MSC. If the
serial number is not available then iSerialNumber must be 0. Failure to
read the string descriptor for non-zero iSerialNumber fails USB Command
Verifier Chapter 9 tests.
When USBD_DESC_SERIAL_NUMBER_DEFINE() was used without CONFIG_HWINFO
then it did lead to runtime failure when requesting the string (thus
failing certification).
Fail USBD_DESC_SERIAL_NUMBER_DEFINE() at build-time if CONFIG_HWINFO is
not set to prevent the surprise at runtime. Only define serial number
descriptors if CONFIG_HWINFO is enabled.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
added function to calculate antenna path
based on the antenna permutation index and
total number of antenna paths
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
Kconfig value LWM2M_ENGINE_MESSAGE_HEADER_SIZE added
an extra headroom for CoAP packet sizes so that
if CoAP Block-Wise transfer block-size is configured
to be same as LWM2M_COAP_MAX_MSG_SIZE, the full
payload block would usually fit to the datagram.
This causes too much confusion to be usable.
CoAP headers and options vary on sizes, and there is
no runtime limitations that we should check the
header size against.
Only real limitation is the CoAP packet size, which
must fit into the UDP datagram with typical DTLS headers.
Only limitation for CoAP block-size then is that
it must fit into the CoAP message with all the headers
and options. But as the option sizes, like path, vary,
it must be checked runtime.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Convert the socket poll logic to use a more lightweight eventfd file
descriptor instead of a socket pair.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Disable/enable endpoints even if the new alternate is the same as the
current one, forcing the endpoint to reset to defaults.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Do not report canceled transfers as an error and continue the transfers
regardless of the previous transfer status.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move functions `bt_sco_cleanup()`, `bt_conn_create_br()`,
`bt_hci_connect_br_cancel()`, and `bt_conn_get_dst_br()` from `conn.c`
to `conn_br.c`.
Change the function `bt_hci_connect_br_cancel()` to internal public
function.
Add a header file `conn_br_internal.h`. And declare the function
`bt_hci_connect_br_cancel()` in the header file.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Clarifies the use of identity in `bluetooth.h` by specifying whether the
documentation refers to the identity address, i. e. the actual address
`bt_addr_le_t`, or the identity handle, i. e. an index corresponding to
a specific identity address.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
if CONFIG_PM=y, board will enter low power,
which will cause problem for debugger.
So for ztest cases, we need enable this to avoid problem.
This used to apply to soc/platform level, now remove them.
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Several members of the ull_hdr can be removed, saving 12 bytes
from all ULL instances used (and a bit of code as well)
ticks_active_to_start is always 0 and can be removed completely
ticks_prepare_to_start is always set to
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_XTAL_US), so replace usage
of it by this constant
ticks_preempt_to_start is always set to
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_PREEMPT_MIN_US), so replace
usage of it by this constant
In addition, remove logic handling usage of XON_BITMASK since it
was only used by the long removed legacy LL
Signed-off-by: Troels Nilsson <trnn@demant.com>
The lost_payloads calculation in ull_conn_iso_start() could easily
end up negative for CIS with FT > 1; Add a check to avoid this
Signed-off-by: Troels Nilsson <trnn@demant.com>
If we end up writing zero bytes to cmux output, we can return
zero instead of -ENOMEM as it would break various modules when
using small buffers. For example modem_chat.c does not tolerate
-ENOMEM but handles zero OK.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>