In the previous report "Mill MYS-8MMQ6-8E2D-180-C Unboxing Report 3 - Network" ( https://en.eeworld.com/bbs/thread-1175378-1-1.html ), we tried to make the board into station mode and communicate with the computer through the home AP , but as mentioned in the article, configuring the wifi interface through commands is only temporary and cannot take effect permanently. Moreover, there is no default route and no access to the Internet . In this report, we will further study how to connect the board to the Internet network and support remote management.
1. Enable network connection
Still use SecureCRT to connect to the board, enable the wlan interface, use wpa_supplicant.conf to configure the connection network, add the address, and then configure:
route add default gw 192.168.1.1
View the routing table
Next, try to modify the startup file so that it can take effect after restart.
Add the above command to /etc/rc.local :
Restart verification. After startup, the board will automatically connect to the network.
2. Network connectivity test
Use the ping command to test an address that is confirmed to be available, and it should respond normally. For example, Beijing DNS :
You can stop the ping command with ctrl-c .
Use nslookup to test the domain name and it can be obtained successfully.
In fact, you can check through cat /etc/resolv.conf that the board has set up domain name servers such as 1.1.1.1 and 8.8.8.8 by default , and it has been tested that it can be resolved normally, so there is no need to modify it here.
Continue to use ping to test the connectivity of domain names such as Baidu , which is normal.
In this step, if ping does not respond for a long time, it is not necessarily a network anomaly. It may be that the URL or a certain jump in the path does not respond to ICMP . For example , pinging the domain name of Peking University www.pku.edu.cn can get the resolved IPv6 address 2001:da8:201:1512::a269:83a0 , but ping does not respond.
Here, we disable ipv6 and the effect is the same.
You can use traceroute to try to connect to its domain name to check.
I found that starting from the 13th jump, I could no longer trace the path backwards.
But in fact, this domain name is definitely available.
In the previous section, we used wget to get a web page, but in fact, the MYS -8MMQ6-8E2D-180-C can support more network applications by default, such as:
3.1 Network Time
NTP protocol is usually used to synchronize time, setting the client's network clock to the same as the server's clock. ntpd is enabled by default on the board (in fact, it does not even have an RTC battery, so it is meaningless to enable it as a server ). Before using it as a client , you should first disable the ntpd process. The method to disable the ntpd process is very simple. Use ps -e |grep ntpd to find the pid value, and then kill it .
Looking at the time zone settings, from the board's point of view, it can only support UTC .
Try to connect the board to Alibaba Cloud's clock and obtain the clock from Alibaba Cloud's clock server:
Adjust the time zone again
As you can see from the picture above, the clock has been corrected.
3.2 Game Client
Mir MYS-8MMQ6-8E2D-180-C supports telnet clinet by default . We can use it as a game client to access the mud server, such as Peking University Xiakexing, which is a mud server we built when we were in college. It has been running stably for more than 20 years.
You can see that the game has been connected normally.
3.3 Support remote management of boards
According to the manual, the SSH function is enabled by default on the board. When trying to connect directly with SecureCRT , it was rejected because the "key exchange" failed.
From the output, we can know that the modes supported by the server (card) are: curve25519-sha256 , curve25519-sha256@libssh.org , ecdh-sha2-nistp521 , ecdh-sha2-nistp384 , ecdh-sha2-nistp256 , diffie-hellman-group14-sha256 , kexguess2@matt.ucc.asn.au . However, the modes supported by SecureCRT are only:
So change a terminal tool, such as PuTTY , and you can connect normally: