I am following the instructions in : https://bovs.org/post/168/Building-Yocto-linux-for-Intel-Edison-with-3G-USB-modems-support https://bovs.org/post/168/Building-Yocto-linux-for-Intel-Edison-with-3G-USB-modems-support
I am using Wifi and 3G at the same time.
I can ping 220.127.116.11 but cannot ping www.google.com
Due to the DNS problem. After I run the command:
echo "nameserver 18.104.22.168" >> /etc/resolv.conf
Now I can ping www.google.com.
However, after rebooting the Intel Edison board, the /etc/resolv.conf will lost nameserver 22.214.171.124.
Can I save nameserver 126.96.36.199 in this file?
I have already try the systemd and /ect/init.d method, it doesn't work.
Thank you for interest in the Intel® Edison Breakout Board.
As you can see here https://communities.intel.com/thread/56555 https://communities.intel.com/thread/56555, changing the nameserver in /etc/resolv.conf has helped a community member solve an issue similar to yours.
Thanks you for the reply.
If you read my question carefully, I mentioned that I solved the DNS problem. However, the file I modified didn't save after rebooting.
I understand that you solved the DNS issue.
After you write echo "nameserver 188.8.131.52" >> /etc/resolv.conf, a file named resolv.conf, with the content nameserver 184.108.40.206, will be created in directory etc. To save this file you can open it with the vi (Linux screen-oriented text editor) and then "save and exit" with the :wq command. That will keep the file even after rebooting the board.
Another option will be to create a system service to run the echo "nameserver 220.127.116.11" >> /etc/resolv.conf command, so everytime you boot your board, the resolv.conf file will be automatically created with nameserver 18.104.22.168 on it.
If you need further information on how to create a system service, check this site https://communities.intel.com/docs/DOC-111103 https://communities.intel.com/docs/DOC-111103.
Thanks for the reply.
I can only save the file if I close down the WIFI function: systemctl disable wpa_supplicant
However, if I want to use the WiFi and 3g module at the same time, the nameserver 22.214.171.124 will still disappear after I reboot. The system service didn't work. I try it before.
It seems everytime restart the WiFi function, the file /etc/resolv.conf will be rewrite.
Do you know how to save the file while keep the WiFi function? Or maybe the nameserver can be set up when configuring the 3g module.
In the file /etc/ppp/peers/tele2, I found : usepeerdns . Is this command using to set up the nameserver?
I'll be needing more time to come up with information that you may find relevant. As soon as I find something that may help solve your issue, I'll contact you through this post.
Thank you for your patience.
I found information that you may find relevant, please check this link https://wiki.archlinux.org/index.php/pppd https://wiki.archlinux.org/index.php/pppd, it mentions why is your file been overwritten.
Under the Configuration section (create connection configuration file): "If usepeerdns option is used, pppd will create the /etc/ppp/resolv.conf file with obtained DNS addresses while establishing a connection. By default, the /etc/ppp/ip-up.d/00_dns hook script moves this file to /etc/resolv.conf, allowing the system to use these name servers. If this is undesirable (e.g. you are using a local caching DNS), edit the /etc/ppp/ip-up.d/00_dns.sh as you need".
Based on the previous information, this is why your /etc/resolv.conf file gets overwritten. So what you need is edit the /etc/ppp/ip-up.d/00_dns.sh script to fit your needs.
I hope you find the previous information useful.
Hi, I went out for a holiday and just come back.
I try the method above and didn't. But I successfully save the file by doing this:
chattr +i resolv.conf
Thanks for the help!