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
-
move script file on /etc/init.d/script_name(mesh_start.sh and ap_start.sh)
-
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!