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
  • show the output of cat /etc/network/interfaces How did you setup wireless – Milliways Dec 23 '14 at 9:32
  • Hi, here is the output : 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 – MikelThibault Jan 3 '15 at 5:16
  • I edited the first post sorry. – MikelThibault Jan 3 '15 at 5:23
  • Is your WiFi module properly detected? if iwconfig does not show wlan0, it probably isn't. Please show dmesg output when you insert a dongle – Osman-pasha Mar 4 '15 at 6:39
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!

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
  • I tried the way you said, but still the same error. – MikelThibault Jan 3 '15 at 6:08
  • Could anybody suggest another solution please? – MikelThibault Jan 5 '15 at 2: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 5 '15 at 3: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 5 '15 at 5:07
  • Maybe the problem is that I didn´t set up the wireless properly...how am I supposed to do that? – MikelThibault Jan 5 '15 at 5:40

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.