This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

wlan_cu user manual, how to run it in non-interactive mode

Hi,

         Is there a user manual available for wlan_cu? How can you run it in non-interactive mode, so that I can write a script to execute commands from the script to connect perform the RF calibrarion, scan for an access point and connect to an access point?

Elvis Dowson

  • Hi Elvis, 

    Yes, You can execute the RF calibration, scan and connect to access point in non-interactive mode by writing a script.

    Firstly write a script with all the commands for RF calibration, Scan and connect then quit, change the mode of the script. Then execute the script with "./wlan_cu -s"

    ./wlan_cu -s <script_name>.sh

    Regards
    Salma

  • Is there a way to redirect the output to a file?

  • Have you tried simply redirecting to a file?  

    ./wlan_cu -s [script_name.sh] &> [output_file]
  • Yes,

    Any kind of redirection doesn't seem to work.

  • It is possible to redirect the output to a file as said in the previous post, isn't it?

    For example, to redirect scan result, what i have tried is the following command;

    ./wlan_cu -s test.sh &> scan_output

    where "test.sh" contains cli commands;

    --------------------------------------------------------------------------------------

    root@omap3evm:~/wlan# cat test.sh
    /
    c
    b
    /
    q
    root@omap3evm:~/wlan#

    --------------------------------------------------------------------------------------

    The output was redirected to the file "scan_output";

    --------------------------------------------------------------------------------------

    root@omap3evm:~/wlan# ./wlan_cu -s test.sh &> scan_output
    root@omap3evm:~/wlan#
    root@omap3evm:~/wlan# cat scan_output
    Connection established with supplicant
    \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
    .../Connection> Bssid_list, Connect, Disassociate, Status, Full_bssid_list, wPs/
    BssId List: Num=8
             MAC        Privacy Rssi  Mode    Channel    SSID
     5c.d9.98.5e.de.0e     1    -73  Infra      1        RSIndiaB
     00.24.a8.b6.b0.10     0    -75  Infra      9        Mistral-Guest-WiFi
     00.24.a8.b6.b0.11     1    -76  Infra      9        Mistral - WiFi
     00.12.17.6b.35.92     1    -56  Infra     11        Different
     00.19.07.5a.c6.80     1    -45  Infra     11        ****
     00.18.39.0e.e6.14     1    -84  Infra      6        Mistral_Wireless
     00.24.a8.b3.16.50     0    -45  Infra      6        Mistral-Guest-WiFi
     00.24.a8.b3.16.51     1    -45  Infra      6        Mistral - WiFi
    \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit

    ----------------------------------------------------------------------------------------

    Hope this helps.

    Regards,

    Sinoj

  • Thanks Sinoj,

    I didn't mention that this is on Android platform.   My output follows.....

    # pwd

    /data/jay

    # ls

    cli.sh

    stat.sh

    connect.sh

    # cat stat.sh

    c s

    /

    q

    # wlan_cu -itiwlan0 -s /data/jay/stat.sh &> out

    # Connection established with supplicant

    .../Connection> Bssid_list, Connect, Disassociate, Status, Full_bssid_list, wPs/

    ==========================

    Status   : DISCONNECT

    MAC      : f8.7b.7a.7b.b7.9b

    SSID     : <empty>

    BSSID    : 00.00.00.00.00.00

    Channel  : <empty>

    ==========================

    \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit

    /

    /: permission denied

    [1]   Done                    wlan_cu -itiwlan0 -s /data/jay/stat.sh

    # ls

    out

    cli.sh

    stat.sh

    connect.sh

    # cat out

    #
    The file is created but empty and the output still goes to screen.

  • Jay,

    Sorry i do not have a command for Android file system. You may need to look at "http://developer.android.com/guide/developing/tools/logcat.html" to find a way to redirect "stdout" and "stderr" to a file.

    Sinoj

  • Thanks Sinoj,

    Was playing with setprop before.  Will give it a revisit.