-
Notifications
You must be signed in to change notification settings - Fork 54
Mesh Synchronization Test Plan
- Clone distro11s from
git://github.com/cozybit/distro11s.git
- Patch the qemu package list file as indicated below:
diff --git a/board/qemu/pkglist b/board/qemu/pkglist
index 740bef9..114a3b2 100644
--- a/board/qemu/pkglist
+++ b/board/qemu/pkglist
@@ -1,5 +1,5 @@
debian-rootfs;;;;
-kernel;git;git://github.com/cozybit/open80211s.git;master;
+kernel;git;git://github.com/cozybit/open80211s.git;ft-mesh-sync-tmp;
libnl;git;git://git.infradead.org/users/tgr/libnl.git;master;libnl3_0
iw;git;http://git.sipsolutions.net/iw.git;master;
authsae;git;git://github.com/cozybit/authsae.git;master;
- Fetch and build the code
cd distro11s
./scripts/fetch.sh
./scripts/build.sh
- Launch qemu
./board/qemu/qemu.sh
- Choose a method to transfer test scripts to your qemu image. We use sshfs to mount our development host hard drive, but scp or even cut and pasting the scripts could do the job.
Prepare your target with Atheros AR9285. If your target's host is an x86, you can use distro11s to build an image with all the components required for mesh.
If not, you will need to cross-compile and install the following components:
- kernel:
git://github.com/cozybit/open80211s.git/ft-mesh-sync-tmp
- iw:
git://github.com/cozybit/iw
- libnl:
git://git.infradead.org/users/tgr/libnl.git
Goal: Determine if mesh synchronization takes place between neighbors in different MBSSs.
This script brings up two mesh interfaces (mesh0 and mesh1) with default synchronization method (MBSS1) and another two mesh interfaces (mesh2 and mesh3) with vendor synchronization method enabled (MBSS2). This test checks if TSF's of all neighbors, (peer/non-peers in same MBSS and neighbors from different MBSS) are tracked and timing offset, Toffset, is recorded appropriately.
Requirements: Three target machines namely STA1, STA2 and STA3.
- Bring up mesh interfaces on targets as
iw phy0 interface add $MESH_IFACE type mesh
iw $MESH_IFACE set channel <$CHANNEL>
- Create two mesh networks.
# On STA1 and STA2
iw $MESH_IFACE mesh join $MESH_ID
# On STA3
iw $MESH_IFACE mesh join $MESH_ID vendor_sync on
- Observe Toffsets of all neighbors of STA1 at the output of iw station dump.
iw mesh0 station dump | grep -e Station -e Toff
Station 00:03:7f:10:4e:0c (on mesh0)
Toffset: -4394252 us
Station 00:03:7f:10:4e:11 (on mesh0)
Toffset: -29907799 us
- Monitor Toffset of all peers once a second
while true; do iw mesh0 station dump | grep -e Station -e Toffset; sleep 1; done
- Introduce clock drift. To introduce small TSF drifts, you can use the following syntax:
echo +=000002000 > /sys/kernel/debug/ieee80211/phy0/netdev\:$MESH_IFACE/tsf
OR
echo -=000002000 > /sys/kernel/debug/ieee80211/phy0/netdev\:$MESH_IFACE/tsf
- Observe that drift is countered
Goal: Verify that time synchronization is not affected by the presence of traffic.
This script brings three mesh interfaces (namely mesh0, mesh1 and mesh2) with default mesh synchronization method. This test checks if timing offsets in the presence of data traffic.
Requirements: Three target machines namely STA1, STA2 and STA3.
- Bring up mesh interfaces on targets as
iw phy0 interface add $MESH_IFACE type mesh
iw $MESH_IFACE set channel <$CHANNEL>
ifconfig $MESH_IFACE <$IP_ADDR>
iw $MESH_IFACE mesh join $MESH_ID
- Run tsfdrift on one of the stations
- Display Toffset of all peers for every second.
while true; do iw mesh0 station dump | grep -e Station -e Toffset; sleep 1; done
- Open a second terminal for each STAs. Start iperf server on STA1
iperf -s
- Start iperf client on STA2 and STA3
iperf -c $STA1_IPADDR
- Switch back to terminal1, with iperf still running and observe Toffset values.
- Confirm Toffset values are within TOFFSET_DELTA_MAXIMUM range.
TOFFSET_DELTA_MAXIMUM is calculated to the 0.01% of the duration of the test, which maximum drift specified in the IEEE 802.11 Std (See Section 10.1.3.7, TSF timer accuracy).