硬件:ESPRESSOBIN 开发板,1G RAM;TP-LINK TL-WN725N微型150M无线网卡

OS:Linux alarm 4.16.0-1-ARCH #1 SMP Mon Apr 2 19:00:19 MDT 2018 aarch64 GNU/Linux

1、检查USB无线网卡状态

 
[root@alarm alarm]# lsusb
...
Bus 002 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
...
[root@alarm alarm]# dmesg |grep usbcore
...
[   19.387522] usbcore: registered new interface driver mt7601u

2、查看无线网络设备名,并启用

[root@alarm alarm]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 532
    link/ether f0:ad:4e:05:34:02 brd ff:ff:ff:ff:ff:ff
3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether xxxxxxx brd ff:ff:ff:ff:ff:ff
4: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether xxxxxxx brd ff:ff:ff:ff:ff:ff
5: lan0@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether XXXXXXX brd ff:ff:ff:ff:ff:ff
6: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether XXXXXXXX brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether xxxxxxx brd ff:ff:ff:ff:ff:ff
[root@alarm alarm]#
[root@alarm alarm]# ip link set wlan0 up
[ 5309.612474] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

使用ip link查看到wlan0就是无线网卡的设备名。默认情况下ESPRESSOBIN有六个网卡设备,即ip link命令输出的第1-6个网卡。

启用wlan0设备时出错。原因是ESPRESSOBIN默认情况下使用IPV6,需要更改为IPV4

3、ArchLinuxArm 关闭IPV6

[root@alarm alarm]# touch /etc/sysctl.d/ipv6.conf

[root@alarm alarm]# vi !$

输入如下内容:

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.<wlan0>.disable_ipv6 = 1
net.ipv6.conf.<lo>.disable_ipv6 = 1

其中wlan0就是上面的无线网卡名。保存上述文件,并重启系统

4、启用无线网卡

重启系统后,执行如下命令

[root@alarm alarm]# ip link set wlan0 up

5、配置无线网卡

配置的方法很多,此处采用netctl。用 root 身份运行 wifi-menu -o 可以自动在 /etc/netctl/ 中生成配置文件

 
[root@alarm sysctl.d]# wifi-menu -o
Scanning for networks... done
               lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
               x Select the network you wish to use             x
               x Flags description:                             x
               x  * - active connection present                 x
               x  : - handmade profile present                  x
               x  . - automatically generated profile present   x
               x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
               x x ChinaNet-WThN                  wpa     -35 x x
               x x Topway_315759                  wpa2    -49 x x
               x x SN2HO51V6514342424             wpa2    -51 x x
               x x kydd                           wpa2    -69 x x
               x x Topway_613230                  wpa     -69 x x
               x x zlm                            wpa     -71 x x
               x x D-LINK601                      wpa     -73 x x
               x x xu158                          wpa     -75 x x
               x x 706                            wpa     -79 x x
               x x ChinaNet-KPbK                  wpa     -79 x x
               x x Topway_06A068                  wpa2    -79 x x
               x x HUAWEI-46                      wpa     -79 x x
               x mqqqqv(+)qqqqqqqqqqqqqqqqqqqqqqqqqqqq54%qqqqqj x
               x                                                x
               tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
               x           <  OK  >      <Cancel>               x
               mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

移动上下键,选中需要的SSID

               lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
               x Enter a name for the new profile               x
               x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
               x xwlan0-kydd                                  x x
               x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
               x                                                x
               x                                                x
               tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
               x           <  OK  >      <Cancel>               x
               mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

设置默认的profile文件名,保存默认

                    lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
                    x Enter wpa security key for           x
                    x 'kydd'                               x
                    x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
                    x x**********                        x x
                    x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
                    x                                      x
                    tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
                    x       <  OK  >    <Cancel>           x
                    mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

输入密码

                    lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
                    x          CONNECTING FAILED           x
                    x                                      x
                    x Do you want to keep the generated    x
                    x profile ('wlan0-kydd')?              x
                    x                                      x
                    x                                      x
                    tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
                    x         < Yes >     < No  >          x
                    mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

生成配置文件。在/etc/netctl下自动生成名为wlan0-your_ssid的配置文件

6,重启系统

重启系统,wlan0可正常DHCP获得IP地址,网络连接正常。

7,两个遗留问题

配置过程中,有如下两个遗留问题,暂未找到解决办法

1)配置profile后,出现如下提示:Job for netctl@wlan0\x2dkydd.service failed because the control process exited with error code.See "systemctl status "netctl@wlan0\\x2dkydd.service"" and "journalctl -xe" for details.

查看提示文件,未发现有价值信息。

2)串口频繁输出如下信息,影响正常使用。好在远程ssh登录时无此信息。

[  341.186640] mt7601u 2-1:1.0: Error: TSSI upper saturation
[  369.744016] mt7601u 2-1:1.0: Error: TSSI upper saturation
[  402.382447] mt7601u 2-1:1.0: Error: TSSI upper saturation
[  410.543699] mt7601u 2-1:1.0: Error: TSSI upper saturation

 

 

 

Logo

更多推荐