Skip to content

network.WLAN(...).scan() on Pico W returns out of range security and hidden parameters #10017

@mrmabs

Description

@mrmabs

Hi all,

When doing wifi scans, the returned values regularly have values 5 of 7 in security, and values varying from 0 to 8 in hidden; the documentation states security should be 0-4 and hidden should be 0 or 1.

I've tried to go through the source from micropython to the cyw43 pico driver, but I'm not able to identify the issue (as I don't believe I understand the code enough to make a definitive statement). My [poorly informed] assumption is the security values aren't being translated from the CYW43 driver (CYW43_AUTH_), and maybe the hidden variable is getting overrun because it only ever appears to be set to 1 (network_cyw43_scan_cb() in extmod/network_cyw43.c), which would be hidden and should probably be 0 for visible. But neither of those assumptions completely make sense.

I have used two different firmware releases:

  • pimoroni-picow-v1.19.10-micropython
  • rp2-pico-w-20221118-unstable-v1.19.1-705-gac5934c96

I initially followed the scanning code from this website, and quoting from the website where you can see the example output shows out of range values:

import network #import required module
wlan = network.WLAN(network.STA_IF) #initialize the wlan object
wlan.active(True) #activates the wlan interface
accessPoints = wlan.scan() #perform a WiFi Access Points scan
for ap in accessPoints: #this loop prints each AP found in a single row on shell
    print(ap)

'>>> %Run -c $EDITOR_CONTENT
(b'****er-1', b'\xac\x9e\x17k\xd6@', 2, -47, 5, 5)
(b'*********G3P4', b'\xc8Z\x9f\xdc\xa47', 11, -81, 5, 3)
(b'*********TWEB', b'\xcaZ\x9f\xdc\xa47', 11, -80, 5, 2)

And this blog post also mentions unusual output values:
https://dev.webonomic.nl/scanning-network-with-the-raspberry-pi-pico-w

My end goal is to get reliable values to generate logs for wardriving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy