Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

Problème de connexion WIFI Raspberry PI
#1

Bonjour,
Je ne réussis pas à me connecter en wifi sur un RPI.

Le message d'erreur est "could not get status from wpa_supplicant", fichier qui existe.

Mon fichier wpa_supplicant :
###############
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="Alain"
psk="Password..."
}
###############

Mon fichier interfaces :
###############
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.16
netmask 255.255.255.0
gateway 192.168.0.254
dns-nameservers 212.27.40.24
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp
#################

Merci pour votre aide.
#2

Voici les réponses que j'obtiens lorsque je fais "sudo ifup --force wlan0
Comment conserver la couleur en copie?
Pardon pour la lecture... Smile

[email protected] ~ $ sudo ifup --force wlan0

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
wpa_supplicant: /sbin/wpa_cli daemon failed to start
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1

Code :
[== Indéfini ==]
[email protected] ~ $ sudo nano /etc/network/if-pre-up.d/wpasupplicant

if [ -n "$IF_WPA_MAINT_DEBUG" ]; then
        set -x
fi

# quit if we're called for the loopback
if [ "$IFACE" = lo ]; then
        exit 0
fi

# allow wpa_supplicant interface to be specified via wpa-iface
# useful for starting wpa_supplicant on one interface of a bridge
if [ -n "$IF_WPA_IFACE" ]; then
        WPA_IFACE="$IF_WPA_IFACE"
else
        WPA_IFACE="$IFACE"
fi

# source functions
if [ -f /etc/wpa_supplicant/functions.sh ]; then
        . /etc/wpa_supplicant/functions.sh
else
        exit 0
fi

# quit if executables are not installed
if [ ! -x "$WPA_SUP_BIN" ] || [ ! -x "$WPA_CLI_BIN" ]; then
        exit 0
fi

do_start () {
        if test_wpa_cli; then
                # if wpa_action is active for this IFACE, do nothing
                ifupdown_locked && exit 0

                # if the administrator is calling ifup, say something useful
                if [ "$PHASE" = "pre-up" ]; then
                        wpa_msg stderr "wpa_action is managing ifup/ifdown stat$
                        wpa_msg stderr "execute \`ifdown --force $WPA_IFACE' to$
                fi
                exit 1
        elif ! set | grep -q "^IF_WPA"; then
                # no wpa- option defined for IFACE, do nothing
                exit 0
        fi

        # ensure stale ifupdown_lock marker is purged
        ifupdown_unlock

        # preliminary sanity checks for roaming daemon
        if [ -n "$IF_WPA_ROAM" ]; then
                if [ "$METHOD" != "manual" ]; then
                        wpa_msg stderr "wpa-roam can only be used with the \"ma$
                        exit 1
fi
                WPA_SUP_CONF_CTRL_DIR=$(sed -n -e 's/[[:space:]]*#.*//g' -e 's/$
                        -e 's/^ctrl_interface=\(DIR=\)\?\(.*\)/\2/p' "$IF_WPA_C$
                if [ -n "$WPA_SUP_CONF_CTRL_DIR" ]; then
                        WPA_CTRL_DIR="$WPA_SUP_CONF_CTRL_DIR"
                        WPA_SUP_CONF="-c $IF_WPA_CONF"
                else
                        # specify the default ctrl_interface since none was def$
                        # the given IF_WPA_CONF
                        WPA_SUP_CONF="-c $IF_WPA_CONF -C $WPA_CTRL_DIR"
                fi
        else
                # specify the default ctrl_interface
                WPA_SUP_CONF="-C $WPA_CTRL_DIR"
        fi
}

do_stop () {
        if test_wpa_cli; then
                # if wpa_action is active for this IFACE and calling ifdown,
                # do nothing
                ifupdown_locked && exit 0
        elif test_wpa_supplicant; then
                # wpa_supplicant process exists for this IFACE, but wpa_cli
                # process does not. Allow stop mode to kill this process.
                :
        else
                exit 0
        fi
}

case "$MODE" in
        start)
                do_start
                case "$PHASE" in
                        pre-up)
                                kill_wpa_supplicant
                                init_wpa_supplicant     || exit 1
                                conf_wpa_supplicant     || { kill_wpa_supplican$
                                ;;
                        post-up)
                                init_wpa_cli            || { kill_wpa_supplican$
                                ;;
                esac
                ;;

        stop)
                do_stop
                case "$PHASE" in
                        pre-down)
                                kill_wpa_cli
                                ;;
                        post-down)
                                kill_wpa_supplicant
                                ;;
                        *)
                                wpa_msg stderr "unknown phase: \"$PHASE\""
                                exit 1
                                ;;
                esac
                ;;

        *)
                wpa_msg stderr "unknown mode: \"$MODE\""
                exit 1
                ;;
esac

exit 0


[email protected] ~ $ sudo nano /etc/network/if-up.d/wpasupplicant

if [ -n "$IF_WPA_MAINT_DEBUG" ]; then
        set -x
fi

