initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2015 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <platform_opts.h>
|
||||
#include <wifi_mac_monitor/example_wifi_mac_monitor.h>
|
||||
#include <platform/platform_stdlib.h>
|
||||
|
||||
typedef int (*mac_monitor_ptr)(unsigned char *phone_macaddr,char real_rssi);
|
||||
extern mac_monitor_ptr mac_monitor_callback;
|
||||
|
||||
int get_station_mac(unsigned char *sta_mac,char rssi)
|
||||
{
|
||||
printf("\n\r%s: %02x:%02x:%02x:%02x:%02x:%02x, Rssi = %d\n",__func__,*(sta_mac)\
|
||||
,*(sta_mac+1),*(sta_mac+2),*(sta_mac+3),*(sta_mac+4),*(sta_mac+5),rssi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void example_wifi_mac_monitor(void)
|
||||
{
|
||||
mac_monitor_callback = get_station_mac;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef __EXAMPLE_WIFI_MAC_MONITOR_H__
|
||||
#define __EXAMPLE_WIFI_MAC_MONITOR_H__
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2015 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void example_wifi_mac_monitor(void);
|
||||
int get_station_mac(unsigned char *sta_mac,char rssi);
|
||||
|
||||
#endif //#ifndef __EXAMPLE_WIFI_MAC_MONITOR_H__
|
||||
12
lib/amb1_sdk/common/example/wifi_mac_monitor/readme.txt
Normal file
12
lib/amb1_sdk/common/example/wifi_mac_monitor/readme.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
WIFI MAC MONITOR EXAMPLE
|
||||
|
||||
Description:
|
||||
Get station mac information in AP mode
|
||||
|
||||
Configuration:
|
||||
[platform_opts.h]
|
||||
#define CONFIG_EXAMPLE_WIFI_MAC_MONITOR 1
|
||||
|
||||
Execution:
|
||||
When define CONFIG_EXAMPLE_WIFI_MAC_MONITOR, the callback function is automatically registered as get_station_mac().
|
||||
It can collect the station mac address and rssi.
|
||||
Reference in New Issue
Block a user