Created
July 12, 2019 01:09
-
-
Save tyhenry/648a0f325d19fbe3a54d23965e3b20b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. setup interfaces: | |
sudo nano /etc/network/interfaces.d/bat0 | |
auto bat0 | |
iface bat0 inet auto | |
address 172.27.0.1 | |
netmask 255.255.255.0 | |
pre-up /usr/sbin/batctl if add wlan1 | |
sudo nano /etc/network/interfaces.d/wlan1 | |
auto wlan1 | |
iface wlan1 inet manual | |
mtu 1532 # increase packet size to account for batman-adv header | |
wireless-channel 1 # any channel from 1-14 | |
wireless-essid nightlight-mesh | |
wireless-mode ad-hoc | |
wireless-ap 02:12:34:56:78:9A # pre-set CELL id | |
2. install and enable batman-adv | |
sudo apt-get install -y batctl | |
echo 'batman-adv' | sudo tee --append /etc/modules | |
echo "${HOME}/start-batman-adv.sh" >> ~/.bashrc | |
2. setup batman boot script | |
sudo nano ~/start-batman-adv.sh | |
#!/bin/bash | |
# tell batman-adv which interface to use | |
sudo batctl if add wlan1 | |
# activates the interfaces for batman-adv | |
sudo ifconfig wlan1 up | |
sudo ifconfig bat0 up # bat 0 is created via first cmd | |
3. | |
append to /etc/dhcpcd.conf: | |
interface wlan1 | |
static ip_address=127.72.0.1/24 | |
nohook wpa_supplicant | |
# added for ap | |
interface wlan0 | |
static ip_address=192.168.0.1/24 | |
nohook wpa_supplicant |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment