• iwlist dies with toomany access points.

    From William Unruh@2:250/1 to All on Fri Jul 19 21:58:50 2019
    iwlist, which is used in Mageia, and in wicd, has a severe disability--
    namely if there are too many access points like more than 200 or so, it
    reports nothing. This means that on Mageia, the networking simply does
    not work when there are too may. Thus, DeGalle airport, Taipei airport, Heathrow airport, the Radcliffe hospitel in Oxford, and sometimes the
    physics dept at Univ of BC ( and probably other universities) are
    unuseble for any wireless program that uses iwlist.
    iw does work ( with at least up to 500 access points-- I have not found
    a location with more than that many APs.
    And this is becoming more and more of a problem since many people have
    set up their phones to act as access points.


    But sureley others have run into this limitation on other programs as
    well.

    Does Network Manager use iwlist to find the access points? Does it cease
    to work in the case of some of the above locations?

    How have others gotten around this limitation of iwlist? Or is there
    some way of upping the number of APs that iwlist can handle? If so, how?

    I cannot believe that I am the only one in the world that has run into
    this limitation.


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From HASM@2:250/1 to All on Fri Jul 19 22:32:00 2019

    iwlist, which is used in Mageia, and in wicd, has a severe disability-- namely if there are too many access points like more than 200 or so, it reports nothing.

    Yes, one is not supposed to used iwlist anymore. Instead of, e,g,
    iwlist wlan0
    use
    iw dev wlan0 scan

    It should work for all cards that support nl80211, for older ones that
    don't, you're stuck with iwlist and you may need to rebuild it with
    this patch:
    http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/wireless_tools.html

    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sat Jul 20 09:48:26 2019
    On 2019-07-19, HASM <hasm@example.invalid> wrote:

    iwlist, which is used in Mageia, and in wicd, has a severe disability--
    namely if there are too many access points like more than 200 or so, it
    reports nothing.

    Yes, one is not supposed to used iwlist anymore. Instead of, e,g,
    iwlist wlan0
    use
    iw dev wlan0 scan

    iw has a totally diffeent output from iwlist, and is NOT a replacement
    for iwlist. They also have for over 10 years had a disclaimer that you
    are not to assume that iw is at all usefull for scripting as they retain
    the right to totally change the output without a by-your-leave. And as
    far as i can see, no user useful wireless program uses iw, rather than
    iwlist. (Please tell me I am wrong if I am and which one uses iw).



    It should work for all cards that support nl80211, for older ones that
    don't, you're stuck with iwlist and you may need to rebuild it with
    this patch:
    http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/wireless_tools.html

    Thanks a lot for the pointer to this patch.

    Unfortunately it does not work. The newer iwlist.c (I have version 30
    for wireless-tools) already includes this
    patch, but iwlist still does NOT print out the list of APs it has found
    before it ran out of room. Ie, the claim that this patch solves the
    problem is false.





    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Jul 20 14:16:07 2019
    On Sat, 20 Jul 2019 08:48:26 -0000 (UTC), William Unruh wrote:

    iw has a totally diffeent output from iwlist, and is NOT a replacement
    for iwlist. They also have for over 10 years had a disclaimer that you
    are not to assume that iw is at all usefull for scripting as they retain
    the right to totally change the output without a by-your-leave.

    There is really no problem when a designer makes that claim.
    Take python for example, seems every release causes package maintainers
    to go in and make changes to run with new release.

    It is just a fair warning to anyone wanting to use it in their
    networking tools.

    I did a quick glance at iw output and is should be easy to create
    a case statement to parse the output and provide a selection list.

    As I see it, you need to write a iw roaming script, to use ip to bring up
    your wireless device, parse iw output, present you a menu of results,
    get your selection, and get wpa_supplicant to get you connected.

    Heheheh, I was looking at my enable_nic script I use to set the wifi
    connection with my neighbor and knowing how much you like systemd,
    I had to smile when checking my code header which has a few research
    links used to get wpa_supplicant to work for me.

    go ahead and google
    systemd wireless roaming


    When I get some time, I will have get back to this script and convert
    it to systemd.

    I have already converted my wired nic over to systemd-networkd service.

    As I type this, it seems easy to create a systemd network file, use your
    iw roaming script to get a selection, create the wpa_supplicant
    configuration information and do a "ip link set wlp2s0 up"

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From HASM@2:250/1 to All on Sat Jul 20 15:45:32 2019

    iw has a totally diffeent output from iwlist, and is NOT a replacement
    for iwlist.

    Maybe, but it's scan command overcomes iwlist's limitation of the number
    of access points.

    I'm not advocating one or the other, and don't know the history behind
    either, but wireless-tools, of which iwlist is a part of, hasn't been
    updated since 2007, while iw seems to have recent changes.

    They also have for over 10 years had a disclaimer that you are not to
    assume that iw is at all usefull for scripting as they retain the
    right to totally change the output

    But have they? (I don't know the answer). You can always download the
    source, recompile it, rename it or tuck it away in some non default
    place, then use it for your scripts.

    And as far as i can see, no user useful wireless program uses iw,
    rather than iwlist. (Please tell me I am wrong if I am and which one
    uses iw).

    On my Fedora system
    /etc/sysconfig/network-scripts/ifup-wireless
    /etc/sysconfig/network-scripts/network-functions
    use iw, while
    /etc/sysconfig/network-scripts/ifdown-eth
    uses iwconfig :-). Not for listing, though.

    I don't run NetworkManager to give it a try (or maybe I do in an old
    laptop that isn't accessible now). If you do you could try

    nmcli dev wifi list

    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sat Jul 20 16:38:51 2019
    On 2019-07-20, HASM <hasm@example.invalid> wrote:

    iw has a totally diffeent output from iwlist, and is NOT a replacement
    for iwlist.

    Maybe, but it's scan command overcomes iwlist's limitation of the number
    of access points.

    Yes, it does. I know that. That is how I dicovered that when iwlist
    gives nothing at all, it is because there are over 200 access points (as
    seen by iw)


    I'm not advocating one or the other, and don't know the history behind either, but wireless-tools, of which iwlist is a part of, hasn't been
    updated since 2007, while iw seems to have recent changes.

    Actually not correct, but also not too far out.
    -rw-r----- 1 unruh unruh 62089 Nov 24 2009 iwlist.c



    They also have for over 10 years had a disclaimer that you are not to
    assume that iw is at all usefull for scripting as they retain the
    right to totally change the output

    But have they? (I don't know the answer). You can always download the source, recompile it, rename it or tuck it away in some non default
    place, then use it for your scripts.

    It is the distributions that need to use it for their scripts (Network
    Center, Network Manager, wicd,.....)



    And as far as i can see, no user useful wireless program uses iw,
    rather than iwlist. (Please tell me I am wrong if I am and which one
    uses iw).

    On my Fedora system
    /etc/sysconfig/network-scripts/ifup-wireless

    It uses iwlist I believe if it uses any listing function, which I do not
    think it does..

    /etc/sysconfig/network-scripts/network-functions
    use iw, while
    /etc/sysconfig/network-scripts/ifdown-eth
    uses iwconfig :-). Not for listing, though.

    I don't run NetworkManager to give it a try (or maybe I do in an old
    laptop that isn't accessible now). If you do you could try

    nmcli dev wifi list

    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From HASM@2:250/1 to All on Sun Jul 21 18:01:40 2019
    William Unruh <unruh@invalid.ca> writes:


    but wireless-tools, of which iwlist is a part of, hasn't been
    updated since 2007, while iw seems to have recent changes.

    Actually not correct, but also not too far out.
    -rw-r----- 1 unruh unruh 62089 Nov 24 2009 iwlist.c

    Fedora ships v29, the last official release, which is from 2007. Ubuntu
    ships v30-beta, from 2009, which never became official.

    This page sums it up:


    https://unix.stackexchange.com/questions/407517/why-did-wireless-tools-version- 30-become-a-permanent-beta

    Curiously, one of the comments to the first answer claims:

    The reason Ubuntu (and pretty much all distros I know of) provide
    version 30 beta is because that version fixes a critical bug that was
    in version 29, which caused the iwconfig to fail if there were too
    many networks in the area due to a buffer overflow. The Github repo
    for wireless tools does not show this, but here's the relevant patch
    from Arch

    Thus they claim that fixes your problem, though I guess it does not.

    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sun Jul 21 20:28:28 2019
    On 2019-07-21, HASM <hasm@example.invalid> wrote:
    William Unruh <unruh@invalid.ca> writes:


    but wireless-tools, of which iwlist is a part of, hasn't been
    updated since 2007, while iw seems to have recent changes.

    Actually not correct, but also not too far out.
    -rw-r----- 1 unruh unruh 62089 Nov 24 2009 iwlist.c

    Fedora ships v29, the last official release, which is from 2007. Ubuntu ships v30-beta, from 2009, which never became official.

    This page sums it up:


    https://unix.stackexchange.com/questions/407517/why-did-wireless-tools-version- 30-become-a-permanent-beta

    Curiously, one of the comments to the first answer claims:

    The reason Ubuntu (and pretty much all distros I know of) provide
    version 30 beta is because that version fixes a critical bug that was
    in version 29, which caused the iwconfig to fail if there were too
    many networks in the area due to a buffer overflow. The Github repo
    for wireless tools does not show this, but here's the relevant patch
    from Arch

    Thus they claim that fixes your problem, though I guess it does not.


    wireless-tools-30-0.pre9.10.mga6

    The source code shows the test for buffer length which is in those
    patches. But iwlist scan shows nothing if there are too many APs.



    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Mon Jul 22 20:13:56 2019
    On 2019-07-21, HASM <hasm@example.invalid> wrote:
    William Unruh <unruh@invalid.ca> writes:


    but wireless-tools, of which iwlist is a part of, hasn't been
    updated since 2007, while iw seems to have recent changes.

    Actually not correct, but also not too far out.
    -rw-r----- 1 unruh unruh 62089 Nov 24 2009 iwlist.c

    Fedora ships v29, the last official release, which is from 2007. Ubuntu ships v30-beta, from 2009, which never became official.

    This page sums it up:


    https://unix.stackexchange.com/questions/407517/why-did-wireless-tools-version- 30-become-a-permanent-beta

    Curiously, one of the comments to the first answer claims:

    The reason Ubuntu (and pretty much all distros I know of) provide
    version 30 beta is because that version fixes a critical bug that was
    in version 29, which caused the iwconfig to fail if there were too
    many networks in the area due to a buffer overflow. The Github repo
    for wireless tools does not show this, but here's the relevant patch
    from Arch

    Thus they claim that fixes your problem, though I guess it does not.

    So the problem that this seems to fix is that of the buffer overflow (or
    at least the buffer length be larer than the max length that the integer (short) the buffer can be be shorter than the buffer length). However
    it would seem that if the ioctl need a longer buffer that 65535 then
    wither it puts nothing into the buffer or iwlist prints nothing out. I
    am not sure which it is. What would seem sensible is if the ioctl filled
    up the buffer with as much as it can, and iwlist printed it out. You
    would loose some of the output, but you would still get a lot of APs
    listed.

    Does anyone know which it is? Ie, is the buffer full of information and
    iwlist just does not print it out, or is that that the buffer is
    actually empty, because the ioctl refused to put in any information.
    Now, what I am using is ctl80211 and mac80211 (not the old Wireless
    extention) modules. Is it they that are misbehaving?



    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From HASM@2:250/1 to All on Mon Jul 22 23:11:18 2019

    Does anyone know which it is? Ie, is the buffer full of information and iwlist just does not print it out, or is that that the buffer is
    actually empty, because the ioctl refused to put in any information.

    I faced this problem twice, same place, at a relative's apartment, back
    in Europe. Can't remember whether I applied the patch the first time,
    but the second time I'm sure I used iw. Not even sure where to go
    around "here" to even test this.

    Now, what I am using is ctl80211 and mac80211 (not the old Wireless extention) modules. Is it they that are misbehaving?

    Or this.

    -- HASM

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)