I'm trying to connect four Pis (slaves) together and one of them is being used as a DHCP server. I'm currently trying to connect one of them to the Pi acting as a DHCP server (call this the master) but I'm not having any luck.

The master's Wi-Fi is configured as an ad hoc and I can connect the slave to this and communicate with the master, providing I statically set the IP address of the slave. This however, doesn't work when the slave is connecting to the master using DHCP. The weird thing is, is this all works when I use the Ethernet connection (all I'm doing is swapping over the interface within the dhcpd config to wlan0 to eth0).

Is there something I'm missing?

  • Isn't an ad-hoc WiFi network the same as a cross-over cable, meaning that it forces a network between just 2 computers, and both ends need to manually set their IPs? What happens if you use hostapd to turn your master into a WiFi AP? – Phil B. Dec 22 '16 at 13:04

This has been a classic problem for Raspberry Pis. However since you don't mention which Pi (Pi-2 or Pi-3) and/or USB WLAN Dongle you are using I will give my input for your problem.

I have spent a considerable amount of time figuring the problem out. I have concluded that WiFi Modules such as:

  • Edimax 7811UN

  • LogiLink WL1045 version 1.0

Do not work in Ad-Hoc mode. I have had a thread over at StackOverflow which targets your query.

However, the way around to this is using a Ralink RT3570 Driver based Dongle.

You can check using

 $ lsusb | grep -i "ralink"

and it should tell your if your dongle has the driver or not.

I have a project that runs completely on Ad-Hoc at GitHub with an extended Wiki to support all the research and conclusions that I have done w.r.t. to Ad Hoc Networking with Raspberry Pis.


Try Ralink Driver based WiFi Dongles for hassle-free Ad Hoc Mode Configuration over Jessie

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.