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
Request for Help with Implementing MAC Filter on ESP8266 in AP Mode using Arduino Platform(PlatformIO) #9162
I am working on a project using the ESP8266 and need to implement a MAC filter in Access Point (AP) mode. I am using the Arduino platform(PlatformIO) for programming and require your assistance.
My main issue is how to define a list of allowed MAC addresses and disconnect a client if its MAC address is not on the allowed list.
I have tried several different codes so far, but it seems that some of these codes do not work correctly. For example, the code that was previously suggested to me:
void wifi_station_deauth(uint8_t *bssid) {
struct auth_deauth_frame {
uint16_t frame_control;
uint16_t duration;
uint8_t da[6];
uint8_t sa[6];
uint8_t bssid[6];
uint16_t seq_ctrl;
uint16_t reason_code;
} attribute((packed));
This code does not disconnect clients whose MAC addresses are not on the allowed list. I have been using standard Arduino library functions as well as lower-level SDK functions, but I have not been able to resolve the issue.
Has anyone had a similar experience or can provide a comprehensive guide for creating an effective MAC filter on the ESP8266? Any sample code or suggestions in this regard would be greatly appreciated.
Activity
enjoyneering commentedon Jul 11, 2024
Hi,
I'm not a C/C++ expert, but I read that it is not recommended to use pointers with packed structures.
SajjadQadri commentedon Jul 13, 2024
hi enjoyneering
So what is your suggestion?