Commit Graph

185 Commits

Author SHA1 Message Date
Emil Gydesen cda5e58aa5 Bluetooth: CAP: Commander discovery support
Implement the CAP Commander discovery function.

Adds support for it in the shell.

This includes initial babblesim and unit testing as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-19 08:50:40 +01:00
Pavel Vasilyev fe70e50d41 Bluetooth: Mesh: Added support for randomly delaying publications
The section 3.7.3.1 of the mesh specification recommends to delay
a message publication in certain cases:
- at power-up or upon state change for a time between 20 to 500 ms
- for periodic publications for a time between 20 to 50 ms

This change implements this recommendation by adding the
`CONFIG_BT_MESH_DELAYABLE_PUBLICATION` Kconfig option which enables
the randomization code and by adding the `bt_mesh_model_pub.delayable`
bit field which allows each model decide whether the publications
should be delayed for this model or not.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-12-18 09:29:24 +01:00
Pieter De Gendt 4807ada01e net: lib: coap: Use coap_transmission_parameters in coap_server
Update coap_service_send and coap_resource_send to take an optional
pointer argument to the newly introduced coap_transmission_parameters.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-18 09:28:25 +01:00
Anders Storrø 25d44a828d Bluetooth: Mesh: Rename prov_dev->provisionee
Renames "prov device" references and options to
"provisionee" to align implementation with Mesh
Protocol specification v1.1, section 5.4.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-12-13 13:57:46 +01:00
Pieter De Gendt 157b22e5ec doc: connectivity: networking: api: Add doxygengroup for coap_mgmt
Make sure the CoAP event doxygen is added to the documentation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-11 18:33:31 +01:00
Emil Gydesen 9c8ec58beb Bluetooth: GMAP: Add GMAP shell
Add the GMAP shell module with support for running the
various audio configurations in an easy way.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-12-11 18:30:57 +01:00
Aleksandr Khromykh d175ac0572 Bluetooth: Mesh: access tx msg randomizer
Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-12-11 09:50:18 +01:00
Robert Lubos ffc425191e net: doc: Remove Network Connectivity API page
The Network Connectivity API page is kind of pointless, as it provides
little information (which can be found elsewhere as well) and it was
pointer out that it kind of creates noise in the documentation as it can
be confused with the page which provides a summary of network APIs.

Therefore, remove the page, and move the information from it elsewhere.
The brief summary of what APIs to use was moved the Networking APIs
index page. The information about the samples demonstrating BSD sockets
API usage was moved to the BSD sockets documentation page itself.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-07 10:37:15 +00:00
Robert Lubos b9453d52ed net: doc: Reference the Kconfig option that enables app libraries
Several application protocol libraries documentation missed information
on how can they be enabled (i. e. missed info about associated Kconfig
symbol). This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-12-07 10:37:15 +00:00
Pieter De Gendt 1f52a755d3 doc: connectivity: networking: Update CoAP event handling example
Change the CoAP documentation to demonstrate CoAP events using
net_mgmt.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-07 10:34:39 +00:00
Benjamin Cabé 571f94309e doc: net: sockets: fix terms list for Socket offloading section
This commit fixes incorrect rendering of the list detailing the various
parameters for the NET_SOCKET_OFFLOAD_REGISTER macro.
This also improves the spelling and grammar of said list.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-12-06 09:25:28 +00:00
Seppo Takalo 9102821fbe doc: Clarify documentation of LwM2M events
Properly document the actions that application should
take on certain events.

This clarifies the events that indicate that the LwM2M
engine is stopped.

Add missing events to the state machine diagram and
apply color coding to states.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-12-05 16:40:06 -06:00
Pieter De Gendt 21ba08c575 doc: connectivity: networking: Document NET_MGMT_REGISTER_EVENT_HANDLER
Add an example using the macro NET_MGMT_REGISTER_EVENT_HANDLER to the
network management documentation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-05 09:17:42 -05:00
Mia Koen 0bcad09392 bluetooth: mesh: Doc fix Bluetooth mesh to Mesh
SIG has changed Bluetooth mesh to Bluetooth Mesh
Updating zephyr docs accordingly
Leaving out old release notes

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-12-01 10:56:18 +00:00
Seppo Takalo 8cfede8f2e net: lwm2m: Support DTLS Connection Identifier
DTLS Connection Identifier support requires DTLS stack
that supports it. MbedTLS support in Zephyr is already
ported in, also some offloaded sockets support it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-17 09:23:29 +01:00
Alberto Escolar Piedras 05c03eb258 bluetooth dev doc: Update with nrf5340bsim info
Now that we also have this target board, we have
some more options.
Update the docs to reflect these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-16 17:53:25 +01:00
Lingao Meng ab08f34fd9 Bluetooth: Mesh: Make bt_mesh_model as rodata
Since model struct most of member should not change at run time,
so mark as const will be suitable and safely.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2023-11-16 16:52:14 +01:00
Alberto Escolar Piedras 9fe225d2b8 doc/connectivity/usb: Replace references to native_posix w native_sim
Replace the references to native_posix with native_sim,
and update link names accordingly.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-16 09:37:59 +01:00
Benjamin Cabé 155420522b doc: Fix occurrences of repeated words
Another round of repeated words cleanup. This commit tries to keep the
diff minimal and line wrapping was mostly left intact in the touched
files, as having them consistent across the documentation is probably
the topic of a future tree-wide cleanup (or not)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-15 17:34:39 -05:00
Andrej Butok 287b30eb78 doc: Fix double 'the'
Fix double 'the' in all .rst documentation.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-15 14:25:11 +00:00
Alberto Escolar Piedras d0f554dd6a docs: networing: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras e44c43cc2c docs: Networking with native_posix: Rename
Rename
Networking with native_posix
to
Networking with native_sim
replace all links to this page accordingly
and replace its references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Georges Oates_Larsen 9f093ab731 net: tls_credetials: Add TLS Credentials shell
Adds a shell interface for TLS Credentials, allowing management of
credentials via the Zephyr shell

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-11-14 10:40:02 +00:00
Alberto Escolar Piedras d427169845 docs: bluetooth: Replace reference to native_posix w native_sim
Let's replace the references to native_posix with native_sim,

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Tomasz Moń c275fa737b doc: connectivity: usb: Document CDC ACM ECHO mitigation
Explain the root cause behind garbage characters received in shell
applications, what Zephyr does to mitigate the issue and what is
expected from host userspace applications.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-13 09:43:46 +01:00
Emil Gydesen fc2a54b80c doc: Bluetooth: Audio Stack status table
Adds table of the status of the LE Audio stack in
the Bluetooth subsystem.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-13 09:43:35 +01:00
Pieter De Gendt b81ce1f957 doc: connectivity: networking: api: Add subsystem link notes to CoAP
The CoAP documentation has server/clients sample usages, added a
note about the available subsystems that can be used instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Pieter De Gendt 230c989590 doc: connectivity: networking: api: Add CoAP server documentation
Created a dedicated page for CoAP service and resource examples.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Aleksandr Khromykh 50d17a0d52 Bluetooth: Mesh: split gatt client and solicitation pdu sending
The ability to send the solicitation PDU doesn't
depend on GATT Client role.
Commit makes independent one functionality from
another.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 10:08:36 +01:00
Omkar Kulkarni 30c36525ef Doc: Bluetooth: Mesh: Specify RPR Server limitations
Specifies RPR Server limitations.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2023-11-03 09:54:03 +01:00
Ludvig Jordet 596fc48509 doc: bluetooth: mesh: Improve CDP128+ docs
Improves the documentation about how CDP 128, 129 and 130, as well as
Models Metadata Page 128 are created, as well as which functions the
application will have to call to store the correct contents in the
pages.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2023-11-02 12:24:47 +01:00
Seppo Takalo 2eb804a558 net: lwm2m: Add shell support for deleting object and resource instances
Extend the previous support of creating object instances by allowing
creation of resource instances as well.
Similarly, add support for deleting.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-02 09:27:55 +01:00
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
Henrik Brix Andersen eddfba487d doc: can: move the documention for high-level protocols to connectivity
Move the documentation for high-level CAN protocols (for now only covering
ISO-TP) from the peripherals section to the connectivity section.

This matches the layout in code, where the CAN controllers are under the
drivers/can directory and the protocols are under the subsys/canbus/
directory.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-30 09:25:40 +01:00
Anders Storrø c51bb9c13b Bluetooth: Mesh: Update spec ref 1.0.1->1.1
Updates Bluetooth mesh specification references:

- Change "Profile" to "Protocol" since the main specification has
changed its name.
- Update/align formating of specification references. This will
make it easier to find spec references in the future.
- Change some section references to point to the correct section of the
newest version of the specification (v1.1).

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-25 14:50:14 +02:00
Jukka Rissanen 8a58104396 net: shell: Add net-sockets command
The new "net sockets" command will utilize the object core
support to track and show information about BSD sockets that
are created in the system. This command is able to show info
for all network sockets (native, offloaded etc) in the system.

Example of the output of the new command:

uart:~$ net sockets
 Creator  Name       Flags  FD   Lifetime (ms) Sent  Received

    main  af_inet46  6ST    0    3260          819   498
    main  af_inet46  4ST    1    2110          469   142
    main  af_inet46  6DU    2    2110          9941  9941
    main  af_inet46  4DU    3    2110          1375  621

4 active sockets found.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-24 11:11:30 +02:00
Johann Fischer c152e0980c usb: device: cdc_acm: block in uart_poll_out() routine
According to the UART API documentation, implementation must block when
the transceiver is full. For CDC ACM UART, TX ringbuffer can be
considered as transceiver buffer/FIFO. Blocking when the USB subsystem
is not ready is considered highly undesirable behavior. Blocking may
also be undesirable when CDC ACM UART is used as a logging backend.

Change the behavior of CDC ACM poll out to:
 - Block if the TX ring buffer is full, hw_flow_control property is
   enabled, and called from a non-ISR context.
 - Do not block if the USB subsystem is not ready, poll out
   implementation is called from an ISR context, or hw_flow_control
   property is disabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-23 11:48:44 +02:00
Seppo Takalo 8ffb64d46f net: lwm2m: Allow configuring update period
Add new configuration value CONFIG_LWM2M_UPDATE_PERIOD
that allows calculating update period from last update,
instead of calculating it from the lifetime.

In runtime, server is allowed to change the lifetime of the
registration which causes update perdiod to be effected.

When fixed update period is preferred, UPDATE_PERIOD
config is then used.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 14:57:38 +02:00
Benjamin Cabé 32918ddd92 doc: Fix broken references to Kconfig options
Fixed a few occurrences of incorrect references to Kconfig options
(missing the CONFIG_ prefix)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-17 19:50:39 +01:00
Robert Lubos fdaba20b2c doc: net: Add page for net_time
So that the type is visible and "referencable" in the documentation.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-10 16:27:32 +03:00
Juha Heiskanen 647fb4dc8f net: lwm2m: RD client Deregister event indicate
Added a new event for LWM2M_RD_CLIENT_EVENT_DEREGISTER for
indicate LwM2M client dereistartion.

Updated unit test and sample for new event type

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-09-29 16:53:55 +03:00
Florian Grandel 9864d03c6e doc: openthread: integrate ot/ieee802154 docs
Integrates and cross-references OpenThread and native IEEE 802.15.4 docs
as they share a common driver layer.

While OpenThread is of course not an IEEE 802.15.4 subsystem API it is
still included in the ieee802154 documentation group, purely for
convenience to the documentation readers.

For organizational purposes OT is considered a separate area of
maintenance and therefore keeps its dedicated documentation page - but
the two subsystems now cross-reference each other for convenience.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-28 15:13:12 +02:00
Florian Grandel 80fc350849 doc: ieee802154: improved API documentation structure
Improves the API documentation including it's structure and integration
into the Zephyr documentation.

Previously the API status of the IEEE 802.15.4 API (and its sub-APIs)
was unclear.

This change adds three APIs in an "unstable" state:
- IEEE 802.15.4 L2 for subsystem developers
- IEEE 802.15.4 drivers for driver developers
- IEEE 802.15.4 net_mgmt for application developers

The corresponding APIs are documented at a group level.

These sub-APIs need to be separately versioned as they have different
audiences, change velocities and levels of stability.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-28 15:13:12 +02:00
Georges Oates_Larsen 98a506f341 net: conn_mgr: Write documentation
Write documentation for conn_mgr and its subsystems, especially
guidelines for writing connectivity implementations

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-09-28 15:11:14 +02:00
Pavel Vasilyev b2c163e108 doc: Bluetooth: Mesh: Fix line width to 100 in mesh docs
From Codying Style guideline:
https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style

`The line length is 100 columns or fewer. In the documentation, longer
lines for URL references are an allowed exception.`

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-28 09:33:37 +02:00
Benjamin Cabé 14348c53d4 net: doc: coap: Eclipse Titan is now on Gitlab
Eclipse Titan is now hosted on Gitlab (previously GitHub).
Update URLs accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-27 15:49:14 +02:00
Aleksandr Khromykh 236e3b64db Bluetooth: Mesh: shell supports 32 bytes static oob
Commit adds support of 32 bytes static oob in mesh shell.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-09-27 15:48:08 +02:00
Seppo Takalo ebfbf83153 net: lwm2m: Clean up shell documentation
Move commands that require parameters first into the list.

Move syntax line first, command documentation second,
flags last. This is much like Unix commands do

❯ /bin/ls --help
Usage: /bin/ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).

Compared to:

uart:~$ lwm2m
lwm2m - LwM2M commands
Subcommands:
  read    :read PATH [OPTIONS]
          Read value from LwM2M resource
          -x   Read value as hex stream (default)
          -s   Read value as string

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-09-26 16:55:16 +02:00
Mia Koen 0a0198898d doc: bluetooth: mesh: note and spec name fix
Fixed a note in Config Server model
and spec name in couple of other models

Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
2023-09-25 16:43:54 +02:00
Pavel Vasilyev 0e26a0ddb9 doc: Bluetooth: Mesh: Correct DFU and BLOB models specs names
Correct DFU and BLOB models specs names. Also mentioning that they are
experimental yet (under BT_MESH_V1d1 option).

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-25 16:42:55 +02:00