Page 14 of 46
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 10:29 am
by DarqueSandu
Thanx for reacting so quickly! I think I already found this link somewhere in this thread, and this is giving me the finger (in the form of a nice 404), so I was hoping somebody had this downloaded file still on disk somewhere, ready to re-share it...!
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 10:46 am
by olibanum
Gah! Sorry about that. I personally dont have the file to hand.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 10:48 am
by olibanum
MrEngman wrote:
Hi All,
I've just updated the driver to handle the latest rpi-update. Download the new driver using the link on the wiki page in the Micronet SP907NS description.
I've also added a list of driver versions and compatible Linux versions in the instructions. Link also on the wiki page.
Again I cant access drop box from work, but you could check the instructions for the list of drivers, they may have updated links @
http://elinux.org/RPi_VerifiedPeriphera ... i_Adapters
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 11:38 am
by MrEngman
DarqueSandu wrote:Thanx for reacting so quickly! I think I already found this link somewhere in this thread, and this is giving me the finger (in the form of a nice 404), so I was hoping somebody had this downloaded file still on disk somewhere, ready to re-share it...!
Use this one instead.
http://dl.dropbox.com/u/80256631/8192cu-20120629.tar.gz
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 11:43 am
by DarqueSandu
Thanx again for helping out, olibanum and thanx MrEngman for your work on these drivers. Driver installation can be cumbersome and painstaking, and you have done much more than just take the edge off, real nice!
Anyway, the download is working again, I got the file I was looking for.
I also decided to read 'install-rtl8188cus.txt' more thoroughly (installation instructions link on the wiki). Links to all previous versions are there, and they all still work, including the 'lost' one as per just now

