Results 1 to 10 of 10

Thread: WLAN signal strength meter through audio?

  1. #1
    Join Date
    Jun 2008
    Location
    Hessia
    Posts
    303

    Question WLAN signal strength meter through audio?

    How to convert a wireless signal strength into an audio signal?
    Does an audio WLAN strength meter exist?

    I wand to adjust a directed WLAN antenna mounted on the outside of a shed, but I cannot see the PC display inside when I am at the antenna. So it would be nice if I could get an immediate WLAN signal strength reading through a sound signal, so that I can adjust the directed antenna towards the router by listening.

    (Note: I only need this once, so a simple hack would do.)

    I want to replace my standard WLAN antenna (already mounted outside) with a directed TP-Link TL-ANT2409A 2,5GHz antenna. The normal antenna works in principle, showing less than half the signal strength bars in the knetworkmanager. However, the connection breaks down in poor weather or if video is added to a VoIP call.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,818

    Default Re: WLAN signal strength meter through audio?

    I see no technical usefull help is forthcoming the last 22 hours. Personaly I doubt such a thing exists. But couldn't yuo solve this by asking a neighbour/friend/family to help you for that once in a lifetime action? Even if you have to offer a beer in return, that seems the quickest solution to me.

    I allways though Hessen is full of nice, technical capable people (that love to help for a Maß).
    Henk van Velden

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: WLAN signal strength meter through audio?

    On 2014-01-31 13:56, STurtle wrote:
    > (Note: I only need this once, so a simple hack would do.)


    If there is a CLI command that gives signal strength as text, then it is
    doable, yes.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: WLAN signal strength meter through audio?

    On 2014-02-01 14:18, Carlos E. R. wrote:
    > On 2014-01-31 13:56, STurtle wrote:
    >> (Note: I only need this once, so a simple hack would do.)

    >
    > If there is a CLI command that gives signal strength as text, then it is
    > doable, yes.


    I see this:

    Code:
    
    > minas-tirith:~ # cat /proc/net/wireless
    > Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
    >  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
    >  wlan0: 0000   69.  -41.  -256        0      0      0      0      3        0
    > minas-tirith:~ #
    The "Quality" section looks interesting. You can concoct a script to
    separate those three values (grep for wlan0, then "cut"), and then have
    the machine read them aloud:

    Code:
    echo "69.  -41.  -256" | espeak -v en --stdin -a 20 -w tempfile
    gst123 --verbose tempfile
    This can be polished more, and run in a loop.

    :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,818

    Default Re: WLAN signal strength meter through audio?

    Quote Originally Posted by robin_listas View Post
    On 2014-02-01 14:18, Carlos E. R. wrote:


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)
    Realy nice. You earn the beer. Were it only for the suggestion.
    Henk van Velden

  6. #6
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default AW: WLAN signal strength meter through audio?

    Nice idea Carlos. Something like that avoids the tempfile
    Code:
    cat /proc/net/wireless | grep wlp2s0 | awk '{print $3}' | espeak -v en --stdin -a 20
    (wlp2s0 is my wireless, has to be replaced of course)

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: WLAN signal strength meter through audio?

    This one works for me
    Code:
    #!/bin/bash
    while :
    do
        echo "Press [CTRL+C] to stop.."
        cat /proc/net/wireless \
        | grep wlp2s0 \
        | awk '{print $3}' \
        | espeak -v de --stdin -a 20
        sleep 3
    done
    (I tested in german so espeak has here de instead of en)

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: WLAN signal strength meter through audio?

    On 2014-02-01 14:56, martin helm wrote:
    >
    > Nice idea Carlos.


    Thanks :-)

    > Something like that avoids the tempfile
    >
    > Code:
    > --------------------
    > cat /proc/net/wireless | grep wlp2s0 | awk '{print $3}' | espeak -v en --stdin -a 20
    > --------------------
    >
    > (wlp2s0 is my wireless, has to be replaced of course)


    The tempfile I use because I had at some time problems with pulseaudio
    and the volume used. I use something similar to "speak" the local time
    every half hour, from a cron job. A talking clock, you see :-)

    This I used time ago:

    Code:
    /bin/date +"%B %e, %k hours %-M minutes " | /usr/bin/festival --tts
    or this for Spanish:

    Code:
    
    > LANG=es_ES.ISO-8859-1 LC_ALL=es_ES.ISO-8859-1 /bin/date +"Es %e de %B, y son las %k horas y %-M minutos " | /usr/bin/festival --tts --language spanish
    but festival does not use pulse, and thus failed if something else was
    holding audio. Festival produces better output than espeak, but can not
    be directed (or not easily) to a file. So I used "espeak" instead:

    Code:
    .... espeak -v en --stdin -a 20
    but it had the problem of using full volume, despite the "-a" (bug at
    some time?)

    Code:
    .... espeak -v en --stdin -a 20 -w fichero.wav
    but did not work from inside cron. It needed at least
    "ALSA_CONFIG_PATH=/etc/alsa-pulse.conf", and was unreliable.

    Then I turned to generating a tempfile instead, and playing it separately:

    Code:
    paplay -v tmpfile
    This had some other problem I don't remember (it is not in my notes).
    Thus my final version was:

    Code:
    gst123 --verbose tempfile
    or rather the silent version for cronjobs.


    Long story :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  9. #9
    Join Date
    Jun 2008
    Location
    Hessia
    Posts
    303

    Cool Re: WLAN signal strength meter through audio?

    Thanks to everyone contributing to solve this! It worked perfectly fine!


    As for the reason why I asked:

    I got the idea from an old article in a German IT Journal: the article (c't 2008, german) describes the construction of a cheap directional antenna and recommended two Windows tools that conveys signal strength through an audio pitch in order to adjust the antenna. I had constructed that antenna, but the linked Windows tools did not work anymore, due to .net versions being incompatible. So I asked a friend for help indeed. That DIY-antenna worked fine up until icicles grew on it, so I decided to buy the proper directional antenna.

    However, it kept bugging me these Windows tools would not work, and that I could not find an equivalent for Linux. I hate to boot Windows, and even more so if it is pointless.

    I suspected that it ought to be easy for Linux, no need for clumsy frameworks like .net, and I simply wanted to learn how it is done. So now that the problem actually arose a second time, I eventually decided to ask about it here. So my primary true reason why I asked was learning about the possibilities of the Linux CLI along the way. I actually think that the proposed solution will come in handy for lots of other things in the future. Many thanks for the help!

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: WLAN signal strength meter through audio?

    On 2014-02-07 15:56, STurtle wrote:
    > and I wanted
    > to learn how it is done. So *my primary true reason why I asked was
    > learning about the possibilities of the Linux CLI along the way*. I
    > actually think that the proposed solution will come in handy for lots of
    > other things in the future. Many thanks for the help!


    Welcome! :-)

    The traditional Linux idea (older actually, from Unix, I think) is to
    have many small programs that do their tasks correctly. The other idea
    is that you can use them as bricks to build your house. Or like a
    Meccano building blocks.

    If you don't have an exact program that does what you want, you can
    probably chain a few of them to get it done.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •