User avatar
greatdane
Posts: 34
Joined: Mon Apr 30, 2012 7:58 pm
Location: Søndersø, Denmark
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jul 11, 2012 11:32 am

You could install Connectify on your Win7 machine and have Raspi connect to that: http://www.connectify.me/

The limited, free version will suffice.
Sand Bay, North Somerset, UK

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jul 11, 2012 7:17 pm

Maybe I am wrong, but I interpret the many "virtual router" programs out there (virtual router, virtual wifi, connectify, MaryFi, etc.) as they only turn a computer into a wifi hotspot and allow access to the internet from multiple devices. I do not want to share the Internet, nor do I need the Internet, and I do not want to set up shared folders in Windows. I want to be able to connect from the Windows computer to the pi wirelessly in the same exact manner that I am successfully doing now with a hardwired network cable, which is to ssh from Windows into the pi. As I side note I would not be able to connect from the pi to Windows vi ssh, shared folder, etc. because the pi is headless (No monitor, no keyboard, no mouse, no network cable, just a wifi dongle). I am going to experiment some more using the Windows 7 ad-hoc method because it looks like the way to go.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
greatdane
Posts: 34
Joined: Mon Apr 30, 2012 7:58 pm
Location: Søndersø, Denmark
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jul 11, 2012 7:23 pm

Connectify will allow you to SSH into the Raspi from Win7
Sand Bay, North Somerset, UK

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Wed Jul 11, 2012 7:46 pm

greatdane wrote:Connectify will allow you to SSH into the Raspi from Win7
OK, I will give it a try.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
Alligator
Posts: 60
Joined: Tue Jun 26, 2012 6:18 pm
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jul 12, 2012 3:43 am

I just followed the script, which ran for about 30 minutes. I had a few warnings during the script, and now I do not have a working WiFi adaptor (EW-7811Un). It blinks blue a few times, but I cannot connect to my headless Pi unless I plug in the Ethernet cable. How can I check to see if it is working or see what is wrong?

Nevermind, I figured out that my usual ssh command was set to the old Ethernet IP address. When I listed all IP addresses using ifconfig I found the wireless adaptor had a different address. Doh!

chrisdlangton
Posts: 4
Joined: Fri May 25, 2012 5:06 am
Location: Chatswood NSW 2067, Australia
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jul 12, 2012 2:15 pm

@OP

I used your script everything seemed great UNTIL the reboot (shutdown).
I expected to be connected, but now i have no eth0 or wlan0

I see your script disables eth0, why?? is it necessary?
How do i re-enable eth0 by reversing the changes your script made, concisely and via the terminal lease.

Contact me by email if you need to, admin (at) chrisdlangton (dot) com

I attempted to figure out your script but its not my language so i thought my best bet is eitehr ask you or reformat!
Blogging my rasPi Progress: http://blog.chrisdlangton.com/

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jul 12, 2012 3:12 pm

chrisdlangton wrote:@OP

I used your script everything seemed great UNTIL the reboot (shutdown).
I expected to be connected, but now i have no eth0 or wlan0

I see your script disables eth0, why?? is it necessary?
How do i re-enable eth0 by reversing the changes your script made, concisely and via the terminal lease.

Contact me by email if you need to, admin (at) chrisdlangton (dot) com

I attempted to figure out your script but its not my language so i thought my best bet is eitehr ask you or reformat!
In a terminal use the command

Code: Select all

sudo ifup eth0
and it should turn the ethernet back on.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

danielgu
Posts: 2
Joined: Tue Jun 26, 2012 5:48 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Thu Jul 12, 2012 9:43 pm

Hi,
Thank you very much for the script it solved my problem which I have been struggling for quite a while!! :)

But I experience a strange thing with the SSH. I can SSH into the rpi when the eth cable is connected (both with the eth0 IP and the wlan1 IP), but when I bring down the eth0 (ifdown eth0) I loose the SSH wlan connection. I have tried to unplug the eth cable and commented out the eth0 settings in the /etc/network/interface file, but I cannot SSH to rhe rpi without the eth up and running. Internet and network works fine with only the wlan connected by the way so it has to have something to do with the standard SSH settings to do.

Do you have any idea how to solve this? Thanks again.

chrisdlangton
Posts: 4
Joined: Fri May 25, 2012 5:06 am
Location: Chatswood NSW 2067, Australia
Contact: Website

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Jul 13, 2012 12:19 am

MrEngman wrote:
chrisdlangton wrote:@OP

I used your script everything seemed great UNTIL the reboot (shutdown).
I expected to be connected, but now i have no eth0 or wlan0

