Documentation: add documentation for USB cdcncm device

add a documented description of the cdcncm device module, including
execution steps and associated outputs

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2024-08-16 12:22:49 +08:00 committed by Xiang Xiao
parent 640b766d2b
commit aa2ae421d5

View File

@ -1668,6 +1668,7 @@ This is a configuration with sim usbdev support.
conn0: adb & rndis
conn1: cdcacm & cdcecm
conn2: cdcncm
You can use the sim:usbdev configuration::
@ -1744,7 +1745,7 @@ This is a configuration with sim usbdev support.
$ cat /dev/ttyACM0
hello
3> Run CDCECM:
4> Run CDCECM:
NuttX enter command::
@ -1770,6 +1771,36 @@ This is a configuration with sim usbdev support.
Then you can test the network connection using the ping command or telnet.
5> Run CDCNCM:
NuttX enter command::
$ conn 2
$ ifconfig
eth0 Link encap:Ethernet HWaddr 42:67:c6:69:73:51 at UP
inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 00:e0:de:ad:be:ef at UP
inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0
$ dhcpd_start eth1
$ ifconfig
eth0 Link encap:Ethernet HWaddr 42:67:c6:69:73:51 at UP
inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr 00:e0:de:ad:be:ef at UP
inet addr:10.0.0.1 DRaddr:10.0.0.1 Mask:255.255.255.0
Host PC, you can see the network device named enx020000112233::
$ ifconfig
enx020000112233: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 576
inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
ether 02:00:00:11:22:33 txqueuelen 1000 (以太网)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 58 bytes 9143 (9.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Then you can test the network connection using the ping command or telnet.
usbhost
-------