0

I´ve been trying to connect my raspberry pi to my laptop by creating an AD-HOC WiFi connection between them but it doesn´t work. Could anybody please help me out. Here is some information about the error:

pi@raspberrypi -$ iwconfig
lo       no wireless extensions.
eth0     no wireless extensions.



pi@raspberrypi -$ sudo /etc/init.d/networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning)
[....] Reconfiguring network interfaces...wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to connect to wpa_supplicant - wpa_ctrl_open: no such file or directory
wpa_supplicant: /sbin/wpa_cli daemon failed to start
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1
done.



pi@raspberrypi -$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network= {
         ssid="pissh"
         psk="raspberry"
         proto=WPA
         key_mgmt=WPA-PSK
         pairwise=TKIP
         auth_alg=OPEN
}

pi@raspberry -$ cat /etc/networks/interfaces

auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan0
Milliways
  • 62,573
  • 32
  • 113
  • 225

2 Answers2

1

Hi if you are using EDIMAX 7811UN WiFi adapters you might as well have to change it since it does not support adhoc networking past Linux 3.9+ kernel versions.

For further details check this query

Though I use Hardcoded Static Addresses and not wpa-supplicant but this is likely due to hardware incompatibility

Major UPDATE

with Debian Wheezy 7.10 firmware update, the EDIMAX adapters are now ad-hoc mode compatible which makes them ubiquitous for any mode of WLAN. This has been checked and tested by me personally!

Shan-Desai
  • 1,541
  • 2
  • 13
  • 28
0

This applies to Raspbian Wheezy prior to 2015-05-05 for later (and Jessie) See How do I set up networking/WiFi/Static IP

You need the last line below to get an IP address. Normally you have auto wlan0 before wpa-roam (although it probably doesn't matter)

allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp
Milliways
  • 62,573
  • 32
  • 113
  • 225