I am attempting to set up a Ad-Hoc Wifi network of multiple PIs , none of them are supposed to be connected to the Internet. I could configure one of the PIs to act as a Ad Hoc Wifi device which provides the Wifi access point with an SSID and a static IP address.

I configured the /etc/interfaces file with the following text:

auto wlan0
iface wlan0 inet static
wireless-channel 1
wireless-essid CTWifi
wireless-mode ad-hoc

I can see the Wifi connection on another raspberry Pi through the Wifi connection GUI

I set up a static IP address (with the same subnet as the ad-hoc Pi) on the other raspberry pi by adding a line to the dhcpcd.conf file so I can connect to the ad-hoc Pi:

interface wlan0
static ip_address=

However, I cannot seem to connect to CTWifi by clicking on it even though it is showing up in the GUI. I tried to change the wpa_supplicant.conf file but that does not work either.

I also tried to set up a DHCP server on the ad-hoc Pi following this guide: https://spin.atomicobject.com/2013/04/22/raspberry-pi-wireless-communication/

I added the following lines to the dhcpd.conf file on the ad-hoc Pi:

ddns-update-style interim;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet netmask {

It still does not work. I cannot seem to connect to the ad-hoc network through the Wifi GUI.

Any help will be appreciated. Thanks.

Can see CT Wifi but cannot connect to it by clicking on it

  • You do not seem to understand ad-hoc ALL devices need to be ad-hoc – Milliways Jan 13 '20 at 4:56
  • Thanks. Now it works. I think my misunderstanding was that I did not understand that ad hoc means a routerless connection. – Anamitra Jan 13 '20 at 15:20
  • Please make an answer for your solution and accept it after two days. Only accepting an answer will finish a question. Otherwise it will pop up again and again for years (and for nothing). – Ingo Jan 13 '20 at 22:02

I set up the ad hoc settings in the other Pi with a static IP address and was able to able to connect to the network

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.