. So the way to use an earlier version is open, for which I'm grateful. I'll have something to try out tonight. If something's up, I'll post back later
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 1:49 pm
by olibanum
No worries and good luck!
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 8:42 pm
by Darkness
I updated my setup with the latest autoconfig script, including the DHCP update (Micronet - RTL8188CUS edimax dongle).
It's all working, however, one very anoying thing is that the DHCP client seems to be a little bit over aggressive on renewing it's IP address (both for wifi and lan). Every so many minutes, the ip addresses are renewed causing me to loose the SSH connection.
Before the update, the interfaces were also using DHCP but were always getting the same IP address.
What is causing this behaviour? Can I revert to the previous scheme where it would always get the same address if available?
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Tue Jul 03, 2012 10:05 pm
by CannyDuck
I used the setup script to get my RTL8188CUS running.
The ifconfig output looks fine:
Code: Select all
eth0 Link encap:Ethernet Hardware Adresse b8:27:eb:...
inet Adresse:192.168.1.14 Bcast:192.168.1.255 Maske:255.255.255.0
inet6-Adresse: fe80::ba27:ebff:fe3f:4f83/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:408 errors:0 dropped:1 overruns:0 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:35439 (34.6 KiB) TX bytes:46789 (45.6 KiB)
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metrik:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet Hardware Adresse 4c:60:de:5c:...
inet Adresse:192.168.1.21 Bcast:192.168.1.255 Maske:255.255.255.0
inet6-Adresse: fe80::4e60:deff:fe5c:31e5/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:39 errors:0 dropped:50 overruns:0 frame:0
TX packets:15 errors:0 dropped:1 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:13634 (13.3 KiB) TX bytes:2007 (1.9 KiB)
But if I ping my raspberry pi using the wlan ip it only works if eth0 is connected. So it seems like the my desktop pc uses the route through the eth0 path. For both ip addresses I get a ping response time that is smaller than one ms. That seems so be strange, any idea?
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 12:02 am
by MrEngman
Darkness wrote:I updated my setup with the latest autoconfig script, including the DHCP update (Micronet - RTL8188CUS edimax dongle).
It's all working, however, one very anoying thing is that the DHCP client seems to be a little bit over aggressive on renewing it's IP address (both for wifi and lan). Every so many minutes, the ip addresses are renewed causing me to loose the SSH connection.
Before the update, the interfaces were also using DHCP but were always getting the same IP address.
What is causing this behaviour? Can I revert to the previous scheme where it would always get the same address if available?
Sorry to hear you're having problems. Unfortunately I have no idea why your IP's don't stay the same when being renewed. I think I've seen some posts in the forum where people were having similar issues but cannot remember where. It was quite some time ago.
From the little I know about DHCP I believe the lease time, the time before renewing the IP lease, is set by the DHCP server, presumably your router. Have you checked the settings for the DHCP server. I would expect you should be able to change the lease time which should help a bit. However, even if the lease is renewed after a relatively short time I would expect the IP's to remain the same.
Personally I don't have any issues with IP's changing unless I make some alteration to my setup but my Pi is connected to a private domain with its own domain server/controller with DHCP and DNS servers and I have set the DHCP lease time to a very long time. However, even after powering off and then back on I generally always get the same IP's, unless as I said I make a configuration change.
Just to check what happens I changed the lease time on my DHCP server to 2 minutes. I always get the same IP when the lease is renewed. It's been running like that for well over an hour, i.e.more than 40 dhcp renewals, and the IP has not changed.
Have you tried a fixed IP? I would think that would be one way to fix your problem. Useful with SSH as you would not need to determine the IP before connecting. Just had a hunt around the forums for "dhcp" and found this as an example for setting a fixed IP by editing the file /etc/network/interfaces. This is for eth0 but something similar will set the wifi, wlan0, to static as well. I would think you should just need to set network, netmask and gateway to match your network then select an address for eth0 and wlan0.
Code: Select all
iface eth0 inet static
address 192.168.1.201
network 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1
Another alternative may be to use the hostname rather than the IP to connect to the Pi. This is the reason why I use this version of dhcp. Instead of having to use an IP to connect to my Pi I can use its hostname - currently set to the default "raspberrypi". With the dhcp client that comes as standard with the debian6 image it is not possible to access the Pi using the hostname as defined in the file /etc/hostname. Other files need editing. Using this version of dhcp changing the name in /etc/hostname will change the hostname used by dhcp and thus the hostname seen by the dhcp server.
Finally you could of course remove this package and reinstall the older version although I'm unsure what the older version is, using apt-get or dpkg.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 6:45 am
by Darkness
Actually, I am using the hostname to connect to it, but putty does not really like it if the IP address changes while connected...
Static IP would indeed solve the problem, but since the boards are so small, you don't want to have to change the IP address everytime you take it somewhere else.
The DHCP server is indeed my router but the one from my ISP and I have very little control over it. My Windows laptop is always getting the same IP as were the raspberry pis before the update, so I guess it must be something with the update or a combination with something I already had installed (like winbind for example)
will experiment some more
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 8:46 am
by MrEngman
Darkness wrote:Actually, I am using the hostname to connect to it, but putty does not really like it if the IP address changes while connected...
Static IP would indeed solve the problem, but since the boards are so small, you don't want to have to change the IP address everytime you take it somewhere else.
The DHCP server is indeed my router but the one from my ISP and I have very little control over it. My Windows laptop is always getting the same IP as were the raspberry pis before the update, so I guess it must be something with the update or a combination with something I already had installed (like winbind for example)
will experiment some more
How about trying to use wpa_supplicant especially if you're taking it out and about connecting to different systems. It would certainly make that easier as it would avoid having to keep editing /etc/network/interfaces whenever you moved to a different network. Can you use that to set fixed IP's? I'm not sure but it may be something to look at. I've been trying to use it here but for some reason I don't seem to get on with it. But many people seem to find it impossible to live without it.

Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 10:25 am
by Lorian
check the MAC address for the wifi stays he same all the time.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 11:02 am
by Darkness
Lorian wrote:check the MAC address for the wifi stays he same all the time.
yeah, that was also something I was thinking about. Maybe the dhcp client is messing with the mac address as well causing the dhcp server to hand out a different IP every time.
It is not specific to the wifi interface, but both wifi and wired LAN connection.
Up to now, I have not done much in Linux with wifi/wpa_supplicant or other related stuff so I guess I'll have to look into that some more as well.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 11:05 am
by Lorian
Do this occasionally to see if the addresses change on the interfaces
ifconfig|grep -i hwaddr
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 11:44 am
by MrEngman
Darkness wrote:Lorian wrote:check the MAC address for the wifi stays he same all the time.
yeah, that was also something I was thinking about. Maybe the dhcp client is messing with the mac address as well causing the dhcp server to hand out a different IP every time.
It is not specific to the wifi interface, but both wifi and wired LAN connection.
Up to now, I have not done much in Linux with wifi/wpa_supplicant or other related stuff so I guess I'll have to look into that some more as well.
If your MAC address is changing take a look here
http://www.raspberrypi.org/phpBB3/viewt ... 975#p90975 for a fix
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 12:34 pm
by DarqueSandu
MrEngman wrote:DarqueSandu wrote:Thanx for reacting so quickly! I think I already found this link somewhere in this thread, and this is giving me the finger (in the form of a nice 404), so I was hoping somebody had this downloaded file still on disk somewhere, ready to re-share it...!
Use this one instead.
http://dl.dropbox.com/u/80256631/8192cu-20120629.tar.gz
Using 20120629 is working for me, like you suggested, thanx again!
Does anybody have a solid lead on a Powered USB Hub that is guaranteed to work with the Pi, and that can be bought somewhere in Holland or Germany (we have euro plugs which differ from UK plugs)?
Reason I ask is that as soon as I plug any powered usb hub I have into the Pi and also connect my MicroNEXT MN-WD152B (RTL8188CUS), WiFi stops working altogether.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 6:14 pm
by dmpalmer
Thank you for this script. My pi is now wireless. (EDUP 802.11n from DealExtreme.)
Two things:
1) The following may be a result of previous thrashing around to install the card before I found your script:
I ended up with multiple definitions of the wlan0 in the /etc/network/interfaces file. This prevented logging in over either wired or wireless until it was straightened out. Also, the file's permissions were world-readable (bad in principle since it exposes the wireless network password). As I say, it is not clear that this was your script's fault or my previous thrashing.
2) Your Y or N questions along the way aren't protected against zero-length (carriage return) replies, when the user just hits the carriage return. (Protect by the "x$RESPONSE" != "xY" trick)
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 8:50 pm
by dcullimore
i click on the dropbox link and dropbox cant find this link. is it still there?
stuck trying to set my wi fi up.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 8:55 pm
by MrEngman
dmpalmer wrote:Thank you for this script. My pi is now wireless. (EDUP 802.11n from DealExtreme.)
Two things:
1) The following may be a result of previous thrashing around to install the card before I found your script:
I ended up with multiple definitions of the wlan0 in the /etc/network/interfaces file. This prevented logging in over either wired or wireless until it was straightened out. Also, the file's permissions were world-readable (bad in principle since it exposes the wireless network password). As I say, it is not clear that this was your script's fault or my previous thrashing.
2) Your Y or N questions along the way aren't protected against zero-length (carriage return) replies, when the user just hits the carriage return. (Protect by the "x$RESPONSE" != "xY" trick)
With the current script the /etc/network/interface can end up like this if you already have it set up for a wifi adapter before running the script or if you run the script more than once. But as the instructions indicate
it is designed to work with a fresh image which doesn't have this issue. I am working on a new script which will avoid this problem and even allow setting up multiple wifi's if required.
Don't quite understand your 2nd point but guess if I try the script I'll figure it out.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 8:58 pm
by dcullimore
i have downloaded the 8192cu.ko file.
where can i get the script from as i am new to linux and really dont know anything, so a script would be alot easier.
cheers
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Wed Jul 04, 2012 10:52 pm
by Montala
Thanks again to MrEngman for his continuing work on this project, and although I have read the instructions, I would like to clarify one point before I proceed.
I have already updated Debian Wheezy by doing a 'sudo apt-get update && sudo apt-get upgrade' and would now like to 'go wireless' with my Edimax device.
Is it still OK to use the 'wheezy' script (20120619) or is there quicker (or better) way to do it, bearing in mind that I have already updated the OS.
Thanks!

Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Thu Jul 05, 2012 2:56 am
by MrEngman
Montala wrote:Thanks again to MrEngman for his continuing work on this project, and although I have read the instructions, I would like to clarify one point before I proceed.
I have already updated Debian Wheezy by doing a 'sudo apt-get update && sudo apt-get upgrade' and would now like to 'go wireless' with my Edimax device.
Is it still OK to use the 'wheezy' script (20120619) or is there quicker (or better) way to do it, bearing in mind that I have already updated the OS.
Thanks!

The script will be OK provided the driver version specified is OK. Just to make sure .....
Use the command "uname -a" to check the Linux version your wheezy is using. Check in the latest script instructions in the list of drivers which version you need for the the Linux version your wheezy is using. If you don't have the instructions with that list you can find them by looking
here. Check the driver version needed is the same as used in the script. If it's not you can edit the script to use the required driver.
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Thu Jul 05, 2012 7:44 am
by tehowe
My Edimax EW-7811Un was delivered today, so I took the first opportunity to set up and execute MrEngMan's script on a fresh Debian SD card, however the wlan0 interface remains Unassociated.
Code: Select all
pi@raspberrypi:~$ uname -v
#144 PREEMPT Sun Jul 1 12:37:10 BST 2012
pi@raspberrypi:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
pi@raspberrypi:~$ lsusb
Bus 001 Device 006: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
...
I've checked out /etc/network/interfaces and /etc/udev/rules.d/70-persistent-net.rules and they check out. Does anyone have any idea how to proceed? I also tried installing the 8192cu.ko downloaded from a link in this thread over my SDCard since it doesn't seem clear whether the kernel issues mentioned are resolved yet - but that was worse (no wlan0 showed up) and I went back to the fresh install.
One other thing, pulling and reinserting the Edimax wifi dongle makes it flash once quickly, and then there's another slightly longer blue flash... so that may be an attempt to scan but
Code: Select all
pi@raspberrypi:~$ iwlist wlan0 scan
wlan0 No scan results
pi@raspberrypi:~$ sudo iwlist wlan0 scan
wlan0 Failed to read scan data : No such device
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Thu Jul 05, 2012 9:06 am
by MrEngman
tehowe wrote:My Edimax EW-7811Un was delivered today, so I took the first opportunity to set up and execute MrEngMan's script on a fresh Debian SD card, however the wlan0 interface remains Unassociated.
What happens if you try the command
Re: Automatic setup for RTL8188CUS based wifi adapters
Posted: Thu Jul 05, 2012 9:13 am
by MrEngman
dcullimore wrote:i have downloaded the 8192cu.ko file.
where can i get the script from as i am new to linux and really dont know anything, so a script would be alot easier.
cheers
Look on this
wiki page and the links are in the
Micronet SP907NS, 11N Wireless LAN USB Adapter section.
Please take a look at the instructions as well.