Commit graph

678 commits

Author SHA1 Message Date
Zhe Weng
10eae1dc6b vconfig: Support setting default PCP when creating VLAN
Now we allow setting a default PCP when creating VLAN like:
`vconfig add iface-name vlan-id [pcp]`
e.g.
`vconfig add eth0 10` will create eth0.10 with VID=10 and no PCP(0)
`vconfig add eth0 10 3` will create eth0.10 with VID=10 and PCP=3

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2026-01-08 22:51:19 +08:00
Felipe MdeO
ca11a7e093 system/smf: Port SMF .c/.h files to NuttX
This commit add state machine framework lib to the NuttX project. Also an example is added to help users understand and use this feature.

Changes: Added some files. No impact in other features are expected.

Adjust SMF macro names

Fix issues requested during MR review

update kconfig

fix ci-cd issue

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-01-05 12:50:04 -05:00
meijian
3467f9b82d apps/net: add ip address connectivity check API
The system checks connectivity with the input IP address; if no IP address is provided, it defaults to checking DNS server connectivity.

Signed-off-by: meijian <meijian@xiaomi.com>
2026-01-04 00:05:38 +08:00
nuttxs
9ad4c3c395 netutils/dhcpc.h: fix the compilation error caused by undefined
CONFIG_NETDB_DNSSERVER_NAMESERVERS

Provide a default value for CONFIG_NETDB_DNSSERVER_NAMESERVERS if
CONFIG_NETDB_DNSCLIENT is not enabled

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2026-01-02 14:12:10 +01:00
dongjiuzhu1
03ca9ba500 netutils/ptpd: using -B to control BMCA message
new option -B to BMCA message

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 08:51:51 -03:00
dongjiuzhu1
4426ce733a netutils/ptpd: using dynamic config to config clien-only mode and delaye2e
fix compile warning when only enable PTPD_CLIENT or PTPD_SERVER

ptpd.c:493:38: error: 'CONFIG_NETUTILS_PTPD_PRIORITY1' undeclared (first
use in this function); did you mean 'CONFIG_NETUTILS_PTPD_CLIENT'?

ptpd.c:494:39: error: 'CONFIG_NETUTILS_PTPD_CLASS' undeclared (first use
in this function); did you mean 'CONFIG_NETUTILS_PTPD_CLIENT'?

ptpd.c:495:39: error: 'CONFIG_NETUTILS_PTPD_ACCURACY' undeclared (first
use in this function); did you mean 'CONFIG_NETUTILS_PTPD_DEBUG'?
ptpd.c:498:38: error: 'CONFIG_NETUTILS_PTPD_PRIORITY2' undeclared (first
use in this function); did you mean 'CONFIG_NETUTILS_PTPD_CLIENT'?

ptpd.c:502:36: error: 'CONFIG_NETUTILS_PTPD_CLOCKSOURCE' undeclared
(first use in this function); did you mean
'CONFIG_NETUTILS_PTPD_STACKSIZE'?

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 08:51:51 -03:00
dongjiuzhu1
ac881e5108 system/ptpd: provide more parameter by struct ptpd_config_s when starting ptpd
origin command change to new command:
ptpd start interface & -> ptpd -i eth0 &
ptpd stop pid          -> ptpd -d pid
ptpd status pid        -> ptpd -t status

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 08:51:51 -03:00
Zhe Weng
40c7982816 netlib: Add support for adding/removing VLAN device
Add support for adding/removing VLAN device

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-30 11:17:38 +08:00
meijian
9da2bc0696 apps/net: add get iobinfo api
Obtain detailed IOB information by parsing the /proc/iobinfo file.

Signed-off-by: meijian <meijian@xiaomi.com>
2025-12-25 12:27:27 -05:00
gaohedong
74c71145da net/ethernet: ARP can be configured on interface
ARP can be configured on interface

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-25 12:25:02 +08:00
meijian
5d3b2d07d6 ping: add -I for bind device
Add -I option to specify the network device to use for sending ICMP
echo requests. This allows users to explicitly bind ping to a
specific network interface, which is particularly useful in
multi-homed systems with multiple network interfaces.

Signed-off-by: meijian <meijian@xiaomi.com>
2025-12-25 12:24:04 +08:00
meijian
4b3070c081 apps/net: add ip conflict check API
Supports checking for IP conflicts on a NIC.

Signed-off-by: meijian <meijian@xiaomi.com>
2025-12-25 09:44:47 +08:00
nuttxs
92269be92a netutils/netlib: support delete the DNS server address by index or address
- Modify the DHCP-client data structure to support multiple DNS addresses
- Enhance DHCP-option parsing to extract all DNS-server addresses
- Set all received DNS-server addresses
- fix some test case build error

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-11-10 18:10:16 +08:00
Halysson
ddf1dcc3ff netutils/cmux: Add support for CMUX protocol
This commit adds CMUX (GSM 07.10) protocol support to netutils.
CMUX allows multiplexing multiple virtual serial connections
over a single physical serial link.

Changes include:
- CMUX protocol implementation
- CRC table for frame validation
- Basic frame handling

Signed-off-by: Halysson <halysson1007@gmail.com>
2025-10-06 15:04:22 -03:00
Zhe Weng
7a2d5bbc64 apps/graphics: Add input generator library
We can use it to unify our monkey / input tools, and for other input
generation purposes easily.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-08-12 20:20:01 +08:00
Matteo Golin
d334c5eb67 apps/unity: Add printf configuration
Allows the user to select whether or not they want access to the Unity
``TEST_PRINTF`` commands.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-08-07 11:21:57 +08:00
nuttxs
8f3c3c57f9 netutils/dhcpc/dhcpc: add implementation to get renewal (T1) time and
rebinding (T2) time from DHCP packet.
According to RFC 2131, T1 and T2 times play a critical role in lease
management in DHCP clients.

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-08-06 10:54:18 +08:00
SPRESENSE
5e704891d9 netutils/esp8266: Add a function for finalization.
Add a function for finalization so that it can be used repeatedly.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
5429191ab0 netutils/esp8266: Fix nxstyle
Fix nxstyle.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
8b4a015f07 netutils/esp8266: Fix compile error
Fix compile error.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
nuttxs
dfeeef41ed netutils/dhcpc/dhcpc.c:Implement a dedicated interface to send
DHCPRELEASE, According to RFC 2131 section 3.1, DHCPRELEASE is
used by a client to relinquish a network address and cancel any
remaining lease time

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-07-14 15:49:29 -03:00
Tim Hardisty
30b1c024a1 apps/netutils: add mdns library support
This commit allows an external mDNS library to be included in NuttX.

It originates from here: <https://github.com/mjansson/mdns>

It is declared as being in the Public Domain as per <http://unlicense.org>

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
raiden00pl
a8740c2602 logging/nxscope: fix various warnings reported by CodeChekcer
fix various warnings reported by CodeChekcer for nxscope

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:02:32 +08:00
raiden00pl
71df58e937 logging/nxscope: allow use in C++ code
allow nxscope to use in C++ code

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:01:42 +08:00
Alin Jerpelea
064c6e16f7 include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:25:28 +08:00
jianglianfang
0c467dc02d audioutils/nxaudio: added pause/resume interface in nxaudio.h
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-11-11 17:18:09 +08:00
wangjianyu3
3da204c23e Pack parameters of nsh_execute() as struct nsh_exec_param_s
1. Input redirect flags currently is hardcode, passing by arguments maybe better.
2. Only support redirect to path_name, redirect to fd is needed for pipeline.

Test
  1. Redirect in
    cat < /etc/init.d/rc.sysinit

  2. Redirect with FIFO
    mkfifo /dev/testfifo
    cat /dev/testfifo &
    ls > /dev/testfifo

  3. NSH Params
    set name `uname`
    echo $name

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-11 10:36:46 +08:00
Huang Qi
5048d6b472 tools: Add essential math.h for wasm build
If the experimental feature Wasm build enabled with multi thread
compiling, the COPYFILE (cp) maybe raise the error below:
```
cp: cannot create regular file 'math.h': file exists
```

