WRTnode2R starting guide
The most first tip:
WRTnode2R default WiFi ssid: WRTnode2R_xxxx
Defual password for the Wi-Fi ssid: 12345678
Contents
What's in the WRTnode2R retail package
WRTnode2R retail package including the WRTnode2R and it's standerd shield
This is how they are togother ready to work.
How WRTnode2R inserted into the shield
Plug the golden core module WRTnode2R into the miniPCI socket as the angle like the figure:
And push the outside of the golden module lightly, as the figure:
After a "carrrrrh" sound, the core module and the base board fitted each other perfectly, as the figure:
Isn't the inserting of WRTnode2R looks like the inserting of the RAM stick to the laptop? Yep, it's just how we want to design.
Light up WRTnode2R
- The board is powered by micro-USB connector, find an ordinary micro-USB power cable( which is not included in the retail package)
- Plug into the baseboard's micro-USB connector, and the other side you could use any USB port which could offer more than 500mA and 5V power, such as a computer or a laptop's USB interface or a mobile phone charger or something like this.
- The blue LED lights on and the OpenWrt starts to run in the board.
- 20 seconds later, you will find a Wi-Fi with the SSID like WRTnode2P_xxxx( xxxx means the last four byte of the MAC address of your WRTnode2P), you could connecting the Wi-Fi with computer or phone with the password 12345678.
Login to WRTnode2R using telnet or ssh
Use any PC with Windows, Linux or MacOS operating system, install PuTTY on Windows PC, use any Linux / MacOS terminal software on Linux / MacOS.
- First ping the WRTnode to see if connection is available. The default IP of WRTnode2R is set to 192.168.8.1, but WRTnode2R is able to resolve openwrt.lan to 192.168.8.1 as well:
ping openwrt.lan
- Connect to WRTnode2R using telnet or ssh
If you connect first time to WRTnode2R or you didn't set password for root user of OpenWrt, use telnet to connect:
telnet 192.168.8.1
or
telnet openwrt.lan
If you a password for root user was set, use SSH to connect:
ssh root@192.168.8.1
or
ssh root@openwrt.lan
Input your root password and a screen should appear like, ok, that's it. you could play your Linux CLI interacting here now:
No internet no happiness
Now we will connect WRTnode2R to the internet. of course, you must have a 2.4G Wi-Fi ap or router with has connected on the internet.
root@OpenWrt:~# aps
'aps' is the command of WRTnode2R to scan the Wi-Fi available, the output of 'aps' looks like this:
WRTnode AP scaner. Begin scaning APs, pls wait... Finished. APs available are... ra0 get_site_survey: Ch SSID BSSID Security Siganl(%)W-Mode ExtCH NT WPS DPID 1 Tenda xx:xx:xx:xx:xx:xx NONE 70 11b/g/n ABOVE In YES 1 hshn xx:xx:xx:xx:xx:xx WPA2PSK/AES 96 11b/g/n NONE In YES 6 TP-LINK xx:xx:xx:xx:xx:xx NONE 55 11b/g NONE In NO 6 BY01 xx:xx:xx:xx:xx:xx NONE 100 11b/g/n NONE In YES 6 Tenda_xxxxxx xx:xx:xx:xx:xx:xx WPAPSK/AES 50 11b/g/n ABOVE In NO 11 CU_wpFS xx:xx:xx:xx:xx:xx WPAPSK/TKIPAES 70 11b/g/n NONE In YES
ok,we will connect one:
root@OpenWrt:~# setwifi SSID_you_connetctin the_password
be careful, there's a space between the SSID and the password
Such as:
root@OpenWrt:~# setwifi TP_linkAB33CD my_password
Press Enter and wait 5 seconds, or sometimes we need to reconnect our computer to the WRTnode2R's SSID, so let's see if we have got the IP address from uppter router:
root@OpenWrt:~# ia
we'll see
root@OpenWrt:~# ia apcli0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/xx Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sometimes getting the IP address will lasts more than 5 seconds, so be patient. Once we got the IP address, let's see if the board have access the internet:
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
See, thus we connected our computer to the WRTnode2R, and we connected the WRTnode2R to the internet.
WRTnode2R software repository
root@OpenWrt:~# opkg update Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ramips/mt7628/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/ramips/mt7628/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/ramips/mt7628/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/ramips/mt7628/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/ramips/mt7628/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/ramips/mt7628/packages/management/Packages.gz. Updated list of available packages in /var/opkg-lists/chaos_calmer_management. root@OpenWrt:~# opkg install xxxx
Play stm32
Updating the firmware of stm32
In the stm32 of WRTnode2R/en, we preset a bootloader in the first 4K of stm32 so we could update firmware of stm32 online in mt7688, which provide by a 7688 tools named flash-stm32.
Using flash-stm32 like:
root@OpenWrt:~# flash-stm32 URL
URL argument could be the file url from internet or the local file.
We recommended to update the new firmware:
root@OpenWrt:~# flash-stm32 http://d.wrtnode.com/2R-stm32/WRTnode2r_stm32_V1.bin
As shown, stm32 updating finished, after that stm32 will reboot automatically.
If user want to do stm32 development by yourself, use tools like stlink to deleop/debug/reflash. Here's what we must know:
- 用户开发的代码中要将中断向量表重定向到0x08001000位置。
- 用户代码下载时,要下载到0x08001000位置。
- 如果用户完全抛弃我们提供的代码进行开发,但是又希望能够支持在线更新固件的功能,需要在用户开发的代码中实现7688控制stm32复位的功能。(在我们提供的代码中,已经实现了reset这个cmd,所以基于我们提供的代码进行开发,不需要完成这一步)
体验stm32的msh
WRTnode2R的STM32上运行着RT-Thread实时操作系统,受益于RTT中友好的msh命令行调试组件,我们在出厂固件中实现了RTT的spi slave设备驱动,并且将msh的输入输出端口都映射到了spi总线上。同时我们提供了在7688上与STM32通过SPI总线通信的软件(包括spiS0设备驱动、spi-bridge通信软件和flash-stm32固件升级程序)。
体验stm32上的msh:
- 登录到WRTnode2R上。(登录的方式有串口、telnet、ssh)
- 输入spi-bridge即可打开和stm32的msh命令行终端,可以按下tab键再按下enter键列出msh支持的所有命令。
spi-bridge
- 若要执行某一条命令,输入命令后按下enter即可执行。如图:
- exit退出msh。
如需了解WRTnode2R stm32的详情,请参考:WRTnode2R的STM32开发指南
如果你手上拿到的是WRTnode2R的内测版,第一次升级固件请参考stm32的升级:WRTnode2R内测版Stm32升级;升级stm32固件之后再升级WRTnode的固件。提供WRTnode升级固件的方法及新固件下载链接
恢复出厂设置
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,如果是要用于WRTnode2R,请在make menuconfig的时候 [ Subtarget ] 选择 [MT7628 base boards]
更多资源
走起来吧,骚年!