Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE WLAN and Network Profiles (for the guy on the go)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Thu Jun 01, 2006 8:16 pm    Post subject: KDE WLAN and Network Profiles (for the guy on the go) Reply with quote

hi,
i am happy to say that i have had good success so far with this install of gentoo. right now i am trying to work out some things and one of them is the ability to change between wireless networks easily. Right now here is what i do when i boot up somewhere where i am not wired in:
1. boot up and wait for dhcpcd to fail since i am not plugged in.
2. start up kwifimanager to see what networks are available.
3. open up configuration editor from settings tab (aka Wireless Network in Controlcenter) and try connecting to some of the ESSIDS (with no real idea if they have encryption, wpa etc or not)
4. open up a console and run dhcpcd eth1 to get an ip address.

i'd really like to simplify this down to just booting a wireless profile in grub, starting a network manager program ( when i used gnome this was builtin windows style so i could assign ip address etc from the tray), selecting a network and entering a wep key if needed. Then i should be able to assign a static ip or grab one from the dhcp server.

Is this too much to ask? i searched gentoo-wiki and found hprofile (which would solve step 1) or something but i couldn't get it working (beyond me i think). Is there any easier way? Tutorial perhaps?

thanks a lot :D
Back to top
View user's profile Send private message
brickhaus
n00b
n00b


Joined: 17 Feb 2004
Posts: 9

PostPosted: Fri Jun 02, 2006 2:38 am    Post subject: Reply with quote

Well, it depends on exactly what you know about the wireless APs you're going to connect to...

