OpenWrt:WRTnode2P实现联网

登陆WRTnode2Ptelnetssh

使用microUSB供电,一头接在WRTnode2P标准底板的迷你usb接口,一头接到一个超过500ma5v供电的地方,上电以后,WRTnode2P底板上的蓝灯亮起,里面的OpenWrt开始启动了,20秒后就能发现一个WRTnode2P_xxxxxxxxWRTnode2P mac地址的后四位)的Wi-Fi,用电脑或手机或ipad连上,密码是12345678

首先通过ping openwrt.lan看看连上WRTnode2P没有,WRTnode2PIP地址是192.168.8.1openwrt.lan这个域名会被WRTnode2P拦截并解析到自己的ip地址。

如果第一次登陆WRTnode2P,或者之前没有给OpenWrtroot用户设置密码,那就telnet

$ telnet 192.168.8.1 

或是

$ telnet openwrt.lan

或者已经设置过root密码了,那就ssh:

$ ssh [email protected]

或是

$ ssh [email protected]

联网

apsWRTnode的自定义命令,扫描当前的Wi-Fi,结果如下所示:

# aps
WRTnode AP scaner.
Begin scaning APs, pls wait...
Finished.
APs available are...
ra0       get_site_survey:
Ch  SSID                             BSSID               Security               Signal(%)  
1   TP-LINK_0C9FE8                   3c:46:d8:0c:9f:e8   NONE                   0            
1   MERCURY_42D4                     e4:d3:32:de:42:d4   WPA1PSKWPA2PSK/AES     0        
2   360                              c8:3a:35:05:13:80   WPAPSK/AES             0        
2   superficial                      d8:42:ac:6a:14:40   WPA1PSKWPA2PSK/TKIPAES 29          
6   HUAWEI-HT8AYK                    b0:e5:ed:c7:7f:38   WPA2PSK/AES            0        
6   TP-LINK_403                      50:bd:5f:00:a6:90   WPA1PSKWPA2PSK/AES     0        
6   FAST_C98E9E11                    8c:21:0a:c9:8e:9e   WPA1PSKWPA2PSK/AES     0             
7   Phicomm_2CBFA0                   f0:eb:d0:2c:bf:a0   WPA1PSKWPA2PSK/TKIPAES 10       
11  TP-LINK_FE42                     24:69:68:e4:fe:42   WPA1PSKWPA2PSK/AES     0        

然后将WRTnode2P连上路由器:

# setwifi 连接的路由器SSID 对应的密码

看看WRTnode2P有没有从上级路由DHCP获取IP地址:

root@OpenWrt:/# ia
apcli0    Link encap:Ethernet  HWaddr 66:51:7E:00:82:8C  
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::6451:7eff:fe00:828c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:31804 (31.0 KiB)  TX bytes:6514 (6.3 KiB)

获取到IP后,看看是不是已经连上互联网了:

root@OpenWrt:/# ping www.baidu.com
PING www.baidu.com (115.239.211.112): 56 data bytes
64 bytes from 115.239.211.112: seq=0 ttl=55 time=5.686 ms
64 bytes from 115.239.211.112: seq=1 ttl=55 time=8.942 ms
64 bytes from 115.239.211.112: seq=2 ttl=55 time=5.893 ms
^C
--- www.baidu.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 5.686/6.840/8.942 ms

参考文章

WRTnode2P开箱指南

你可能感兴趣的:(openwrt)