PDA

View Full Version : [SOLVED] No WiFi in Safe Mode or Text Terminal Boot, RTL8191/8188SU



bogan
December 27th, 2011, 09:50 PM
How can I connect to my Network from a Text Terminal ??

sudo iwconfig
shows wlan1 as:
' unassociated Nickname:”rtl_wifi” '
and a Signal level=0. whilst
sudo iwlist scan
shows my Network ESSID
and Signal level=52/100 but there is no connection.

My WiFi Network connection works OK from an Ubuntu 10.10 GUI screen; though on booting the WiFi { Network Manager} Icon has a line through it, and is stationary, until after Log-in and a password to 'Unlock' the keyring 'Default'.

The problem is when booting from the grub menu to a Text Terminal or into Recovery mode.
There is no network connection, so neither the 'wpkg Repair', nor the' Terminal with Networking', options work: nor can I run
sudo apt-get upgrade or anything else that needs to connect.

Is there some command that will activate the WiFi connection from a Terminal ??
Or one to do the equivalent of: 'Unlock the keyring' with a password.

I have tried:
sudo start networking and:
sudo /etc/init.d/networking start / restart and:
sudo service networking force_reload but apart from a message:”
* reconfiguring network interfaces...” I only get:
“networking stop/waiting" - no connection.

I have a Medion Desktop with a Dual boot: Windows 7 and both Ubuntu 10.04 LTS and 10.10 and I want to upgrade to 11.10. The installed WiFi card is a Realtek RTL8191SU USB Wireless Adapter.

I also have both Realtek and Ralink USB dongles, both of which work better than the installed card, ( after a lot of help from Chilli555 ); but none work from a Text terminal.

Is this normal?? Surely not!! :confused:

bogan.

chili555
December 28th, 2011, 04:36 PM
I also have both Realtek and Ralink USB dongles, both of which work better than the installed card, ( after a lot of help from Chilli555 ); but none work from a Text terminal.

Is this normal?? Surely not!! It is quite normal. In the text terminal, I assume without any GUI or Network Manager running, you have not yet told the system what network to connect to nor any encryption details. The normal method is:
sudo iwconfig wlan1 essid MyNetwork
sudo iwconfig wlan1 key 0123456789
sudo dhclient wlan1This example is for WEP encryption; WPA is a bit more difficult; you'd need to complete /etc/network/interfaces.

In this example, you'll also need to fill in /etc/resolv.conf if it's not already:
cat /etc/resolv.confIf it has no nameservers listed, add one:
sudo su
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
exit

bogan
December 29th, 2011, 12:34 PM
Hi!, Chilli555, once again!

Thanks for your response.
I have just done a clean install of 11.10, 3.0.0-14-genertic. so am having to set up everything anew.
The installed USB WiFi card works OK from a GUI boot, but usually needs two or more attempts before connecting.
You Posted: C >> P2
In the text terminal, I assume without any GUI or Network Manager running, you have not yet told the system what network to connect to nor any encryption details. The normal method is:
sudo iwconfig wlan1 essid MyNetwork
sudo iwconfig wlan1 key 0123456789
sudo dhclient wlan1 This example is for WEP encryption; WPA is a bit more difficult; you'd need to complete /etc/network/interfaces. Is the value of 'key' what is shown in: 'wlist scan wlan0 ?? If not where would I find it??
The Network I use "CYBERGRANS" is a communal one, with Security set to: WEP&WPA, though 'Active Network Connections' shows it as: "WPA/WPA2". I do not have access to the router, nor authority to alter its settings.
The 'Default Route' is shown as 192.168.2.1 and that is what
root@alan-MS-7616:~# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.2.1
root@alan-MS-7616:~#shows as nameserver.
root@alan-MS-7616:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

root@alan-MS-7616:~# What do I need to add??
root@alan-MS-7616:~# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bg ESSID:"CYBERGRANS" Nickname:"rtl_wifi"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:BF:09:3D:7C
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=100/100 Signal level=86/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
root@alan-MS-7616:~#
root@alan-MS-7616:~# iwlist scan
lo Interface doesn't support scanning.
eth0 Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: 00:12:BF:09:3D:7C
ESSID:"CYBERGRANS"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s
6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Extra:wpa_ie=dd160050f20101000050f20201000050f2020 1000050f202
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Signal level=100/100
root@alan-MS-7616:~#
root@alan-MS-7616:~# lshw -C network
*-network
description: Wireless interface
physical id: 1
bus info: usb@2:1.4.2
logical name: wlan0
serial: 1c:4b:d6:47:82:96
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=r8712u ip=192.168.2.4 multicast=yes wireless=IEEE 802.11bg
root@alan-MS-7616:~#Should I infer that from a Text Terminal, I should run Network Manager with something like:
sudo service network-manager startBefore the above code you posted.??
Your help in clarifying these points will be much appreciated.

Chao! ,bogan.

chili555
December 29th, 2011, 02:46 PM
Is the value of 'key' what is shown in: 'wlist scan wlan0 ?? If not where would I find it??
The Network I use "CYBERGRANS" is a communal one, with Security set to: WEP&WPA, though 'Active Network Connections' shows it as: "WPA/WPA2".The key referred to is a WEP key, but it appears you are using WPA.

