@@ -1669,6 +1669,7 @@ This is a configuration with sim usbdev support.
1669
1669
conn0: adb & rndis
1670
1670
conn1: cdcacm & cdcecm
1671
1671
conn2: cdcncm
1672
+ conn3: cdcmbim
1672
1673
1673
1674
You can use the sim:usbdev configuration::
1674
1675
@@ -1801,6 +1802,46 @@ This is a configuration with sim usbdev support.
1801
1802
1802
1803
Then you can test the network connection using the ping command or telnet.
1803
1804
1805
+ 6> Run CDCMBIM:
1806
+
1807
+ NuttX enter command::
1808
+
1809
+ $ conn 3
1810
+ $ ifconfig
1811
+ eth0 Link encap:Ethernet HWaddr 42:67:c6:69:73:51 at RUNNING mtu 1500
1812
+ inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
1813
+ wwan0 Link encap:UNSPEC at RUNNING mtu 1200
1814
+ inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0
1815
+ $ ifconfig wwan0 10.0.0.1 netmask 255.255.255.0
1816
+ $ ifconfig
1817
+ eth0 Link encap:Ethernet HWaddr 42:67:c6:69:73:51 at RUNNING mtu 1500
1818
+ inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
1819
+ wwan0 Link encap:UNSPEC at RUNNING mtu 1200
1820
+ inet addr:10.0.0.1 DRaddr:10.0.0.1 Mask:255.255.255.0
1821
+
1822
+ $ echo -n "hello from nuttx" > /dev/cdc-wdm2
1823
+ $ cat /dev/cdc-wdm2
1824
+ hello from linux
1825
+
1826
+ Host PC, you can see the network device named wwx020000112233::
1827
+
1828
+ $ sudo ifconfig wwx020000112233
1829
+ $ sudo ifconfig wwx020000112233 10.0.0.2 netmask 255.255.255.0
1830
+ $ ifconfig
1831
+ wwx020000112233: flags=4226<BROADCAST,NOARP,MULTICAST> mtu 1500
1832
+ inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
1833
+ ether 02:00:00:11:22:33 txqueuelen 1000 (以太网)
1834
+ RX packets 0 bytes 0 (0.0 B)
1835
+ RX errors 0 dropped 0 overruns 0 frame 0
1836
+ TX packets 58 bytes 9143 (9.1 KB)
1837
+ TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1838
+
1839
+ $ sudo cat /dev/cdc-wdm1
1840
+ hello from nuttx
1841
+ $ sudo bash -c "echo -n hello from linux > /dev/cdc-wdm1"
1842
+
1843
+ Then you can test the network connection using the ping command or telnet.
1844
+
1804
1845
usbhost
1805
1846
-------
1806
1847
0 commit comments