dimanche 27 mai 2018

Forcer le wifi a rester actif (ou réveillé)



$ iwconfig


lo no wireless extensions.

enxb827eb80b379 no wireless extensions.

wlan0 IEEE 802.11 ESSID:"W4V3"
Mode:Managed Frequency:2.427 GHz Access Point: B0:4E:26:C5:F8:42
Bit Rate=65 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=37/70 Signal level=-73 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:4 Invalid misc:0 Missed beacon:0


$ sudo iwconfig wlan0 power off

$ iwconfig

lo no wireless extensions.

enxb827eb80b379 no wireless extensions.

wlan0 IEEE 802.11 ESSID:"W4V3"
Mode:Managed Frequency:2.427 GHz Access Point: B0:4E:26:C5:F8:42
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=38/70 Signal level=-72 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:4 Invalid misc:0 Missed beacon:0



Modifier cette config à chaque démarrage:


Créer un script:
$ sudo nano /etc/network/if-up.d/powersaveoff


#!/bin/sh

# The connection is dropped when powersave if turned on.
# So we disable it.

# Disable the powersave
iw wlan0 set power_save off

Rendez ce script exécutable :
$ sudo chmod 755 /etc/network/if-up.d/powersaveoff

rebootez:
$ sudo reboot


ouala