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
  • 54,718
  • 26
  • 92
  • 182

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,463
  • 2
  • 12
  • 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
  • 54,718
  • 26
  • 92
  • 182
  • I tried the way you said, but still the same error. – MikelThibault Jan 03 '15 at 06:08
  • Could anybody suggest another solution please? – MikelThibault Jan 05 '15 at 02:24
  • You have given little information (and responded to comments very slowly). This makes it hard to help. What have you tried? What WiFi device? Is it supported? is the driver loaded? And one of my original questions "How did you setup wireless?" – Milliways Jan 05 '15 at 03:55
  • I am using Wi-Pi official accesory for Raspberry Pi. I just plugged it in. Went to /etc/network/interfaces and changed accordingly to previous responses. – MikelThibault Jan 05 '15 at 05:07
  • Maybe the problem is that I didn´t set up the wireless properly...how am I supposed to do that? – MikelThibault Jan 05 '15 at 05:40