wifi.sh无线程序命令解析

45 篇文章 3 订阅
38 篇文章 5 订阅

#Add the wi-fi driver module to the kernel:

cp -rf /home/root/wpa_supplicant.conf /etc/

Load ATWILC3000 driver
#modprobe wilc

modprobe wilc-sdio

Linux modprobe命令用于自动处理可载入模块。
-a或–all  载入全部的模块。
-c或–show-conf  显示所有模块的设置信息。
-d或–debug  使用排错模式。
-l或–list  显示可用的模块。
-r或–remove  模块闲置不用时,即自动卸载模块。
-t或–type  指定模块类型。
-v或–verbose  执行时显示详细的信息。
-V或–version  显示版本信息。
-help  显示帮助。

#bring up interface

ifconfig wlan0 up

ifconfig可设置网络设备的状态,或是显示目前的设置。
[网络设备] 网络设备的名称。
down 关闭指定的网络设备。
up 启动指定的网络设备。

#Run wpa_supplicant for secure networking:

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf -B

i : 网络接口名称
-c: 配置文件名称
-C: 控制接口名称
-D: 驱动类型名称
-p: 驱动参数
-b: 桥接口名称
-d: 增加调试信息
-B为后台运行

#To add DHCP:

udhcpc -i wlan0

c, --clientid=CLIENTID Client identifier
-H, --hostname=HOSTNAME Client hostname
-h, Alias for -H
-f, --foreground Do not fork after getting lease
-b, --background Fork to background if lease cannot be
immediately negotiated.
-i, --interface=INTERFACE Interface to use (default: eth0)
-n, --now Exit with failure if lease cannot be
immediately negotiated.
-p, --pidfile=file Store process ID of daemon in file
-q, --quit Quit after obtaining lease
-r, --request=IP IP address to request (default: none)
-s, --script=file Run file at dhcp events (default:
/usr/share/udhcpc/default.script)
-v, --version Display version

#To run iperf3: (2.0.5 without the “b”)
#server mode:
#comment this to simplify production testing:
#iperf3 -s

#如果udhapc失败,可以用静态配置方法

#To config IP address:

ifconfig wlan0 192.168.1.7

#To config IP gateway:

route add default gw 192.168.1.1 wlan0

有时,sudo source wifi.sh不能成功,但su进入后,再用source wifi.sh则可以成功
#ping 百度IP地址
ping 61.135.169.125
ping www.baidu.com
在这里插入图片描述
Linux下查看网关方法:

1、route -n
2、ip route show
3、traceroute www.baidu.com-s 100 【第一行就是自己的网关】
4、netstat -r
5、more /etc/network/interfaces 【Debian/Ubuntu Linux】
在这里插入图片描述
base文件内容:nameserver 8.8.8.8

nameserver 127.0.1.1

sudo /etc/init.d/networking restart or service networking restart
国内移动、电信和联通通用的DNS 114.114.114.114
GOOGLE公司提供的DNS 8.8.8.8
百度 180.76.76.76、
阿里 223.5.5.5和223.6.6.6
清华DNS:166.111.8.28和166.111.8.29

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

Pre-built SD image v2.5 for Ultra96 version 2:
http://avnet.me/ultra96v2-pynq-image-v2.5

Pre-built SD image v2.5 for Ultra96 version 1:
http://avnet.me/ultra96v1-pynq-image-v2.5

Please note: v2.5 no longer loads a bitstream into the SOC PL. This means the PL loaded LED will stay red. PYNQ can load a bitstream anytime and once loaded the LED will go un-red.

Please also note: WiFi access point has been disabled since PYNQ v2.4. To activate it you must enter the following commands into a console (sudo password for user xilinx is: xilinx):

To check if service is available:
sudo systemctl list-unit-files | grep wpa_ap.service

To enable temporarily:
sudo systemctl start wpa_ap.service

To enable even after re-boot:
sudo systemctl enable wpa_ap.service

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值