Commit graph

321 commits

Author SHA1 Message Date
Florian Grandel
2d8b272ab5 tools: net-tools: place net-tools inside tools
Updates references to the net-tools project  to refer to the correct
placement of net-tools under tools.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-05 12:34:09 -05:00
Florian Grandel
21481dd31c doc: net: qemu: minor fixes
Adds missing preliminaries and recommends to start persistent commands
in the background.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 21:27:20 +02:00
Anuj Pathak
957d59814b bluetooth: services: added current time service
- added ctc implementation
- updated Kconfig & CMake files
- updated service doc

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 11:38:28 +02:00
Dat Nguyen Duy
8bbcab485d docs: gptp: add mention ClockSourceTime interface is supported
Update the docs to reflect that ClockSourceTime interface is supported

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-08-27 10:50:25 -04:00
Tomasz Moń
d3e1bc8b59 samples: usb: add UAC2 implicit feedback sample
The sample illustates how to achieve bidirectional asynchronous audio.
Implicit feedback is the only way to achieve asynchronous USB headset
on devices that have only one isochronous IN and one isochronous OUT
endpoint.

The sample implements stereo playback and mono recording. While it would
be possible to have stereo recording, the commonly available headsets
are mono only. The number of channels can differ between audio sink and
source because the only requirement is that the two run on same clock.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-26 11:27:30 -04:00
Johan Hedberg
48c05bb361 doc: bluetooth: Fix external web page references
The generated HTML was broken, even though the rst files themselves
contained the correct URLs. Update to a different format which should
generate the right output.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-21 18:26:15 +01:00
Maochen Wang
1db73c3d4f wifi: Add WPA2 EAP-TLS support
Add basic WPA2 EAP-TLS support.
Also, add test infrasturcture esp. the certification handling,
non-certificate credentials are take as runtime input and certificated
are build time input for testing.

A real application can set certificates at runtime too.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 10:30:55 +02:00
Jukka Rissanen
f93e19276e doc: tracing: net: Add information for network tracing
Add a simple documentation page that describes the network
tracing support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Henrik Brix Andersen
9584008d9f net: buf: deprecate special putter and getter functions
Deprecate the net_buf_put() and net_buf_get() functions.

Special handling of net_bufs in k_fifos is no longer needed after commit
3d306c181f, since these actions are now
atomic regardless of any net_buf fragments.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-16 09:55:11 +02:00
Johan Hedberg
640151be62 doc: bluetooth: Fix auto-pts references
The auto-pts project is now days hosted under an independent organization
instead of the intel one.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-14 09:14:29 -04:00
Benjamin Cabé
385f8e127d doc: Use basic ..doxygengroup syntax
Do not pass options to doxygengroup to rationalize
usage and be less dependent on Breathe.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Seppo Takalo
e7b06e1c86 net: lwm2m: send REGISTRATION_TIMEOUT event on error
When socket errors call sm_handle_timeout_state() we might be
in a state where application assumes we are in registered state
but we are dropping it.
Therefore we must ensure that all registration states emit either
REGISTRATION_TIMEOUT event for application to indicate that
we have lost the connection to server.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-06 17:16:46 -04:00
Johann Fischer
6c779908fa samples: net: remove wpanusb sample
Clean up before deprecating legacy device support.
The Linux kernel driver for this example has never been upstreamed or
implemented upstream. In general, 15.4 development does not seem to be a
big success, but if it comes up again, the protocol used by the example
will need to be redesigned anyway.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Johann Fischer
4dd1681fab samples: usb: remove hid sample
Clean up before deprecating legacy device support. This sample does not
contain anything special that is not present in the hid-mouse or
hid-keyboard samples. It also makes no sense to port it to a new stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Johann Fischer
cd9dff7d8c samples: usb: remove cdc_acm_composite sample
Clean up before deprecating legacy device support. Remove
cdc_acm_composite sample, which is not much different than cdc_acm, but
uses two virtual UART interfaces.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Benjamin Cabé
8e6b44ce66 doc: net: fix Sphinx C domain roles usage
use the proper types/syntax for referencing C elements from Networking
docs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:26 +01:00
Matt Rodgers
47fbb8512f net: coap_client: allow application to add block2 option to requests
Allow an application to add a Block2 option to an initial request for a
resource. For any subsequent requests as part of a blockwise transfer,
drop the application-added Block2 option since the coap_client must
append a Block2 option with updated NUM and SZX fields based on the
server response.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-01 09:13:32 +01:00
Gerhard Jörges
e55278a87b net: lib: http_server: add static fs resource
adds filesystem as a resource for the http_server which serves static
(gzipped) files from a filesystem to the client.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-07-31 10:08:16 +02:00
Johann Fischer
67caae3aca usb: device_next: introduce UDC_BUF_POOL_*_DEFINE macros
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Emil Gydesen
38d09af445 Bluetooth: BAP: Scan delegator add src without PA sync
Modify the bt_bap_scan_delegator_add_src to take an address and
a sid instead of a PA sync object, so that the scan delegator
can add a source without syncing to the PA.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-28 07:31:06 +03:00
Kacper Dalach
52197b515a drivers: eth: native_posix: if_name from cmd line
Iface name which is used by native posix ethernet driver can only be
specified at compile-time. I wanted to run two instances of the same
program on native posix but did not want to make two separate builds only
to change the iface name. I have implemented getting the iface name from
command line.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2024-07-28 07:30:02 +03:00
Vineeta S Narkhede
232c802c05 net: hostname: Add a function to set the hostname postfix as is.
Fixes: #72363

