On VIM3, after loading the SYN43752 WiFi, we used either the wpa_supplicant or wl join command to connect to the mobile hotspot, but we were unable to connect to the network properly.However, using the same method, connecting to the phone's hotspot through a computer allows for normal internet usage.The basic assumption is that there is a DNS issue on the vim3 side.
To confirm whether it's a DNS issue, you can try pinging Baidu's IP address directly from vim3 instead of pinging the domain name to see if it works.
The computer and VIM3 are connected to the same router device. After obtaining Baidu's IP through the computer terminal, test it. If you can successfully ping the IP, it is basically confirmed to be a DNS issue.
Below are several methods for configuring DNS that I have listed based on online guidance:
(1)Use/etc/resolv.confDocument
This is the most straightforward method. You can set the DNS server by editing the /etc/resolv.conf file.
1. Open the terminal.
2. Open the /etc/resolv.conf file using a text editor, such as vi or vim:
3. Add or modify the following lines, replacing <DNS_SERVER_IP> with your DNS server's IP address (for example: Google's public DNS is 8.8.8.8 and 8.8.4.4): For example:
nameserver 8.8.8.8
nameserver 8.8.4.4
4. Save and close the file.
- Restart the network service to apply the changes (optional):
sudo systemctl restart NetworkManager
Or for older systems, use:
sudo /etc/init.d/networking restart
Notes:
In some systems, /etc/resolv.conf may be automatically generated by network management tools such as NetworkManager or systemd-resolved. Direct modifications might be overwritten after a system reboot or network reconnection.
So, if you find that the modified configuration is not taking effect, you should consider using other methods.
(2) Configure DNS using systemd-resolved
1. Edit/etc/systemd/resolved.confDocument:
sudo vi /etc/systemd/resolved.conf
2. FindDNS=Okay, uncomment (if it is commented out) and add the DNS server addresses, separating multiple addresses with spaces. For example:
DNS=8.8.8.8 8.8.4.4
3. Save and exit the editor.
4. Restartsystemd-resolvedService to apply the configuration:
sudo systemctl restart systemd-resolved
(3) Use dhclient to configure DNS
1. Edit/etc/dhcp/dhclient.confDocument:
sudo vi /etc/dhcp/dhclient.conf
2. Add or modifysupersedeSpecify the DNS server addresses, separating multiple addresses with commas. For example:
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
3. Save and exit the editor.
4. First, release the current DHCP lease, then reacquire it:
sudo dhclient -r
sudo dhclient
(4) Use resolvconf to configure DNS
1. Edit/etc/resolvconf/resolv.conf.d/headDocument:
sudo vi /etc/resolvconf/resolv.conf.d/head
2. Add to the documentnameserverSpecify the DNS server address, for example:
nameserver 8.8.8.8
nameserver 8.8.4.4
3. Save and exit the editor.
4. Updateresolv.confThe document is used to apply changes:
sudo resolvconf -u
Effect Verification:
Directly ping the domain name to check if it is functioning properly.
FAQ:
1. What is DNS?
Domain Name System (DNS)AbbreviationDNS) isInternetA service. It serves as a means to...Domain nameandIP addressMutualMappingone ofDistributed databaseIt can make it more convenient for people to access the internet.
2. What are the potential impacts if a device is not properly configured with DNS?
If DNS is not configured, it will affect normal internet access. Nowadays, basic operations such as upgrading, installing, and downloading are accessed using domain names rather than direct IP addresses, which can result in operation failures.
3. What is the VIM3 mentioned above?
VIM3 is an open-source single-board computer powered by the Amlogic A311D, featuring a built-in 5.0 TOPS NPU. It supports Android and Linux systems, and we use it to integrate and drive our Wi-Fi module.
4. Is the above method the configuration method for that system?
Linux DNS server address configuration
5. What are the prerequisites for configuring DNS?
It is necessary to ensure that the Wi-Fi driver is functioning properly and that the network connection can be used normally.