Do you know at least most of the ESSIDs and WEP keys? You could put them in your /etc/conf.d/wireless file (there's a "wireless.example" I used to configure things in that directory as well), which would then cause the wireless setup scripts to roll through them, setting "preferred_aps" with the preferences you have.

The idea is that you configure things like this (you may need to play with ESSID2's config a bit to get it working):
Code:
key_ESSID1="1234-5678-0ABC-DEF1-2345-6789-0A"
config_ESSID1=( "dhcp" )

key_ESSID2="1234-5678-0ABC-DEF1-2345-6789-0A"
config_ESSID2= ( "10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255" )
routes_ESSID2= ( "default via 10.0.0.1" )

preferred_aps=( "ESSID1" "ESSID2" )


This also allows you to fall back to an unprotected WAP in case none of your configured ESSIDs are available. Oh, and why bother with the second hardware profile for worrying about whether or not you're plugged in. If you're not plugged in, eth0 fails pretty much instantaneously as far as I can tell. Doesn't slow boot down much.

Sorry if this doesn't serve your purpose. Just trying to help.
Back to top
View user's profile Send private message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Fri Jun 02, 2006 1:43 pm    Post subject: Reply with quote

umm, not dhcpcd. It takes ~1.5mins, which is too long.

No, unfortunately i can't tell what is going to be available in the area before i go. That is why i am looking for a frontend that will allow me to do easy changes/connections.

Thanks for your reply, though.
Back to top
View user's profile Send private message
mariux2
Apprentice
Apprentice


Joined: 16 Sep 2003
Posts: 242

PostPosted: Fri Jun 02, 2006 2:35 pm    Post subject: Reply with quote

Try wlassistant.
Back to top
View user's profile Send private message
Xithix
Apprentice
Apprentice


Joined: 31 Dec 2004
Posts: 228

PostPosted: Fri Jun 02, 2006 3:51 pm    Post subject: Reply with quote

If you want to kill the wired dhcpcd wait time, emerge ifplugd. It's a wired ethernet autodetection daemon. It runs in the background instead of delaying your boot and should automatically run dhcpcd (also in the background) when it detects a plugged in connection.

If you don't like that idea, you could still go into /etc/conf.d/net and set the dchp args. Look at /etc/conf.d/net.example for more info. The argument you would want is "-t 15" for timeout after 15 seconds. That should be enough time for any dhcp server.

Kwifimanager is ok, but it has its downfalls. It's just a gui frontend for command line functions like iwconfig, iwlist, ifconfig.

I always just run shell scripts for wifi connecting though, one for each wifi network I use. Looks kind of like this (I'm not at my machine now):
Code:
#!/bin/bash
sudo killall dhcpcd              # This shuts down any current connections
sudo ifconfig eth1 down
sudo modprobe -r bcm43xx
sudo modprobe -r ieee80211crypt
sudo modprobe ieee80211crypt     # Bring it all back up
sudo modprobe bcm43xx
sudo ifconfig eth1 up
sudo sleep 1                     # wait for adapter to come up
sudo iwlist scan                 # mostly just for kicks.  See what's available around here.
sudo iwconfig eth1 rate 11M mode Managed ap <mac address of ap, only present for my house's network> essid <ssid> key open 1 <wepkley>
sudo sleep 1                     # wait for it to connect
sudo dhcpcd eth1 -t 15           # get an IP address
sudo ifconfig eth1               # display results.  If there's an inet address, I win at life.
I just chmod the script +x and put it in /usr/bin ... ex. /usr/bin/wifi. The sudos are there so I can type in "wifi" as a normal user and it will just ask for password once. requires app-admin/sudo of course ;)

For discovery of nearby networks you don't know enough about to write a script for, you can just do
Code:
# iwlist eth1 scan
It will give you more information than kwifimanager.

I'm sure something like "connect to the best signal network that doesn't have encryption" could be easily scripted too. I'm not good enough at bash yet to do it myself though.
Back to top
View user's profile Send private message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Fri Jun 02, 2006 5:13 pm    Post subject: Reply with quote

great, i'll try both.

So for ifplugd, do i need to remove net.eth0 with rc-update del net.eth0 and then emerge and add ifplugd or is it done another way?

i'm not on my comp at the moment otherwise i'd try.
Back to top
View user's profile Send private message
Xithix
Apprentice
Apprentice


Joined: 31 Dec 2004
Posts: 228

PostPosted: Fri Jun 02, 2006 9:48 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-464857.html

You used to have to do that. Current versions of baselayout just need ifplugd to be emerged and it will automatically start instead of the rest oif the standard net.eth0 script.
Back to top
View user's profile Send private message
imperator-x
n00b
n00b


Joined: 02 Jun 2006
Posts: 2

PostPosted: Fri Jun 02, 2006 10:14 pm    Post subject: Reply with quote

hi!

download wireless assistant!
http://kde-apps.org/content/show.php?content=21832
Back to top
View user's profile Send private message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Wed Jun 07, 2006 11:07 pm    Post subject: Reply with quote

hi
i emerged ifplugd and i have seen no indication that it is working. in fact i see no indication that it is even running at boot like it is supposed to. when i boot, i still get the dhcpcd delay even with network cable unplugged.

what is the problem?
Back to top
View user's profile Send private message
Blue Lightning
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2003
Posts: 137
Location: Auckland, New Zealand

PostPosted: Thu Jun 08, 2006 6:36 am    Post subject: Reply with quote

You need to set the ethernet interface to not be started on boot to remove the dhcpd delay, as ifplugd will start it when it detects the cable being plugged in. For ifplugd I assume you have done an rc-update add ifplugd default?
Back to top
View user's profile Send private message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Thu Jun 08, 2006 1:24 pm    Post subject: Reply with quote

yes, i've done that with:
rc-update del net.eth0 default
rc-update add ifplugd default

i did this only after i tested after just straight emerging. if you read up, "Current versions of baselayout just need ifplugd to be emerged and it will automatically start instead of the rest oif the standard net.eth0 script."

is this right then?
ok maybe i just need to do rc-update add ifplugd default and not del net.eth0? i'll have to try that.

thx guys.
Back to top
View user's profile Send private message
kookay
n00b
n00b


Joined: 17 May 2006
Posts: 5

PostPosted: Fri Jun 09, 2006 12:10 pm    Post subject: Reply with quote

maybe you want to have a look at wpa_supplicant. So you're ready for wpa-encryption as well and there is a nice gui called wpa_gui, which allows you to scan for available networks and even shows you the used encryption.
Back to top
View user's profile Send private message
CyD
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2004
Posts: 117

PostPosted: Wed Jun 14, 2006 6:40 pm    Post subject: Reply with quote

it seems to me that unstable baselayout (1.12.etc) backgrounds eth0 by default. i hadn't heard about ifplugd until today. wlassistant looks nice, has anyone experienced the problems with it getting a gateway as described in its page's comments?

i also run into frequent problems with WEP association, i wish i could say wpa_supplicant cleared up those problems, but i haven't use wpa_supplicant since upgrading my testing machines to unstable baselayout. maybe that will bring some results.
Back to top
View user's profile Send private message
jcmuse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2006
Posts: 86

PostPosted: Wed Jun 28, 2006 6:22 pm    Post subject: Reply with quote

i have found a great wireless network manager in wireless assistant.

as for ifplugd, i still have not been able to get it working. i also tried netplug and had no luck with that either. anyway i just removed net.eth0 from startup and i do dhcpcd eth0 manually. beats waiting 1.5 minutes on startup for something you know is going to fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum