[beagle-alpha] Wilink8 features to explore: Wake on WLANand802.11s mesh

Hi!

I successfully run MESH+STA or MESH+AP. However, I liked to run these mode on boot.

So I found website in order to make that happen.

Here is what I did

  1. move script file on /etc/init.d/script_name(mesh_start.sh and ap_start.sh)

  2. update-rc.d <script_name> defaults

So for the AP, i used for ap_start.sh. For Mesh, i used mesh_start.sh

After boot up ap_start.sh works fine but mesh_start.sh does not work perfect

[ 56.906613] wlcore: down
[ 56.996344] IPv6: ADDRCONF(NETDEV_UP): mesh0: link is not ready
[ 57.026577] IPv6: ADDRCONF(NETDEV_CHANGE): mesh0: link becomes ready

After that it supposed to be create mesh network but it does not.

I assumed in mesh_start.sh

*wpa_supplicant -e/usr/share/wl18xx/entropy.bin *
-imesh0 -Dnl80211 -c mesh_supplicant.conf &

This two lines does not run properly

In order to run wpa_supplicant, am I have to initialize wpa_supplicant first because I do not have /etc/init.d/wpa_supplicant?

If you say, do you know how to initialize wpa_supplicant?

I am using

Linux version - 4.4.19-gdb0b54cdad

Board - BeagleBone Green Wireless

mesh_start.sh

#!/bin/sh

#!/usr/sbin/wpa_supplicant

sleep 15

MESH=mesh0

add Mesh interface, if not present

if [ ! -d /sys/class/net/$MESH ]

then

echo “adding $MESH interface”

iw phy ls /sys/class/ieee80211/ interface add $MESH type mp

fi

if ps -w | grep -v grep | grep wpa_supplicant | grep mesh0 > /dev/null

then

echo “wpa_supplicant is already running(Mesh)”

exit 0

fi

sleep 15

wpa_supplicant -e/usr/share/wl18xx/entropy.bin \

-imesh0 -Dnl80211 -c wpa_supplicant.conf &

sleep 1

iw phy phy0 set rts 0

ifconfig mesh0 10.20.30.41 netmask 255.255.255.0

iptables -t nat -A POSTROUTING -o mesh0 -j MASQUERADE

udhcpd /usr/share/wl18xx/udhcpd_mesh.conf

Thank you!

image.png

image.png

ping and iperf test between BBGW1 and BBGW2.PNG

image.png

image.png

image.png

Mesh and STA.PNG

image.png

Hidden SSID2.PNG

image.png

image.png

image.png

image.png

image.png

image.png

Hidden SSID.PNG

image.png

image.png

image.png

image.png

Hi!

I successfully run MESH+STA or MESH+AP. However, I liked to run these mode on boot.

Can you describe the process you followed, step by step including the starting image, to get this working not-on-boot? Going from there to making it work on boot should be relatively straight-forward.

So I found website in order to make that happen.

What website?

Here is what I did

  1. move script file on /etc/init.d/script_name(mesh_start.sh and ap_start.sh)

Move it where?

  1. update-rc.d <script_name> defaults

So for the AP, i used for ap_start.sh. For Mesh, i used mesh_start.sh

After boot up ap_start.sh works fine but mesh_start.sh does not work perfect

[ 56.906613] wlcore: down
[ 56.996344] IPv6: ADDRCONF(NETDEV_UP): mesh0: link is not ready
[ 57.026577] IPv6: ADDRCONF(NETDEV_CHANGE): mesh0: link becomes ready

After that it supposed to be create mesh network but it does not.

No extra log information? How do you know about it working or not working?

I assumed in mesh_start.sh

*wpa_supplicant -e/usr/share/wl18xx/entropy.bin *
-imesh0 -Dnl80211 -c mesh_supplicant.conf &

What is the contents of mesh_supplicant.conf? Do you need to point to its full path?

This two lines does not run properly

In order to run wpa_supplicant, am I have to initialize wpa_supplicant first because I do not have /etc/init.d/wpa_supplicant?

If you say, do you know how to initialize wpa_supplicant?

I am using

Linux version - 4.4.19-gdb0b54cdad

Board - BeagleBone Green Wireless

mesh_start.sh

#!/bin/sh

#!/usr/sbin/wpa_supplicant

Is this really meant to be a “shebang” line? In a script, not being the first line, it’ll be ignored, which makes some sense because it wouldn’t interpret anything properly. I just don’t know why this is here.

sleep 15

MESH=mesh0

add Mesh interface, if not present

if [ ! -d /sys/class/net/$MESH ]

then

echo “adding $MESH interface”

iw phy ls /sys/class/ieee80211/ interface add $MESH type mp

fi

if ps -w | grep -v grep | grep wpa_supplicant | grep mesh0 > /dev/null

then

echo “wpa_supplicant is already running(Mesh)”

exit 0

fi

sleep 15

wpa_supplicant -e/usr/share/wl18xx/entropy.bin \

-imesh0 -Dnl80211 -c wpa_supplicant.conf &

sleep 1

iw phy phy0 set rts 0

If this is waiting for an interface to become available from wpa_supplicant, ‘sleep 1’ might not be enough. Perhaps a set of udev rules would make more sense?

ifconfig mesh0 10.20.30.41 netmask 255.255.255.0

iptables -t nat -A POSTROUTING -o mesh0 -j MASQUERADE

udhcpd /usr/share/wl18xx/udhcpd_mesh.conf

Another configuration file without source.

image.png

image.png

ping and iperf test between BBGW1 and BBGW2.PNG

image.png

image.png

image.png

Mesh and STA.PNG

image.png

Hidden SSID2.PNG

image.png

image.png

image.png

image.png

image.png

image.png

Hidden SSID.PNG

image.png

image.png

image.png

image.png