How to reconnect wifi on waking from hibernation?
How to reconnect wifi on waking from hibernation?
How do I get my wifi connection to reconnect automatically after waking from suspended/hibernate mode?
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]
I use shell scripts to connect to wireless instead of using wizards. I would imaging there would be a way to get puppy to execute a script upon resuming.
Code: Select all
#!/bin/sh
# Find our wifi device.
#
WIFI=$(iwconfig | grep IEEE|awk {'print $1'})
# Bounce wifi device
ifconfig $WIFI down
ifconfig $WIFI up
# Configure for WEP encryption on open/wep network
#
iwconfig $WIFI essid JR-MiFi
iwconfig $WIFI key "s:<<pwd-key>>"
iwconfig $WIFI mode managed
iwconfig $WIFI freq 2.452G
iwconfig $WIFI channel 9
# now to obtain an automatic IP address (DHCP)
# for Puppy 4.0 onwards
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
dhcpcd -t 30 -h Lucid-Puppy -d $WIFI
# Display connection info. (Optional; Rem if unwanted)
#
ipinfo
Is this good for any available wifi or just reconnecting to the last one? Can I have a list of previously configured router connections (both open and encrypted) and autoconnect to whichever is available?
Does anyone know how to execute a script on wake?
Does anyone know how to execute a script on wake?
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]
Okay, ignoring the wake from hibernation for now...
I connect to one open router at home, one at my brother's home, one open but MAC-filtered at work, and have been trying to get connected to a secure one at church (but can't get the AES protocol that's being used there, only TKIP), as well as others. Can I have a list of connections for a connect script to connect to whichever (encrypted or unencrypted) router is available without specifying which myself?
I connect to one open router at home, one at my brother's home, one open but MAC-filtered at work, and have been trying to get connected to a secure one at church (but can't get the AES protocol that's being used there, only TKIP), as well as others. Can I have a list of connections for a connect script to connect to whichever (encrypted or unencrypted) router is available without specifying which myself?
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]
You need to find your suspend.sh file in /etc/acpi/actions.
In this file are all actions that are carried out on suspend.
In my file, it looks like this
I am using fatdog64, but I remember in Lupu it was similar.
WPAGUI seems to be a pretty good way to manage wireless. I don't know whether it is available for a lot of puppies.
In this file are all actions that are carried out on suspend.
In my file, it looks like this
Code: Select all
#suspend
/etc/rc.d/rc.network stop
killall wpa_cli
killall dhcpcd-wpagui
killall dhcpcd
killall wpa_supplicant
echo mem > /sys/power/state
# process at recovery from suspend
modprobe ehci_hcd
/etc/rc.d/rc.network
/etc/init.d/50-Wpagui start
WPAGUI seems to be a pretty good way to manage wireless. I don't know whether it is available for a lot of puppies.
Flipping the lid? All that does here is blank the screen, not suspend. And the power switch only turns it on, not off (except for the long-press hard stutdown) or hibernate. Unless someone can tell me how to fix that on Asus Eee900.
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]
Lucid 528. All I have for suspend right now is a one-line script:
with a symlink icon on the desktop that I doubleclick when I want it to sleep.
Code: Select all
acpitool -s
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]
The Lucid528 should have all the acpi support out of the box, which is good. Looong time ago I set up Lucid 510/520 to do the sleep thing on my thinkpad and that was quite complicated, it involved tinkering with the kernel etc.
You need to find the folder /etc/acpi/events in this folder, there should be some files, among them lid. This file tells the acpi subsystem what to do on closed lid. In my case it points to a script that is located in /etc/acpi/actions, with the name of suspend.sh.
One question though, does your eeepc have a lid switch? Or any means of detecting whether the lid is open or closed? Without it, you naturally won't be able to suspend on lidclose. Maybe you nee dspecial drivers/modules for lid-switch detection for the eeepc, I don't know, don't have one.
When you put your eeepc to sleep by clicking on the symlink, how do you wake up again? Pressing any key? Anyhow, you could put the lines I posted previous in your script, if all else fails.
You need to find the folder /etc/acpi/events in this folder, there should be some files, among them lid. This file tells the acpi subsystem what to do on closed lid. In my case it points to a script that is located in /etc/acpi/actions, with the name of suspend.sh.
One question though, does your eeepc have a lid switch? Or any means of detecting whether the lid is open or closed? Without it, you naturally won't be able to suspend on lidclose. Maybe you nee dspecial drivers/modules for lid-switch detection for the eeepc, I don't know, don't have one.
When you put your eeepc to sleep by clicking on the symlink, how do you wake up again? Pressing any key? Anyhow, you could put the lines I posted previous in your script, if all else fails.
After the
I added the
and now it reconnects to both open and encrypted routers on wake (pressing any key). It must be automatically seeing my settings somewhere.
Code: Select all
acpitool -s
Code: Select all
# process at recovery from suspend
modprobe ehci_hcd
/etc/rc.d/rc.network
/etc/init.d/50-Wpagui start
It has a magnetic lid switch which used to suspend it under Xandros. Currently with Puppy it only blanks the screen/backlight until I open it again. I'll look for those files you mentioned.chiron wrote:One question though, does your eeepc have a lid switch? Or any means of detecting whether the lid is open or closed? Without it, you naturally won't be able to suspend on lidclose. Maybe you nee dspecial drivers/modules for lid-switch detection for the eeepc, I don't know, don't have one.
"Cogito, ergo es. I think, therefore you is." [i]Ray D. Tutto (King of the Moon) to Baron Munschaussen[/i]