Compare commits

...

15 Commits

Author SHA1 Message Date
Just Call Me Koko
8ef5cf3b92 Merge pull request #1015 from justcallmekoko/develop
Faster display buffer
2025-12-13 14:48:34 -05:00
Just Call Me Koko
b3eade1e06 Faster display buffer 2025-12-13 14:43:08 -05:00
Just Call Me Koko
1dd5502c1d Merge pull request #1012 from justcallmekoko/develop
Fix crash during BT wardrive
2025-12-12 18:11:10 -05:00
Just Call Me Koko
1862a5b812 Fix crash during BT wardrive 2025-12-12 18:06:07 -05:00
Just Call Me Koko
f5375eedaf Merge pull request #1006 from justcallmekoko/develop
Wardriving is asynchronous now
2025-12-08 16:45:31 -05:00
Just Call Me Koko
2910addb8a Ensure async wardrive 2025-12-08 16:32:25 -05:00
Just Call Me Koko
be3971d081 Wardriving is async 2025-12-08 15:40:24 -05:00
Just Call Me Koko
86e2fb206a Merge pull request #1005 from justcallmekoko/develop
Add wifi to flock wardrive
2025-12-08 15:10:53 -05:00
Just Call Me Koko
431fa175a0 Update WiFiScan.cpp 2025-12-08 15:04:09 -05:00
Just Call Me Koko
976687980c Add wifi to flock wardrive 2025-12-08 14:53:55 -05:00
Just Call Me Koko
1d419605f7 Merge pull request #1001 from justcallmekoko/develop
Fix menu navigation for back button
2025-12-04 18:36:50 -05:00
Just Call Me Koko
1624d98183 Fix menu navigation for back button 2025-12-04 18:12:28 -05:00
Just Call Me Koko
dfd556da30 Merge pull request #999 from justcallmekoko/develop
Update NimBLE version in actions
2025-12-02 01:09:42 -05:00
Just Call Me Koko
9681076542 Update C5 FBQN 2025-12-02 01:00:16 -05:00
Just Call Me Koko
86d35cba6a Update NimBLE version in actions 2025-12-02 00:49:20 -05:00
5 changed files with 163 additions and 37 deletions

View File

