home-assistant / operating-system

:beginner: Home Assistant Operating System
Apache License 2.0
4.85k stars 967 forks source link

Intel NUC - grep: /proc/net/wireless: No such file or directory #1389

Closed andrewjswan closed 3 years ago

andrewjswan commented 3 years ago

Hardware Environment

https://ark.intel.com/content/www/us/en/ark/products/83254/intel-nuc-kit-nuc5i5ryk.html

Home Assistant OS release:

andrewjswan commented 3 years ago

image

andrewjswan commented 3 years ago

image

agners commented 3 years ago

Hm, this seems to be controlled by the kernel configuration CONFIG_WEXT_PROC. This is part of Wireless Extension, which is deprecated in the upstream kernel (see https://wireless.wiki.kernel.org/wext-statement). Not sure if its a good idea to enable this as it might get removed at one point in the future.

The recommended interface to gain information about wireless is nl80211. The iw tool has many commands to get information, e.g. iw dev wlp5s0 link has signal quality.

andrewjswan commented 3 years ago

@agners image

agners commented 3 years ago

The command in you automation is run in the Home Assistant Core container, which has a different environment. However, also there iw is not installed, so that does not work out of the box. The package is available from Alpine linux, so it would need to get added to the base container.

andrewjswan commented 3 years ago

@agners The strangest thing is that it works for others NUC, and on RPI too, or it depends on the driver WiFi card?

agners commented 3 years ago

It depends on the kernel. It seems that the Raspberry Pi has this deprecated option enabled.

andrewjswan commented 3 years ago

@agners On NUC6i3SYH this work without problem, but on my NUC5i5RYK no :(

agners commented 3 years ago

Hm, from what I can tell its not enabled in our image, so it should not work on any Intel NUC (when you use Home Assistant OS...).

However, since wireless extension is deprecated by upstream Linux, I expect this file to disappear in more and more configurations.

andrewjswan commented 3 years ago

@agners So in the current version I can not get this information? Or are there any options? :)

agners commented 3 years ago

No options currently from what I can tell.

andrewjswan commented 3 years ago

Bad news :(

andrewjswan commented 3 years ago

Is it possible to add this in the next versions?

agners commented 3 years ago

This is an open source project, we do accept PRs ;)

andrewjswan commented 3 years ago

To do PR, I need to understand what to change, unfortunately I am not an expert in this. :)

agners commented 3 years ago

This will be fixed in OS release 6.0.

andrewjswan commented 3 years ago

Thanks!