3 Replies Latest reply on Aug 21, 2015 2:06 PM by JPMontero_Intel

    Problems with getting IP / internet connection with wpa_supplicant

    Christoph.P

      Hi!

      I'm trying to programmatically start an access point, stop it after gettings some

      special packages and then connect to a secured wlan. Sometimes it works so,

      sometimes not. Although "wpa_cli -i wlan0 status" says "COMPLETED", it doesn't get

      an IP and I can't ping other sites like google, etc. sometimes.

       

      What I'm doing is execute these commands in my C++ code:

       

      1. systemctl start hostapd
      2. [I get the packages then]
      3. systemctl stop hostapd
      4. sh wpacli_connect_wpa2.sh <SSID> <Password>   (with the example script of the manual)

       

      the Output then says:

       

      bssid=b8:55:10:d5:14:ac

      ssid=ceiling7390

      id=0

      mode=station

      pairwise_cipher=CCMP

      group_cipher=CCMP

      key_mgmt=WPA2-PSK

      wpa_state=COMPLETED

      p2p_device_address=fe:c2:de:3d:95:b4

      address=fc:c2:de:3d:95:b4


      But as said before the connection doesn't work reliable..

      only sometimes "ping www.google.de" works..

       

      Any help is appreciated!

      Christoph