I see your script disables eth0, why?? is it necessary?
How do i re-enable eth0 by reversing the changes your script made, concisely and via the terminal lease.

Contact me by email if you need to, admin (at) chrisdlangton (dot) com

I attempted to figure out your script but its not my language so i thought my best bet is eitehr ask you or reformat!
In a terminal use the command

Code: Select all

sudo ifup eth0
and it should turn the ethernet back on.
Sorry, i forgot to mention that i had tried that, but it was not successful.

I think i might wait until someone solves the RASBMC issues with this adapter.

I'm also looking at OpenELEC today, has anyone tried this script in OpenELEC ?
Blogging my rasPi Progress: http://blog.chrisdlangton.com/

Antimus
Posts: 1
Joined: Fri Jul 13, 2012 1:31 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Jul 13, 2012 1:32 pm

How would I add a second wireless channel? I have this at work and home and would like to use it in both locations.
Thanks,

tonywig
Posts: 2
Joined: Fri Jul 13, 2012 10:02 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Fri Jul 13, 2012 10:05 pm

Complete beginner.
Followed instructions to the letter (as far as I can see).
Used wired network approach.
Now have a kernel panic - not syncing: Fatal exception in interrupt.

Any ideas as to what I might be able to do ?
Thanks

Paul_L
Posts: 46
Joined: Tue May 29, 2012 2:13 pm
Location: Campina Romania

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 6:36 am

Today I made a apt-get upgrade on my Wheezy on which my Edimax Nano wireless was installed and working ( the upgrade was done on wireless connection ). There are some kernel upgrades and even the kernel has the same version 3.1.9+ I have another modules structure under /lib/modules . I copied my 8192cu.ko module on the correct place, run depmod -a and now the module is complaining on many lines on the version of symbols. Tried even with the module issued on 02.07 and the same . It has to be compiled a new module ?

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 12:33 pm

Paul_L wrote:Today I made a apt-get upgrade on my Wheezy on which my Edimax Nano wireless was installed and working ( the upgrade was done on wireless connection ). There are some kernel upgrades and even the kernel has the same version 3.1.9+ I have another modules structure under /lib/modules . I copied my 8192cu.ko module on the correct place, run depmod -a and now the module is complaining on many lines on the version of symbols. Tried even with the module issued on 02.07 and the same . It has to be compiled a new module ?
Sounds like you need an updated driver.

To find the kernel version use the command

Code: Select all

uname -v
What does that report?

apt-get update should not cause a problem as far as I know. Do you mean you updated using rpi-update?

Did you copy or install the driver file there's a difference. To install use the commands.

Code: Select all

sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless
sudo depmod -a
sudo /etc/init.d/networking restart
You can check the driver versions needed for the different linux versions here. There is a list of driver versions and compatible lnux versions near the beginning of the document. If you've updated using rpi_update you will need to grab hold of the latest driver and then manually install it. The commands to do this are:

Code: Select all

sudo wget http://dl.dropbox.com/u/80256631/8192cu-latest.tar.gz
tar-zxf 8192cu-latest.tar.gz
sudo install -p -m 644  8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless
sudo depmod -a
sudo /etc/init.d/networking restart
I try to ensure the file 8192cu-latest.tar.gz is compatible with the latest version of code updated by rpi-update. If any further updates stop the wifi running just run the exact same commands and it should install the latest driver version whatever that might be.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

DavyC
Posts: 4
Joined: Sat Jun 30, 2012 2:41 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 1:31 pm

Hi

I followed the above instructions and it almost works for me, except my subnet mask on the home network is 255.255.254.0. When the Pi sends out a DHCP request, it's getting no response.

Does anyone know which file I need to amend?

I'd appreciate any advice.

Thanks

Dave

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 2:14 pm

tonywig wrote:Complete beginner.
Followed instructions to the letter (as far as I can see).
Used wired network approach.
Now have a kernel panic - not syncing: Fatal exception in interrupt.

Any ideas as to what I might be able to do ?
Thanks
What image are you using?

Is this while running the script or when rebooting? If during rebooting you'll probably need to re-install the image. It may be possible to recover by running a disk check if you can get the SD card to boot but I'm not sure. My Linux knowledge is limited.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

japester36
Posts: 14
Joined: Sun Jun 03, 2012 8:47 am

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 2:23 pm

DavyC wrote: I followed the above instructions and it almost works for me, except my subnet mask on the home network is 255.255.254.0. When the Pi sends out a DHCP request, it's getting no response.

