LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-27-2013, 02:43 PM   #1
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Question Raspberry Pi Model B Wifi -> No DHCPOFFERS received


Hello I am Niek,

I've got a Raspberry PI Model B since 3 days.
Everything is working fine, ethernet is working, the hub which increases mu usb ports is working and I ve booted Kali Linux ARM Raspberry Pi distro on the 16 GB SD card. I ve also bought an Wifi adapter: Bus 001 Device 007: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter. After I found out it doesn't work automaically I went searching for tutorials online. However, when trying to ifup wlan0, it can not seem to find any DHCPOFFERS:
No working leases in persistent database - sleeping.
Of course I tried to solve this problem, here are some photos with information:

Raspberry
lsusb
Like you can see the wiwi adapter is connected and recognized
lsmod/iwconfig/iwlist scan
I typed lsmod wrong (ismod) but it gives the same output
/etc/network/interfaces
As far as I know I configured that properly..
ifconfig
ifdown / up wlan0
And finally you can see how I try to bring up wlan0 without success..

And when I am trying to boot the machine, I sometimes get stuck untill I remove the wifi adapter or I still don't have wifi..

Help would really be appreciated!

Last edited by Raspberry; 01-03-2014 at 07:37 AM.
 
Old 01-03-2014, 05:13 AM   #2
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
Have you actually loaded the drivers for the Wifi?

I'm not sure about your distro, but can you try installing'wireless-tools'? then udev should pick up the Wifi dongle and load the correct modules at next boot.

Also check in /etc/udev/rules.d/70-persistent-net.rules, and make sure there aren't many wifi adapters noted in there....its an automatically-generated file and it should be OK to delete all wifi adapters, then next time you boot, the system will write the first adapter it finds as WLAN0....if you have many adapters in that file, you may find that the system config is for WLAN0 but the adapter is being registered as WLANx where x is > 0 because the file has incorrect adapters listed (usually from previous failed attempts)

Hope this helps!
 
Old 01-03-2014, 06:25 AM   #3
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Well, since I am a real newbie at wifi in Linux; How do I load the drivers correctly,? I do know that they are present.
I also tried editing the /etc/udev/rules.d/70-persistent-net.rules file, its content:
# Some comments about how this file is generated..
SUBSYSTEM=="NET", ACTION=="ADD", DRIVERS=="?*", ATTR{address}=="00:87:34:39:09:fc", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME=="WLAN0"

Should I edit/Delete this rule/line?

I ve also tried installing wicd Client by Ethernet, Although I couldn't find any wireless networks since my wifi adapter has a problem (not on, drivers not loaded, i don't know..).


Thank you in advance, Niek
 
Old 01-03-2014, 06:50 AM   #4
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
OK, well thats a good start, the udev file shows that the Wifi dongle is recognised and is loaded as WLAN0.
However, when I look at your ifconfig listing, it shows "UP, BROADCAST, MULTICAST" but not "RUNNING". That is sometinmes an indication that the driver is not happy. I tried to read your picture of "interfaces" but its too blurred....can you write it out in normal text.

Looking some more at your pictures, the WLAN card is requesting a lease, but is not getting any response from a DHCP server. What is the wireless connecting to? (an Access Point?) If so, does the Access Point (AP) that it is associated with have a DHCP service running, or is DHCP service supplied by a server connected to the AP? Can you give details of yopur network?

Sorry for so many questions, but there are lots of reasons for this kind of problem
 
Old 01-03-2014, 07:30 AM   #5
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
EDIT: I followed this tutorial: http://www.howtogeek.com/167425/how-...-command-line/
nano /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
nano /etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="dlink-A31A"
psk="***I am sure its the correct pass I filled in here***"

# Protocol type can be: RSN (for WP2) and WPA (for WPA1), However I tried both, still unable to connect to google.com
proto=RSN

# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)
key_mgmt=WPA-PSK

# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)
pairwise=CCMP

#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used are SHARED and LEAP)
auth_alg=OPEN
}
After rebooting my machine this is how my interface looks like:
My Interface:
Code:
Wlan0   Link encap:Ethernet  HWaddr 00:87:34:39:09:fc
        inet addr:192.168.2.81  Bcast:192.168.2.255  Mask:255.255.255.0
        inet6 addr: fe80::287:34ff:fe39:9fc/64 Scope:Link
        UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
        RX packets:4033 errors:0 dropped:0 overruns:0 frame:0
        TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:1171510 (1.1 MiB)  TX bytes:11123 (10.8KiB)
The build-in blue led in my wifi adapter is on, I am not sure what this means but I know that's a good sign..
However it says RUNNING, when I open Iceweasel and try to connect to www.google.com, the little popup status in the bottom left corner says: 'Connected to www.google.com'. But after some seconds I still get the 'Unable to connect' Error.

The wireless connection is to DLINK, it is an wireless range extender (http://www.dlink.com/nl/nl/support/p...range-extender)
It has it's own SSID and PSK and as far as I know it will send my network packets to my actual router and AP point, an experiabox.

The DLINK:
- WPA2-Personal
- AES
- SSID: dlink-A31A
- Type: Access Point

My actual home router (ARV75195EB2EC):
- WPA2-Personal
- AES
- SSID: ARV75195EB2EC
- Type: Access Point

Do I have to directly connect to ARV75195EB2EC? Because dlink's signal is way more powerfull than ARV's.
I have access to the ARV75195EB2EC AP:

Code:
GATEWAY
IP Address:  192.168.2.254
Subnet Mask:  255.255.255.0
DHCP Server:  Enabled         <-- It's enabled
Firewall:  Enabled
UPnP:  Disabled
Wireless:  Enabled

INFORMATION
Numbers of DHCP Clients:  13
Thank you for your quick reply!
 
Old 01-03-2014, 08:07 AM   #6
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I solved the problem, somehow I needed to connect directly to ARV... and not to the wifi repeater DLINK in my room, probably because DLINK hasn't a DHCP server enabled, but I am not sure. I am still interested why I con't connect to my wifi repeater DLINK because it would make Ice weasel a bit faster. Do you know why?
 
Old 01-03-2014, 08:41 AM   #7
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
Yay Raspberry! You solved it!

OK, the only thing I can think of without having my hands on the equipment is that the extender blocks the DHCP operation. When you connect to the AP, you pick up an address from DHCP and everything is good. When you connect over the extender, you don't seem to pick up an address, so DHCP is being blocked, I think. (the RPi is associating with the extender correctly, or it wouldn't be broadcasting for a DHCP lease, and I can see it doing that in one of your screenshots)

Some reasons for this may be that the extender doesn't allow broadcasts through (DHCP uses broadcast to find a server, because there is no other way without an IP address) That suggests that the extender is acting like a router (routers don't let broadcasts through, either). However, I looked at the specification for the DAP-1320 and it looks like a simple extender....so is it working correctly or is it broken? Can other things connect to it and get a DHCP address?

I work mostly with Cisco/Aruba/AeroHive wireless, so have no in-depth knowledge of the DAP-1320 If the extender works with other devices (see question above) then it suggests that the RPi is at fault, but if the RPi/dongle works with the AP, I can't see how that would be.....not much help I'm afrain
 
Old 01-03-2014, 09:00 AM   #8
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Haha Jimbo,
The dongle works with the AP and so does my laptop and other network devices work with Dlink, anyways thank you for your help!
It could be the combination of the wifi dongle and the extender right?

Last edited by Raspberry; 01-03-2014 at 09:05 AM.
 
Old 01-03-2014, 10:34 AM   #9
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
One last thought...is is a powered USB hub? The RPi does not have a lot of power, and it may be that if you are running a passive USB hub for the Wifi dongle, it could be underpowered and the dongle is not working as it should (clutching at straws now! )
 
Old 01-03-2014, 11:14 AM   #10
Raspberry
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
It is indeed a powered USB Hub But the fact that the USB Hub get power from the RPI and from the AC power should mean that it is well powered?!
If not, the power which the dongle needs would decrease when I plug it in one of the 2 USB Ports, Because than the dongle can only use the RPI's power..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No DHCPOFFERS received m0llbuz_ Linux - Networking 6 07-29-2010 03:08 PM
No DHCPOFFERS received ryedunn Linux - Wireless Networking 1 09-27-2008 02:22 PM
no DHCPOFFERS received. murrayfoss *BSD 9 02-09-2007 09:32 PM
No DHCPOFFERS received antonucc Linux - Networking 8 12-07-2006 05:06 AM
NO DHCPOFFERS received ekdya Debian 7 04-27-2006 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration