You are not logged in.

#1 2010-09-08 12:02:08

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

wicd automatic connect

I configured wicd and everything works fine, i have just one issue.
When i move the computer while it is suspended to another location
with a different network, wicd won't automatically connect me to the
other network.

It reconnects me to the same network after a suspend; and after
a fresh boot it connects to whatever network is available.

On http://wiki.archlinux.org/index.php/Sus … ate-script
there is a script /usr/lib/wicd/autoconnect.py mentioned, which seems to do that.
I don't have it however.

Offline

#2 2010-09-08 12:28:48

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: wicd automatic connect

I haven't tested it and I'm not sure, but you can try one of these two scripts, maybe they are helpful:

/usr/share/wicd/daemon/autoconnect.py
/usr/share/wicd/daemon/suspend.py

Maybe the wiki article is outdated, because the mentioned scripts there don't exist in the pacakge

Last edited by ise (2010-09-08 12:30:00)

Offline

#3 2010-09-08 12:52:19

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: wicd automatic connect

They're there, i try them as soon as i move somewhere, thank you.

I have a related question: where do i have to mention them to be
executed automatically after resuming?

Suspend to Ram worked just like that on my laptop (Samsung N150)
by pressing the energy button, not by closing the lid however. So i
didn't installed nor configured anything regarding suspend.

I had a look on some acpi- and laptop-mode scripts, but i haven't figured
out, what is actually triggered when i press the energy button or resume.

hm.. i hope this hasn't gone too far off topic, should i open another thread
for this?

Last edited by MickeyKnox (2010-09-08 12:52:42)

Offline

#4 2010-09-08 13:04:10

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: wicd automatic connect

MickeyKnox wrote:

I configured wicd and everything works fine, i have just one issue.
When i move the computer while it is suspended to another location
with a different network, wicd won't automatically connect me to the
other network.

Strange, i don't have this issue. When i move my laptop while suspended Wicd automatically reconnects to another network, i haven't done any extra scripting or configuration for this.


ᶘ ᵒᴥᵒᶅ

Offline

#5 2010-09-08 15:49:11

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: wicd automatic connect

I usually can get it to reconnect without doing anything,  but sporadically I have the same issue as the OP. I'm not able to reproduce it reliably though. I can also get it to reconnect just by restarting the wicd daemon, no need for a full reboot.

MickeyKnox, is it consistently not switching to a new network?

Offline

#6 2010-09-08 17:10:21

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: wicd automatic connect

mcmillan wrote:

is it consistently not switching to a new network?

I think it did once, but i'm not sure about that. But usually it doesn't. I just
wait a moment, and then i enter wicd-curses and scan the network. That
sometimes does the trick, but sometimes i have to have it connect manually
(maybe i was just impatient in those cases).

Offline

#7 2010-09-08 18:40:28

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: wicd automatic connect

Remember, wicd takes ~10 seconds to re-connect with DHCP..


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2010-09-09 16:19:53

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: wicd automatic connect

Today i checked again. I waited a few minutes after resuming,
but no connection was established. Then i entered wicd-curses,
which show me a lot of networks not present at this location.
I had to trigger a refresh to see the local networks.

One thing i should've mentioned before, i guess: I don't have any client
running, like wicd-client. Just the deamon.

Offline

#9 2010-09-13 12:24:11

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: wicd automatic connect

I just tried again, if wicd connects me to another network,
it didn't. This time i had wicd-client running. I waited a few
minutes, no connection, then i ran the script

/usr/share/wicd/daemon/autoconnect.py

by hand, which did the trick.

Now i would like to register that script somewhere to be
executed automatically after resume. As is sad earlier,
i did no configuration whatsoever for suspend, because it
just worked. So i guess, this is now a matter of understanding
how suspend works.

hm.. another matter just came to me: I have no tray for
wicd-client to connect to. Does that confuse wicd-client maybe?

Offline

#10 2010-09-13 14:13:16

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: wicd automatic connect

If you use pm-utils to suspend, you can create or adjust one of its hooks to execute that script for you.
You can find the hooks in either /etc/pm/sleep.d or /usr/lib/pm-utils/sleep.d.
Personally, i'd recommend to use netcfg instead of wicd, especially if you don't use much ad-hoc connections. It is very plain in its configuration, offers many features and most importantly is very reliable. Also, pm-utils already comes with hooks to make netcfg resume previous connections after a system suspend.

Regards,
demian

Last edited by demian (2010-09-13 14:15:06)


no place like /home
github

Offline

#11 2011-01-13 04:17:19

invictus51
Member
From: Alaska
Registered: 2010-10-08
Posts: 25

Re: wicd automatic connect

I was having the same problem.  I had to modify my /etc/acpi/handler.sh script for suspend and the power button to work on my aspire one.  At first I had the following in the section of the script for the lid closing:

echo -n mem >/sys/power/state ;; #suspend when lid closes

I changed that to:

pm-suspend ;;

On a resume I was no longer connected to my network, and within 10 seconds my connection was re-established, whereas before, my connection still seemed to be active immediately after a resume.  When I would move to work my machine would still be "connected" to my network at home, and still see it when I ran wicd-curses.  Now it all works great smile

Last edited by invictus51 (2011-01-13 15:17:50)


Samsung Series 3 NP305V5A.  AMD Quad Core A6-3410, 8 Gb Ram, 750GB HD, Radeon 6520G

Don't get in an argument with an idiot, they'll drag you down to their level, and beat you with experience...

Offline

Board footer

Powered by FluxBB