# Suspend/resume and wpa_supplicant

## VinzC

Hi all.

I've been using my laptop's suspend/resume for a few months now and I've come to run wpa_cli reassociate twice a day, each time I get home and each time I am at work. My laptop is put into suspend state while I go back and forth between sites so the wireless network has changed when I power it back on. So is there a way to force wpa_supplicant to reassociate with each resume?

Note I don't use hibernate but suspend-to-RAM. I would have expected at this point wpa_supplicant to check ACPI PM states and run that instruction but I can also consider writing a script (daemon?) that does it alone. Or if there's any UDEV/ACPI event that can be trapped...

Thanks for any hint/suggestion.

----------

## toralf

 *VinzC wrote:*   

> Note I don't use hibernate but suspend-to-RAM. 

 Both uses the same /etc/acpi/default.sh hook, there you can add your code.

----------

## VinzC

 *toralf wrote:*   

> Both uses the same /etc/acpi/default.sh hook, there you can add your code.

 

W00t! How come didn't I think of it!? Thanks a whole bunch!

----------

