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

Examples->LWiFi->ScanNetworks won't print specific AP if the BSSID starts with 0x00 #71

Closed
AcSiPCCW opened this issue Nov 28, 2017 · 1 comment
Assignees
Labels

Comments

@AcSiPCCW
Copy link

In ard_mtk.c, get_scan_list()
strlen((char*)ptr->bssid) would be zero if the BSSID starts with 0x00.

@pablosun pablosun self-assigned this Nov 28, 2017
@pablosun pablosun added the bug label Nov 28, 2017
@pablosun
Copy link
Contributor

pablosun commented Nov 28, 2017

Looks like a typo bug: the intention of the check should be checking the ssid instead of the bssid, as the BSSID is of fixed-length and should never be treated as text strings.

// BUG: why check bssid when we're only dealing with ssid???
if (strlen((char*)ptr->bssid) != 0 && ssid_checkout((char*)ptr->ssid, i)) {
    Rssi[i] = ptr->rssi;
    memcpy(Ssid[i], ptr->ssid, ptr->ssid_length);
    Encr[i] = (uint8_t)ptr->encrypt_type;
    ++i;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants