5 Replies Latest reply on May 4, 2015 2:39 PM by Intel_Alvarado

    Is WPA2 ad-hoc mode supported?

    wojci

      I found out that one can build wpa_supplicant with "CONFIG_IBSS_RSN=y" and use the following "/etc/wpa_supplicant/wpa_supplicant.conf"

       

      "ctrl_interface=/var/run/wpa_supplicant

      ctrl_interface_group=0

      config_methods=virtual_push_button virtual_display push_button keypad

      update_config=1

      fast_reauth=1

      device_name=Edison

      manufacturer=Intel

      model_name=Edison

       

      ap_scan=2

      network={

              ssid="adhocwpa2"

              mode=1

              frequency=2412

              mode=1

              key_mgmt=WPA-PSK

              proto=RSN

              pairwise=CCMP

              group=CCMP

              psk="secret"

      }

      "

       

      This works as in wpa_supplement returns no errors, but when I try to ping between two Edisons that were configured to use this ad-hoc network, the ping packets vanish.

       

      Any ideas why this would not work?

        • 1. Re: Is WPA2 ad-hoc mode supported?
          Intel_Alvarado

          Hi,

           

          Are you sure you set your ad hoc network correctly? Take a look at Intel® Edison Products — Intel® Edison Wi-Fi User Guide section 4.2.4 for more information on ad hoc.

           

          Sergio

          • 2. Re: Is WPA2 ad-hoc mode supported?
            wojci

            The WiFi Intel document does not tell me how to create the type of ad-hoc network that I want to use.

             

            "9.4 Script to create/connect to an ad-hoc network" tells me how to create an ad-hoc network without security.

             

            This is why I'm asking here.

             

            I'm using the latest software (that I can find). Is there any way of getting a newer kernel for the Edison?

            How do I rapport bugs like certain networking features not working?

            • 3. Re: Is WPA2 ad-hoc mode supported?
              Intel_Alvarado

              Hi,

               

              I was able to add wpa-psk security to the adhoc script in the Wi-Fi guide section 9.4 by modifying key_mgmt from NONE to WPA-PSK, and adding a psk line.

               

              $rmt wpa_cli -iwlan0 set_network 0 key_mgmt WPA-PSK

              $rmt wpa_cli -iwlan0 set_network 0 psk <key> (need to generate it with a wpa psk generator)

               

              For additional information on wpa_supplicant take a look here: https://www.uni-ulm.de/uploads/media/wpa-supplicant-eduroam_03.conf

              I was also able to ping between two Edison by assigning an IP to each of them.

               

              Sergio

              • 4. Re: Is WPA2 ad-hoc mode supported?
                wojci

                So the modified script gives me the following config file:

                 

                root@edison:~# cat /etc/wpa_supplicant/wpa_supplicant.conf

                ctrl_interface=/var/run/wpa_supplicant

                ctrl_interface_group=0

                driver_param=use_p2p_group_interface=1p2p_device=1

                update_config=1

                device_name=Edison

                manufacturer=Intel

                model_name=Edison

                config_methods=virtual_push_button virtual_display push_button keypad

                 

                 

                network={

                        ssid="testadhoc"

                        scan_ssid=1

                        bssid=fc:c2:de:41:8f:ea

                       

                psk=377df7636381ab02851f0f20dfabff0894707de382eeedc8a7ff5dcc12e9723b

                        key_mgmt=WPA-PSK

                        auth_alg=OPEN

                        mode=1

                        frequency=2412

                }

                 

                root@edison:~# wpa_cli status

                Selected interface 'wlan0'

                bssid=0a:2a:a6:aa:35:51

                ssid=testadhoc

                id=0

                mode=IBSS

                pairwise_cipher=CCMP

                group_cipher=CCMP

                key_mgmt=WPA2-PSK

                wpa_state=COMPLETED

                ip_address=192.168.3.21

                p2p_device_address=fe:c2:de:37:3e:8d

                address=fc:c2:de:37:3e:8d

                 

                According to my laptop, this wpa_supplicant config files creates an unencrypted adhoc network since I can connect to it and get an IP address from udhcpd running on one of the edisons.

                 

                What is the output of "wpa_cli status" on your ad-hoc network?

                 

                Thank you for trying, but it looks like it didn't work.

                • 5. Re: Is WPA2 ad-hoc mode supported?
                  Intel_Alvarado

                  Hi,

                   

                  This is the content of my wpa_supplicant:

                  _____________________________________________________________

                  ctrl_interface=/var/run/wpa_supplicant

                  ctrl_interface_group=0

                  config_methods=virtual_push_button virtual_display push_button keypad

                  update_config=1

                  fast_reauth=1

                  device_name=Edison

                  manufacturer=Intel

                  model_name=Edison

                   

                  # use 'ap_scan=2' on all devices connected to the network

                  ap_scan=2

                   

                  network={

                  ssid="Edi-AD-HOC"

                  mode=1

                  frequency=2432

                  proto=WPA

                  key_mgmt=WPA-NONE

                  pairwise=NONE

                  group=TKIP

                  psk="Password123"

                  }

                  _____________________________________________________________

                   

                   

                  The output of my wpa_cli status

                  _____________________________________________________________

                  Selected interface 'wlan0'

                  bssid=52:10:90:87:08:75

                  ssid=Edi-AD-HOC

                  id=0

                  mode=IBSS

                  pairwise_cipher=NONE

                  group_cipher=TKIP

                  key_mgmt=UNKNOWN

                  wpa_state=COMPLETED

                  ip_address=192.168.1.101

                  p2p_device_address=fc:c2:de:32:d2:b2

                  address=fc:c2:de:32:d2:b2

                   

                  Sergio