Created
March 18, 2019 13:52
-
-
Save plusangel/299f3e43ce4b5765a11f9474490a210d to your computer and use it in GitHub Desktop.
rPi3-ad-hoc
This file contains 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
I have setup Ad-Hoc mode on my Pi3. | |
This involves modification to network configuration file /etc/network/interfaces so you should first make a backup e.g. sudo cp /etc/network/interfaces /etc/network/interfaces.orig. | |
Replace the interfaces file with the following:- | |
# interfaces(5) file used by ifup(8) and ifdown(8) | |
# Please note that this file is written to be used with dhcpcd | |
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' | |
# Include files from /etc/network/interfaces.d: | |
source-directory /etc/network/interfaces.d | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
auto wlan0 | |
iface wlan0 inet static | |
address 10.2.1.1 | |
netmask 255.255.255.0 | |
wireless-channel 1 | |
wireless-essid PiAdHocNetwork | |
wireless-mode ad-hoc | |
You can choose your own address, SSID and wireless-channel, but all machines should have the same settings. | |
Strictly you should should disable dhcpcd as this will try to automatically configure networks. sudo systemctl stop dhcpcd.service will stop (deactivate) dhcpcd. | |
If /etc/network/interfaces calls dhcp it will automatically be disabled. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment