Setting Up Concurrent APSTA in Linux - KBA229128

Version 2

    Version: **

     

    Translation - Japanese: Liunx におけるAP-STAのコンカレント動作の設定方法について - KBA229128 - Community Translated (JA)

     

    Question:

    How do I set up concurrent APSTA in Linux-based WLAN chips?

     

    Answer:

    In order to set up concurrent Access Point (AP) and STA (Station) for WLAN chips hosted by a Linux-based system, you must first install the following utilities and drivers listed as pre-requisites before proceeding with the instructions to set up APSTA.

    Follow these steps to install APSTA in Linux-based WLAN chips:

     

    1. Configure the wpa_supplicant daemon with the credentials/details of the AP to which your STA must connect. For this, modify the wpa_suplicant.conf config file.

    >>>vi /etc/wpa_supplicant.conf

    ctrl_interface=/var/run/wpa_supplicant

    ctrl_interface_group=0

    update_config=1

     

    network={

    ssid=<YourSSID> #ssid of your AP to which the STA connects.

    psk=<YourPassphrase> #Passphrase of the AP

      }

    2. Configure the hostapd daemon with credentials/details of the AP that you want to set up.

    >>> vi /etc/hostapd.conf

    interface=wlan1

    channel=11

    ssid=<Router-Name>

    wpa=1

    wpa_passphrase=<Passphrase>

     

    #above are the major changes to made in the hostapd.conf

     

    3. Kill the wpa_supplicant daemon that is already running.

    >>>grep -aux | grep wpa_supplicant

    >>>killall wpa_supplicant

     

    4. Remove the existing interface of the supplicant.

    >>>rm -rf /var/run/wpa_supplicant/wlan0

    5. Set up the IP address of the AP and start the wpa_supplicant with the nl80211 driver.

    >>>ifconfig wlan0 192.168.1.3

    >>>wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B &

    6. Enable the network and check the status of the connection using the client application of the wpa_supplicant.

    >>>wpa_cli -p /var/run/wpa_supplicant -i wlan0 enable_network 0

    >>>wpa_cli -p /var/run/wpa_supplicant -i wlan0 status

     

    7. Start the dhcp client that needs to be leased out to an IP from your dhcp server. If your AP/router supports static, you can set up a static IP as well using ifconfig.

    >>>udhcpc -i wlan0 up

    8. Set up the AP by running the hostapd daemon with the relevant configuration file and entropy binary for 4-way handshake.

    >>>./hostapd /etc/hostapd.conf -e entropy.bin -B &