A Banana Pi-based router
WiFi
Before operating the WiFi network, you have a tricky task to perform. The cable for the WiFi antennae needs to be connected. The white sticker in Figure 3 is smaller than a US dime. You should press open the small pigtails of the antenna cable from above. A small book can serve to protect the board from damage.
The wireless communication is presently a weak point of the router, because the integrated chip does not work with the access point program hostapd
. Luckily, you can find the source code for a working version of hostapd on the Realtek website. An entry in the forum describes in detail the steps required to generate the two binaries, hostapd
and hostapd_cli
[8].
You should install the compiler and other necessary tools for the build via the metapackage build-essential. The program is saved to the directory /usr/local/sbin
. By issuing the command
$ sudo apt-get -y install hostapd
you will install the hostapd package as well as a series of necessary files. Because the version of hostapd you have pulled down does not work, you have to change the path within /etc/init.d/hostapd from /usr/sbin/hostapd to /usr/local/sbin/hostapd.
In the next step, you will be modifying the configuration of hostapd. The corresponding configuration file can be saved wherever you like in the filesystem, but it must be referenced by the file /etc/defaults/hostapd
. Listing 8 shows a simple example of a configuration that uses the WiFi network as a separate network. To run a test, you should start the access point manually:
Listing 8
WiFi Configuration
ssid=Banana-Network ctrl_interface=/var/run/hostapd interface=wlan0 driver=rtl871xdrv channel=10 beacon_int=100 hw_mode=g ieee80211n=1 wme_enabled=1 ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+] wpa=2 wpa_passphrase=pi31415926535 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP max_num_sta=8 wpa_group_rekey=86400 ignore_broadcast_ssid=0
$ sudo /etc/init.d/hostapd start
To specify an automatic start, you can use the following command:
sudo insserv hostapd
The WiFi network will be its own network, or it will be a part of a bridge with the cable network as needed. The theoretical average payload rate attainable by the R1 ranges from about 120Mbps to 50Mbps. The numbers vary a great deal, especially with dependencies from wireless networks located nearby. When in idle mode, operation as an access point does not increase power consumption. When the access point is active, the power consumption increases by about 1W.
If having a WiFi devices called wlan1 on the R1 instead of wlan0 bothers you, you should delete the /etc/udev/rules.d/70-persistent-net.rules
file. It still contains an old entry by the Bananian maintenance programmer and the chip it used had, of course, a different MAC address.
Conclusion
The BPi-R1 reveals itself in many ways as a true hobby board. This characterization is intended as a compliment. The board opens the door to numerous possibilities, but realizing the possibilities requires some handiwork with the hardware and the software.
In particular, the R1 is highly suitable as a teaching tool. It cuts a good figure as a server/switch/router combination and beats out competition posed by off-the-shelf systems with its equipment and the availability of Debian packages. SOHO routers running OpenWrt and DD-WRT are limited in this respect because they either have very few packages or the ones that exist have limited functionality.
Some users might find several different applications for the lavish equipment. If the user only has one cable in the living room, then the R1 can act simultaneously as a switch, an access point, and a media player on the TV. However, the weak support for the Mali GPU is the fly in the ointment in this scenario.
In summary, the large number of components that come with this board make it relatively expensive. Moreover, the system is not yet stable enough for continuous operation. A router and a server should run as long as possible without problem. The lack of a case raises doubts about this capability, but at the same time leaves room for startups that want to use the R1 as a foundation for additional functionality.
If the reports in relevant forums are to be believed, LeMaker is already working on a new version that will include components for home automation. The prospects are exciting. Will the future bring boards that have an ever greater number of components, or will the trend revert to small, simple, and specialized solutions?
Infos
- BPi-R1: http://www.bananapi.com/index.php/component/content/article?layout=edit&id=59
- Temperature problems with BPi-R1: http://www.bananapi.com/index.php/forum/news/62-temperature-problems-with-bpi-r1
- Banana Pi distros: http://www.bananapi.com/index.php/download?layout=edit&id=65
- Bananian homepage: http://www.bananian.org
- OpenWrt web page for the Allwinner family: http://wiki.openwrt.org/doc/hardware/soc/soc.allwinner.sunxi
- Turning on SATA power: http://bananapi.com/index.php/forum/general/391?start=12
- Rasp Pi iptables: https://blog.bartbania.com/raspberry_pi/iptables-security-part-ii/
- Compiling hostapd from the Realtek sources: http://www.lemaker.org/forum.php?mod=viewthread&tid=13017&highlight=BPi%2BWLAN%2Baccess%2Bpoint
« Previous 1 2 3 4 Next »
Buy this article as PDF
Pages: 6
(incl. VAT)