Doesn't this imply that you are somehow connected?
root@alan-MS-7616:~# lshw -C network
*-network
description: Wireless interface
physical id: 1
bus info: usb@2:1.4.2
logical name: wlan0
serial: 1c:4b:d6:47:82:96
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=r8712u ip=192.168.2.4 multicast=yes wireless=IEEE 802.11bgYes? No??
Should I infer that from a Text Terminal, I should run Network Manager with something like: If you have booted into text mode, that is, no Gnome, Unity or KDE, etc. running anywhere, then Network Manager can't run because it's a GUI, or more correctly, a windowing manager program.

If a windowing manager is running, manual methods are unlikely to work because Network Manager has a very tight rein on networking. On the other hand, if you are running a text mode because the computer is a print/media server and doesn't need the extra weight of a windowing manager because it's quietly running in the closet, then Network Manager is not required or even posiible; manual methods are required.

So, are you connected now? How? What is the eventual purpose of the machine? Windowing manager or none?

Or are you just trying to learn the ways of the wise Linux-ian, which I applaud?

bogan
December 29th, 2011, 07:48 PM
Hi! , Chilli555,
You Posted: C >> P #4
What is the eventual purpose of the machine? Windowing manager or none?This Medion Desktop computer, I call my Win7 m/c, is mainly used for running FSX Flight Simulator and routine OpenOffice usage.

As a back-up to Windows, and a little of: "trying to learn the ways of the wise Linux-ian", it has a dual-boot with Ubuntu 10.04 LTS and 11.10.
Previously, what is now - for just two days - 11.10, 3.0.0-14, was 10.10.
I tried to install 11.10, 3.0.12-030012-generic, into the same partition, using dpkg and the deb. files.

That gave me a lot of problems with the NVIDIA driver which needed a Text Terminal boot and an Internet connection to install to a non-running kernel.
Also booting to recovery in 10.04 or 10.10 had options which needed a Network connection.
{ They are no longer there in 11.10.}

The need for Networking without the X server running was, and is, purely for trouble shooting.
Especially with a system that boots to a Blank Black Screen, or hangs on the "Checking battery state" line.
Though after a future update, I may well probably need it again, to reinstall the NVIDIA driver.
The key referred to is a WEP key, but it appears you are using WPA.
Doesn't this imply that you are somehow connected?
So, are you connected now? How?Edit: Sorry, I should have said that the code quoted was taken when connected from a GUI.
As I posted B >> P#1
My WiFi Network connection works OK from an Ubuntu 10.10 GUI screen;
[ and also, now from a 11.10 GUI ].
The problem is when booting from the grub menu to a Text Terminal or into Recovery mode.I trust that explains things sufficiently.
Having solved the immediate problems by a clean 11.10 install, the need is no longer pressing.

Though I would still like to be able to network from a Text terminal, when the need arises.

Chao! ,bogan.

chili555
December 31st, 2011, 01:51 PM
With WPA, you'd need to set up /etc/network/interfaces something like this:
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-essid CYBERGRANS
wpa-psk yourwpakeyThen, simply do:
sudo ifdown wlan0 && sudo ifup wlan0You should connect. Network Manager and manual methods don't play well together, so, when you return to a windowing manager (Unity, Gnome, etc.), you'll have better luck if you comment out all the wlan0 lines, thus:
auto lo
iface lo inet loopback

#auto wlan0
#iface wlan0 inet dhcp
#wpa-essid CYBERGRANS
#wpa-psk yourwpakey

bogan
December 31st, 2011, 03:08 PM
Hi!, Chilli555, Thanks for the reply and code.
You included:

wpa-psk yourwpakeyWould that be the "Extra" line from iwlist scan ?

Extra:wpa_ie=dd160050f20101000050f20201000050f2020 1000050f202or would the line from iwconfig

Encryption key:****-****-****-****-****-****-****-**** Security mode:open mean that either the key is that format, or that there is no encryption ?
If I am all wrong about those ideas, where would I get the Key from ?

Surely I m,ust have access to it in order to connect and use the Internet? -- or is it Automatic with Network Manager??

Chao!, bogan.

:confused:

chili555
December 31st, 2011, 03:42 PM
Once you enter the correct key in Network Manager, it's typically saved so that you connect automatically without selecting a specific network or supplying the security key. This here:
wpa-psk yourwpakey ...is the security key you used originally to get on the network.
The Network I use "CYBERGRANS" is a communal one, with Security set to: WEP&WPA, though 'Active Network Connections' shows it as: "WPA/WPA2".Didn't someone tell you that the network name is CYBERGRANS and the password or security code is wH4t3v3R?

This implies that you have 128-bit WEP and not WPA:
Encryption key:****-****-****-****-****-****-****-**** Security mode:openFor comparison, my network is WPA-PSK (I know, I set it up) and iwconfig shows:
wlan0 IEEE 802.11abg ESSID:"GBR1"
Mode:Managed Frequency:2.462 GHz Access Point: 99:13:10:62:88:77
Bit Rate=54 Mb/s Tx-Power=14 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=53/70 Signal level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:22 Missed beacon:0If your network is set to WEP and not WPA; or some type of mixed mode, and you're using WEP, then the interfaces file should be:
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wireless-essid CYBERGRANS
wireless-key yourwepkey

