[LINUX] No wireless connection mgnt when not booting into GNOME (XBMC standalone)
#1
Hi,

I'm using Ubuntu 10.04 with a self compiled Ralink driver for my Linksys WUSB600Nv2 wireless USB. When booting into GNOME the wireless module is loaded and the Ubuntu build in network connection manager negotiates an IP address with my router.

I've however build this PC as an HTPC and want to boot directly into XBMC through XBMC standalone but when I do that the driver for my wireless adaptor gets loaded but there's no IP address negotiated and I can't get connected. I've verified that through a terminal and as soon as I log out XBMC standalone and into GNOME the network manager connects to my wireless network. I'm using Dharma RC1.

Does anyone know how I can configure Ubuntu to connect to a wireless network without going into/loading GNOME? I've also posted this on Ubuntu forums http://ubuntuforums.org/showthread.php?t=1640884 as this is mainly related to how Ubuntu (linux?) handles wireless adaptors but as this forum has all the XBMC users someone might have experienced the same problem and knows the solution.

Cheers,
Jochen
Reply
#2
I have struggled with the same problem, to autostart the WUSB600Nv2 with wpa2.
wpa_supplicant is the way to go.

As you already have the wusb600nv2 up and running in gnome you already know how to make the module. For every one else http://homecommunity.cisco.com/t5/Wirele...d-p/318026

There is a few things you need to do before you can autostart the wusb600nv2
blacklist rt2870sta (/etc/modprobe.d/blacklist.conf)

autoload module for WUSB600Nv2
add rt3572sta to /etc/modules

you´ll need wpasupplicant and wireless tools, you probably have them already.
sudo apt-get install wireless-tools wpasupplicant

build your conf file (use ssid and password for your network)
wpa_passphrase ssid password >> /etc/wpa_supplicant.conf

edit your wpa_supplicant.conf. This is my conf. Add the lines that you do not have. The last line is your encrypted password.

network={ ssid="Netwlan1"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=TKIP
psk=5d4c73f23b9cf4f64a86fe73feb9459cfc51adfdc6b5088
}

activate your network (/etc/network/interfaces)
change wlan0 to ra0 and add the wpa-conf line

auto ra0
iface ra0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

reboot and check that everything works.

/hansh
Reply
#3
Thanks for the guidelines, but I haven't got it working yet. I've read about wpa_supplicant some more and tried some things of which you can find the output below. I would appreciate it if you could help me debug this situation.

