Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years ago.
GR-PEACH BP3595 WiFi Sniffer
We'd like to use the GR-PEACH along with the ROHM BP3595 WiFi module to build a WiFi sniffer that will gives us all the MAC addresses in range, along with their RSSI.
I don't see any supported libraries that do this, and I've not even been able to even find a programming manual for the ROHM module. We can use any WiFI device, a USB device would work fine if it had a supported mbed library.
Any pointers or ideas are appreciated. We're on a short fuse, thus the need to find something that's already mostly supported.
Ed
1 Answer
8 years ago.
When the "scan()" function added in mbed OS 5.2 is used, the following information can be acquired. BSSID will be usually the same one as the MAC address.
- SSID
- BSSID
- Security
- RSSI
- Channel
Sample program
You can try with the following program.
[Repository '/teams/Renesas/code/GR-PEACH_WebCamera/' not found]
Using WiFi BP3595 (Set to "NETWORK_TYPE=1" and "SCAN_NETWORK=1")
https://developer.mbed.org/teams/Renesas/code/GR-PEACH_WebCamera/wiki/Homepage#using-wifi-bp3595
Relevant parts excerpt
main.cpp (relevant parts excerpt)
static void scan_network(void) { int num; int i; int select_no; bool loop_break; char ch; char pass[64]; const uint8_t *wk_p; WiFiAccessPoint point[8]; while (1) { printf("scan...\n"); num = network.scan(point, 8); for (i = 0; i < num; i++) { printf(" No.%d\n", i); printf(" ssid :%s\n", point[i].get_ssid()); wk_p = point[i].get_bssid(); printf(" bssid :0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x\n", wk_p[0],wk_p[1],wk_p[2],wk_p[3],wk_p[4],wk_p[5]); printf(" security:"); switch (point[i].get_security()) { case NSAPI_SECURITY_NONE: printf("NONE\n"); break; case NSAPI_SECURITY_WPA: printf("WPA\n"); break; case NSAPI_SECURITY_WPA2: printf("WPA2\n"); break; case NSAPI_SECURITY_WPA_WPA2: printf("WPA_WPA2\n"); break; case NSAPI_SECURITY_UNKNOWN: default: printf("UNKNOWN\n"); break; } printf(" rssi :%d\n", point[i].get_rssi()); printf(" channel :%d\n", point[i].get_channel()); } ...omit... } } #endif
Reference information
Software development specs of BP3595 Japanese
https://developer.mbed.org/teams/Rohm/wiki/Datasheet