bogan
December 31st, 2011, 09:45 PM
Hi!, Chilli555,

You Posted:
Once you enter the correct key in Network Manager, it's typically saved so that you connect automatically without selecting a specific network or supplying the security key. This here:

wpa-psk yourwpakey ..is the security key you used originally to get on the network.
The Network I use "CYBERGRANS" is a communal one, with Security set to: WEP&WPA, though 'Active Network Connections' shows it as: "WPA/WPA2". Didn't someone tell you that the network name is CYBERGRANS and the password or security code is wH4t3v3R?

This implies that you have 128-bit WEP and not WPA:
Encryption key:****-****-****-****-****-****-****-**** Security mode:openActually, no. No-one did tell ,me anything.
I knew the Network was called "CYBERGRANS" because Windows showed it as the operating network. The new computer was installed - with a new password - while I was away.
When I came back I found that the Security Password had been left with the "Show Password" option active, So I clicked it, noted the Password, and made myself the Administrator, hiding the password!!

The 'Active Network Connections' display in 11.10 is different to earlier ones and when I wrote, from memory:
:"CYBERGRANS" is a communal one, with Security set to: WEP&WPA, I was wrong, It previously said: " WPA &WPA2".
However, I bow to your superior knowledge.
I guess the only thing to do is to "Suck it and See".

If I understand you correctly; 'yourwpakey', and 'yourwepkey', would both be the same as the Network Password, asked for by Network Manager.
Just that a different coding to enter it would be needed from a terminal.

I will let you know how it goes, thanks a million.

Chao! ,bogan.

chili555
December 31st, 2011, 10:32 PM
'yourwpakey', and 'yourwepkey', would both be the same as the Network Password, asked for by Network Manager. Yes, exactly.

bogan
January 1st, 2012, 09:06 PM
Hi! Chilli555,

WOW! It WORKED !!\\:D/

To make sense of what follows, I need to explain that although my WiFi connection works OK - after a lot of help from you - from a GUI, it is quite unpredictable as to its initial connection time.

For instance, this last boot-up, it connected as soon as the login password was accepted - less than 5 secs delay. The previous three boots, it took two attempts before it succeeded; and that is without the Dell m/c alongside being switched on; in which case it could take 4 or more attempts.
Also, the Network key is two words with a space between them, so I, dubiously, put it between inverted commas.
So the story is this:
I edited:
# /etc/network/interfaces edited 1/1/12 AFP

auto lo
iface lo inet loopback

# For WEP
auto wlan0
iface wlan0 inet dhcp
wireless-essid CYBERGRANS
wireless-key "Kxxxxxxxx Sxxxxxx"

#For WPA
#auto wlan0
#iface wlan0 inet dhcp
#wpa-essid CYBERGRANS
#wpa-psk "Kxxxxxxxx Sxxxxxx"
Strangely, that had an immediate effect on the graphics, including a long delay during shut down and rebooting.

With the WEP code uncommented, a text terminal boot hung for a minute on:
"starting CUPS printing spooler/server" [Crtl/Alt/F7 showed it hung on:
"Checking battery state" Then messages:
"Waiting for network configuration"
+ 1 min
"Waiting 60 seconds more for network configuration"
+1 min
" Booting without full network configuration"After the login I entered:
sudo su
ifdown wlan0 && ifup wlan0
ifdown : interface not configured and hung on a flashing cursor.
I then found that I had keyed an '=' sign instead of '-' in:'wireless-key',
Corrected, it produced the same delays and messages but:
sudo ifdown wlan0 && sudo ifup wlan0
RNETLINK answers: no such process.
invalid argument "Kxxxxxxxx Sxxxxxx" and hung on a flashing cursor.

So, without much hope, I commented out the WEP code, uncommented the WPA code, and rebooted to a text terminal.
The delays and messages were the same except that after:
sudo ifdown wlan0 && sudo ifup wlan0 there was a lag on a flashing cursor of over two minutes when it returned:
RNETLINK answers: File exists, and returned to the prompt.
nm-tool for wlan0 then showed WEP YES, WPA YES, WPA2 YES. but 'wireless access points' was void.
Whereas, from a GUI it shows:
Wireless Properties
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes

Wireless Access Points (* = current AP)
*CYBERGRANS: Infra, 00:12:BF:09:3D:7C, Freq 2437 MHz, Rate 54 Mb/s, Strength 96 WPAI entered
sudo apt-get update not expecting anything to work, but it did. Then I ran:
nvidia-installer -latest and it connected to the NVIDIA site and returned the correct response.

I should add that I did a normal boot to a GUI between the two trials, and afterwards, to check everything was Ok, and when the interface entries were not commented out, booting hung on the Ubuntu screen for several sequences of the red & gold dots, followed by the same "Waiting"+ 1min messages.

So as I said: WOW! it is Solved.

Thanks and Chao! ,bogan.