1

I connected my pi to my laptop (Win7) via this Guide. I'm using Putty for a SSH connection. Now I want to connect my pi to internet (either via the LAN to my Laptop or WIFI), but I can't get any of them to work properly. For the ethernet method I tried all various things found on the web, but nothing worked.

For WIFI: I try to connect to a non secured Network (just for test purposes, later I will connect to a WPA2 secured network), via these commands:

sudo iwlist wlan0 scan
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid [MY_ESSID]
sudo dhclient -v wlan0

The output is the follwing:

Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/wlan0/00:51:25:52:83:8f Sending on LPF/wlan0/00:51:25:52:83:8f Sending on Socket/fallback DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 No DHCPOFFERS received. No working leases in persistent database - sleeping.

What am I doing wrong or how can I connect my pi to the web? Thanks in advance!

  • Post the content of your /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf – Milliways Aug 2 '14 at 12:14
1

The network you try to connect to does not support or allow you to use DHCP. Try another network or enable DHCP on the network you test with.

-2

I suspect that you don't have enough power for your wifi dongle (use a powered hub) or an issue with the dongle check here if you have a working usb adapter : http://elinux.org/RPi_USB_Wi-Fi_Adapters

here is maybe an answer what you could try :

Source : raspberry-asteriskDOTorgSLASHfaq (can t post more than 2 links as new user)

" Install required packages:

apt-get install wireless-tools wpasupplicant

Edit the file /etc/network/interfaces and add at the bottom of this file:

auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid your-ssid-here-no-quotes wpa-psk "your-passphrase-here-with-quotes"

Then restart your RPi:

reboot

Your WiFi connection should show up as wlan0, wlan1, etc. configured with an IP of your network when calling:

ifconfig

"

If this is not working consider buying an USB WiFi device that supports "Access Point" mode

This will allow you later to try this tutorial : http://elinux.org/RPI-Wireless-Hotspot I personally used this tutorial to set up a (very stable) openvpn wifirouter but thats an other story.

Regards.

  • Sorry, but this doesn't help me. Now I can't connect my oi via LAN either. It doesn't connect to the Wifi, too. I forgot to say that the adapter worked properlyw ith raspbian, but then i flashed raspbmc (it worked there, too), but now I'm back to raspbian and it doesnt work anymore... – Lorenz Aug 3 '14 at 15:40
  • 1
    @DIY What?!? Why would you suspect power failure when it says No DHCPOFFERS received.??? Why would your advice be "consider buying an USB WiFi device that supports 'Access Point' mode", when there is no indication the ts wants to use the pi as an access point??? – Bex Sep 1 '14 at 16:11

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.