10 Replies Latest reply on May 30, 2017 2:16 PM by Intel Corporation

    Wifi in AP mode and scanning simultaneously

    mzavatta

      Hello,

       

      I can easily play with hostapd and wpa_supplicant on wlan0 to switch from station to AP mode and back. I've also been playing with iw (compliled latest version 4.9), the output of "iw list" is:

       

      ..

      Supported interface modes:

      * IBSS

      * managed

      * AP

      * monitor

      * P2P-client

      * P2P-GO

      * P2P-device

      ..

      software interface modes (can always be added):

      valid interface combinations:

      * #{ AP } <= 1, #{ managed } <= 2, #{ P2P-client, P2P-GO } <= 2, #{ P2P-device } <= 1, #{ IBSS } <= 1,

      total <= 4, #channels <= 2

      Device supports scan flush.

      ..

       

      My use case is to be able to scan for available networks while in AP mode. I don't need to actually connect to a network as Station while in AP mode.

       

      I know it has been suggested previously that it is not supported by the chip, though questions are 2 years old, also I can find no info about this limitation in the BCM43340 datasheet.

       

      - I only need scanning, not actually connecting.

      - Maybe someone has achieved this with a different driver.

       

      Furthermore, every time I start and stop hostapd my wiphy index given by iw increments, and all virtual interfaces that I create with iw (to try to separate station and AP) get deleted, and wlan0 disabled.

       

      Any further hints?

       

      Thanks!

      Marco

        • 1. Re: Wifi in AP mode and scanning simultaneously
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Marco,

           

          Thanks for your interest in the Intel Edison Platform.

           

          If you check the WiFi guide http://download.intel.com/support/edison/sb/edison_wifi_331438001.pdf , you will find that this is not possible, because the hostapd and the wpa_supplicant can't run simultaneously. Please see the image below, so you can understand better what I'm explaining:

           

          Wifi interface.PNG

           

          Hope you find this information useful, have a nice day!

           

          Best Regards,
          -Jose P.

          • 2. Re: Wifi in AP mode and scanning simultaneously
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hi Marco,

            Do you have any more questions? Please let me know in order to assist you.

            Have a nice day! 

            Best Regards,
            -Jose P.

            • 3. Re: Wifi in AP mode and scanning simultaneously
              mzavatta

              Hello,

              Do you think it is possible to support the use case I describe above by using station simultaneously with P2P autonomous GO. Of course the GO has to be discoverable and connectable by non-P2P stations. I refer to Chapter 6.4 of the Wifi Guide.

              Thanks

              • 4. Re: Wifi in AP mode and scanning simultaneously
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi mzavatta,

                In order to establish a P2P connection with PIN mode as autonomous GO, you will need the devices to be in wpa_supplicant, so I'm not sure how you will be able to achieve your project goals.

                Could you be so kind to explain me with more detail your project design?

                We will be waiting for your reply, have a nice day! 

                Best Regards,
                -Jose P.
                 

                • 5. Re: Wifi in AP mode and scanning simultaneously
                  mzavatta

                  Thanks for your interest.

                   

                  Our application is an IoT device, the Edison will act both as a client to a cloud API, and as web server to expose a web page that allows the user to configure the device.

                   

                  Imagine you unbox the device as the customer. To be functional, the device has to reach the interenet, so you have to tell to it to which wireless network to connect to. The user would power on the device, take his laptop or mobile, scan for wifi networks, see an AP from the Edison, connect to it, open the browser and access the web page exposed by the Edison (no need to type Edison's IP address in the browser, as Edison is a "captive portal" for now), use the web page to scan available wifi network, select one, insert credentials, and connect to it.

                   

                  This means:

                  - Edison has to scan for Wifi networks while being an AP (or in any other mode in which other stations can connect to it).

                  - Ideally, the two would work simultaneously so that if the user wants to change come configuration of the device (for example change the password of the wifi network it has to connect to), it simply connects to the Edison's AP, access the web page, and change config just like while unboxing.

                   

                  (Of course this could be done through bluetooth with an app, but unfortunatley we cannot go on this direction)

                  • 6. Re: Wifi in AP mode and scanning simultaneously
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi Marco,

                    This is a great idea! I sure hope that you are able to achieve it! But like I mention in my first reply, the Edison software capabilities don't allow to run simultaneously the hostapd and the wpa_supplicant. WiFi Direct is a great way to communicate with other devices, unfortunately you will need the devices in wpa_supplicant mode, so you won't be able to use the Edison in AP mode.

                    My best advice would be to find a SoC or a microcontroller that will let you run these two applications simultaneously in order to achieve your project objectives.

                    Best Regards,
                    -Jose P.

                    • 7. Re: Wifi in AP mode and scanning simultaneously
                      mzavatta

                      Hello,

                      any chance that you can supply a build of wpa_supplicant 2.6 for the Edison?

                      The version that is included in the image is 3 years old and there has been a lot of development and fixes around p2p:

                      https://w1.fi/cgit/hostap/plain/wpa_supplicant/ChangeLog

                      Thanks

                      • 8. Re: Wifi in AP mode and scanning simultaneously
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hi Marco,

                         

                        I understand what you are trying to explain, unfortunately the latest version of wpa_supplicant in the Edison, can only be found on the Latest Yocto* Poky image Downloads for Intel® Edison Module | IoT | Intel® Software . If you are interested in acquiring a new version I would encourage to contact Broadcom since they are the creators of this firmware.

                         

                        Best Regards,
                        -Jose P.

                        • 9. Re: Wifi in AP mode and scanning simultaneously
                          mzavatta

                          I had the impression that the latest image was:

                          iot-devkit-prof-dev-image-edison-20160606

                          which reads:

                          ...

                          wpa-supplicant android-4.4.4_r2.0.1-r1

                          wpa-supplicant-cli android-4.4.4_r2.0.1-r1

                          wpa-supplicant-passphrase android-4.4.4_r2.0.1-r1

                          ...

                          which means that even though image is from 2016, wpa_supplicant is from 2014.

                          Also, I understand that Broadcom is the Wifi hardware and driver manufacturer. What Broadcom has to do with wpa_supplicant and the Intel Edison image (that is, clearly, outdated)?

                           

                          But it's probably my mistake? Is Intel planning to update the image to recent versions or just let the project go?

                          • 10. Re: Wifi in AP mode and scanning simultaneously
                            Intel Corporation
                            This message was posted on behalf of Intel Corporation

                            Hi Marco,

                            I'm sorry I didn't make myself clear, what I meant to say is that the wpa_supplicant found in the iot-devkit-prof-dev-image-edison-20160606 is the only available at the moment. Unfortunately, there are no plans to update this component.

                            We apologize for any inconvenience that this may cause.

                            Best Regards,
                            -Jose P.