Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noisy logs when wifi not configured in config.exs #92

Open
axelson opened this issue Nov 9, 2021 · 0 comments
Open

Noisy logs when wifi not configured in config.exs #92

axelson opened this issue Nov 9, 2021 · 0 comments

Comments

@axelson
Copy link
Contributor

axelson commented Nov 9, 2021

Describe the bug
vintage_net_wifi generates noisy logs even when not configured for wifi

To Reproduce
Steps to reproduce the behavior:

  1. Run a project that does not configures VintageNetWifi in config.exs
  2. Connect to the device via ssh
  3. Run RingLogger.attach
  4. Every 5 seconds or so you get the following 4 log messages
07:41:59.148 [info]  WPASupplicant ignoring {:event, "WPS-AP-AVAILABLE"}
07:41:59.169 [debug] wpa_supplicant: wlan0: Failed to initiate sched scan
07:41:59.170 [info]  wpa_supplicant(wlan0): Failed to initiate sched scan
07:41:59.172 [info]  WPASupplicant ignoring {:event, "CTRL-EVENT-NETWORK-NOT-FOUND"}
07:42:04.678 [info]  WPASupplicant ignoring {:event, "WPS-AP-AVAILABLE"}
07:42:04.699 [debug] wpa_supplicant: wlan0: Failed to initiate sched scan
07:42:04.701 [info]  wpa_supplicant(wlan0): Failed to initiate sched scan
07:42:04.702 [info]  WPASupplicant ignoring {:event, "CTRL-EVENT-NETWORK-NOT-FOUND"}

Expected behavior
Instead I'd expect it to not log or try to connect

VintageNet Info

Output of VintageNet.info (please hide any sensitive information like WiFi PSKs)

iex([email protected])7> VintageNet.info
VintageNet 0.11.2

All interfaces:       ["lo", "usb0", "wlan0"]
Available interfaces: []

Interface usb0
  Type: VintageNetDirect
  Present: true
  State: :configured (0:10:15)
  Connection: :lan (0:10:15)
  Addresses: fe80::bc84:e0ff:fe43:5c57/64, 172.31.219.153/30
  Configuration:
    %{type: VintageNetDirect}

Interface wlan0
  Type: VintageNet.Technology.Null
  Present: true
  State: :configured (0:10:16)
  Connection: :disconnected (0:10:16)
  Configuration:
    %{type: VintageNet.Technology.Null}

Note: this was take after running VintageNet.deconfigure

Environment

  • Nerves environment: (mix nerves.env --info)
mix nerves.env --info jason@jdesktop ~/d/inky_impression_livebook (impression-initial)> mix nerves.env --info ==> nerves ==> nerves_livebook |nerves_bootstrap| Environment Package List

Pkg: nerves_toolchain_armv6_nerves_linux_gnueabihf
Vsn: 1.4.3
Type: toolchain
BuildRunner: {Nerves.Artifact.BuildRunners.Local, []}

Pkg: nerves_toolchain_ctng
Vsn: 1.8.4
Type: toolchain_platform
BuildRunner: {nil, []}

Pkg: nerves_system_rpi0
Vsn: 1.17.1
Type: system
BuildRunner: {Nerves.Artifact.BuildRunners.Local, [make_args: ["source", "all", "legal-info"]]}

Pkg: nerves_system_br
Vsn: 1.17.1
Type: system_platform
BuildRunner: {nil, []}

|nerves_bootstrap| Loadpaths Start

Nerves environment
MIX_TARGET: rpi0
MIX_ENV: dev

|nerves_bootstrap| Environment Variable List
target: rpi0
toolchain: /home/jason/.local/share/nerves/artifacts/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-1.4.3
system: /home/jason/.local/share/nerves/artifacts/nerves_system_rpi0-portable-1.17.1
app: .

|nerves_bootstrap| Loadpaths End

* Additional information about your host, target hardware or environment that might help: * Running on a raspberry pi 0, code is at https://github.com/axelson/inky_impression_livebook/tree/bf0240dc20f454d713138ed62770b82889dc2928

Note: originally I was going to report this as vintage_net_wifi trying to connect even when not configured but now I'm not able to reproduce that anymore (I doubt that `VintageNet.deconfigure persists). Of course now after rebooting I'm not able to reproduce it anymore!

Okay, after actually reading the VintageNet.configure docs (and checking in the code), it turns out that VintageNet.deconfigure actually persists, which totally caught me off guard. So I guess this issue should actually be about not trying to scan when not "configured". I'm using configured here to refer to the configuration files (e.g. config.exs), not VintageNet's definition of "configured".

@axelson axelson changed the title Noisy logs lots of connections errors when not configured for wifi Noisy logs when wifi not configured in config.exs Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant