Summary:
A short summary of the issue I am seeing before I launch into the details: I am trying to use wlan0 on my RP3b for wireless comms in a RP3 mesh network (batman-adv). Using a fresh install of Raspbian – Jessie, I am able to change the wlan0 interface mode to ad-hoc and if the ESSID is its default of “off/any”, I am able to set the CELL ID (AP) to any ID I want. I use iwconfig to do this.
However if I define ESSID to “my-mesh” for example, then the CELL ID gets changed automatically and I am unable to change it back to the ID I want it to be.
What I am trying to do long term:
The long term goal is to setup a mesh network using multiple RP3s using batman-adv. I want to also configure each RP3 to be an AP too. The intention is to solve the wifi dead spots in my house using my own mesh network. I want to be able to roam around the house and for the client (that is connected to the internet via the AP and mesh) to seamlessly hand over to the nearest AP when appropriate.
After reading countless articles on this topic, I decided to try batman-adv and follow this guideline as it is well written as seems straight forward: how to configure batman-adv
As ever, things are never straight forwards as my two RP3s cannot join the defined mesh network because I am unable to set the ad-hoc CELL IDs to the same value.
What I am seeing at the minute:
So after many attempts at solving this problem, I decided to go back to grass roots, forget the mesh for the moment and try and work out what the problem is on a single RP3. So using a fresh install of Raspbian – Jessie and following a reboot:
pi@raspberrypi:~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:d2:c5:83
inet addr:192.168.0.79 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::bcc5:f949:7b72:592c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9318 errors:0 dropped:0 overruns:0 frame:0
TX packets:5489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:9953717 (9.4 MiB) TX bytes:883874 (863.1 KiB)
lo (ignore)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:87:90:d6 inet6 addr: fe80::ee57:4cb4:85bd:f61a/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 is connected to my home gateway (access to the internet), wlan0 is currently unconfigured.
pi@raspberrypi:~ $ iwconfig lo no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on
eth0 no wireless extensions.
Changing wlan0 mode and defining the Cell ID:
pi@raspberrypi:~ $ sudo iwconfig wlan0 mode ad-hoc
pi@raspberrypi:~ $ sudo iwconfig wlan0 ap 02:11:87:12:34:56
pi@raspberrypi:~ $ iwconfig
lo no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any Mode:Ad-Hoc Frequency:2.412 GHz Cell: 02:11:87:12:34:56 Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on
eth0 no wireless extensions.
All good so far. However in order for a mesh network to be created, from what I understand the ESSID needs to be defined so that on all RP3s that form part of the mesh share a common: ESSID, CELL ID and password. Now when I try and set the ESSID, the CELL ID changes automatically:
pi@raspberrypi:~ $ sudo iwconfig wlan0 essid "my-mesh" pi@raspberrypi:~ $ iwconfig lo no wireless extensions.
wlan0 IEEE 802.11 ESSID:"my-mesh" Mode:Ad-Hoc Frequency:2.412 GHz Cell: FA:0A:C8:56:BD:4E Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on
eth0 no wireless extensions.
and whatever I try and do, I am unable to change the CELL ID to what I want/need it to be for my mesh network:
pi@raspberrypi:~ $ sudo iwconfig wlan0 ap 02:11:87:12:34:56 pi@raspberrypi:~ $ iwconfig lo no wireless extensions.
wlan0 IEEE 802.11 ESSID:"my-mesh" Mode:Ad-Hoc Frequency:2.412 GHz Cell: FA:0A:C8:56:BD:4E Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on
eth0 no wireless extensions.
I am hoping that I am making a silly mistake or have forgotten something obvious. Is anyone able to offer any guidance please? I am getting quite frustrated by this.
Is there a daemon in the backgorund that is changing the CELL ID?
My setup:
Board = RP3b v1.2 (I have two of these) OS – Raspbian Jessie, 4.9.35-v7+ For initial configuration purposes, I am using eth0 connected to my gateway, and intend using the onboard wifi interface wlan0 for mesh comms (bat0) I will plug in an additional usb wifi dongle later to act as my AP, but I want to get the basics working first before I do so
Thanks in advance for any help you can offer