This error cause by that the wasi-sdk don't provide the math.h for
non-wasi envrioment, for this case, provide a math.h for it instead of copy
file each time is better.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-11-06 01:38:10 +08:00
meijian
e25f89d2d6 app/netstatistics: Add net statistics api for user
Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 13:38:38 +08:00
meijian
7bf20f1a89 [wireless] add set/get pmksa api for fast-auth
Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 12:43:52 +08:00
meijian
cf7491a1fe [wireless][wapi] add powersave cmd of wapi for Low-power modules
Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 12:43:52 +08:00
meijian
c5541bfb56 [wireless][wapi] add extend api for private needs
Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 12:43:52 +08:00
zhangshuai39
6d52a0fbc1 netutils/netlib: Encapsulate the dhcp configuration network code and modify at all calling locations
The DHCP configuration network code is called multiple times, so it is encapsulated

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2024-08-23 22:10:04 +08:00
Marco Casaroli
96100b30f2 feat(nsh): input (stdin) redirection
This adds support for `<` to redirect input on nsh commands.
2024-08-08 19:19:18 -03:00
Zhe Weng
3022f836dc netlib/ip6tables: Add functions for ip6tables & filter table
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
Zhe Weng
4283e57013 netlib/iptables: Add functions for filter table
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
Andre Heinemans
cecc2e762b controlse: add accesslib for the se05x secure element 2024-04-21 11:20:12 +08:00
Zhe Weng
7e7b108ef9 netutils/netlib: Add netfilter conntrack functions
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-18 09:57:01 +08:00
simbit18
000a8bcdf1 Fix nuttx coding style
fix
error: Relative file path does not match actual file
error: Long line found
error: Operator/assignment must be preceded with whitespace
error: Missing blank line after comment
2024-04-18 09:56:48 +08:00
Xiang Xiao
9d67f38062 canutils: Fix minor style issue found in canlib
no functional change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-12 15:48:21 -03:00
TimJTi
169beaeef7 Add Settings Utility and example app 2024-03-03 02:36:56 +08:00
SPRESENSE
2b4a25c8d5 examples/fmsynth: Fix freaze when execute it in 2nd time
Fix a freaze BUG when the example is executed again after 1st execution.
2024-02-28 15:30:26 +08:00
Jorge Guzman
49204e1389 modbus_master: fix modbus master example 2024-02-17 05:01:18 -08:00
xuchaojie
ca5293629f wapi: Add pscan cmd to trigger a passive scan.
Added scanning in passive mode without affecting the scan command.

Signed-off-by: xuchaojie <xuchaojie@xiaomi.com>
2024-01-25 03:10:06 -08:00
SPRESENSE
a16fb23dd7 lte/alt1250: Notice instance information
Notice instance information of LwM2M server operation to application.
2024-01-24 22:21:56 +01:00
Xiang Xiao
e55c0d9aa5 Remove @ tag from all comments
and format the multiple line comments

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-01-04 10:26:49 +01:00
Takumi Ando
730370e565 fsutils: passwd: Fix wrong macro
passwd_update/adduser/deluser should be enabled
if CONFIG_FSUTILS_PASSWD_READONLY is NOT defined.

Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-12-21 16:16:20 +01:00
Petteri Aimonen
fcd0729e21 ptpd: Fix reserved word 'class'
When ptpd.h is included in C++ code, the use of identifier 'class'
caused a compilation error. Changed to "clockclass".
2023-12-07 18:26:39 -08:00
liqinhui
91a697a3f4 renew6: Optimize the process of obtaining an IPv6 address.
If Managed Address Congfiguration flag in the Router Advertisement
Messsage is set, we would obtain the IPv6 address though the stateful
DHCPv6 procedure.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-12-07 06:26:50 -08:00
Petteri Aimonen
6dd9adbb5b ptpd: Code quality improvements 2023-12-04 00:30:26 -08:00