米尔MYD-LHI3093配置网络连接
1 前言
最近用米尔MYD-LHI3093做实验,开发板预装openEuler Embedded 22.03 LTS-SP2支线(qemu-aarch64),默认缺少如下命令(command not found):
- 缺少nmcli,无法通过该指令连接到网络;
- 缺少sudo,虽然系统默认root账户;
- 缺少yum,无法用yum源安装依赖及应用。
下面先介绍对出厂的开发板进行网络配置,之后有空再更新介绍其他配置。
2 基本配置
2.1 连接无线网络
参考链接:https://blog.csdn.net/zhengnianli/article/details/119157348
使用vi /etc/wpa_supplicant.conf
查看WiFi配置文件:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
key_mgmt=NONE
}
改为如下:
ctrl_interface=/var/run/wpa_supplicant
update_config=1
ctrl_interface_group=root
ap_scan=1
network={
ssid="pi"
psk="12345678"
key_mgmt=WPA-PSK
}
开启热点,使用下面的命令连接wifi:
wpa_supplicant -Dwext -c /etc/wpa_supplicant.conf -i wlan0&
等待,输出下述信息即连接成功:
wlan0: Trying to associate with 2e:a8:cf:5d:f6:97 (SSID='pi' freq=2462 MHz)
wlan0: Associated with 2e:a8:cf:5d:f6:97
wlan0: WPA: Key negotiation completed with 2e:a8:cf:5d:f6:97 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 2e:a8:cf:5d:f6:97 completed [id=0 id_str=]
通过udhcpc -i wlan0
动态获取IP:
qemu-aarch64 ~ # udhcpc -i wlan0
udhcpc: started, v1.34.1
udhcpc: broadcasting discover
udhcpc: broadcasting select for 192.168.116.149, server 192.168.116.198
udhcpc: lease of 192.168.116.149 obtained from 192.168.116.198, lease time 3599
/etc/udhcpc.d/50default: Adding DNS 192.168.116.198
其中lease of 192.168.116.149 obtained
表示获取到的IP地址为192.168.116.149
。
ping上面出现的服务器地址,测试连通性:
`ping 192.168.116.198`
同一局域网下的设备可以通过ssh连接到开发板:
ssh root@192.168.116.149
2.2 连接有线网络
敬请期待...
2.3 通过scp传输文件
参考链接:https://www.runoob.com/linux/linux-comm-scp.html
# 从本机传输文件到远程目录
scp /home/space/music/1.mp3 root@www.runoob.com:/home/root/others/music
# 从本机传输文件到远程目录 & 指定文件名
scp /home/space/music/1.mp3 root@www.runoob.com:/home/root/others/music/001.mp3
# 从本机传输文件夹到远程目录
scp -r /home/space/music/ root@www.runoob.com:/home/root/others/
# 从远程目录传输到本机,只需调换参数的顺序
scp root@www.runoob.com:/home/root/others/music /home/space/music/1.mp3
scp -r www.runoob.com:/home/root/others/ /home/space/music/
标签:LHI3093,scp,192.168,开发板,music,home,root,MYD,udhcpc
From: https://www.cnblogs.com/EndPoem-ZH/p/18103145