The existing function to set the postfix is converting postfix
string to hexadecimal. Adding a new function to handle a use case
where the provided postfix should be used as is without any conversion.

Signed-off-by: Vineeta S Narkhede <VineetaSNarkhede@Eaton.com>
2024-07-28 07:28:51 +03:00
Emil Gydesen
27d0aad70c doc: Bluetooth: Update LE Audio and iso in the BT features page
Added Isochronous channels to the controller
Moved Isochronous channels from LE Audio to the host
Changed the LE Audio to refer to the page where
the feature is more detailed described.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-24 08:59:24 +02:00
Théo Battrel
f2b6490dee Docs: Bluetooth: Update qualification page
With the new Bluetooth Qualification process the QDID and link to
launchstudio are outdated, remove them.

Also remove the ICS listing as it hasn't been updated for a while.
Instead add a download link to the Zephyr Bluetooth Host ICS file.

Update the documentation configuration script to include the ICS file
(`*.pts`) in the external contents.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-22 03:29:29 -04:00
Andries Kruithof
3828c8b86a Documentation: Bluetooth: audio: add table for profile dependencies
Added tables for showing the dependencies of profiles on other
profiles and services

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-07-17 08:25:51 +02:00
Johann Fischer
552c353969 doc: usb: add a note about the deprecation plan
Add a note about about the deprecation of current USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-10 14:36:46 +02:00
Vinayak Kariappa Chettimada
f9655ac84e doc: release: 3.7: Add known issue with nRF51x SoC series Bluetooth
Add known issues section with broken Bluetooth support for
nRF51x SoC series boards.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-10 14:36:10 +02:00
Pisit Sawangvonganan
eead5104fc doc: fix typo in multiple directories before v3.7.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-08 09:21:24 +02:00
Jukka Rissanen
9abca61841 doc: net: Add info about misc network config options
Add information about these missing Kconfig options:

CONFIG_NET_CONFIG_MY_IPV6_ADDR
CONFIG_NET_CONFIG_PEER_IPV6_ADDR
CONFIG_NET_CONFIG_MY_IPV4_ADDR
CONFIG_NET_CONFIG_MY_IPV4_NETMASK
CONFIG_NET_CONFIG_MY_IPV4_GW
CONFIG_NET_CONFIG_PEER_IPV4_ADDR

