Problem:
I am trying to configure batman-adv network on raspberry pi 3b+ following this, using on-board wlan0 interface coming with raspberry pi 3b+.
Once the network is executed by following all the steps in the page given above, it sets up healthily only occasionally, but once setup is successful, then it is possible to ping the nodes with each other. But during other instances nodes are not visible to each other.
The differences seen between the two instances when iwconfig
is executed are;
(1) during the instance of perfect funtionality;
wlan0 IEEE 802.11 ESSID: "network_name"
Mode:Ad-Hoc Frequency:2.447GHz Cell:26:AB:FD:65:E7:9E
Tx-Power=20dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Power Management:off
and (2) during the faulty instance;
wlan0 IEEE 802.11 ESSID: "network_name"
Mode:Managed Frequency:2.447GHz Access Point:Not-Associated
Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
What I have tried:
I've tried this on 2018-10-09-raspbian-stretch-lite and 2018-11-13-raspbian-strech-lite images, which still has no effect.
The commands to setup the network as given in the page was;
sudo modprobe batman-adv
sudo ip link set wlan0 down
sudo ifconfig wlan0 mtu 1532
sudo iwconfig wlan0 mode ad-hoc
sudo iwconfig wlan0 essid my-mesh-network
sudo iwconfig wlan0 ap any
sudo iwconfig wlan0 channel 8
sudo ip link set wlan0 up
sudo batctl if add wlan0
sudo ifconfig bat0 up
sudo ifconfig bat0 172.27.0.1/16
I have tried executing the commands in the script provided in the page above line by line, without letting the whole script of commands to run during the booting of the Pi (as recommended in the page). Then the following issues were encountered.
$ifconfig wlan0 mtu 1532
SCIOSIFMTU: Invalid argument
$sudo iwconfig wlan0 mode ad-hoc
Error for wireless request "set mode" (8B06):
SET failed on device wlan0; Device or resource busy
And all the other commands seems to be accepted without any error (eg: sudo iwconfig wlan0 essid network_name
which comes after the above commands takes effect and is reflected in iwconfig
)
I would be grateful to have any ideas to solve this issue and get the batman-adv up and running reliably.