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

WPS-ENROLLEE-SEEN causes confusion (log spam) #7

Open
zxdavb opened this issue Oct 4, 2018 · 3 comments
Open

WPS-ENROLLEE-SEEN causes confusion (log spam) #7

zxdavb opened this issue Oct 4, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@zxdavb
Copy link

zxdavb commented Oct 4, 2018

Thanks for your work.

I was getting WPS-ENROLLEE-SEEN events, and it has more than three parameters, causing errors in the system log.

When I looked at https://w1.fi/wpa_supplicant/devel/ctrl_iface_page.html, it seems all Control interface events have: iface msg, but after that it varies, so it may be better to reverse the logic a bit to reduce errors in favour of warnings (or just ignore?).

function push_event {
    logger -t $0 -p debug "push_event $@"

#   iface=$1
    msg=$2

    config_get hass_timeout_conn global timeout_conn
    config_get hass_timeout_disc global timeout_disc

    case $msg in 
        "AP-STA-CONNECTED")
            timeout=$hass_timeout_conn
            ;;
        "AP-STA-POLL-OK")
            timeout=$hass_timeout_conn
            ;;
        "AP-STA-DISCONNECTED")
            timeout=$hass_timeout_disc
            ;;
        *)
            logger -t $0 -p warning "push_event '$msg' not handled"
            return
            ;;
    esac

    if [ "$#" -lt 3 ]; then
        err_msg "Illegal number of push_event parameters"
        exit 1
    fi

    mac=$3

    post $(build_payload "$mac" "$(get_host_name $mac)" "$timeout")
}

IMO, you can get rid of the if block altogether? And maybe the warning too?

@zxdavb zxdavb changed the title WPS-ENROLLEE-SEEN causes confusion WPS-ENROLLEE-SEEN causes confusion (log spam) Oct 4, 2018
@zxdavb
Copy link
Author

zxdavb commented Oct 4, 2018

This may be of interest to you:

Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:40 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:41 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:41 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]
Fri Oct  5 00:35:41 2018 user.debug /usr/lib/hass/push_event.sh: push_event wlan1 WPS-ENROLLEE-SEEN 20:47:ed:55:f5:a6 8ff510a9-df20-d88d-614e-d7bd47f50bae 0-00000000-0 0x268c 0 1 [Sky Q box]

This device is not in my house. :(

@mueslo mueslo added the bug Something isn't working label Oct 5, 2018
@mueslo
Copy link
Owner

mueslo commented Oct 5, 2018

Thanks for the input, I left that as a warning from back when I was investigating all the hostapd events which would be useful for monitoring presence, it should of course be debug. I'll get on it after the week-end.

What do you mean by "this device is not in my house"?

@zxdavb
Copy link
Author

zxdavb commented Oct 6, 2018

What do you mean by "this device is not in my house"?

The device is next door, I guess (it is not one of my own wifi-enabled devices). In fact, there are several such devices appearing in the log, all with WPS-ENROLLEE-SEEN.

The real question is: why are these devices puzzling my WiFi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants