matthieu-pi
Posts: 11
Joined: Thu Jun 25, 2015 5:44 pm

RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Thu Jun 25, 2015 5:56 pm

Hello,

I'm using a Rpi B+ and A+. I have the same problem.
I've got this Realtek WLAN adapter :
ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

I've seen many people with the same problem as me but no answer. So I try again....

My driver is installed correctly as I have (lsmod):

Code: Select all

8192cu                528381  0
When I do iwconfig, I get :

Code: Select all

wlan0     IEEE 802.11bgn  ESSID:"Mat"  Nickname:"<[email protected]>"
          Mode:Managed  Frequency:2.462 GHz  Access Point: E2:CA:94:22:F7:5E
          Bit Rate:65 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
So the adaptor seems to connect correctly to my Wifi network.
But I don't get any IP adress...

When I do ifdown wlan0: ifup wlan0, it looks for a DHCP lease that fails:

Code: Select all

sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
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/40:a5:ef:03:11:e7
Sending on   LPF/wlan0/40:a5:ef:03:11:e7
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
What are these errors of SIOCSIW...?

uname -a gives:

Code: Select all

Linux XXXXX 4.0.6-v7+ #798 SMP PREEMPT Tue Jun 23 18:06:01 BST 2015 armv7l GNU/Linux
my /etc/network/interfaces is:

Code: Select all

more /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
#iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

I don't understand why I don't get any IP adress?
I've tried with other network adaptors and it's ok...

Could someone help ?

Thanks in advance,
Mat

MrEngman
Posts: 3890
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Thu Jun 25, 2015 6:06 pm

As far as I'm aware command iwconfig doesn't show an IP, but if it shows the access point name it should have a connection. I have several Pi's up and running with wifi connections and iwconfig only shows the access point name regardless of the type of wifi adapter used.

To see the IP use command ifconfig instead.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

matthieu-pi
Posts: 11
Joined: Thu Jun 25, 2015 5:44 pm

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Thu Jun 25, 2015 6:17 pm

Thanks for your answer!
I forgot to post the ipconfig:

Code: Select all

wlan0     Link encap:Ethernet  HWaddr 40:a5:ef:03:11:e7
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:4807 overruns:0 frame:0
          TX packets:31 errors:0 dropped:2 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31188 (30.4 KiB)  TX bytes:23271 (22.7 KiB)

When I check to my router there's no Rpi connected...
A firmware problem ?
How can I investigate on this ?

Cheers,
Mat

MrEngman
Posts: 3890
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Thu Jun 25, 2015 6:54 pm

matthieu-pi wrote:Thanks for your answer!
I forgot to post the ipconfig:

Code: Select all

wlan0     Link encap:Ethernet  HWaddr 40:a5:ef:03:11:e7
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:4807 overruns:0 frame:0
          TX packets:31 errors:0 dropped:2 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31188 (30.4 KiB)  TX bytes:23271 (22.7 KiB)

When I check to my router there's no Rpi connected...
A firmware problem ?
How can I investigate on this ?

Cheers,
Mat
The output of ifconfig is showing a very large number of dropped packets compared to the number of received packets so looks like you have some sort of hardware issue.

How is your wifi adapter connected to your Pi, directly plugged into one of the USB ports or using a powered hub? Do you have any other wireless type devices connected, eg, wireless keyboard/ mouse? What is the spec of the power supply you are using? How long is the cable connecting the power supply to the Pi's power connector?


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

pegasus1001
Posts: 9
Joined: Thu Jun 04, 2015 5:36 am

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Fri Jun 26, 2015 5:18 am

I had some trouble with the large amount of packets dropping on my wifi as well. One thing I found was that if I connect to wifi G, the packet drop seems to reduce significantly! Perhaps try that first?

I have yet to figure out why it is dropping out that much on Wifi N. I have a suspicion that it has something to do with my wifi N settings on my router but hasn't got the time to experiment on different settings yet.

PS: I have tried different power supply, different usb cables, powered hubs, a replacement wifi dongle and still no luck till I switch it to wifi G

Oh and the Wifi N runs with WPA/WPA2 encryption where else Wifi G runs on WPA encryption. Not sure if this has anything to do with the packet dropping...

rosbif
Posts: 42
Joined: Wed May 13, 2015 9:26 am

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Fri Jun 26, 2015 6:50 am

Maybe a red herring, but I've found that putting the wlan entry first in the /etc/network/interfaces (i.e. before the eth0 entry) fixes this

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Fri Jun 26, 2015 9:08 am

rosbif wrote:Maybe a red herring, but I've found that putting the wlan entry first in the /etc/network/interfaces (i.e. before the eth0 entry) fixes this
Try purging ifplugd
sudo apt-get purge ifplugd
and you won't need to mess with your interfaces file.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

matthieu-pi
Posts: 11
Joined: Thu Jun 25, 2015 5:44 pm

Re: RTL8188CUS 802.11n WLAN Adapter - NO IP Address

Thu Jul 02, 2015 2:52 am

Hello,

Thanks for your advices.
I'll try the sudo apt-get purge ifplugd package.

I figured out that my adpator works fine with the RPi A+ ("out of the box), but not with the B+/B.
I already had problem with the usb ports of the B+/B. I guess there's something there.

Cheers,
Mat

EDIT:

Now that I see the details of the package ifplugd, I might had this problem of connecting to wifi but not getting an IP, because a Lan cable was connected and IP assigned to it (by my router).

In a way, I feel the A+ is really more robust because it's simplier.

Return to “Troubleshooting”