Code:
xbmc@MediaPortal:/etc/wpa_supplicant$ wpa_supplicant -ira0 -c/etc/wpa_supplicant.conf -d
Initializing interface 'ra0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line 1: unknown global field 'network={ ssid="mod-u-lar"'.
Line 1: Invalid configuration line 'network={ ssid="mod-u-lar"'.
Line 2: unknown global field 'scan_ssid=1'.
Line 2: Invalid configuration line 'scan_ssid=1'.
Line 3: unknown global field 'proto=RSN'.
Line 3: Invalid configuration line 'proto=RSN'.
Line 4: unknown global field 'key_mgmt=WPA-PSK'.
Line 4: Invalid configuration line 'key_mgmt=WPA-PSK'.
Line 5: unknown global field 'pairwise=CCMP'.
Line 5: Invalid configuration line 'pairwise=CCMP'.
Line 6: unknown global field 'group=CCMP'.
Line 6: Invalid configuration line 'group=CCMP'.
Line 7: unknown global field 'psk=f0cbe576758366b4f084f15cb1516eaf71e1596552aaf678b2e6b8a426d96c09'.
Line 7: Invalid configuration line 'psk=f0cbe576758366b4f084f15cb1516eaf71e1596552aaf678b2e6b8a426d96c09'.
Line 8: unknown global field '}'.
Line 8: Invalid configuration line '}'.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
Failed to add interface ra0
Cancelling scan request
Cancelling authentication timeout

Code:
sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...                                          wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
There is already a pid file /var/run/dhclient.ra0.pid with pid 3215
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/ra0/68:7f:74:82:f0:54
Sending on   LPF/ra0/68:7f:74:82:f0:54
Sending on   Socket/fallback
DHCPREQUEST of 192.168.10.101 on ra0 to 255.255.255.255 port 67

When logged on to GNOME the following is the response to iwconfig
Code:
xbmc@MediaPortal:/etc/wpa_supplicant$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

ra0       Ralink STA  ESSID:"mod-u-lar"  Nickname:"RT3572STA"
          Mode:Managed  Frequency=2.437 GHz  Access Point: 00:10:9C:D0:85:10  
          Bit Rate=216 Mb/s  
          RTS thr:off   Fragment thr:off
          Link Quality=92/100  Signal level:-72 dBm  Noise level:-92 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Thanks.
Jochen
Reply
#4
I dont now whats wrong. Looks like your wpa_supplicant deamon doesnt start. I´ll look into my configuration tomorrow (working nightshift tonight) to se if i have missed anything. I´m using xbmcfreak rc1 (ubuntu 10.04) our configurationfiles should be the same for wpa2.

can you post your wpa_supplicant.conf and /etc/network/interfaces

/hansh
Reply
#5
mod-u-lar Wrote:Hi,



I've however build this PC as an HTPC and want to boot directly into XBMC through XBMC standalone

Does anyone know how I can configure Ubuntu to connect to a wireless network without going into/loading GNOME?


Why are you even bothering with a standard version of Ubuntu if you want to boot directly into XBMC?

I have that same USB wireless adapter and compiled the driver myself with XBMC live. I dont have any issues.
Reply
#6
I agree that there is probably something wrong with the wpa_supplicant deamon but I don't know what to expect and where to start changing things.

wpa_supplicant.conf
Code:
network={ ssid="mod-u-lar"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
group=CCMP
psk=f0cbe576758366b4f084f15cb1516eaf71e1596552aaf678b2e6b8a426d96c09
}

I also tried with group=TKIP but I have my router configured for WPA2 - AES and read somewhere it should be CCMP in that case.

/etc/network/interfaces
Code:
auto lo0
iface lo0 inet loopback

auto ra0
iface ra0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

Quote:Why are you even bothering with a standard version of Ubuntu if you want to boot directly into XBMC?

I have that same USB wireless adapter and compiled the driver myself with XBMC live. I dont have any issues.

I started with a standard Ubuntu because I had to get all of my hardware working and especially nvidia proprietary driver, vdpau, audio over hdmi, raid, rf remote. I also got the impression that a standard Ubuntu was better documented as I'm no linux expert. But if you say that the current XBMC live will let me do all this I'm definitely willing to give it a try, it might even boot a lot faster.

Regarding the wireless, in XBMC Live, what or who is managing your connection? Because driver compilation is fine, and connection is working perfect in GNOME with network manager applet but I don't have this functionality available when booting in XBMC standalone.
Reply
#7
mod-u-lar Wrote:Regarding the wireless, in XBMC Live, what or who is managing your connection?

Its not managed. You simply edit one file after install (/etc/network/interfaces) and its all automatic from there every time you boot with no intervention from you.

Here is mine as an example

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# auto eth0
# iface eth0 inet dhcp

# Wireless Network

auto ra0
iface ra0 inet dhcp
wpa-ssid *******
wpa-driver wext
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk ******************************
Reply
#8
http://forum.xbmc.org/showpost.php?p=644...stcount=13
Reply
#9
mod-u-lar Wrote:I also tried with group=TKIP but I have my router configured for WPA2 - AES and read somewhere it should be CCMP in that case.


you can run iwlist -scan to get information about your router, this is the output from one of my APs

Cell 03 - Address: 00:18:E7:FA:3B:10
Protocol:802.11a/n
ESSID:"Nova2"
Mode:Managed
Frequency:5.22 GHz (Channel 44)
Quality:89/100 Signal level:-55 dBm Noise level:-92 dBm
Encryption key:on
Bit Rates:300 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK


Thats why i use group=TKIP and pairwise=CCMP (i have also added TKIP to this line)

try to manually start your network after editing your wpa_supplicant.conf by typing.

Code:
sudo wpa_supplicant -B -Dwext -ira0 -c/etc/wpa_supplicant.conf

and then

Code:
sudo dhclient ra0
Reply
#10
Thanks alot, my apologies for not stumbling upon the other thread, I confirm the connection is established by editing /etc/network/interfaces with the suggested info.

However and this is really weird Smile XBMC system info displays the correct connection info, IP, default gateway, etc and my wireless adapter is blinking blue but it doesn't find my media over the network. When going to video and browsing for SMB sources it can't find any but when I move to a terminal and ping my network elements they are all responding. By logging out and back into XBMC this is resolved.

I'm thinking the network connection is established after XBMC standalone is completely initialized and is thus not aware of the connection? I'll look at some debugging tomorrow but if anyone has a clue feel free to fill me in.

Thanks again for the guidelines on getting my wireless up and running. Almost there....
Reply
#11
mod-u-lar Wrote:Thanks alot, my apologies for not stumbling upon the other thread, I confirm the connection is established by editing /etc/network/interfaces with the suggested info.

However and this is really weird Smile XBMC system info displays the correct connection info, IP, default gateway, etc and my wireless adapter is blinking blue but it doesn't find my media over the network. When going to video and browsing for SMB sources it can't find any but when I move to a terminal and ping my network elements they are all responding. By logging out and back into XBMC this is resolved.

I'm thinking the network connection is established after XBMC standalone is completely initialized and is thus not aware of the connection? I'll look at some debugging tomorrow but if anyone has a clue feel free to fill me in.

Thanks again for the guidelines on getting my wireless up and running. Almost there....

Instead of trying to browse for your media add a network location.

protocol SMB
enter username and password

That location should be at the highest level of your share so you can go to that one single location to find all the stuff below it after you add it.
Reply
#12
When entering a new network location based on the actual IP of my NAS XBMC can find it, thanks for the tip!

Browsing for network shares or entering the name of my NAS does not work unless I start XBMC through GNOME. Is this a bug, odd behavior at least..
Reply
#13
mod-u-lar Wrote:When entering a new network location based on the actual IP of my NAS XBMC can find it, thanks for the tip!

Browsing for network shares or entering the name of my NAS does not work unless I start XBMC through GNOME. Is this a bug, odd behavior at least..

Not sure if its a bug or not but I always have better luck when entering an actual IP address.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] No wireless connection mgnt when not booting into GNOME (XBMC standalone)0