Create an Ad-Hoc network via WIFI

11 posts
by megrimm » Mon Aug 20, 2012 8:08 pm
I would like to create a Ad-Hoc network. I would like to directly (no access point) connect to my pi via wifi/ssh.

My card is a NetGear, Inc. WG111v2 54 Mbps Wireless [RealTek RTL8187L], but I have just ordered a Edimax EW-7811Un.

A good tutorial / help would be great!

Posts: 26
Joined: Mon Jul 16, 2012 1:34 pm
by elatllat » Mon Aug 20, 2012 11:21 pm
it might be supported by the drivers. ... es-614579/
4k or USB3 :

Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm
by SirLagz » Tue Aug 21, 2012 6:08 am
You could turn your Pi INTO an access point and connect to that...
Do you specifically want to connect it as an Ad-Hoc network ?
My Blog -
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post !
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by fhlipZero » Tue Aug 21, 2012 12:23 pm
been using mine the same way, this is the walkthrough i followed on debian squeeze, this same setup has yet to work for me on wheezy

1) edit the file "/etc/modprobe.d/blacklist.conf" and add the line
blacklist rtl8192cu

2) Get hold of module file "8192cu.ko" either by compiling from source for ARM (hard) or from the link provided in the forum (easy, shown below)


and then type
tar xf 8192cu.tar.gz

sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/

sudo depmod -a

3) Make sure you have the file /lib/firmware/rtlwifi/rtl8712u.bin. If not, there is a link in the forum for you to download it.

4) Insert the dongle and reboot. You should see the module initializing as it boots

then to configure

ifconfig wlan0 up
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid "Pi"
sudo ifconfig wlan0 inet

connect to wireless created by the pi, assign yourself an ip of, ssh into your pi at!
Posts: 35
Joined: Tue May 29, 2012 11:50 pm
by inovaxt » Fri Feb 22, 2013 12:34 am

I used Edimax ew-7811un USB wireless dongle (latest Raspbian wheezy already has this dongle driver installed) and followed your steps to create Ad-Hoc (, my iPad can find that dongle, and then I plug wire Ethernet crossover cable from Raspberry Pi (type B, 512MB, to Squeezebox 3 (, and then reboot Raspberry Pi, after that, I didn't not see my dongle, but I can listen the music via Ethernet crossover without any issue.

My idea is,

1. I want to use iPad s/w or web to remote control Raspberry Pi (Installed SqueezePlug 6 Logitech Media Server) .
2. Hardware configuration:

Squeezebox 3 Player <--Ethernet crossover cable-->Raspberry Pi (SqueezePlug & Logitech Media Server) <-- Ad-Hoc Edimax ew-7811un--> iPad

Is it possible to use Ad-Hoc & Wire at the same time?

Posts: 1
Joined: Sat Feb 16, 2013 7:58 am
by robin28 » Sun Dec 15, 2013 1:03 pm
I have just followed the instructions at It worked first time. I now have 2 RPis talking to each other. Now...

1. What is the best ad-hoc equivalent of DHCP? I do not want either to be a server in the usual sense but I do want further RPis to be able to join. Presumably, when the first machine boots, whichever one it is, it sets up the network and allocates itself an address.

2. Can WPA2 work in this context or is there some equivalent?

Ciao, Robin
Posts: 3
Joined: Fri Oct 11, 2013 10:11 am
by davidfutsi » Fri Sep 26, 2014 2:16 pm
Posts: 1
Joined: Fri Sep 26, 2014 2:13 pm
by beta-tester » Sun Oct 19, 2014 3:42 pm
did you got work your ad-hoc mode with the EW-7811Un ?
can you please tell me your settings...
[I only give negative feedback]
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)
Posts: 871
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE
by robin28 » Sun Oct 19, 2014 11:44 pm
I did get the adapter to work but that's a long time ago now. I found it is a very small step towards having a working ad-hoc network. I tried Byzantium Pi ...
Posts: 3
Joined: Fri Oct 11, 2013 10:11 am
by Rover_boyo » Mon Jul 20, 2015 9:06 am
Hello guys,

I am quite new to raspberry pi and I have a few question about the ad hoc network set up. I would like to establish communication between 2 pi's so I can continuously send a digital signal from one pi to the other.
Is ad-hoc network the simplest way to send digital signal or perhaps you guys have a better suggestion for signal transmission between pi's? Perhaps radio is the way to go?

If anyone have any tutorial or link for digital comms between pi's it would be really appreciate.

Posts: 1
Joined: Mon Jul 20, 2015 8:40 am
by drgeoff » Thu Jul 23, 2015 12:21 pm
FYI. All RPis with ethernet have an autosensing interface and never require a crossover cable to connect to anything.
Posts: 6848
Joined: Wed Jan 25, 2012 6:39 pm