Fixes #75211

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-03 08:50:22 +02:00
Emil Gydesen
0eb612b28b doc: Bluetooth: Audio: Remake zephyr_gaf.svg to graphviz
Remake the Zephyr Generic audio framework (GAF) figure to a graphviz
version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
05b11e58eb doc: Bluetooth: Audio: Remake gaf.svg to graphviz
Remake the Generic audio framework (GAF) figure to a graphviz version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
0b4d7523fd doc: Bluetooth: Audio: Remake audio_arch to graphviz
Remake the Bluetooth Audio Architecture figure to a graphviz
version. This makes it easier to modify it directly in the
.rst file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
cb80ca3a50 doc: Bluetooth: Add sample app for CAP ini/acc in status table
Add the sample application as existing for the CAP initiator
and CAP acceptor.

The samples are still in progress of being improved and
fully featured, but they exist and can be used already now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 12:21:37 -04:00
Chris Friedt
9ada52f060 fdtable: replace z_ prefix with zvfs_ for fdtable.h functions
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.

ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.

There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.

- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-26 12:33:02 +02:00
Lingao Meng
302422ad9d everywhere: replace double words
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Carles Cufi
a87b825641 doc: bluetooth: mesh: Remove outdated text
The bt_mesh_cfg_srv structure was removed in ad2fd44d7a, no need to
keep this text here anymore.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-06-24 12:42:30 -04:00
Jordan Yates
07870934e3 everywhere: replace double words
Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Benjamin Cabé
a8573a985c doc: fix incorrect bullet lists
ReStructuredText bullet lists should be preceded by an empty
line

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
b4b623c26c doc: use proper pygment for .conf code-blocks
config file snippets should use "cfg" pygment to get proper highlighting
This commit updates all occurences where "kconfig" or other languages
were used.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Johann Fischer
7e123084e2 doc: usb: document USB message notifications
Add documentation about USB message notifications. Use literalinclude to
pull code snippets from the samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Johann Fischer
afa6411139 doc: usb: include group usbd_msg_api
Include group usbd_msg_api to reference its members.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Tomasz Moń
e653816665 doc: usb: include new MSC device API
Add doxygen group with MSC device API and document macro to create
mapping between disk access and MSC LUN.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Johann Fischer
52dbc3377b doc: usb: make example code most left-aligned
Make example code most left-aligned.
Also use :samp: to format identification strings in the table.
Followup on commit 8739efe0fc
("doc: usb: add initial USB device configuraiton howto").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-18 19:56:54 -04:00
Chris Friedt
12cc7bbd8a net: sockets: use z_finalize_typed_fd() to identify as sockets
Fill-in the mode field of the fd_entry so that the
implementation can be made aware that the specific file
descriptors created are sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-15 07:47:12 -04:00
Johann Fischer
8739efe0fc doc: usb: add initial USB device configuraiton howto
Add initial documentation how to configure and enable new USB device
support. Use literalinclude to pull code snippets from the samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
9e80d4f976 doc: usb: rework new USB device support overview description
Rework new USB device support overview description.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
1d0616a33b doc: usb: include Audio Class 2 device API
Include new Audio Class 2 device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
7f2320ae08 doc: usb: include new HID device API
Include new HID device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Johann Fischer
0dc1414237 samples: usb: remove hid-cdc sample
We have some other simpler CDC ACM and HID samples in the tree.
Providing multiple functions is a core functionality of USB device
support, and we have other samples to demonstrate this as well. This
sample does not really provide anything unique, but has a few issues
such as unsafe HID buffer handling and calling uart_fifo_fill() outside
of the UART driver's IRQ context.
Remove the hid-cdc sample, as there is no value in this sample, and to
avoid spending time fixing and cleaning up the code.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-13 16:47:22 -04:00
Adam Wojasinski
4a989b736e doc: net: ptp: Add PTP library documentation
Add documentation page for IEEE 1588-2019 (PTP) library.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-06-13 05:40:41 -04:00