You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wifichecker should only be active when WiFi dongle found #50
The WiFi checker tries to activate wlan0 and prints errors when no WiFi module has been plugged in.
It would be better to check for the existance of the module and just exit silently when it cannot be found. Trying to do things against wlan0 when the module is not plugged in is silly.
Error in stderr:
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Cannot find device "wlan0"
changed the title [-]make Wifichecker only active when WiFi dongle found[/-][+]wifichecker should only be active when WiFi dongle found[/+]on Mar 10, 2015
This is already the method by which you check to see if its plugged in - it appropriately logs an error, and quits. Would you rather just have it redirect the error message to /dev/null ?
It's possible to check via other methods, but it requires you knowing what the specific wifi card name is. For example, checking to see if a wifi card is connected by running lspci or lsusb would yield something like this;
Bus 005 Device 009: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card
We could make some educated guesses by searching for 'Wireless' or other keywords, but couldn't guarantee we could find all cards. By attempting to set wlan up, that already is the command that checks to see if it is connected and, if not present, returns that error. While it is good to have those errors in the logs for troubleshooting, we can just suppress it if you prefer. I think I fall on the side of leaving the error messsage in.
Perhaps a middleground would be a custom one-line error message instead?
Use case just reported in the channel - the wlan0 error popped up, and led the user to determine that he had set the wrong IP address - by suppressing this error message, it likely would have taken a lot longer to determine the actual error
Activity
[-]make Wifichecker only active when WiFi dongle found[/-][+]wifichecker should only be active when WiFi dongle found[/+]vanosg commentedon Mar 27, 2015
This is already the method by which you check to see if its plugged in - it appropriately logs an error, and quits. Would you rather just have it redirect the error message to /dev/null ?
It's possible to check via other methods, but it requires you knowing what the specific wifi card name is. For example, checking to see if a wifi card is connected by running lspci or lsusb would yield something like this;
Bus 005 Device 009: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card
We could make some educated guesses by searching for 'Wireless' or other keywords, but couldn't guarantee we could find all cards. By attempting to set wlan up, that already is the command that checks to see if it is connected and, if not present, returns that error. While it is good to have those errors in the logs for troubleshooting, we can just suppress it if you prefer. I think I fall on the side of leaving the error messsage in.
Perhaps a middleground would be a custom one-line error message instead?
vanosg commentedon Apr 3, 2015
Use case just reported in the channel - the wlan0 error popped up, and led the user to determine that he had set the wrong IP address - by suppressing this error message, it likely would have taken a lot longer to determine the actual error
m-mcgowan commentedon Apr 14, 2015
Related - https://community.brewpi.com/t/set-up-ethernet-connection-rather-than-wifi/420