# quit if we're called for the loopback
if [ "$IFACE" = lo ]; then
        exit 0
fi

# allow wpa_supplicant interface to be specified via wpa-iface
# useful for starting wpa_supplicant on one interface of a bridge
if [ -n "$IF_WPA_IFACE" ]; then
        WPA_IFACE="$IF_WPA_IFACE"
else
        WPA_IFACE="$IFACE"
fi

# source functions
if [ -f /etc/wpa_supplicant/functions.sh ]; then
        . /etc/wpa_supplicant/functions.sh
else
        exit 0
fi

# quit if executables are not installed
if [ ! -x "$WPA_SUP_BIN" ] || [ ! -x "$WPA_CLI_BIN" ]; then
        exit 0
fi

do_start () {
        if test_wpa_cli; then
                # if wpa_action is active for this IFACE, do nothing
                ifupdown_locked && exit 0

                # if the administrator is calling ifup, say something useful
                if [ "$PHASE" = "pre-up" ]; then
                        wpa_msg stderr "wpa_action is managing ifup/ifdown stat$
                        wpa_msg stderr "execute \`ifdown --force $WPA_IFACE' to$
                fi
                exit 1
        elif ! set | grep -q "^IF_WPA"; then
                # no wpa- option defined for IFACE, do nothing
                exit 0
        fi

        # ensure stale ifupdown_lock marker is purged
        ifupdown_unlock
# preliminary sanity checks for roaming daemon
        if [ -n "$IF_WPA_ROAM" ]; then
                if [ "$METHOD" != "manual" ]; then
                        wpa_msg stderr "wpa-roam can only be used with the \"ma$
                        exit 1
                fi
                if [ -n "$IF_WPA_MAPPING_SCRIPT" ]; then
                        if ! type "$IF_WPA_MAPPING_SCRIPT" >/dev/null; then
                                wpa_msg stderr "wpa-mapping-script \"$IF_WPA_MA$
                                exit 1
                        fi
                fi
                if [ -n "$IF_WPA_MAPPING_SCRIPT_PRIORITY" ] && [ -z "$IF_WPA_MA$
                        wpa_msg stderr "\"wpa-mapping-script-priority 1\" is in$
                        exit 1
                fi
                IF_WPA_CONF="$IF_WPA_ROAM"
                WPA_ACTION_SCRIPT="/sbin/wpa_action"
        fi

        # master function; determines if ifupdown.sh should do something or not
        if [ -n "$IF_WPA_CONF" ] && [ "$IF_WPA_CONF" != "managed" ]; then
                if [ ! -s "$IF_WPA_CONF" ]; then
                        wpa_msg stderr "cannot read contents of $IF_WPA_CONF"
                        exit 1
                fi
                WPA_SUP_CONF_CTRL_DIR=$(sed -n -e 's/[[:space:]]*#.*//g' -e 's/$
                        -e 's/^ctrl_interface=\(DIR=\)\?\(.*\)/\2/p' "$IF_WPA_C$
                if [ -n "$WPA_SUP_CONF_CTRL_DIR" ]; then
                        WPA_CTRL_DIR="$WPA_SUP_CONF_CTRL_DIR"
                        WPA_SUP_CONF="-c $IF_WPA_CONF"
                else
                        # specify the default ctrl_interface since none was def$
                        # the given IF_WPA_CONF
                        WPA_SUP_CONF="-c $IF_WPA_CONF -C $WPA_CTRL_DIR"
                fi
        else
                # specify the default ctrl_interface
                WPA_SUP_CONF="-C $WPA_CTRL_DIR"
        fi
}

do_stop () {
        if test_wpa_cli; then
                # if wpa_action is active for this IFACE and calling ifdown,
                # do nothing
                ifupdown_locked && exit 0
        elif test_wpa_supplicant; then
                # wpa_supplicant process exists for this IFACE, but wpa_cli
                # process does not. Allow stop mode to kill this process.
                :
        else
                exit 0
        fi
}
case "$MODE" in
        start)
                do_start
                case "$PHASE" in
                        pre-up)
                                kill_wpa_supplicant
                                init_wpa_supplicant     || exit 1
                                conf_wpa_supplicant     || { kill_wpa_supplican$
                                ;;
                        post-up)
                                init_wpa_cli            || { kill_wpa_supplican$
                                ;;
                esac
                ;;

        stop)
                do_stop
                case "$PHASE" in
                        pre-down)
                                kill_wpa_cli
                                ;;
                        post-down)
                                kill_wpa_supplicant
                                ;;
                        *)
                                wpa_msg stderr "unknown phase: \"$PHASE\""
                                exit 1
                                ;;
                esac
                ;;

        *)
                wpa_msg stderr "unknown mode: \"$MODE\""
                exit 1
                ;;
esac

exit 0
#3

Je sais que les ondes sont démocratisées, mais a mon avis le cerveau de ton bébé en développement préfera quelques cables au wifi !
#4

execute ifconfig sur raspberry
et donne moi ton output
Sujet fermé


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)