How to enable Realtek Repeater
Self-Organization Network
2017/07/20 Aries Lee Ver 0.2
1. Introduction
Realtek Repeater Self-Organization Network is a private software protocol which
allows all devices to construct and maintain the network topology automatically. All
devices which’s with the same identity (we call RSON ID) will connect each other in
the form of tree structure. If any node is deleted or added, all nodes can automatically
reconstruct a new network topology to adapt any change.
Since the network will form a hierarchical tree structure. The top of the tree is called
“Root”, which only operates hostapd function to allow to be associated by other
devices. The STA interface of Root is NOT necessary to be active.
On the other hand, the rest parts of the tree are called “Nodes”, which be required to
operated not only hostapd but also wpa_supplicant at the same time, the STA
interface of “Node” MUST connect to tree and the AP interface of “Node” MUST
allow to be connected by other node as well. We also define a term -- “Hop count”,
which means the number of edges from the Root to the Nodes, it also represent the
hierarchical level for a node in the tree
Following figures show the process of each stage during RSON working.
Attention!! A linking was UNABLE to be established between a peer and a peer
unless both of them have the same RSON ID.
All devices are just power on, RSON function is preparing.
All devices have constructed a tree structure networking by RSON function.
If a node is disconnect for some reason, RSON function will recovery the
connection of whole networking.
2. Driver configuration
2.1 Please make sure that all devices can perform repeater mode well, you
have to run hostapd and wpa_supplicant at the same time, if you have no idea
about how to enable repeater mode function, please reference the documents --
“Quick_Start_Guide_for_Bridge.pdf” and
“Realtek_WiFi_concurrent_mode_Introduction.pdf”.
2.2 Set CONFIG_RTW_REPEATER_SON as y in Makefile
2.3 Edit include/autoconfig.h, put following string in file.
#define CONFIG_RTW_REPEATER_SON_ID 0xXXXXXXXX
Where “0xXXXXXXXX” is an 4byte hexadecimal number which’s used as an
identity of network. The devices with the same
CONFIG_RTW_REPEATER_SON_ID value will consist of the same network.
On the other hand, the devices with different ID would NOT try to connect each
other even they have the same SSID and password.
2.4 If this device is a root (ex:NVR), please put following string in
include/autoconfig.h.
#define CONFIG_RTW_REPEATER_SON_ROOT
If this device is a node (ex:IPCAM), do NOT define this flag.
2.5 All device which’s in the same network should use the same channel, SSID,
password, encryption way. In other words, the content of hostapd.conf and
wpa_supplicant.conf should be the same.
3. Technical detail
This table shows the parameters of “Realtek Repeater Self-Organization Network”
mechanism.
Name Explanation
Version Version
ID Different network should own a
different ID.
HopCount Hop count
Connectible Whether the AP allow to be
connected or not
1 : allow
0 : deny
Loading The traffic loading
Reserve Reserve
The file “/proc/net/<wifi_chip>/wlanx/rson_data” allows the developers to get/set
those parameters.
How to get parameter?
cat /proc/net/<wifi_chip>/wlanx/rson_data
How to set parameter?
echo <field> <val> > /proc/net/<wifi_chip>/wlanx/rson_data
where <field> is the parameter name and <val> is the value you want to assign.
Ex :
echo ver 1 > /proc/net/rtl8188eu/wlan0/rson_data
echo id 0x01020304 > /proc/net/rtl8188eu/wlan0/rson_data
echo hc 1 > /proc/net/rtl8188eu/wlan0/rson_data
echo cnt 1 > /proc/net/rtl8188eu/wlan0/rson_data
echo loading 1 > /proc/net/rtl8188eu/wlan0/rson_data
echo res 11223344556677889900aabbcc > /proc/net/rtl8188eu/wlan0/rson_data
For debugging purpose, developer can observe the content of
/proc/net/<wifi_chip>/wlanx/survey_info, it shows a list of all detected nodes and
their information in the air.
4. Note
4.1 All nodes will detect whole system and automatically roam to better choice (if
it exist) every 2 seconds.
4.2 The node will detect the linking status of parent node, it would not report
disconnection immediately. Instead, device will try to roam to the second
choice and report disconnection if it is still unable to connect with any peer in
next 6 seconds.
4.3 “Realtek Repeater Self-Organization Network” function only focus on
constructing a layer 2 wifi networking topology, this function DOESN’T
take care IP, TCP/UDP, HTTP or any other upper network
protocol/application.
4.4 The criteria of choosing parent node is implemented in
core/rtw_rson.c::rtw_cal_so_score() function. It is based on 2 factor ---
A. The hop count from the root.
B. RSSI.
The developer can customize this function by their user scenario.