Wednesday, September 23, 2020

NanoPi R2S and OpenWRT

Although there is an OEM version of OpenWRT (FriendlyWRT) for NanoPi R2S, personally I prefer using the original version of OpenWRT if it is possible.  The FriendlyWRT is fine solution however it is few versions behind the official OpenWRT build.  In addition, the OEM version preloaded with many plugins that I either don't use or I don't know.  For instance, it comes it with many VPN related plugins that are populate in its home market.


Currently, its support hasn't make to the mainstream yet.  It is still under development and its image is under the snapshot branch.  Being a snapshot image, it only contains the very core.  That is it doesn't come with luci preloaded.  Here are steps that I use to set mine up.  Firstly, ssh into your NanoPi, then:-

1) Install luci to regain GUI access.

opkg update
opkg install luci 

2) Install packges for OpenVPN, Custom Command and ttyd.

opkg install openvpn-openssl luci-app-openvpn luci-app-commands luci-app-ttyd

3) Install packages for statistics such as CPU load, thermal etc

opkg install luci-app-statistics
opkg install collectd-mod-cpu collectd-mod-interface collectd-mod-memory collectd-mod-ping collectd-mod-rrdtool collectd-mod-wireless collectd-mod-thermal

4) Install Smart Queue Management (SQM) package

opkg install luci-app-sqm

You may need to restart the r2s to get this to work.

 https://openwrt.org/docs/guide-user/luci/luci_app_statistics 

 

Here is settings for the front LEDs in the /etc/config/system file.

config led 'led_wan'
option name 'WAN'
option sysfs 'nanopi-r2s:green:wan'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'eth0'

config led 'led_lan'
option name 'LAN'
option sysfs 'nanopi-r2s:green:lan'
option trigger 'netdev'
option mode 'link tx rx'
option dev 'eth1'

 

 

n.b. all packages in one command:

opkg install luci openvpn-openssl luci-app-openvpn luci-app-commands luci-app-ttyd luci-app-statistics collectd-mod-cpu collectd-mod-interface collectd-mod-memory collectd-mod-ping collectd-mod-rrdtool collectd-mod-wireless collectd-mod-thermal luci-app-sqm

No comments: