Forum Linux.embarqué Wifi et roaming

Posté par  . Licence CC By‑SA.
Étiquettes :
0
6
avr.
2023

Bonjour,

Je suis entrain de configurer un écran embarqué sous Linux Debian 11.
Pour le roaming j'utilise wpa_supplican (j'ai essayé avec iwd mais même résultat que ce qui suit).
Pour éviter tout parasitage j'ai supprimé networkmanager.
Le roaming se passe assez bien dans l'ensemble.
Sauf qu'en le terminal perd le réseau (passage dans une zone blanche) et doit se reconnecter au réseau, là il faut prêt d'30 secondes - 1 minutes à l'équipement pour se reconnecter (oui les caristes n'aiment pas attendre).

Configuration /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
    source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enx00e04c421374
iface enx00e04c421374 inet static
    address 192.168.0.50
#    gateway 192.168.0.10

allow-hotplug wls6
iface wls6 inet manual
    wpa-driver      wext
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface societe inet dhcp
    netmask 255.255.0.0

Configuration /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
update_config=1
ap_scan=1
country=FR
update_config=0
fast_reauth=1
network={
        ssid="PROWLAN"
        proto=WPA RSN
        key_mgmt=WPA-PSK
        psk="moddepasse"
        #psk=11afec0ccc675e5f708f7f7c1da4c8cd82261cac78924fc7ed7359a5e9e9b154
        bgscan="simple:5:-62:3600"
        id_str="societe"
}

Log au moment des problèmes de connexion :

Apr  6 09:57:21 term wpa_supplicant[532]: wls6: CTRL-EVENT-DISCONNECTED bssid=00:23:68:09:a8:69 reason=0
Apr  6 09:57:23 term wpa_supplicant[532]: wls6: Trying to associate with 00:23:68:09:a8:69 (SSID='PROWLAN' freq=2462 MHz)
Apr  6 09:57:23 term wpa_supplicant[532]: Failed to add supported operating classes IE
Apr  6 09:57:23 term kernel: [  132.181868] wls6: authenticate with 00:23:68:09:a8:69
Apr  6 09:57:23 term kernel: [  132.181890] wls6: 80 MHz not supported, disabling VHT
Apr  6 09:57:23 term kernel: [  132.184256] wls6: send auth to 00:23:68:09:a8:69 (try 1/3)
Apr  6 09:57:23 term kernel: [  132.315492] wls6: send auth to 00:23:68:09:a8:69 (try 2/3)
Apr  6 09:57:23 term kernel: [  132.318957] wls6: authenticated
Apr  6 09:57:23 term kernel: [  132.318978] iwlwifi 0000:02:00.0 wls6: disabling HT/VHT/HE as WMM/QoS is not supported by the AP
Apr  6 09:57:23 term kernel: [  132.319490] wls6: associate with 00:23:68:09:a8:69 (try 1/3)
Apr  6 09:57:23 term kernel: [  132.322791] wls6: RX AssocResp from 00:23:68:09:a8:69 (capab=0x11 status=0 aid=1)
Apr  6 09:57:23 term wpa_supplicant[532]: wls6: Associated with 00:23:68:09:a8:69
Apr  6 09:57:23 term kernel: [  132.325671] wls6: associated
Apr  6 09:57:33 term wpa_supplicant[532]: wls6: Authentication with 00:23:68:09:a8:69 timed out.
Apr  6 09:57:33 term kernel: [  142.326381] wls6: deauthenticating from 00:23:68:09:a8:69 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr  6 09:57:33 term wpa_supplicant[532]: wls6: CTRL-EVENT-DISCONNECTED bssid=00:23:68:09:a8:69 reason=3 locally_generated=1
Apr  6 09:57:33 term wpa_supplicant[532]: wls6: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="PROWLAN" auth_failures=1 duration=10 reason=CONN_FAILED
Apr  6 09:57:43 term wpa_supplicant[532]: wls6: CTRL-EVENT-SSID-REENABLED id=0 ssid="PROWLAN"
Apr  6 09:57:43 term wpa_supplicant[532]: wls6: Trying to associate with 00:23:68:53:c6:16 (SSID='PROWLAN' freq=2437 MHz)
Apr  6 09:57:43 term wpa_supplicant[532]: Failed to add supported operating classes IE
Apr  6 09:57:43 term kernel: [  152.859846] wls6: authenticate with 00:23:68:53:c6:16
Apr  6 09:57:43 term kernel: [  152.859867] wls6: 80 MHz not supported, disabling VHT
Apr  6 09:57:43 term kernel: [  152.862216] wls6: send auth to 00:23:68:53:c6:16 (try 1/3)
Apr  6 09:57:43 term kernel: [  152.989057] wls6: send auth to 00:23:68:53:c6:16 (try 2/3)
Apr  6 09:57:44 term kernel: [  153.090194] wls6: send auth to 00:23:68:53:c6:16 (try 3/3)
Apr  6 09:57:44 term kernel: [  153.481535] wls6: authentication with 00:23:68:53:c6:16 timed out
Apr  6 09:57:53 term wpa_supplicant[532]: wls6: Authentication with 00:23:68:53:c6:16 timed out.
Apr  6 09:57:53 term wpa_supplicant[532]: wls6: CTRL-EVENT-DISCONNECTED bssid=00:23:68:53:c6:16 reason=3 locally_generated=1
Apr  6 09:57:53 term wpa_supplicant[532]: wls6: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="PROWLAN" auth_failures=2 duration=20 reason=CONN_FAILED
Apr  6 09:57:53 term wpa_supplicant[532]: ioctl[SIOCSIWSCAN]: Device or resource busy
Apr  6 09:57:53 term wpa_supplicant[532]: wls6: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
Apr  6 09:58:14 term wpa_supplicant[532]: wls6: CTRL-EVENT-SSID-REENABLED id=0 ssid="PROWLAN"
Apr  6 09:58:14 term wpa_supplicant[532]: wls6: Trying to associate with 00:23:68:53:c6:16 (SSID='PROWLAN' freq=2437 MHz)
Apr  6 09:58:14 term wpa_supplicant[532]: Failed to add supported operating classes IE
Apr  6 09:58:14 term kernel: [  183.621857] wls6: authenticate with 00:23:68:53:c6:16
Apr  6 09:58:14 term kernel: [  183.621878] wls6: 80 MHz not supported, disabling VHT
Apr  6 09:58:14 term kernel: [  183.624243] wls6: send auth to 00:23:68:53:c6:16 (try 1/3)
Apr  6 09:58:14 term kernel: [  183.654006] wls6: authenticated
Apr  6 09:58:14 term kernel: [  183.654030] iwlwifi 0000:02:00.0 wls6: disabling HT/VHT/HE as WMM/QoS is not supported by the AP
Apr  6 09:58:14 term kernel: [  183.655493] wls6: associate with 00:23:68:53:c6:16 (try 1/3)
Apr  6 09:58:14 term kernel: [  183.658950] wls6: RX AssocResp from 00:23:68:53:c6:16 (capab=0x11 status=0 aid=1)
Apr  6 09:58:14 term kernel: [  183.673224] wls6: associated
Apr  6 09:58:14 term wpa_supplicant[532]: wls6: Associated with 00:23:68:53:c6:16
Apr  6 09:58:24 term wpa_supplicant[532]: wls6: Authentication with 00:23:68:53:c6:16 timed out.
Apr  6 09:58:24 term kernel: [  193.674568] wls6: deauthenticating from 00:23:68:53:c6:16 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr  6 09:58:24 term wpa_supplicant[532]: wls6: CTRL-EVENT-DISCONNECTED bssid=00:23:68:53:c6:16 reason=3 locally_generated=1
Apr  6 09:58:24 term wpa_supplicant[532]: wls6: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="PROWLAN" auth_failures=3 duration=30 reason=CONN_FAILED

Une petite idée ?

Bonne journée

  • # bgscan

    Posté par  . Évalué à 1.

    Salut,

    Je connais pas trop wpa_supplicant, mais là, comme ça, je dirais qu'il faut jouer avec la ligne :

    bgscan="simple:5:-62:3600"
    As-tu essayé de baisser la valeur 3600?
    Et même chose avec -62?

    https://wiki.archlinux.org/title/Wpa_supplicant

    • [^] # Re: bgscan

      Posté par  . Évalué à 1.

      Bonjour,

      Merci, alors oui et non, le problème si dessus est différent, par contre ta réponse m'a rappelé un réglage qui règle un autre souci que j'ai en roaming ( problème de latence sur le passage entre 2 bornes, en effet le terminal avait tendance à ne pas se connecter sur la borne la plus proche… ).

      Nouveau réglage

      bgscan="simple:5:-65:3600"
      

      Oui le passage de -62 à -65 a résolut des soucis, mais pas la reconnexion après zone blanche :'(

      • [^] # Re: bgscan

        Posté par  . Évalué à 2.

        J'ai jeté un oeil sur la doc officiel, et j'ai trouvé ça qui, si j'ai au moins compris partiellement ça pourras peux être, t'aider, ou pas :

        AP scanning/selection

        By default, wpa_supplicant requests driver to perform AP scanning and then

        uses the scan results to select a suitable AP. Another alternative is to

        allow the driver to take care of AP scanning and selection and use

        wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association

        information from the driver.

        1: wpa_supplicant initiates scanning and AP selection; if no APs matching to

        the currently enabled networks are found, a new network (IBSS or AP mode

        operation) may be initialized (if configured) (default)

        0: This mode must only be used when using wired Ethernet drivers

        (including MACsec).

        2: like 0, but associate with APs using security policy and SSID (but not

        BSSID); this can be used, e.g., with ndiswrapper and NDIS drivers to

        enable operation with hidden SSIDs and optimized roaming; in this mode,

        the network blocks in the configuration file are tried one by one until

        the driver reports successful association; each network block should have

        explicit security policy (i.e., only one option in the lists) for

        key_mgmt, pairwise, group, proto variables

        Note: ap_scan=0/2 should not be used with the nl80211 driver interface (the

        current Linux interface). ap_scan=1 is the only option working with nl80211.

        For finding networks using hidden SSID, scan_ssid=1 in the network block can

        be used with nl80211.

        When using IBSS or AP mode, ap_scan=2 mode can force the new network to be

        created immediately regardless of scan results. ap_scan=1 mode will first try

        to scan for existing networks and only if no matches with the enabled

        networks are found, a new IBSS or AP mode network is created. ap_scan=1

        Moi, j'essayerais de mettre l'AP scannig sur 2.
        Après j'avoue que j'en pas plus que toi.

        • [^] # Re: bgscan

          Posté par  . Évalué à 1.

          Bon, après test, même soucis.
          J'ai l'impression que des fois wpa_supplicant ne fait pas de rechargement de l'interface, après reconnexion. (Qu'en je branche une carte réseau USB, ça repart aussi sec…)

          J'en perd mon latin…

          Dans tous les cas merci de ton aide.

          • [^] # Re: bgscan

            Posté par  . Évalué à 1.

            De rien.
            Juste comme ça, as-tu jeté un oeil au log coté AP?

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.