Commit Graph

6738 Commits

Author SHA1 Message Date
zhanghongyu
44e5a5ecd7 dhcpc: adds errno to the dhcpc internal error
add errno to help analyze possible causes of dhcp failures

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-05-12 22:30:38 +08:00
simbit18
b810ac0b7e system: Fix nxstyle errors
error: Long line found
2023-05-10 15:40:06 +02:00
wangchen
cb292d0608 nshlib/netcmds:modify the description of setting MTU
modify the description of setting MTU

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-05-10 19:56:04 +08:00
Michal Lenc
f270ef644e examples: add adjtime example application
This application demonstrates the usage of adjtime() interface.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-05-10 00:46:53 +08:00
Xiang Xiao
f95d60366a Fix the nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
575582ca85 system/vi: Replace strncat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
73701cd7cd Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
7c37421266 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
134b8b538f Replace all strcat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Filipe Cavalcanti
f60d23fdb9 Added example for Bosch BMP280 pressure sensor 2023-05-08 13:02:59 +08:00
hujun5
02efb15b57 ostest:fix signal test fail
If the same signal is quickly repeated multiple times, the signal may be ignored.
In SMP since we cannot control thread scheduling to ensure timely signal processing,
it is best to use semaphores to wait for signal processing to complete, which can also shorten the ostest time

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-06 23:37:07 +03:00
Radek Pesina
be55ea7869 spitool: add support for 32-bit SPI BUS width
Link: https://git.motec.com.au/id/I62920d28ab9804d52d25af3bcdd0f1ceb87be93f
2023-05-06 03:23:02 +08:00
simbit18
6a5912c76c system/termcurses: Fix nxstyle errors
error: Long line found
2023-05-04 20:19:56 +08:00
Xiang Xiao
bebae28bdd nsh: Fix the typo error cmd_swtichboot -> cmd_switchboot
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-03 17:40:49 +03:00
simbit18
1707be3977 graphics: Fix nxstyle errors
error: Bad alignment
error: Right brace must be followed by a blank line
error: Long line found
2023-05-03 17:35:05 +08:00
Tiago Medicci Serrano
b5fb80c0cd apps/netutils/rtptools: fix warning while building with clang
The flag '-Wno-maybe-uninitialized' is not known by clang, so a
workaround substitutes it for '-Wno-uninitialized' when clang is
being used as C compiler.
2023-05-03 00:28:55 +08:00
Tiago Medicci Serrano
a6c41fbaeb apps/netutils: Add RTP tools 2023-05-02 13:42:41 +08:00
halyssonJr
b00f612470 nxwidget: Fix incorrect #endif position
remove space
2023-05-02 13:41:53 +08:00
Xiang Xiao
a38acd685f examples: Enable cxxinfo output if CONFIG_DEBUG_FEATURES is defined
fix the wrong logic

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-30 09:33:54 +03:00
Xiang Xiao
0786563bba examples/module: Add g_ prefix to chardev_fops
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-30 09:32:21 +03:00
anjiahao
fd42d811c2 support ymodem transfer on a custom blocksize
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-29 21:23:55 +08:00
anjiahao
32e597a136 support ymodem send/recve can asynchronous
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-29 21:23:55 +08:00
Tiago Medicci Serrano
3516a5d2ee wireless/wapi: support WPA3 on wapi psk command
Similarly to the alg_flag (which can be set by text), the ver_flag
is able to select the WPA version which will be sent to the Wi-Fi
driver through the `IW_AUTH_WPA_VERSION` command. A new bit field
(IW_AUTH_WPA_VERSION_WPA3) was created to indicate WPA3 is set.

It's up to the arch's Wi-Fi driver to implement handling of this
new bit field and config the underlying driver to handle WPA3 on
AP and/or STA mode.

This implementation doesn't interfere with commonly used commands.

`wapi psk wlan0 mypasswd 3` still selects CCMP algorithm and WPA2
and is equivalent to `wapi psk wlan0 mypasswd 3 WPA_VER_2`.

One can use `wapi psk wlan0 mypasswd 3 WPA_VER_3` to set WPA3.
2023-04-29 10:02:52 -03:00
Tiago Medicci Serrano
fe8232fba0 wireless/wapi: change wapi_psk_cmd error code for invalid alg 2023-04-29 10:02:52 -03:00
Tiago Medicci Serrano
f1557dafd3 wireless/wapi: add textual flag of WAPI_ESSID_DELAY_ON
Add the `WAPI_ESSID_DELAY_ON` member of the `wapi_essid_flag_e`
enum to its textual counterpart in `g_wapi_essid_flags`. This
enables `wapi`'s usage to describe it properly.
2023-04-29 10:02:52 -03:00
simbit18
bfd4cbc743 apps/testing/ostest/roundrobin.c: Fix nxstyle errors
error: Long line found
2023-04-29 14:54:40 +08:00
Alan Carvalho de Assis
679dbdac0a Add a simple TinyCBOR Test Example 2023-04-28 12:04:20 +08:00
Alan Carvalho de Assis
98dde40a88 fsutils: Add TinyCBOR Library 2023-04-28 12:04:20 +08:00
wangchen
c2f75330f7 nshlib/netcmds:support to set MTU
Usage:ifconfig interfacename mtu ***

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-27 18:02:23 +08:00
yinshengkai
08bfc4e9c7 system/critmon: fix warning
critmon.c:269:3: warning: 'runtime' may be used uninitialized in this function [-Wmaybe-uninitialized]
  269 |   printf("%11s %11s %11s %-16s %-5s %s\n",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  270 |          maxpreemp, maxcrit, maxrun, runtime, entryp->d_name, name);

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-25 20:00:54 +08:00
Peter van der Perk
fa26bab6b2 DroneCAN add socketcan support, rename to DroneCAN
Rename canardv1 to OpenCyphal

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-25 18:24:41 +08:00
Zhe Weng
e935f153bc apps/system: Call arg_freetable before iptables/tcpdump exit
Forget to free argtable before exit.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-24 23:47:45 +08:00
YAMAMOTO Takashi
15df04083e toywasm: regen
REF=80d43dfa3377810fff0ff143b2e8be2e229bf7f2 ./regen.sh
2023-04-24 23:47:13 +08:00
YAMAMOTO Takashi
b7ac752cca bump toywasm version 2023-04-24 23:47:13 +08:00
yinshengkai
3877c31b2f critmon: add total time running time of task
PRE-EMPTION   CSECTION      RUN         TIME         PID   DESCRIPTION
0.000000000   0.000000000   0.001237000 28.421047000 0     Idle Task

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 04:44:52 -04:00
hujun5
5b2a89e174 ostest: fix smp ostest fail
In SMP we need improve thread waiting strategy

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-24 09:55:54 +02:00
hujun5
f0f98c3d73 ostest: fix smp ostest fail
In SMP we need improve thread waiting strategy

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-24 09:55:54 +02:00
Xiang Xiao
fe1d701b71 system/adb: Replace adb special reset cause with boardctl.h's value
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-23 10:44:43 -07:00
Fotis Panagiotopoulos
c50ff7ff61 Fixes in asprintf usage. 2023-04-23 17:16:34 +08:00
chenrun1
cf54069487 nshlib/nsh_fscmds.c:Add whether or not to pass in empty arguments when rm -r
When rm -r is passed with no address specified, it will automatically recursively unlink all files under the root path ('/') until unlinking to the mounted folder causes the unlink to fail. In this change, rm -r without a specified path will prompt for missing arguments
2023-04-22 12:47:57 +08:00
Huang Qi
3a28933ca8 nshlib: Don't show passwd in telnet login
Current implementation is broken, in this patch ECHO is
disabled by termios.

This patch works with https://github.com/apache/nuttx/pull/8950

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-22 12:47:16 +08:00
dependabot[bot]
5abae22fd4 build(deps): bump github/super-linter from 4 to 5
Bumps [github/super-linter](https://github.com/github/super-linter) from 4 to 5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/v4...v5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-22 01:32:50 +08:00
Tiago Medicci Serrano
0a9b983e90 apps/examples/pipe: check POSIX-compliant behavior of NuttX's FIFOs
Adjust the test considering the POSIX-compliant behavior of the
NuttX's FIFO (mkfifo), which should block `open` for read-only
and write-only. This test's result is expected to be the same with
any other POSIX-compliant system.

This commit also:

 * Fix redirect test;
 * Use pthread instead `task_create` to be able to run this test
on POSIX-compliant systems;
 * General fixes regarding formatting and error messages;
2023-04-22 01:28:25 +08:00
Zhe Weng
f2819b71e5 netutils/iperf: Support RPMsg socket test
Usage:
iperf -s --rpmsg <name>
iperf -c <cpu> --rpmsg <name>

Note:
RPMsg with SOCK_DGRAM (`-u`) doesn't have server mode (bind) yet, iperf
may not work in this case before rpsock is enhanced.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
213219f30a netutils/iperf: Support local socket test
Usage:
iperf -s --local <path>
iperf -c <path> --local || iperf -c <whatever> --local <path>

Can combine with other options, e.g. '-u' will result in local
UDP (DGRAM).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
411c98acec netutils/iperf: Split out sockaddr from general logic
We'll add local/rpmsg sockets later, they're mainly different in
sockaddr, we can reuse other current logic.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
e3e3cc28a6 netutils/iperf: Use argtable's builtin glossary to print usage
Argtable's builtin glossary can produce same output and we do not need
to maintain two sets of help string. Then we're easier to add more
options to iperf.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Ville Juven
4ce809e7d4 nsh/nsh_parse: Fix handling of back-quotes
The logic that handles back-quotes was faulty, i.e. example command
set FOO `ls -l` would be split into two tokens as follows:
- set FOO `ls
- -l`

This results in nsh: `: no matching ` error, this fixes that issue.
2023-04-19 03:12:18 +08:00
Petro Karashchenko
700b0ed235 netutils/netlib: fix typos in comments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
a926c8bf12 include/netutils: fix code alignments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00