@@ -36,7 +36,7 @@ jobs:
- { name: "Marauder CYD 3.5inch", flag: "MARAUDER_CYD_3_5_INCH", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "cyd_3_5_inch", tft: true, tft_file: "User_Setup_cyd_3_5_inch.h", build_dir: "d32", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "Marauder v7.1", flag: "MARAUDER_V7_1", fbqn: "esp32:esp32:dfrobot_firebeetle2_esp32e:FlashSize=16M,PartitionScheme=min_spiffs,PSRAM=enabled", file_name: "marauder_v7_1", tft: true, tft_file: "User_Setup_dual_nrf24.h", build_dir: "dfrobot_firebeetle2_esp32e", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "M5Cardputer", flag: "MARAUDER_CARDPUTER", fbqn: "esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=disabled", file_name: "m5cardputer", tft: true, tft_file: "User_Setup_marauder_m5cardputer.h", build_dir: "esp32s3", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "ESP32-C5-DevKitC-1", flag: "MARAUDER_C5", fbqn: "esp32:esp32:esp32c5:PartitionScheme=min_spiffs", file_name: "esp32c5devkitc1", tft: false, tft_file: "", build_dir: "esp32c5", addr: "0x2000", idf_ver: "3.3.4", nimble_ver: "2.3.0", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "ESP32-C5-DevKitC-1", flag: "MARAUDER_C5", fbqn: "esp32:esp32:esp32c5:FlashSize=8M,PartitionScheme=min_spiffs,PSRAM=enabled", file_name: "esp32c5devkitc1", tft: false, tft_file: "", build_dir: "esp32c5", addr: "0x2000", idf_ver: "3.3.4", nimble_ver: "2.3.6", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
steps:
- name: Checkout Code

View File

@@ -85,7 +85,7 @@ jobs:
- { name: "Marauder CYD 3.5inch", flag: "MARAUDER_CYD_3_5_INCH", fbqn: "esp32:esp32:d32:PartitionScheme=min_spiffs", file_name: "cyd_3_5_inch", tft: true, tft_file: "User_Setup_cyd_3_5_inch.h", build_dir: "d32", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "Marauder v7.1", flag: "MARAUDER_V7_1", fbqn: "esp32:esp32:dfrobot_firebeetle2_esp32e:FlashSize=16M,PartitionScheme=min_spiffs,PSRAM=enabled", file_name: "marauder_v7_1", tft: true, tft_file: "User_Setup_dual_nrf24.h", build_dir: "dfrobot_firebeetle2_esp32e", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "M5Cardputer", flag: "MARAUDER_CARDPUTER", fbqn: "esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=disabled", file_name: "m5cardputer", tft: true, tft_file: "User_Setup_marauder_m5cardputer.h", build_dir: "esp32s3", addr: "0x1000", idf_ver: "2.0.11", nimble_ver: "1.3.8", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "ESP32-C5-DevKitC-1", flag: "MARAUDER_C5", fbqn: "esp32:esp32:esp32c5:PartitionScheme=min_spiffs", file_name: "esp32c5devkitc1", tft: false, tft_file: "", build_dir: "esp32c5", addr: "0x2000", idf_ver: "3.3.4", nimble_ver: "2.3.0", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
- { name: "ESP32-C5-DevKitC-1", flag: "MARAUDER_C5", fbqn: "esp32:esp32:esp32c5:FlashSize=8M,PartitionScheme=min_spiffs,PSRAM=enabled", file_name: "esp32c5devkitc1", tft: false, tft_file: "", build_dir: "esp32c5", addr: "0x2000", idf_ver: "3.3.4", nimble_ver: "2.3.6", esp_async: "bigbrodude6119/ESPAsyncWebServer", esp_async_ver: "master" }
steps:
- name: Checkout Code

View File

@@ -475,33 +475,37 @@ void Display::processAndPrintString(TFT_eSPI& tft, const String& originalString)
String new_string = originalString;
// Check for color macros at the start of the string
if (new_string.startsWith(RED_KEY)) {
text_color = TFT_RED;
new_string.remove(0, strlen(RED_KEY)); // Remove the macro
} else if (new_string.startsWith(GREEN_KEY)) {
text_color = TFT_GREEN;
new_string.remove(0, strlen(GREEN_KEY)); // Remove the macro
} else if (new_string.startsWith(CYAN_KEY)) {
text_color = TFT_CYAN;
new_string.remove(0, strlen(CYAN_KEY)); // Remove the macro
} else if (new_string.startsWith(WHITE_KEY)) {
text_color = TFT_WHITE;
new_string.remove(0, strlen(WHITE_KEY)); // Remove the macro
} else if (new_string.startsWith(MAGENTA_KEY)) {
text_color = TFT_MAGENTA;
new_string.remove(0, strlen(MAGENTA_KEY)); // Remove the macro
if (new_string.startsWith(";")) {
if (new_string.startsWith(RED_KEY)) {
text_color = TFT_RED;
new_string.remove(0, strlen(RED_KEY)); // Remove the macro
} else if (new_string.startsWith(GREEN_KEY)) {
text_color = TFT_GREEN;
new_string.remove(0, strlen(GREEN_KEY)); // Remove the macro
} else if (new_string.startsWith(CYAN_KEY)) {
text_color = TFT_CYAN;
new_string.remove(0, strlen(CYAN_KEY)); // Remove the macro
} else if (new_string.startsWith(WHITE_KEY)) {
text_color = TFT_WHITE;
new_string.remove(0, strlen(WHITE_KEY)); // Remove the macro
} else if (new_string.startsWith(MAGENTA_KEY)) {
text_color = TFT_MAGENTA;
new_string.remove(0, strlen(MAGENTA_KEY)); // Remove the macro
}
}
String spaces = String(' ', TFT_WIDTH / CHAR_WIDTH);
// Set text color and print the string
tft.setTextColor(text_color, background_color);
tft.print(new_string);
tft.print(new_string + spaces);
}
void Display::displayBuffer(bool do_clear)
{
if (this->display_buffer->size() > 0)
{
int print_count = 1;
int print_count = 10;
while ((display_buffer->size() > 0) && (print_count > 0))
{
@@ -530,9 +534,9 @@ void Display::displayBuffer(bool do_clear)
screen_buffer->add(display_buffer->shift());
for (int i = 0; i < this->screen_buffer->size(); i++) {
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
String spaces = String(' ', TFT_WIDTH / CHAR_WIDTH);
tft.print(spaces);
//tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
//String spaces = String(' ', TFT_WIDTH / CHAR_WIDTH);
//tft.print(spaces);
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
this->processAndPrintString(tft, this->screen_buffer->get(i));

View File

@@ -2039,6 +2039,8 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&wifiGeneralMenu, "View AP Info", TFTCYAN, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2074,6 +2076,8 @@ void MenuFunctions::RunSetup()
// Select Stations on Mini v2
this->addNodes(&wifiGeneralMenu, "Select Stations", TFTCYAN, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wifiAPMenu.parentMenu, true);
@@ -2140,6 +2144,9 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&wifiGeneralMenu, "Join WiFi", TFTWHITE, NULL, KEYBOARD_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2186,6 +2193,8 @@ void MenuFunctions::RunSetup()
this->changeMenu(&wifiGeneralMenu, true);
}
else {
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2303,6 +2312,8 @@ void MenuFunctions::RunSetup()
// Clone AP MAC to ESP32 for button folks
//#ifndef HAS_ILI9341
this->addNodes(&setMacMenu, "Clone AP MAC", TFTRED, NULL, CLEAR_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2321,6 +2332,8 @@ void MenuFunctions::RunSetup()
});
this->addNodes(&setMacMenu, "Clone STA MAC", TFTMAGENTA, NULL, CLEAR_ICO, [this](){
wifiAPMenu.parentMenu = &wifiGeneralMenu;
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
@@ -2474,6 +2487,8 @@ void MenuFunctions::RunSetup()
#ifdef HAS_BT
// Select Airtag on Mini
this->addNodes(&bluetoothAttackMenu, "Spoof Airtag", TFTWHITE, NULL, ATTACKS, [this](){
wifiAPMenu.parentMenu = &bluetoothAttackMenu;
// Clear nodes and add back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {

View File

@@ -432,7 +432,16 @@ extern "C" {
if (gps_obj.getGpsModuleStatus()) {
bool do_save = false;
if (buf >= 0)
{
{
unsigned char mac_char[6];
wifi_scan_obj.copyNimbleMac(advertisedDevice->getAddress(), mac_char);
if (wifi_scan_obj.currentScanMode != BT_SCAN_WAR_DRIVE_CONT) {
if (wifi_scan_obj.seen_mac(mac_char))
return;
}
Serial.print(F("Device: "));
if(advertisedDevice->getName().length() != 0)
{
@@ -476,6 +485,10 @@ extern "C" {
if (do_save)
buffer_obj.append(wardrive_line);
if (wifi_scan_obj.currentScanMode != BT_SCAN_WAR_DRIVE_CONT) {
wifi_scan_obj.save_mac(mac_char);
}
}
}
#endif
@@ -1153,6 +1166,14 @@ extern "C" {
bool do_save = false;
if (buf >= 0)
{
unsigned char mac_char[6];
wifi_scan_obj.copyNimbleMac(advertisedDevice->getAddress(), mac_char);
if (wifi_scan_obj.currentScanMode != BT_SCAN_WAR_DRIVE_CONT) {
if (wifi_scan_obj.seen_mac(mac_char))
return;
}
Serial.print(F("Device: "));
if(advertisedDevice->getName().length() != 0)
{
@@ -1196,6 +1217,10 @@ extern "C" {
if (do_save)
buffer_obj.append(wardrive_line);
if (wifi_scan_obj.currentScanMode != BT_SCAN_WAR_DRIVE_CONT) {
wifi_scan_obj.save_mac(mac_char);
}
}
}
#endif
@@ -2499,6 +2524,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
#endif
this->shutdownBLE();
this->ble_scanning = false;
#endif
}
@@ -4414,19 +4440,37 @@ void WiFiScan::executeWarDrive() {
bool do_save;
String display_string;
while (WiFi.scanComplete() == WIFI_SCAN_RUNNING) {
/*while (WiFi.scanComplete() == WIFI_SCAN_RUNNING) {
Serial.println(F("Scan running..."));
delay(500);
}*/
int scan_status = WiFi.scanComplete();
if (scan_status == WIFI_SCAN_RUNNING) {
delay(1);
return;
}
else if (scan_status == WIFI_SCAN_FAILED) {
Serial.println("WiFi scan failed to start. Restarting...");
this->wifi_initialized = true;
this->shutdownWiFi();
this->startWardriverWiFi();
this->wifi_initialized = true;
delay(100);
}
#ifndef HAS_DUAL_BAND
/*#ifndef HAS_DUAL_BAND
int n = WiFi.scanNetworks(false, true, false, 110, this->set_channel);
#else
int n = WiFi.scanNetworks(false, true, false, 110);
#endif
#endif*/
if (n > 0) {
for (int i = 0; i < n; i++) {
bool do_continue = false;
if (scan_status > 0) {
for (int i = 0; i < scan_status; i++) {
do_continue = true;
display_string = "";
do_save = false;
uint8_t *this_bssid_raw = WiFi.BSSID(i);
@@ -4439,6 +4483,24 @@ void WiFiScan::executeWarDrive() {
this->save_mac(this_bssid_raw);
String ssid = WiFi.SSID(i);
//Serial.println(ssid);
if (this->currentScanMode == BT_SCAN_FLOCK_WARDRIVE) {
for (int x = 0; x < sizeof(flock_ssid)/sizeof(this->flock_ssid[0]); x++) {
//Serial.print("Comparing ");
//Serial.print(ssid);
//Serial.print(" to ");
//Serial.println(this->flock_ssid[x]);
if (strcasestr(ssid.c_str(), this->flock_ssid[x])) {
do_continue = false;
break;
}
}
if (do_continue)
continue;
}
ssid.replace(",","_");
if (ssid != "") {
@@ -4476,11 +4538,17 @@ void WiFiScan::executeWarDrive() {
buffer_obj.append(wardrive_line);
}
}
}
this->channelHop();
// Free up that memory, you sexy devil
WiFi.scanDelete();
// Free up that memory, you sexy devil
WiFi.scanDelete();
}
/*#ifndef HAS_DUAL_BAND
this->channelHop();
#endif*/
if (!this->ble_scanning)
WiFi.scanNetworks(true, true, false, 80);
}
#endif
}
@@ -4941,6 +5009,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
NimBLEDevice::init("");
pBLEScan = NimBLEDevice::getScan(); //create new scan
if ((scan_mode == BT_SCAN_ALL) ||
(scan_mode == BT_SCAN_WAR_DRIVE) ||
(scan_mode == BT_SCAN_WAR_DRIVE_CONT) ||
(scan_mode == BT_SCAN_AIRTAG) ||
(scan_mode == BT_SCAN_AIRTAG_MON) ||
(scan_mode == BT_SCAN_FLIPPER) ||
@@ -4949,6 +5019,28 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
(scan_mode == BT_SCAN_SIMPLE) ||
(scan_mode == BT_SCAN_SIMPLE_TWO))
{
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
if (scan_mode == BT_SCAN_WAR_DRIVE) {
startLog("bt_wardrive");
}
else if (scan_mode == BT_SCAN_WAR_DRIVE_CONT) {
startLog("bt_wardrive_cont");
}
else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) {
startLog("flock_wardrive");
this->startWardriverWiFi();
this->wifi_initialized = true;
}
String header_line = "WigleWifi-1.4,appRelease=" + (String)MARAUDER_VERSION + ",model=ESP32 Marauder,release=" + (String)MARAUDER_VERSION + ",device=ESP32 Marauder,display=SPI TFT,board=ESP32 Marauder,brand=JustCallMeKoko\nMAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n";
buffer_obj.append(header_line);
} else {
return;
}
#else
return;
#endif
#ifdef HAS_SCREEN
display_obj.TOP_FIXED_AREA_2 = 48;
display_obj.tteBar = true;
@@ -4973,6 +5065,10 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
display_obj.tft.drawCentreString("Simple Sniff", TFT_WIDTH / 2, 16, 2);
else if (scan_mode == BT_SCAN_SIMPLE_TWO)
display_obj.tft.drawCentreString("Simple Sniff 2", TFT_WIDTH / 2, 16, 2);
if (scan_mode == BT_SCAN_WAR_DRIVE)
display_obj.tft.drawCentreString("BT Wardrive",TFT_WIDTH / 2,16,2);
else if (scan_mode == BT_SCAN_WAR_DRIVE_CONT)
display_obj.tft.drawCentreString("BT Wardrive Continuous",TFT_WIDTH / 2,16,2);
#ifdef HAS_ILI9341
display_obj.touchToExit();
#endif
@@ -4987,6 +5083,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
pBLEScan->setScanCallbacks(new bluetoothScanAllCallback(), false);
#endif
else if ((scan_mode == BT_SCAN_FLIPPER) ||
(scan_mode == BT_SCAN_WAR_DRIVE) ||
(scan_mode == BT_SCAN_WAR_DRIVE_CONT) ||
(scan_mode == BT_SCAN_FLOCK) ||
(scan_mode == BT_SCAN_FLOCK_WARDRIVE) ||
(scan_mode == BT_SCAN_SIMPLE) ||
@@ -5016,6 +5114,8 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
}
else if (scan_mode == BT_SCAN_FLOCK_WARDRIVE) {
startLog("flock_wardrive");
this->startWardriverWiFi();
this->wifi_initialized = true;
}
String header_line = "WigleWifi-1.4,appRelease=" + (String)MARAUDER_VERSION + ",model=ESP32 Marauder,release=" + (String)MARAUDER_VERSION + ",device=ESP32 Marauder,display=SPI TFT,board=ESP32 Marauder,brand=JustCallMeKoko\nMAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n";
buffer_obj.append(header_line);
@@ -5058,8 +5158,7 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
#endif
}
else if (scan_mode == BT_SCAN_SKIMMERS)
{
else if (scan_mode == BT_SCAN_SKIMMERS) {
#ifdef HAS_SCREEN
display_obj.TOP_FIXED_AREA_2 = 160;
display_obj.tteBar = true;
@@ -10105,13 +10204,21 @@ void WiFiScan::main(uint32_t currentTime)
this->ble_scanning = false;
}
else {
pBLEScan->start(0, scanCompleteCB, false);
this->ble_scanning = true;
return;
if (WiFi.scanComplete() != WIFI_SCAN_RUNNING) {
pBLEScan->start(0, scanCompleteCB, false);
this->ble_scanning = true;
return;
}
}
#endif
if (currentScanMode == BT_SCAN_FLOCK)
channelHop();
else if (currentScanMode == BT_SCAN_FLOCK_WARDRIVE) {
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus())
this->executeWarDrive();
#endif
}
}
}
else if (currentScanMode == WIFI_PING_SCAN) {