WRTnode2Q开箱指南

来自WRTnode Wiki
Summer讨论 | 贡献2016年9月21日 (三) 10:25的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

快速窍门:
WRTnode2Q默认ssid: WRTnode2Q_xxxx
默认Wi-Fi密码:12345678

买了WRTnode2Q你得到了什么

WRTnode2Q以套件形式售卖,因此你不光有2Q核心板
WRTnode2P.jpg
套装中还有底板以及外接天线,为了方便包装及运输,开箱后天线是重叠覆盖在核心版和地板上的,如图:
2PPACK.jpg

天线是可以360度旋转的,入手后的第一步就是要平行的旋转天线,让天线不要遮挡住核心板,同时两个天线也不要重叠,这样保证wifi信号是最强的。如下图所示:
2PSHLD-1.jpg

启动WRTnode2Q

使用microUSB供电,一头接在WRTnode2Q标准底板的迷你usb接口,一头接到一个超过500ma的5v供电的地方,一般来说随便一个电脑啊笔记本啊手机充电器啊什么的都可以,上电以后,WRTnode2Q底板上的蓝灯亮起,里面的OpenWrt开始启动了,20秒后,你能发现一个WRTnode2Q_xxxx(xxxx指你的WRTnode2Q mac地址的后四位)的Wi-Fi,用电脑或手机或ipad连上,密码是12345678.

把玩WRTnode2Q

登陆WRTnode2Q(telnet或ssh)

Windows、Linux、Mac都可以,Windows的话,用putty或者其他Linux终端软件。

  • 首先你看看你连上WRTnode2Q没有
ping openwrt.lan

WRTnode2Q的IP地址是192.168.8.1,‘openwrt.lan’这个域名会被WRTnode2Q拦截并解析到自己的ip地址。

  • telnet或者ssh连上WRTnode2Q

如果你是第一次登陆WRTnode2Q,或者你之前没有给OpenWrt的root用户设置密码,那就telnet:

telnet 192.168.8.1 

或是

telnet openwrt.lan

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

ssh root@192.168.8.1

或是

ssh root@openwrt.lan

输入密码,看到这个就ok了:
Busybox.jpg

不联网不幸糊

接下来的事情就是要把你的WRTnode2Q连上互联网。首先,你得有个已经连上网的无线路由器。

root@OpenWrt:~# aps

'aps'是WRTnode的自定义命令,扫描当前的Wi-Fi,结果是类似这样的:

WRTnode AP scaner.
Begin scaning APs, pls wait...
Cell 01 - Address: xx:xx:xx:xx:xx:xx
          ESSID: "TP-LINK"
          Mode: Master  Channel: 1
          Signal: -53 dBm  Quality: 57/70
          Encryption: mixed WPA/WPA2 PSK (CCMP)

Cell 02 - Address: xx:xx:xx:xx:xx:xx
          ESSID: "LEDE"
          Mode: Master  Channel: 1
          Signal: -27 dBm  Quality: 70/70
          Encryption: none

Cell 03 - Address: xx:xx:xx:xx:xx:xx
          ESSID: unknown
          Mode: Master  Channel: 1
          Signal: -73 dBm  Quality: 37/70
          Encryption: mixed WPA/WPA2 PSK (CCMP)

然后,我们来将WRTnode2Q连上您现有的路由器:

root@OpenWrt:~# setwifi 您要连接的路由器SSID 对应的密码

注意哦,SSID和密码中间有个空格。
例如:

root@OpenWrt:~# setwifi TP_linkAB33CD password

回车以后等5秒,有时需要我们的电脑重新连接WRTnode2Q的Wi-Fi,然后看看WRTnode2Q有没有从上级路由DHCP获取IP地址:

root@OpenWrt:~# ia

我们得到:

root@OpenWrt:~# ia
"up" : "ture"
"ipv4-address": "192.168.1.149"
WRTnode2Q is connected to Internet

有时候,获取IP地址有可能要搞十几秒甚至几十秒,稍安勿躁。搞到IP后,我们看看是不是已经连上互联网了:

root@OpenWrt:~# ping baidu.com
PING baidu.com (220.181.111.85): 56 data bytes
64 bytes from 220.181.111.85: seq=0 ttl=54 time=6.071 ms

搞定,我们用电脑连上了WRTnode2Q,还把WRTnode2Q连上了互联网。

WRTnode2Q软件仓

root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_base.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/telephony/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_telephony.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/oldpackages/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/wrtnode/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_packages.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/routing/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_routing.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/luci/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_luci.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/management/Packages.gz.
Updated list of available packages in /var/opkg-lists/chaos_calmer_management.
root@OpenWrt:~# opkg install xxxx

恢复出厂设置

root@OpenWrt:~# firstboot
This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
/dev/mtdblock5 is mounted as /overlay, only erasing files
root@OpenWrt:~# reboot

OpenWrt SDK

请到https://github.com/WRTnode/openwrt克隆或下载
ps: 本sdk是WRTnode各款硬件产品的OpenWrt通用的SDK,如果是要用于WRTnode2Q,请在make menuconfig的时候 [ Subtarget ] 选择 [ Generic ],[ Target Profile ] 选择 [ (WRTnode2Q board ]

更多资源

WRTnode2Q详细参数
WRTnode2Q针脚定义
WRTnode2Q标准底板
WRTnode2Q硬件扩展开发及量产指南

走起来吧,骚年!