How to disconnect wifi link, that was connected with wpa_supplicant

igoryonya

I connect with the following command:

sudo wpa_supplicant -B -D nl80211 -i wlan_card -c /etc/wpa_supplicant/connection.conf

It connects fine, and keeps persistent connection. If AP goes down, the connection tears, if AP gets back up, the connection comes back. If I power down the wifi interface:

sudo ip link set wlan_card down

It goes down. When I bring it up with:

sudo ip link set wlan_card up

The connection, that was launched in the very beginning with wpa_supplicant, reconnects again.

Such stable, persistent connection is very good, but then it causes a problem, if I want to connect to a different AP.

When I try to use wpa_cli with any command, it just gives me the following error:

Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory

When I try to disconnect with:

sudo iw dev wlan_card disconnect

It disconnects, but reconnects right away, so, currently, I have to reserve to:

ps -AlF|grep -i wpa
sudo kill -KILL wpa_pid

I wish to know the correct method to stop the connection, or killing is the only way?

GAD3R

Before connecting a to a different AP you can stop the running instance of the wpa_supplicant service:

sudo killall wpa_supplicant

Configure your /etc/wpa_supplicant/connection.conf then connect through wpa_supplicant.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

wpa_supplicantを使用して接続できません

分類Dev

How to open a GUI application and 'disconnect' it?

分類Dev

How to disconnect git for a project in intellij?

分類Dev

How to get IP address of cellular network when device is connected to WiFi in Android

分類Dev

How to get all MAC addresses connected to WiFi with node.js?

分類Dev

Updating wifi credentials to wpa_supplicant.conf in Rasberry Pi using Node.js

分類Dev

netlogo: how to get nodes that are connected with a link to a node N

分類Dev

Checking wpa_supplicant output from Python app

分類Dev

wpa_supplicantの下のdriver(-D)オプション

分類Dev

wpa_supplicantでwifiに接続できません

分類Dev

wpa_supplicantを使用して接続できません

分類Dev

WiFiエラーwpa_supplicant

分類Dev

wpa_supplicantおよびネットワーク管理ツール

分類Dev

wpa_supplicant - detecting that my password is incorrect?

分類Dev

wpa_supplicant nl80211 hangs linux mint frequently

分類Dev

wpa_supplicant nl80211 hangs linux mint frequently

分類Dev

How to automatically apply wpa_supplicant configuration?

分類Dev

wpa_supplicantの悪夢

分類Dev

wpa_supplicantの悪夢

分類Dev

その後のwpa_supplicantの呼び出しは失敗します-wifiに接続できません

分類Dev

How to prevent wpa_supplicant from connecting to a network

分類Dev

Why the WPA2-PSK wifi can't be connected?

分類Dev

Connect to hidden Wifi AP with wpa-supplicant?

分類Dev

Wifi apparently connected, but webpages won't load

分類Dev

wpa_supplicant / WiFi Direct:wpa_cliコマンドp2p_findはFAILを返します

分類Dev

wpa_supplicantで接続されたwifiリンクを切断する方法

分類Dev

Can users connected to the same non-open (e.g. WPA-PSK) WiFi see each others traffic?

分類Dev

NetworkManagerとwpa_supplicant

分類Dev

wpa_supplicant と dhclient を使用した WiFi 接続で IP の隣にホスト名を表示する

Related 関連記事

  1. 1

    wpa_supplicantを使用して接続できません

  2. 2

    How to open a GUI application and 'disconnect' it?

  3. 3

    How to disconnect git for a project in intellij?

  4. 4

    How to get IP address of cellular network when device is connected to WiFi in Android

  5. 5

    How to get all MAC addresses connected to WiFi with node.js?

  6. 6

    Updating wifi credentials to wpa_supplicant.conf in Rasberry Pi using Node.js

  7. 7

    netlogo: how to get nodes that are connected with a link to a node N

  8. 8

    Checking wpa_supplicant output from Python app

  9. 9

    wpa_supplicantの下のdriver(-D)オプション

  10. 10

    wpa_supplicantでwifiに接続できません

  11. 11

    wpa_supplicantを使用して接続できません

  12. 12

    WiFiエラーwpa_supplicant

  13. 13

    wpa_supplicantおよびネットワーク管理ツール

  14. 14

    wpa_supplicant - detecting that my password is incorrect?

  15. 15

    wpa_supplicant nl80211 hangs linux mint frequently

  16. 16

    wpa_supplicant nl80211 hangs linux mint frequently

  17. 17

    How to automatically apply wpa_supplicant configuration?

  18. 18

    wpa_supplicantの悪夢

  19. 19

    wpa_supplicantの悪夢

  20. 20

    その後のwpa_supplicantの呼び出しは失敗します-wifiに接続できません

  21. 21

    How to prevent wpa_supplicant from connecting to a network

  22. 22

    Why the WPA2-PSK wifi can't be connected?

  23. 23

    Connect to hidden Wifi AP with wpa-supplicant?

  24. 24

    Wifi apparently connected, but webpages won't load

  25. 25

    wpa_supplicant / WiFi Direct:wpa_cliコマンドp2p_findはFAILを返します

  26. 26

    wpa_supplicantで接続されたwifiリンクを切断する方法

  27. 27

    Can users connected to the same non-open (e.g. WPA-PSK) WiFi see each others traffic?

  28. 28

    NetworkManagerとwpa_supplicant

  29. 29

    wpa_supplicant と dhclient を使用した WiFi 接続で IP の隣にホスト名を表示する

ホットタグ

アーカイブ