Does anyone know which file I need to amend?
I had the DHCP behaviour when I used the adapter plugged directly into the Pi with the problem going away when I moved it to a powered hub.

After it was working with DHCP, I then edited /etc/network/interfaces to enter a static address and you can then change the subnet mask too.

As an example, mine has this:

Code: Select all

iface wlan0 inet static
address 192.168.50.7
gateway 192.168.50.1
netmask 255.255.255.0
wpa-ssid "ssid-name"
wpa-psk "passcode"
Hope this helps.

DavyC
Posts: 4
Joined: Sat Jun 30, 2012 2:41 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 2:26 pm

Beautiful!!

Thank you ever so much.

Dave.

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 2:36 pm

Antimus wrote:How would I add a second wireless channel? I have this at work and home and would like to use it in both locations.
Thanks,
You can use wpa_supplicant to do this. You will need to make a configuration file for wpa_supplicant, wpa_supplicant.conf in directory /etc/wpa_supplicant, and edit the file /etc/network/interfaces to use wpa_supplicant.

You will need to generate a configuration file that willl look something like

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2

network={
ssid="NETWORK1"
key_mgmt=WPA-PSK
proto=RSN
pairwise=CCMP TKIP
group=CCMP TKIP
psk="PASSWORD1"
}

network={
ssid="NETWORK2"
key_mgmt=WPA-PSK
proto=RSN
pairwise=CCMP TKIP
group=CCMP TKIP
psk="PASSWORD2"
}
The exact contents of wpa_supplicant.conf will depend on the security employed by each network. The above assumes both use wpa/wpa2. There is a load of documentation including one specifically on the configuration file.

Then change /etc/network/interfaces entry for wlan0 to something like

Code: Select all

allow-hotplug wlan0

auto wlan0

iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
.....................................................................................................................................................................................................................
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

allcardr
Posts: 26
Joined: Sun Feb 26, 2012 8:09 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 8:40 pm

OK, I've tried everything I can here but still get the following errro when running the script on Debian:


- Invalid response, enter U, E or A
read: 154: Illegal option -n


it just loops and loops!

Help!

jbracegirdle
Posts: 10
Joined: Sat Jul 14, 2012 7:45 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 9:11 pm

I'm sorry if this has been asked before but I've tried searching for the answer and my head is starting to hurt. I followed the instructions here: http://dl.dropbox.com/u/80256631/install-rtl8188cus.txt

