Network Configuration

1. Connect Wi-Fi

Enter the following command to connect to the specified WiFi network.

When the terminal returns the message 'successfully activated', it indicates that the WIFI connection is successful.

If the following message is returned after connecting to the hotspot, it means that the hotspot was not found. You can execute the sudo nmcli device wifi rescan command to rescan and connect again.

2. Wired network

The wired network of the development board defaults to a static IP configuration, with an initial IP address of "192.168.1.10".

The static network configuration of the development board is saved in the file '/etc/network/interfaces'.

By modifying fields such as' address',' netmask ',' gateway ', etc., the static IP configuration can be modified.' metric 'is the network priority configuration, set to' 700 'to lower the priority of wired networks.

When both wired and wireless networks are enabled, wireless networks will be prioritized. For example:

After the modification is completed, enter the sudo restart_network command on the command line to make the configuration take effect.

3. Soft AP mode

The wireless network of the development board runs in Station mode by default.

If you need to use Soft AP mode, please follow the steps below to configure it.

  1. Install hostapdisc-dhcp-server

热点模式1 热点模式2 热点模式3

  1. Run the command 'sudo vim/etc/hostapd.conf' to configure 'hostapd.conf'`

    • Password without WiFi hotspot configuration

    The default way to open the hostapd.conf file is as shown in the picture: (Configure a password free hotspot, which can be left unchanged).

    无密码默认配置

    • Password with WiFi hotspot configuration

有密码

Press i to enter editing mode, press Esc to exit editing mode after editing, press wq to write and close.

  1. Configure the 'isc-dhcp server' file, as follows.

    • Execute sudo vim/etc/default/isc-dhcp server to modify the isc-dhcp server file and add the following defined network interface.

    wlan0

    Press i to enter the edit mode. After editing, press Esc to exit the edit mode. Press :wq to write and close.

    • Run sudo vim /etc/dhcp/dhcpd.confmodify dhcpd.conffile, cancel the following comment.

    取消注释 Press i to enter the edit mode. After editing, press Esc to exit the edit mode. Press :wq to write and close.

    • Then, add the following configuration to the end of the /etc/dhcp/dhcpd.conf file.

    增加配置 Press i to enter the edit mode. After editing, press Esc to exit the edit mode. Press :wq to write and close.

  2. Stop wpa_supplicant service,re-start wlan0

  3. Follow the steps below to start the hostapdservice.

    • Run sudo hostapd -B /etc/hostapd.confcommand.

  1. Connect to the development board hotspot sunrise

    连接热点

  2. If you need to switch back to Station mode, you can do as follows.