DioxusLabs / example-projects

Featured Dioxus projects on how to build clean user interfaces in Rust
486 stars 64 forks source link

Wifi Scanner: no networks found on Ubuntu #10

Open rMazeiks opened 1 year ago

rMazeiks commented 1 year ago

When running the wifi scanner example on Ubuntu, it shows "no networks found" despite there being available Wifi connections according to the OS.

Steps to reproduce:

Expected: A list of available Wifi connections

Actual result: "No networks found. Try scanning"

Busyvar commented 1 year ago

Problem experienced also on Archlinux x64. From what i saw, wifiscanner::scan() returns an empty array, so the problem might be upstream.

Busyvar commented 1 year ago

After checking original implementation of wifiscanner it seems the package rely on iw for wifi scan on linux. iw require root permission to execute. @rMazeiks try to run the application as root, it fixed the issue on my side.

rMazeiks commented 1 year ago

Thanks for the heads up! Indeed, it appears to only work if run with sudo. The issue may be closed, though it would be nice to mention this limitation in the Readme.