Add opcode information for cmd timeout assert,
since BT_DBG usually not show in real product,
however we can't see any information just from
assert message.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
When vendor specific commands are disabled by setting
BT_HCI_VS=n the host still calls bt_read_static_addr,
but that function is not compiled in, resulting in a
build error.
Fixed by moving the code in controller/hci/hci.c
outside of the conditional compile
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Package length was previously stored on 10 bits which limited
package size to 1023 bytes. Descriptor which contained package
length field had one unused bit which can be used to increase
package length field to 11 bits doubling the maximum package
length.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When packacge exceeds the limitation warning log is printed
and message is dropped.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Some internal macros were still using 2 suffix which comes from
time when there was v1 and v2. Cleaning up by removing the suffix.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Reschedule dedicated relay adv sets immediatey after finishing
advertising of the previous relay message. This allows a node to
relay messages as fast as possible when Relay Retransmit Count state
is zero using less relay adv sets.
When Relay Retransmit Count state is non-zero, the delay doesn't do
anything as the time between pushing a relay message to the host and
triggering adv_sent callback will be greater than this delay. In this
case the relay adv set will send a next message immediately.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The unicast client would attempt to send the
receiver start ready opcode to the server for
source ASEs before the CIS was connected, which
is a spec violation.
The code has been refactored to set a boolean,
and then send the receiver start ready opcode on
CIS connection instead.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This fixes compilation errors of BabbleSim tests generated by gcc-12
when MOD_REL_LIST_SIZE is zero.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
A subscription check was still being done in the
gatt_notify_multiple_verify_params() fn, regardless of the value of
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION.
This could lead to getting this warning if BT_GATT_NOTIFY_MULTIPLE is
enabled, and the notifications not being sent to unsubscribed peers.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
[216/319] Building C object zephyr/subsys/bluetooth/controller/
CMakeFiles/subsys__bluetooth__controller.dir/hci/hci.c.obj
zephyrproject/zephyr/subsys/bluetooth/controller/hci/hci.c:
In function 'hci_vendor_cmd_handle_common':
zephyrproject/zephyr/subsys/bluetooth/controller/hci/hci.c:5459:17:
warning: implicit declaration of function 'vs_set_min_used_chans';
did you mean 'll_set_min_used_chans'? [-Wimplicit-function-declaration]
5459 | vs_set_min_used_chans(cmd, evt);
| ^~~~~~~~~~~~~~~~~~~~~
| ll_set_min_used_chans
....
zephyr-sdk-0.15.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../
../../../arm-zephyr-eabi/bin/ld.exe: zephyr/subsys/bluetooth/controller/
libsubsys__bluetooth__controller.a(hci.c.obj): in function
`hci_vendor_cmd_handle_common':
zephyrproject/zephyr/subsys/bluetooth/controller/hci/hci.c:5459: undefined
reference to `vs_set_min_used_chans'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Once the bt_ascs_ase is taken from the mem_slab, it has to be memset to
override the junk data.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The z_set_timeout_expiry() function is a wrapper provided in the
timeout subsystem that has some corrections for timelicing. But the
suspend code doesn't care; by definition there are no active threads
that might be timeslicing at the point where the OS is suspending.
Use the lower-level timer driver API instead.
(z_set_timeout_expiry() is also about to disappear)
Signed-off-by: Andy Ross <andyross@google.com>
1. `zsock_socket()` gets the right packet familiy.
2. `inet_pton()` returns 1 on success.
This should address #55193.
Signed-off-by: Sebastian Arnd <sebastianarnd@gmail.com>
Provide a means of declaring zero or more HTTP services, each
with zero or more static HTTP resources.
Static HTTP resources are those which have fixed paths[1] which
are known prior to system initialization. Some examples of
static http resources would be
* a forwarder from '/' to '/index.html'
* a REST endpoint with fixed path '/api/foo' and detail
pointing at some implementation-specific function
* a Javascript file in string form with fixed path '/js/util.js'
* a 'construction' image with path '/res/work.png'
* a gzip-compressed 'Hello' HTML file at '/hello.html'
Without describing in any detail how static HTTP resources are
organized or served by any given HTTP server, we can describe
what static resources exist on a system in a common way that
does not require any optional facilities (e.g. filesystem) and
relies only on addressable memory.
Additionally, for the purposes of simply allowing others
to implement custom HTTP servers in a consistent way, or
benchmarking implementations, or having a consistent testsuite
to use across multiple implementations, it is helpful to have
a common method to declare HTTP services and static resources
for Zephyr.
[1] https://en.wikipedia.org/wiki/URL
Signed-off-by: Chris Friedt <cfriedt@meta.com>
In the unicast client we should reset the stream before calling
the released callback. This is so that we can reuse the stream object
in the released callback.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
USB Mass Storage Specification for Bootability requires MODE SENSE(10)
command. MODE SENSE(6) and MODE SENSE(10) generally access the same data
but differ in the maximum allocated length and LLBAA support. However
there is no point in extracting common handling because there no mode
pages are supported now.
Fail MODE SENSE requests if asking for anything other than supported
page codes (to which the essentially hardcoded response is valid).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Several places used the bt_audio prefix where it shouldn't.
Also moved the BAP documentation to its own file.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a new header file bap_lc3_preset.h which contains
the definitions of the LC3 (pre)sets defined by the
BAP spec.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename the bt_audio_unicast_client API to bt_bap_unicast_client
and move the API to bap.h
Also adds the _bap_ infix to the bt_unicast_client functions.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename the bt_audio_audio_server API to bt_bap_unicast_server
and move API to bap.h.
This also adds the _bap_ infix for bt_unicast_server.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This fixes compiler unused variable error
warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
461 | struct bt_ascs_ase_status *status;
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Mass Storage Class allows device to either silently discard OUT endpoint
data after receiving invalid CBW or to STALL the OUT endpoint (and keep
it STALLed regardless of host clearing halt) until Reset Recovery.
Switch from silently discarding to STALL in order to allow host realize
that device waits for Reset Recovery without transferring complete OUT
data.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
While both the server and client are allowed to terminate
the CIS when a stream is released, it is, per the BAP spec,
the client's responsibilty. This commit modifies it so that
the client will actually get a chance to do its responsibilty
by adding a small delay before our ASCS disconnects the CIS.
The CIS disconnection has kept with a delay, rather than
removed, in case that the Unicast Client is not properly
performing it's responsibility.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix scan window value corruption due to modification of
stored ticks_window value when enabling continuous scan.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Removes the unused pac_pache from the unicast_client.
This moves the storing of the PAC records (in the form of
struct bt_codec) from the stack to the upper layers.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The thread analyzer cannot be really used with the
POSIX architecture.
As:
* Code takes 0 simulated time to execute.
So the analyzer will report 0 cycles being used.
* The stack allocated by Zephyr is not actually used
(except for a tiny part used by the arch code itself
to do a bit of thread bookkeeping).
The POSIX architecture uses a separate stack
(from an underlying Linux pthread) which Zephyr is blind
about. So the thread analyzer is going to only report
a tiny stack utilization.
Prevent users from selecting them together to avoid confusion.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Initial commit introducing the input subsystem into Zephyr.
Includes the input_event data structure, the input_report_* APIs, an
iterables sections based subscription API and two operation modes:
synchronous, where the listeners are called directly, and asynchronous,
where the listeners are called in a dedicated thread.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Latest modification to LLCP removed 'monitoring' of cis->established
flag in LLCP, relying instead on signal through ULL.
For this to work properly the signal must also be generated, so this is
introduced. Note - checking of cis->established flag could be removed
if caller ensures only calling once (on establish condition)
Signed-off-by: Erik Brockhoff <erbr@oticon.com>