From aa2ae421d5f0127858fa93784a3a408fbd63e7fa Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Fri, 16 Aug 2024 12:22:49 +0800 Subject: [PATCH] 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 --- .../platforms/sim/sim/boards/sim/index.rst | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Documentation/platforms/sim/sim/boards/sim/index.rst b/Documentation/platforms/sim/sim/boards/sim/index.rst index 2026534ffc..0c67290f4b 100644 --- a/Documentation/platforms/sim/sim/boards/sim/index.rst +++ b/Documentation/platforms/sim/sim/boards/sim/index.rst @@ -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 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 -------