I copied the files onto the boot partition and ran the script with Ethernet connected and a fresh copy of the official Debian image (http://downloads.raspberrypi.org/images ... 4-2012.zip)

I keep getting:

Code: Select all

[email protected]:~$ sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
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/80:1f:02:60:f9:ef
Sending on   LPF/wlan0/80:1f:02:60:f9:ef
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
I tried to configure wpa_supplicant like the post above (and lots of other search results) after running the script wpa_supplicant.conf does not exist, so I created it. I've tried this process with a fresh Debian image a few times now, with a WPA2 network and an open network. For the open network I used my mobile phone it gave the same results but without the line

Code: Select all

ioctl[SIOCSIWAP]: Operation not permitted

The blue light on my Edimax EW-7811Un is on but it's not connecting.
Any ideas where I'm going wrong?

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 10:04 pm

allcardr wrote:OK, I've tried everything I can here but still get the following errro when running the script on Debian:


- Invalid response, enter U, E or A
read: 154: Illegal option -n


it just loops and loops!

Help!
Is that Debian6-19-04-2012?

Sounds like the script may be corrupt. You should be able to abort the script by pressing ctrl-C.

This message indicates an error in the read command on line 154 of the script. I've looked through all the versions I have copies of and more and can find no line 154 with this command. Can you re-download the latest version of the script and try again? http://dl.dropbox.com/u/80256631/instal ... -latest.sh.

I'd hate to think how many times I've run the script while testing, literally hundreds of times, and I've never seen anything like this.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

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

Re: Automatic setup for RTL8188CUS based wifi adapters

Sat Jul 14, 2012 10:31 pm

jbracegirdle wrote:I'm sorry if this has been asked before but I've tried searching for the answer and my head is starting to hurt. I followed the instructions here: http://dl.dropbox.com/u/80256631/install-rtl8188cus.txt

I copied the files onto the boot partition and ran the script with Ethernet connected and a fresh copy of the official Debian image (http://downloads.raspberrypi.org/images ... 4-2012.zip)

I keep getting:

Code: Select all

[email protected]:~$ sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
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/80:1f:02:60:f9:ef
Sending on   LPF/wlan0/80:1f:02:60:f9:ef
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
I tried to configure wpa_supplicant like the post above (and lots of other search results) after running the script wpa_supplicant.conf does not exist, so I created it. I've tried this process with a fresh Debian image a few times now, with a WPA2 network and an open network. For the open network I used my mobile phone it gave the same results but without the line

Code: Select all

ioctl[SIOCSIWAP]: Operation not permitted

The blue light on my Edimax EW-7811Un is on but it's not connecting.
Any ideas where I'm going wrong?
If you've read the instructions and you have a wired internet connection the only file you need is the script! So no need to copy files to the SD card other than the script.

The "Operation not permitted" error always appears when I start my wifi. Not sure why it appears but it doesn't cause any problems, for me anyway.

I am confused. Does the wifi work or not when the script has finished? I presume you are typing the command "ifup ..." - when? and why? after you've tried to set for wpa_supplicant or before that?

Try the command

Code: Select all

ifup --force wlan0
instead.

What are you connecting to, a router, an access point on a network or what? Does the access point or router transmit the SSID or not? If it doesn't set it so it does transmit it. Does it have a DCHP server?
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

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

jbracegirdle
Posts: 10
Joined: Sat Jul 14, 2012 7:45 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sun Jul 15, 2012 8:47 am

Thanks for your very quick reply, and your help by creating the script in the first place. I had always started the process with Ethernet connected and the WiFi adapter out. I ran the script and tried to connect to my router with WPA2 and again (from a new SD image) with an Android phone as an open hotspot.
I've tried it again with a new image on the SD card (debian6-19-04-2012) and only the script on /boot. The WiFi blue light on the Edimax EW-7811Un did come on in perevious installs, but it won't now and it won't connect to the WiFi network. I used ifup to re-create the errors I get when the RPi boots, and the same errors happen before and after I changed/added wpa_supplicant.
I set my router to open security and tried again, it is broadcasting the SSID and has DHCP working. The RPi connects to it ok over Ethernet. My router is a Linksys/Cisco WAG120N.
On my latest run of the script it seems to miss out lines 509 and 525 and ends:

Code: Select all

Installing the new wifi driver.

The script will now terminate and the Raspberry Pi will REBOOT.
The RPi then reboots and on boot I get the DHCP errors that can be recreated by running:

Code: Select all

[email protected]:~$ sudo ifup --force wlan0
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/80:1f:02:60:f9:ef
Sending on   LPF/wlan0/80:1f:02:60:f9:ef
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 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Thanks for all your help so far.

tonywig
Posts: 2
Joined: Fri Jul 13, 2012 10:02 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sun Jul 15, 2012 10:50 am

by MrEngman » Sat Jul 14, 2012 3:14 pm
tonywig wrote:
Complete beginner.
Followed instructions to the letter (as far as I can see).
Used wired network approach.
Now have a kernel panic - not syncing: Fatal exception in interrupt.

Any ideas as to what I might be able to do ?
Thanks

What image are you using?

Is this while running the script or when rebooting? If during rebooting you'll probably need to re-install the image. It may be possible to recover by running a disk check if you can get the SD card to boot but I'm not sure. My Linux knowledge is limited.
I'm running Debian 19-04-2012.
It happened before reboot.
Rebuilt image from scratch (to be on safe side) and re-ran your script.
This time completed OK but on reboot I got (and still get) a series of "failed" responses.
Items such as ...
.. ifup: couldn't read interfaces file.
.. Starting NFS common utilities: statd
.. startpar: service returned failure: nfs-common

Oh - WiFi not working either.

Thanks for your assistance.

allcardr
Posts: 26
Joined: Sun Feb 26, 2012 8:09 pm

Re: Automatic setup for RTL8188CUS based wifi adapters

Sun Jul 15, 2012 12:59 pm

Just retried the script on a fresh install of Debian, using http://dl.dropbox.com/u/80256631/instal ... -latest.sh

and am getting exactly the same.
I'm now going to try Hexxeh's image to see if that sorts it out.


Update,

now getting
- Invalid response, enter U, E or A
/boot/install-rtl8188cus-latest.sh: 145: read: Illegal option -n


Here's how I'm trying to install.
1) set up 8Gb sd card with the latest raspian Hexxeh image (RC3)
2) logged in via ssh
3) performed an rpi-update
4) Downloaded the Latest script , as directed, from http://dl.dropbox.com/u/80256631/instal ... -latest.sh
5) ran script as root.

I then get the aforementioned error.

Return to “Beginners”