Solve the problem of coexistence of debian rndis and wifi hotspot
- Thanks to lilyok123 (酷安@lilyok123) for the contribution
- Principle: Create a network bridge, configure the ip address, and add the usb network card and wireless network card device to the bridge
- Note: It is recommended to connect the wifi to the router before operation. When operating, first add the usb network to the network bridge to ensure that the computer can be connected normally, and then add the wireless network card to the network bridge. The network card used to log in to the device. Otherwise, it is estimated that you will have to re-flash the machine.
Specific steps
- The first step, enter the command nmtui to create a bridge
- The
second step is to configure the ip address to 192.168.68.1/24 (the
default is this address, if you change the network segment, you need to
modify the dnsmsq.conf file), the configuration name is arbitrary, the
device name is arbitrary, write br0 here
- The third step is to add an ETHERNET device to the bridge
- The
fourth step, the ethernet device needs to be filled in as usb0 (the
name of the network card seen by the ifconfig command), the
configuration name is optional, and the name here is also usb0
- The fifth step, at this time the usb0 device is added successfully, save and exit
- The
sixth step, if the usb0 configuration file does not take effect at this
time, it needs to be manually activated by nmcli connection. If there
is no accident, the computer can access the portable wifi normally. If it is unsuccessful, log in through another wireless network card to see if the configuration is correct.
- The
seventh step, after the usb0 bridge is normal in the sixth step, you
can add a wireless network card to the bridge, enter the nmtui command,
select the br0 configuration file just now, and select edit to edit.
- The eighth step, choose to add WLAN wireless device
- The
ninth step is to configure the hotspot name, password and other
parameters. The configuration file is optional, and the device needs to
add the wireless network card name in ifconfig.
- The tenth step, save the configuration and return
- In the last step, the configuration file of wlan0 does not take effect at this time, and the nncli connection needs to be switched manually.