-
Notifications
You must be signed in to change notification settings - Fork 134
get_wifi_info() does not attempt to activate wifi - Mac OS 10.6 #20
Comments
Changing the function get_wifi_info() to enable wifi if it is off seems to fix it ... I think prey should detect the wifi state and then return it to this state after completing any scans etc. Here is my changed function. get_wifi_info() { |
Added to my fork… …but I'm too stupid to add a commit message ! |
Merged! Closing... |
Sorry Tomas, you need to pull again, I reviewed it and it broke. There were too many arguments for the if statement and the test for nonzero (-n) was backwards, it needs to be a test for zero (-z). Sorry |
I believe we're done with this (on 0.4.4), are we not? |
This is in 0.4.4 but I tried testing on a new install of OSX & I couldn't get a connection to work when my access point was set to no security. I think I need to create a new access point & run some more tests. |
Any news drew? We're about to pack a new release so it would be great to make sure this bug is out. |
Tomas, The 0.4.4 release is correct with the -z test. Cheers, |
The get_wifi_info function (in platform/mac/functions) either returns information from the scanner utility - (/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I)
or it returns nothing for the $wifi_points variable. The geo module uses $wifi_points to get the location, but if $wifi_points is empty it makes no attempt to activate wifi.
Wouldn't it make sense to turn airport on if the scanner returns an 'Off' status? Then recheck the status & only return an empty value for $wifi_points if that scan fails.
The text was updated successfully, but these errors were encountered: