mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2026-01-26 11:14:51 -08:00
Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8769103817 | ||
|
|
d2b8cf76ef | ||
|
|
83c84054bf | ||
|
|
0b1089ff6e | ||
|
|
e564924f48 | ||
|
|
fa2ea87a5a | ||
|
|
a11531975e | ||
|
|
b813972365 | ||
|
|
dd27b25757 | ||
|
|
a9aeef2c78 | ||
|
|
e59e58f673 | ||
|
|
6352b67de3 | ||
|
|
213645d3a3 | ||
|
|
0c46326da3 | ||
|
|
e22627fdda | ||
|
|
0c92d3c568 | ||
|
|
ba13305b7b | ||
|
|
0f7d786445 | ||
|
|
118c46817f | ||
|
|
8afa68d132 | ||
|
|
7c4b0483aa | ||
|
|
e6d7ac39c8 | ||
|
|
0cc7c8d64c | ||
|
|
456823ce45 | ||
|
|
84371818c8 | ||
|
|
ee9c8dc1b2 | ||
|
|
4f3d0cce2e | ||
|
|
19a5ce334a | ||
|
|
2872dd0162 | ||
|
|
a929b6a76b | ||
|
|
d2402ad801 | ||
|
|
20ea935c42 | ||
|
|
a3ec0ac1af | ||
|
|
7b2ffed45a | ||
|
|
c0cdcc9818 | ||
|
|
8049c2834c | ||
|
|
9057d3919c | ||
|
|
7d576d1863 | ||
|
|
ba53d7ac38 | ||
|
|
f2d5c6b73e | ||
|
|
96c14d37e3 | ||
|
|
93760f24e5 | ||
|
|
c63e052374 | ||
|
|
420e29476d | ||
|
|
f920d7a283 | ||
|
|
808be3234f | ||
|
|
3206d4b5e1 | ||
|
|
589b7c7962 | ||
|
|
d1ac7234f4 | ||
|
|
c839e66ff3 | ||
|
|
8e83bb1874 | ||
|
|
da22ba0819 | ||
|
|
d2155cc9d4 | ||
|
|
26bc9c63f8 | ||
|
|
2026381e9b | ||
|
|
f175ba5e4e | ||
|
|
f09b0c4e5f | ||
|
|
0729a2368b | ||
|
|
07b57ae7b8 | ||
|
|
2e469d1410 | ||
|
|
d0d3c40ad3 | ||
|
|
9c0f627176 | ||
|
|
3d602d7555 | ||
|
|
e8693c95f4 | ||
|
|
cebfc5b5c1 | ||
|
|
1291c7f322 | ||
|
|
b234cee7ea | ||
|
|
792b4e5ac9 | ||
|
|
09de10d95c | ||
|
|
898dd1242d | ||
|
|
4f04e91d0a | ||
|
|
b7c2d668b5 |
314
.github/workflows/build_push.yml
vendored
Normal file
314
.github/workflows/build_push.yml
vendored
Normal file
@@ -0,0 +1,314 @@
|
||||
name: Build and Push
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
name: Build Marauder Binaries
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install TFT_eSPI
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: justcallmekoko/TFT_eSPI
|
||||
ref: master
|
||||
path: CustomTFT_eSPI
|
||||
|
||||
- name: Install LinkedList
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ivanseidel/LinkedList
|
||||
ref: master
|
||||
path: CustomLinkedList
|
||||
|
||||
- name: Install lv_arduino
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lvgl/lv_arduino
|
||||
ref: master
|
||||
path: Customlv_arduino
|
||||
|
||||
- name: Install JPEGDecoder
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: Bodmer/JPEGDecoder
|
||||
ref: master
|
||||
path: CustomJPEGDecoder
|
||||
|
||||
- name: Install NimBLE-Arduino
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: h2zero/NimBLE-Arduino
|
||||
ref: 1.2.0
|
||||
path: CustomNimBLE-Arduino
|
||||
|
||||
- name: Install Adafruit_NeoPixel
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/Adafruit_NeoPixel
|
||||
ref: master
|
||||
path: CustomAdafruit_NeoPixel
|
||||
|
||||
- name: Install ArduinoJson
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: bblanchon/ArduinoJson
|
||||
ref: v6.18.2
|
||||
path: CustomArduinoJson
|
||||
|
||||
- name: Install SwitchLib
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: justcallmekoko/SwitchLib
|
||||
ref: main
|
||||
path: CustomSwitchLib
|
||||
|
||||
- name: Configure TFT_eSPI
|
||||
run: |
|
||||
rm -f CustomTFT_eSPI/User_Setup_Select.h
|
||||
cp User_Setup_Select.h CustomTFT_eSPI/
|
||||
cp User_Setup_marauder_mini.h CustomTFT_eSPI/
|
||||
cp User_Setup_og_marauder.h CustomTFT_eSPI/
|
||||
pwd
|
||||
ls -la
|
||||
ls -la CustomTFT_eSPI
|
||||
|
||||
- name: Install ESP32 Boards and Compile MarauderOTA
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: MarauderOTA.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2
|
||||
platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
|
||||
- name: Modify platform.txt
|
||||
run: |
|
||||
echo "Chicken"
|
||||
for i in $(find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -name "platform.txt"); do
|
||||
sed -i 's/compiler.c.elf.libs.esp32s2=/compiler.c.elf.libs.esp32s2=-zmuldefs /' "$i"
|
||||
sed -i 's/compiler.c.elf.libs.esp32=/compiler.c.elf.libs.esp32=-zmuldefs /' "$i"
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32s2
|
||||
cat "$i" | grep compiler.c.elf.libs.esp32
|
||||
done
|
||||
|
||||
- name: Build Marauder for Flipper Zero WiFi Dev Board
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:esp32s2:PartitionScheme=min_spiffs,FlashSize=16M,PSRAM=enabled
|
||||
#platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
#extra-arduino-lib-install-args: "-zmuldefs"
|
||||
|
||||
- name: Rename Marauder Flipper bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
|
||||
|
||||
- name: Configure TFT_eSPI and configs.h for OG Marauder
|
||||
run: |
|
||||
pwd
|
||||
find /home/runner/ -name "*TFT_eSPI*"
|
||||
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
|
||||
sed -i 's/^ \/\/#define MARAUDER_V4/ #define MARAUDER_V4/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_KIT/ \/\/#define MARAUDER_KIT/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for OG Marauder
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
#platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
#extra-arduino-lib-install-args: "-zmuldefs"
|
||||
|
||||
- name: Rename OG Marauder bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.og.bin
|
||||
|
||||
- name: Configure TFT_eSPI and configs.h for Marauder v6
|
||||
run: |
|
||||
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
|
||||
sed -i 's/^ \/\/#define MARAUDER_V6/ #define MARAUDER_V6/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_KIT/ \/\/#define MARAUDER_KIT/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for v6 Marauder
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
#platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
#extra-arduino-lib-install-args: "-zmuldefs"
|
||||
|
||||
- name: Rename v6 Marauder bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6.bin
|
||||
|
||||
- name: Configure TFT_eSPI and configs.h for Marauder Kit
|
||||
run: |
|
||||
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
|
||||
sed -i 's/^ \/\/#define MARAUDER_KIT/ #define MARAUDER_KIT/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder Kit
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
#platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
#extra-arduino-lib-install-args: "-zmuldefs"
|
||||
|
||||
- name: Rename Marauder Kit bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.kit.bin
|
||||
|
||||
- name: Configure TFT_eSPI and configs.h for Marauder Mini
|
||||
run: |
|
||||
sed -i 's/^\/\/#include <User_Setup_marauder_mini.h>/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^#include <User_Setup_og_marauder.h>/\/\/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
|
||||
sed -i 's/^ \/\/#define MARAUDER_MINI/ #define MARAUDER_MINI/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_KIT/ \/\/#define MARAUDER_KIT/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
|
||||
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
|
||||
|
||||
- name: Build Marauder for Marauder Mini
|
||||
uses: ArminJo/arduino-test-compile@v3.2.0
|
||||
with:
|
||||
sketch-names: esp32_marauder.ino
|
||||
arduino-board-fqbn: esp32:esp32:d32:PartitionScheme=min_spiffs
|
||||
#platform-url: https://github.com/espressif/arduino-esp32/releases/download/2.0.0-rc1/package_esp32_dev_index.json
|
||||
extra-arduino-cli-args: "--warnings none"
|
||||
#extra-arduino-lib-install-args: "-zmuldefs"
|
||||
|
||||
- name: Rename Marauder Mini bin
|
||||
run: |
|
||||
mv ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.mini.bin
|
||||
|
||||
- name: Display finished bins
|
||||
run: |
|
||||
find ./esp32_marauder/build -name "*.bin"
|
||||
|
||||
- name: 'Upload Flipper Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: esp32_marauder.flipper.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload OG Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: esp32_marauder.og.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.og.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload v6 Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: esp32_marauder.v6.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Kit Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: esp32_marauder.kit.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.kit.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: 'Upload Mini Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: esp32_marauder.mini.bin
|
||||
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.mini.bin
|
||||
retention-days: 5
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Flipper Asset
|
||||
id: upload-flipper-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
|
||||
asset_name: esp32_marauder.flipper.bin
|
||||
asset_content_type: application/bin
|
||||
|
||||
- name: Upload OG Asset
|
||||
id: upload-og-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.og.bin
|
||||
asset_name: esp32_marauder.og.bin
|
||||
asset_content_type: application/bin
|
||||
|
||||
- name: Upload v6 Asset
|
||||
id: upload-v6-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6.bin
|
||||
asset_name: esp32_marauder.v6.bin
|
||||
asset_content_type: application/bin
|
||||
|
||||
- name: Upload Kit Asset
|
||||
id: upload-kit-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.kit.bin
|
||||
asset_name: esp32_marauder.kit.bin
|
||||
asset_content_type: application/bin
|
||||
|
||||
- name: Upload Mini Asset
|
||||
id: upload-mini-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.mini.bin
|
||||
asset_name: esp32_marauder.mini.bin
|
||||
asset_content_type: application/bin
|
||||
@@ -3,7 +3,7 @@
|
||||
<!---[](https://travis-ci.com/justcallmekoko/ESP32Marauder)--->
|
||||
<!---Shields/Badges https://shields.io/--->
|
||||
|
||||
# ESP32 Marauder v0.9.9
|
||||
# ESP32 Marauder v0.9.15
|
||||
<p align="center"><img alt="Marauder logo" src="https://github.com/justcallmekoko/ESP32Marauder/blob/master/pictures/marauder3L.jpg?raw=true" width="300"></p>
|
||||
<p align="center">
|
||||
<b>A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32</b>
|
||||
@@ -20,6 +20,8 @@
|
||||
<a href="https://www.twitch.tv/willstunforfood"><img src="https://assets.stickpng.com/images/580b57fcd9996e24bc43c540.png" alt="Twitch WillStunForFood" width="200"></a>
|
||||
</p>
|
||||
|
||||
[](https://github.com/justcallmekoko/ESP32Marauder/actions/workflows/build_push.yml)
|
||||
|
||||
## Getting Started
|
||||
Download the [latest release](https://github.com/justcallmekoko/ESP32Marauder/releases/latest) of the firmware.
|
||||
|
||||
|
||||
180
User_Setup_Select.h
Normal file
180
User_Setup_Select.h
Normal file
@@ -0,0 +1,180 @@
|
||||
// This header file contains a list of user setup files and defines which one the
|
||||
// compiler uses when the IDE performs a Verify/Compile or Upload.
|
||||
//
|
||||
// Users can create configurations for different Espressif boards and TFT displays.
|
||||
// This makes selecting between hardware setups easy by "uncommenting" one line.
|
||||
|
||||
// The advantage of this hardware configuration method is that the examples provided
|
||||
// with the library should work with different setups immediately without any other
|
||||
// changes being needed. It also improves the portability of users sketches to other
|
||||
// hardware configurations and compatible libraries.
|
||||
//
|
||||
// Create a shortcut to this file on your desktop to permit quick access for editing.
|
||||
// Re-compile and upload after making and saving any changes to this file.
|
||||
|
||||
// Customised User_Setup files are stored in the "User_Setups" folder.
|
||||
|
||||
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
|
||||
// platformio.ini, see notes in "Tools" folder.
|
||||
|
||||
// Only ONE line below should be uncommented. Add extra lines and files as needed.
|
||||
|
||||
//#include <User_Setup.h> // Default setup is root library folder
|
||||
|
||||
//#include <User_Setup_og_marauder.h>
|
||||
#include <User_Setup_marauder_mini.h>
|
||||
|
||||
//#include <User_Setups/Setup1_ILI9341.h> // Setup file configured for my ILI9341
|
||||
//#include <User_Setups/Setup2_ST7735.h> // Setup file configured for my ST7735
|
||||
//#include <User_Setups/Setup3_ILI9163.h> // Setup file configured for my ILI9163
|
||||
//#include <User_Setups/Setup4_S6D02A1.h> // Setup file configured for my S6D02A1
|
||||
//#include <User_Setups/Setup5_RPi_ILI9486.h> // Setup file configured for my stock RPi TFT
|
||||
//#include <User_Setups/Setup6_RPi_Wr_ILI9486.h> // Setup file configured for my modified RPi TFT
|
||||
//#include <User_Setups/Setup7_ST7735_128x128.h> // Setup file configured for my ST7735 128x128 display
|
||||
//#include <User_Setups/Setup8_ILI9163_128x128.h> // Setup file configured for my ILI9163 128x128 display
|
||||
//#include <User_Setups/Setup9_ST7735_Overlap.h> // Setup file configured for my ST7735
|
||||
//#include <User_Setups/Setup10_RPi_touch_ILI9486.h> // Setup file configured for ESP8266 and RPi TFT with touch
|
||||
|
||||
//#include <User_Setups/Setup11_RPi_touch_ILI9486.h> // Setup file configured for ESP32 and RPi TFT with touch
|
||||
//#include <User_Setups/Setup12_M5Stack.h> // Setup file for the ESP32 based M5Stack
|
||||
//#include <User_Setups/Setup13_ILI9481_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
|
||||
//#include <User_Setups/Setup14_ILI9341_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
|
||||
//#include <User_Setups/Setup15_HX8357D.h> // Setup file configured for HX8357D (untested)
|
||||
//#include <User_Setups/Setup16_ILI9488_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
|
||||
//#include <User_Setups/Setup17_ePaper.h> // Setup file for any Waveshare ePaper display
|
||||
//#include <User_Setups/Setup18_ST7789.h> // Setup file configured for ST7789
|
||||
|
||||
//#include <User_Setups/Setup19_RM68140_Parallel.h> // Setup file configured for RM68140 with parallel bus
|
||||
|
||||
//#include <User_Setups/Setup20_ILI9488.h> // Setup file for ESP8266 and ILI9488 SPI bus TFT
|
||||
//#include <User_Setups/Setup21_ILI9488.h> // Setup file for ESP32 and ILI9488 SPI bus TFT
|
||||
|
||||
//#include <User_Setups/Setup22_TTGO_T4.h> // Setup file for ESP32 and TTGO T4 (BTC) ILI9341 SPI bus TFT
|
||||
//#include <User_Setups/Setup23_TTGO_TM.h> // Setup file for ESP32 and TTGO TM ST7789 SPI bus TFT
|
||||
//#include <User_Setups/Setup24_ST7789.h> // Setup file configured for ST7789 240 x 240
|
||||
//#include <User_Setups/Setup25_TTGO_T_Display.h> // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT
|
||||
//#include <User_Setups/Setup26_TTGO_T_Wristband.h> // Setup file for ESP32 and TTGO T-Wristband ST7735 SPI bus TFT
|
||||
|
||||
//#include <User_Setups/Setup27_RPi_ST7796_ESP32.h> // ESP32 RPi MHS-4.0 inch Display-B
|
||||
//#include <User_Setups/Setup28_RPi_ST7796_ESP8266.h> // ESP8266 RPi MHS-4.0 inch Display-B
|
||||
|
||||
//#include <User_Setups/Setup29_ILI9341_STM32.h> // Setup for Nucleo board
|
||||
//#include <User_Setups/Setup30_ILI9341_Parallel_STM32.h> // Setup for Nucleo board and parallel display
|
||||
//#include <User_Setups/Setup31_ST7796_Parallel_STM32.h> // Setup for Nucleo board and parallel display
|
||||
//#include <User_Setups/Setup32_ILI9341_STM32F103.h> // Setup for "Blue Pill"
|
||||
|
||||
//#include <User_Setups/Setup43_ST7735.h> // Setup file configured for my ST7735S 80x160
|
||||
|
||||
//#include <User_Setups/Setup135_ST7789.h> // Setup file for ESP8266 and ST7789 135 x 240 TFT
|
||||
|
||||
//#include <User_Setups/SetupX_Template.h>
|
||||
|
||||
|
||||
#endif // USER_SETUP_LOADED
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DON'T TINKER WITH ANY OF THE FOLLOWING LINES, THESE ADD THE TFT DRIVERS //
|
||||
// AND ESP8266 PIN DEFINITONS, THEY ARE HERE FOR BODMER'S CONVENIENCE! //
|
||||
// //
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Identical looking TFT displays may have a different colour ordering in the 16 bit colour
|
||||
#define TFT_BGR 0 // Colour order Blue-Green-Red
|
||||
#define TFT_RGB 1 // Colour order Red-Green-Blue
|
||||
|
||||
// Legacy setup support, RPI_DISPLAY_TYPE replaces RPI_DRIVER
|
||||
#if defined (RPI_DRIVER)
|
||||
#if !defined (RPI_DISPLAY_TYPE)
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Legacy setup support, RPI_ILI9486_DRIVER form is deprecated
|
||||
// Instead define RPI_DISPLAY_TYPE and also define driver (e.g. ILI9486_DRIVER)
|
||||
#if defined (RPI_ILI9486_DRIVER)
|
||||
#if !defined (ILI9486_DRIVER)
|
||||
#define ILI9486_DRIVER
|
||||
#endif
|
||||
#if !defined (RPI_DISPLAY_TYPE)
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Load the right driver definition - do not tinker here !
|
||||
#if defined (ILI9341_DRIVER)
|
||||
#include <TFT_Drivers/ILI9341_Defines.h>
|
||||
#define TFT_DRIVER 0x9341
|
||||
#elif defined (ST7735_DRIVER)
|
||||
#include <TFT_Drivers/ST7735_Defines.h>
|
||||
#define TFT_DRIVER 0x7735
|
||||
#elif defined (ILI9163_DRIVER)
|
||||
#include <TFT_Drivers/ILI9163_Defines.h>
|
||||
#define TFT_DRIVER 0x9163
|
||||
#elif defined (S6D02A1_DRIVER)
|
||||
#include <TFT_Drivers/S6D02A1_Defines.h>
|
||||
#define TFT_DRIVER 0x6D02
|
||||
#elif defined (ST7796_DRIVER)
|
||||
#include "TFT_Drivers/ST7796_Defines.h"
|
||||
#define TFT_DRIVER 0x7796
|
||||
#elif defined (ILI9486_DRIVER)
|
||||
#include <TFT_Drivers/ILI9486_Defines.h>
|
||||
#define TFT_DRIVER 0x9486
|
||||
#elif defined (ILI9481_DRIVER)
|
||||
#include <TFT_Drivers/ILI9481_Defines.h>
|
||||
#define TFT_DRIVER 0x9481
|
||||
#elif defined (ILI9488_DRIVER)
|
||||
#include <TFT_Drivers/ILI9488_Defines.h>
|
||||
#define TFT_DRIVER 0x9488
|
||||
#elif defined (HX8357D_DRIVER)
|
||||
#include "TFT_Drivers/HX8357D_Defines.h"
|
||||
#define TFT_DRIVER 0x8357
|
||||
#elif defined (EPD_DRIVER)
|
||||
#include "TFT_Drivers/EPD_Defines.h"
|
||||
#define TFT_DRIVER 0xE9D
|
||||
#elif defined (ST7789_DRIVER)
|
||||
#include "TFT_Drivers/ST7789_Defines.h"
|
||||
#define TFT_DRIVER 0x7789
|
||||
#elif defined (R61581_DRIVER)
|
||||
#include "TFT_Drivers/R61581_Defines.h"
|
||||
#define TFT_DRIVER 0x6158
|
||||
#elif defined (ST7789_2_DRIVER)
|
||||
#include "TFT_Drivers/ST7789_2_Defines.h"
|
||||
#define TFT_DRIVER 0x778B
|
||||
#elif defined (RM68140_DRIVER)
|
||||
#include "TFT_Drivers/RM68140_Defines.h"
|
||||
#define TFT_DRIVER 0x6814
|
||||
// <<<<<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVER HERE
|
||||
// XYZZY_init.h and XYZZY_rotation.h must also be added in TFT_eSPI.c
|
||||
#elif defined (XYZZY_DRIVER)
|
||||
#include "TFT_Drivers/XYZZY_Defines.h"
|
||||
#define TFT_DRIVER 0x0000
|
||||
#else
|
||||
#define TFT_DRIVER 0x0000
|
||||
#endif
|
||||
|
||||
|
||||
// These are the pins for ESP8266 boards
|
||||
// Name GPIO NodeMCU Function
|
||||
#define PIN_D0 16 // GPIO16 WAKE
|
||||
#define PIN_D1 5 // GPIO5 User purpose
|
||||
#define PIN_D2 4 // GPIO4 User purpose
|
||||
#define PIN_D3 0 // GPIO0 Low on boot means enter FLASH mode
|
||||
#define PIN_D4 2 // GPIO2 TXD1 (must be high on boot to go to UART0 FLASH mode)
|
||||
#define PIN_D5 14 // GPIO14 HSCLK
|
||||
#define PIN_D6 12 // GPIO12 HMISO
|
||||
#define PIN_D7 13 // GPIO13 HMOSI RXD2
|
||||
#define PIN_D8 15 // GPIO15 HCS TXD0 (must be low on boot to enter UART0 FLASH mode)
|
||||
#define PIN_D9 3 // RXD0
|
||||
#define PIN_D10 1 // TXD0
|
||||
|
||||
#define PIN_MOSI 8 // SD1 FLASH and overlap mode
|
||||
#define PIN_MISO 7 // SD0
|
||||
#define PIN_SCLK 6 // CLK
|
||||
#define PIN_HWCS 0 // D3
|
||||
|
||||
#define PIN_D11 9 // SD2
|
||||
#define PIN_D12 10 // SD4
|
||||
316
User_Setup_marauder_mini.h
Normal file
316
User_Setup_marauder_mini.h
Normal file
@@ -0,0 +1,316 @@
|
||||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DRIVER
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
//#define ILI9341_DRIVER // OG Marauder
|
||||
#define ST7735_DRIVER // Marauder Mini // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
|
||||
|
||||
// For ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below
|
||||
|
||||
// #define M5STACK
|
||||
|
||||
// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
#define TFT_WIDTH 128 // Marauder Mini
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
#define TFT_HEIGHT 128 // Marauder Mini
|
||||
// #define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or tray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
#define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
#define TFT_BACKLIGHT_ON LOW // HIGH or LOW are options
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for ESP8266 NodeMCU ESP-12 is :
|
||||
//
|
||||
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
|
||||
// Display LED to NodeMCU pin VIN (or 5V, see below)
|
||||
// Display SCK to NodeMCU pin D5
|
||||
// Display SDI/MOSI to NodeMCU pin D7
|
||||
// Display DC (RS/AO)to NodeMCU pin D3
|
||||
// Display RESET to NodeMCU pin D4 (or RST, see below)
|
||||
// Display CS to NodeMCU pin D8 (or GND, see below)
|
||||
// Display GND to NodeMCU pin GND (0V)
|
||||
// Display VCC to NodeMCU 5V or 3.3V
|
||||
//
|
||||
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
|
||||
//
|
||||
// The DC (Data Command) pin may be labeled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
//
|
||||
// The NodeMCU D0 pin can be used for RST
|
||||
//
|
||||
//
|
||||
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
|
||||
// If 5V is not available at a pin you can use 3.3V but backlight brightness
|
||||
// will be lower.
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
//#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
//#define TFT_DC PIN_D3 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
|
||||
// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######
|
||||
|
||||
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
|
||||
// but saves pins for other functions. It is best not to connect MISO as some displays
|
||||
// do not tristate that line wjen chip select is high!
|
||||
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
|
||||
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
|
||||
// In ESP8266 overlap mode the following must be defined
|
||||
|
||||
//#define TFT_SPI_OVERLAP
|
||||
|
||||
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
|
||||
//#define TFT_CS PIN_D3
|
||||
//#define TFT_DC PIN_D5 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######
|
||||
|
||||
// For ESP32 Dev board (only tested with ILI9341 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
// Marauder Mini
|
||||
#define TFT_CS 17 // Chip select control pin D8
|
||||
#define TFT_DC 16 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
#define TOUCH_CS -1
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_BL 32
|
||||
|
||||
/*
|
||||
// ESP32 Marauder
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 17 // Chip select control pin
|
||||
#define TFT_DC 16 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
*/
|
||||
/////////////////////////////
|
||||
|
||||
// ESP32 Centauri
|
||||
/*
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 27 // Chip select control pin
|
||||
#define TFT_DC 26 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
*/
|
||||
/////////////////////////////
|
||||
|
||||
//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
// For the M5Stack module use these #define lines
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS 14 // Chip select control pin
|
||||
//#define TFT_DC 27 // Data Command control pin
|
||||
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL 32 // LED back-light (required for M5Stack)
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######
|
||||
|
||||
// The library supports 8 bit parallel TFTs with the ESP32, the pin
|
||||
// selection below is compatible with ESP32 boards in UNO format.
|
||||
// Wemos D32 boards need to be modified, see diagram in Tools folder.
|
||||
// Only ILI9481 and ILI9341 based displays have been tested!
|
||||
|
||||
// Parallel bus is only supported on ESP32
|
||||
// Uncomment line below to use ESP32 Parallel interface instead of SPI
|
||||
|
||||
//#define ESP32_PARALLEL
|
||||
|
||||
// The ESP32 and TFT the pins used for testing are:
|
||||
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
|
||||
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RST 32 // Reset pin, toggles on startup
|
||||
|
||||
//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RD 2 // Read strobe control pin
|
||||
|
||||
//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
//#define TFT_D1 13 // so a single register write sets/clears all bits.
|
||||
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
|
||||
//#define TFT_D3 25 // TFT screen update performance.
|
||||
//#define TFT_D4 17
|
||||
//#define TFT_D5 16
|
||||
//#define TFT_D6 27
|
||||
//#define TFT_D7 14
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
//#define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
#define SPI_FREQUENCY 20000000
|
||||
//#define SPI_FREQUENCY 27000000 // Marauder // Actually sets it to 26.67MHz = 80/3
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
|
||||
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
|
||||
// then uncomment the following line:
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
// Comment out the following #define if "SPI Transactions" do not need to be
|
||||
// supported. When commented out the code size will be smaller and sketches will
|
||||
// run slightly faster, so leave it commented out unless you need it!
|
||||
|
||||
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
|
||||
// Transaction support is required if other SPI devices are connected.
|
||||
|
||||
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
|
||||
// so changing it here has no effect
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
||||
316
User_Setup_og_marauder.h
Normal file
316
User_Setup_og_marauder.h
Normal file
@@ -0,0 +1,316 @@
|
||||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DRIVER
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
#define ILI9341_DRIVER // OG Marauder
|
||||
//#define ST7735_DRIVER // Marauder Mini // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
|
||||
|
||||
// For ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below
|
||||
|
||||
// #define M5STACK
|
||||
|
||||
// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
// #define TFT_WIDTH 128 // Marauder Mini
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
// #define TFT_HEIGHT 128 // Marauder Mini
|
||||
// #define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or tray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// #define TFT_BACKLIGHT_ON LOW // HIGH or LOW are options
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for ESP8266 NodeMCU ESP-12 is :
|
||||
//
|
||||
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
|
||||
// Display LED to NodeMCU pin VIN (or 5V, see below)
|
||||
// Display SCK to NodeMCU pin D5
|
||||
// Display SDI/MOSI to NodeMCU pin D7
|
||||
// Display DC (RS/AO)to NodeMCU pin D3
|
||||
// Display RESET to NodeMCU pin D4 (or RST, see below)
|
||||
// Display CS to NodeMCU pin D8 (or GND, see below)
|
||||
// Display GND to NodeMCU pin GND (0V)
|
||||
// Display VCC to NodeMCU 5V or 3.3V
|
||||
//
|
||||
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
|
||||
//
|
||||
// The DC (Data Command) pin may be labeled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
//
|
||||
// The NodeMCU D0 pin can be used for RST
|
||||
//
|
||||
//
|
||||
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
|
||||
// If 5V is not available at a pin you can use 3.3V but backlight brightness
|
||||
// will be lower.
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
//#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
//#define TFT_DC PIN_D3 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
|
||||
// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######
|
||||
|
||||
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
|
||||
// but saves pins for other functions. It is best not to connect MISO as some displays
|
||||
// do not tristate that line wjen chip select is high!
|
||||
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
|
||||
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
|
||||
// In ESP8266 overlap mode the following must be defined
|
||||
|
||||
//#define TFT_SPI_OVERLAP
|
||||
|
||||
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
|
||||
//#define TFT_CS PIN_D3
|
||||
//#define TFT_DC PIN_D5 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######
|
||||
|
||||
// For ESP32 Dev board (only tested with ILI9341 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
// Marauder Mini
|
||||
/*
|
||||
#define TFT_CS 17 // Chip select control pin D8
|
||||
#define TFT_DC 16 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_BL 32
|
||||
*/
|
||||
|
||||
// ESP32 Marauder
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 17 // Chip select control pin
|
||||
#define TFT_DC 16 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
// ESP32 Centauri
|
||||
/*
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 27 // Chip select control pin
|
||||
#define TFT_DC 26 // Data Command control pin
|
||||
#define TFT_RST 5 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
*/
|
||||
/////////////////////////////
|
||||
|
||||
//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
// For the M5Stack module use these #define lines
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS 14 // Chip select control pin
|
||||
//#define TFT_DC 27 // Data Command control pin
|
||||
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL 32 // LED back-light (required for M5Stack)
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######
|
||||
|
||||
// The library supports 8 bit parallel TFTs with the ESP32, the pin
|
||||
// selection below is compatible with ESP32 boards in UNO format.
|
||||
// Wemos D32 boards need to be modified, see diagram in Tools folder.
|
||||
// Only ILI9481 and ILI9341 based displays have been tested!
|
||||
|
||||
// Parallel bus is only supported on ESP32
|
||||
// Uncomment line below to use ESP32 Parallel interface instead of SPI
|
||||
|
||||
//#define ESP32_PARALLEL
|
||||
|
||||
// The ESP32 and TFT the pins used for testing are:
|
||||
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
|
||||
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RST 32 // Reset pin, toggles on startup
|
||||
|
||||
//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RD 2 // Read strobe control pin
|
||||
|
||||
//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
//#define TFT_D1 13 // so a single register write sets/clears all bits.
|
||||
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
|
||||
//#define TFT_D3 25 // TFT screen update performance.
|
||||
//#define TFT_D4 17
|
||||
//#define TFT_D5 16
|
||||
//#define TFT_D6 27
|
||||
//#define TFT_D7 14
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
//#define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000 // Marauder // Actually sets it to 26.67MHz = 80/3
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
|
||||
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
|
||||
// then uncomment the following line:
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
// Comment out the following #define if "SPI Transactions" do not need to be
|
||||
// supported. When commented out the code size will be smaller and sketches will
|
||||
// run slightly faster, so leave it commented out unless you need it!
|
||||
|
||||
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
|
||||
// Transaction support is required if other SPI devices are connected.
|
||||
|
||||
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
|
||||
// so changing it here has no effect
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
||||
@@ -107,6 +107,7 @@ void CommandLine::runCommand(String input) {
|
||||
if (cmd_args.get(0) == HELP_CMD) {
|
||||
Serial.println(HELP_HEAD);
|
||||
Serial.println(HELP_CH_CMD);
|
||||
Serial.println(HELP_SETTINGS_CMD);
|
||||
Serial.println(HELP_CLEARAP_CMD_A);
|
||||
Serial.println(HELP_CLEARAP_CMD_B);
|
||||
Serial.println(HELP_REBOOT_CMD);
|
||||
@@ -189,6 +190,39 @@ void CommandLine::runCommand(String input) {
|
||||
wifi_scan_obj.RunClearSSIDs();
|
||||
}
|
||||
|
||||
else if (cmd_args.get(0) == SETTINGS_CMD) {
|
||||
int ss_sw = this->argSearch(&cmd_args, "-s"); // Set setting
|
||||
int re_sw = this->argSearch(&cmd_args, "-r"); // Reset setting
|
||||
int en_sw = this->argSearch(&cmd_args, "enable"); // enable setting
|
||||
int da_sw = this->argSearch(&cmd_args, "disable"); // disable setting
|
||||
|
||||
if (re_sw != -1) {
|
||||
settings_obj.createDefaultSettings(SPIFFS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ss_sw == -1) {
|
||||
settings_obj.printJsonSettings(settings_obj.getSettingsString());
|
||||
}
|
||||
else {
|
||||
bool result = false;
|
||||
String setting_name = cmd_args.get(ss_sw + 1);
|
||||
if (en_sw != -1)
|
||||
result = settings_obj.saveSetting<bool>(setting_name, true);
|
||||
else if (da_sw != -1)
|
||||
result = settings_obj.saveSetting<bool>(setting_name, false);
|
||||
else {
|
||||
Serial.println("You did not properly enable/disable this setting.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
Serial.println("Could not successfully update setting \"" + setting_name + "\"");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (cmd_args.get(0) == REBOOT_CMD) {
|
||||
Serial.println("Rebooting...");
|
||||
ESP.restart();
|
||||
@@ -433,9 +467,9 @@ void CommandLine::runCommand(String input) {
|
||||
if (ap_sw != -1) {
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected)
|
||||
Serial.println("[" + (String)i + "] " + access_points->get(i).essid + " (selected)");
|
||||
Serial.println("[" + (String)i + "] " + access_points->get(i).essid + " " + (String)access_points->get(i).rssi + " (selected)");
|
||||
else
|
||||
Serial.println("[" + (String)i + "] " + access_points->get(i).essid);
|
||||
Serial.println("[" + (String)i + "] " + access_points->get(i).essid + " " + (String)access_points->get(i).rssi);
|
||||
}
|
||||
}
|
||||
// List SSIDs
|
||||
@@ -463,24 +497,44 @@ void CommandLine::runCommand(String input) {
|
||||
// Get list of indices
|
||||
LinkedList<String> ap_index = this->parseCommand(cmd_args.get(ap_sw + 1), ",");
|
||||
|
||||
// Mark APs as selected
|
||||
for (int i = 0; i < ap_index.size(); i++) {
|
||||
int index = ap_index.get(i).toInt();
|
||||
if (!this->inRange(access_points->size(), index)) {
|
||||
Serial.println("Index not in range: " + (String)index);
|
||||
continue;
|
||||
// Select ALL APs
|
||||
if (cmd_args.get(ap_sw + 1) == "all") {
|
||||
for (int i = 0; i < access_points->size(); i++) {
|
||||
if (access_points->get(i).selected) {
|
||||
// Unselect "selected" ap
|
||||
AccessPoint new_ap = access_points->get(i);
|
||||
new_ap.selected = false;
|
||||
access_points->set(i, new_ap);
|
||||
}
|
||||
else {
|
||||
// Select "unselected" ap
|
||||
AccessPoint new_ap = access_points->get(i);
|
||||
new_ap.selected = true;
|
||||
access_points->set(i, new_ap);
|
||||
}
|
||||
}
|
||||
if (access_points->get(index).selected) {
|
||||
// Unselect "selected" ap
|
||||
AccessPoint new_ap = access_points->get(index);
|
||||
new_ap.selected = false;
|
||||
access_points->set(index, new_ap);
|
||||
}
|
||||
else {
|
||||
// Select "unselected" ap
|
||||
AccessPoint new_ap = access_points->get(index);
|
||||
new_ap.selected = true;
|
||||
access_points->set(index, new_ap);
|
||||
}
|
||||
// Select specific APs
|
||||
else {
|
||||
// Mark APs as selected
|
||||
for (int i = 0; i < ap_index.size(); i++) {
|
||||
int index = ap_index.get(i).toInt();
|
||||
if (!this->inRange(access_points->size(), index)) {
|
||||
Serial.println("Index not in range: " + (String)index);
|
||||
continue;
|
||||
}
|
||||
if (access_points->get(index).selected) {
|
||||
// Unselect "selected" ap
|
||||
AccessPoint new_ap = access_points->get(index);
|
||||
new_ap.selected = false;
|
||||
access_points->set(index, new_ap);
|
||||
}
|
||||
else {
|
||||
// Select "unselected" ap
|
||||
AccessPoint new_ap = access_points->get(index);
|
||||
new_ap.selected = true;
|
||||
access_points->set(index, new_ap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "WiFiScan.h"
|
||||
#include "Web.h"
|
||||
#include "SDInterface.h"
|
||||
#include "settings.h"
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
extern MenuFunctions menu_function_obj;
|
||||
@@ -20,6 +21,7 @@
|
||||
extern WiFiScan wifi_scan_obj;
|
||||
extern Web web_obj;
|
||||
extern SDInterface sd_obj;
|
||||
extern Settings settings_obj;
|
||||
extern LinkedList<AccessPoint>* access_points;
|
||||
extern LinkedList<ssid>* ssids;
|
||||
extern const String PROGMEM version_number;
|
||||
@@ -32,6 +34,7 @@ const char PROGMEM CLEARAP_CMD[] = "clearlist";
|
||||
const char PROGMEM REBOOT_CMD[] = "reboot";
|
||||
const char PROGMEM UPDATE_CMD[] = "update";
|
||||
const char PROGMEM HELP_CMD[] = "help";
|
||||
const char PROGMEM SETTINGS_CMD[] = "settings";
|
||||
|
||||
// WiFi sniff/scan
|
||||
const char PROGMEM SCANAP_CMD[] = "scanap";
|
||||
@@ -69,6 +72,7 @@ const char PROGMEM HELP_CLEARAP_CMD_B[] = "clearlist -s";
|
||||
const char PROGMEM HELP_REBOOT_CMD[] = "reboot";
|
||||
const char PROGMEM HELP_UPDATE_CMD_A[] = "update -s";
|
||||
const char PROGMEM HELP_UPDATE_CMD_B[] = "update -w";
|
||||
const char PROGMEM HELP_SETTINGS_CMD[] = "settings [-s <setting> enable/disable>]/[-r]";
|
||||
|
||||
// WiFi sniff/scan
|
||||
const char PROGMEM HELP_SCANAP_CMD[] = "scanap";
|
||||
|
||||
@@ -14,6 +14,10 @@ void Display::RunSetup()
|
||||
|
||||
// Need to declare new
|
||||
display_buffer = new LinkedList<String>();
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
screen_buffer = new LinkedList<String>();
|
||||
#endif
|
||||
|
||||
tft.init();
|
||||
tft.setRotation(0); // Portrait
|
||||
@@ -252,30 +256,57 @@ void Display::clearScreen()
|
||||
tft.setCursor(0, 0);
|
||||
}
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
void Display::scrollScreenBuffer(bool down) {
|
||||
// Scroll screen normal direction (Up)
|
||||
if (!down) {
|
||||
this->screen_buffer->shift();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Display::displayBuffer(bool do_clear)
|
||||
{
|
||||
if (this->display_buffer->size() > 0)
|
||||
{
|
||||
delay(1);
|
||||
|
||||
|
||||
while (display_buffer->size() > 0)
|
||||
{
|
||||
xPos = 0;
|
||||
if ((display_buffer->size() > 0) && (!loading))
|
||||
{
|
||||
printing = true;
|
||||
delay(print_delay_1);
|
||||
yDraw = scroll_line(TFT_RED);
|
||||
tft.setCursor(xPos, yDraw);
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
tft.print(display_buffer->shift());
|
||||
printing = false;
|
||||
delay(print_delay_2);
|
||||
}
|
||||
if (!tteBar)
|
||||
blank[(18+(yStart - TOP_FIXED_AREA) / TEXT_HEIGHT)%19] = xPos;
|
||||
else
|
||||
blank[(18+(yStart - TOP_FIXED_AREA_2) / TEXT_HEIGHT)%19] = xPos;
|
||||
|
||||
#ifndef SCREEN_BUFFER
|
||||
xPos = 0;
|
||||
if ((display_buffer->size() > 0) && (!loading))
|
||||
{
|
||||
printing = true;
|
||||
delay(print_delay_1);
|
||||
yDraw = scroll_line(TFT_RED);
|
||||
tft.setCursor(xPos, yDraw);
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
tft.print(display_buffer->shift());
|
||||
printing = false;
|
||||
delay(print_delay_2);
|
||||
}
|
||||
if (!tteBar)
|
||||
blank[(18+(yStart - TOP_FIXED_AREA) / TEXT_HEIGHT)%19] = xPos;
|
||||
else
|
||||
blank[(18+(yStart - TOP_FIXED_AREA_2) / TEXT_HEIGHT)%19] = xPos;
|
||||
#else
|
||||
xPos = 0;
|
||||
if (this->screen_buffer->size() >= MAX_SCREEN_BUFFER)
|
||||
this->scrollScreenBuffer();
|
||||
|
||||
screen_buffer->add(display_buffer->shift());
|
||||
|
||||
for (int i = 0; i < this->screen_buffer->size(); i++) {
|
||||
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
|
||||
for (int x = 0; x < TFT_WIDTH / CHAR_WIDTH; x++)
|
||||
tft.print(" ");
|
||||
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
|
||||
tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
tft.print(this->screen_buffer->get(i));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ class Display
|
||||
|
||||
void drawFrame();
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
void scrollScreenBuffer(bool down = false);
|
||||
#endif
|
||||
|
||||
//void addNodes(Menu* menu, String name, Menu* child, std::function<void()> callable);
|
||||
//void changeMenu(Menu* menu);
|
||||
//void showMenuList(Menu* menu, int layer);
|
||||
@@ -103,6 +107,10 @@ class Display
|
||||
|
||||
LinkedList<String>* display_buffer;
|
||||
|
||||
#ifdef SCREEN_BUFFER
|
||||
LinkedList<String>* screen_buffer;
|
||||
#endif
|
||||
|
||||
// The initial y coordinate of the top of the bottom text line
|
||||
uint16_t yDraw = YMAX - BOT_FIXED_AREA - TEXT_HEIGHT;
|
||||
|
||||
|
||||
@@ -926,7 +926,10 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_RICK_ROLL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_ALL) ||
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS))
|
||||
(wifi_scan_obj.currentScanMode == BT_SCAN_SKIMMERS) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR))
|
||||
{
|
||||
//Serial.println("Stopping scan...");
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
|
||||
@@ -1016,17 +1019,33 @@ void MenuFunctions::main(uint32_t currentTime)
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
if (u_btn.justPressed()){
|
||||
if (current_menu->selected > 0) {
|
||||
current_menu->selected--;
|
||||
this->buttonSelected(current_menu->selected);
|
||||
this->buttonNotSelected(current_menu->selected + 1);
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
|
||||
(wifi_scan_obj.currentScanMode == OTA_UPDATE)) {
|
||||
if (current_menu->selected > 0) {
|
||||
current_menu->selected--;
|
||||
this->buttonSelected(current_menu->selected);
|
||||
this->buttonNotSelected(current_menu->selected + 1);
|
||||
}
|
||||
}
|
||||
else if ((wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL)) {
|
||||
if (wifi_scan_obj.set_channel < 14)
|
||||
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel + 1);
|
||||
}
|
||||
}
|
||||
if (d_btn.justPressed()){
|
||||
if (current_menu->selected < current_menu->list->size() - 1) {
|
||||
current_menu->selected++;
|
||||
this->buttonSelected(current_menu->selected);
|
||||
this->buttonNotSelected(current_menu->selected - 1);
|
||||
if ((wifi_scan_obj.currentScanMode == WIFI_SCAN_OFF) ||
|
||||
(wifi_scan_obj.currentScanMode == OTA_UPDATE)) {
|
||||
if (current_menu->selected < current_menu->list->size() - 1) {
|
||||
current_menu->selected++;
|
||||
this->buttonSelected(current_menu->selected);
|
||||
this->buttonNotSelected(current_menu->selected - 1);
|
||||
}
|
||||
}
|
||||
else if ((wifi_scan_obj.currentScanMode == WIFI_PACKET_MONITOR) ||
|
||||
(wifi_scan_obj.currentScanMode == WIFI_SCAN_EAPOL)) {
|
||||
if (wifi_scan_obj.set_channel > 1)
|
||||
wifi_scan_obj.changeChannel(wifi_scan_obj.set_channel - 1);
|
||||
}
|
||||
}
|
||||
if(c_btn_press){
|
||||
@@ -1510,12 +1529,25 @@ void MenuFunctions::RunSetup()
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_DEAUTH, TFT_RED);
|
||||
});
|
||||
addNodes(&wifiSnifferMenu, text_table1[45], TFT_BLUE, NULL, PACKET_MONITOR, [this]() {
|
||||
wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);
|
||||
});
|
||||
addNodes(&wifiSnifferMenu, text_table1[46], TFT_VIOLET, NULL, EAPOL, [this]() {
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);
|
||||
});
|
||||
#ifndef MARAUDER_MINI
|
||||
addNodes(&wifiSnifferMenu, text_table1[46], TFT_VIOLET, NULL, EAPOL, [this]() {
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);
|
||||
});
|
||||
addNodes(&wifiSnifferMenu, text_table1[45], TFT_BLUE, NULL, PACKET_MONITOR, [this]() {
|
||||
wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);
|
||||
});
|
||||
#else
|
||||
addNodes(&wifiSnifferMenu, text_table1[46], TFT_VIOLET, NULL, EAPOL, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_SCAN_EAPOL, TFT_VIOLET);
|
||||
});
|
||||
addNodes(&wifiSnifferMenu, text_table1[45], TFT_BLUE, NULL, PACKET_MONITOR, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
wifi_scan_obj.StartScan(WIFI_PACKET_MONITOR, TFT_BLUE);
|
||||
});
|
||||
#endif
|
||||
addNodes(&wifiSnifferMenu, text_table1[47], TFT_RED, NULL, PWNAGOTCHI, [this]() {
|
||||
display_obj.clearScreen();
|
||||
this->drawStatusBar();
|
||||
@@ -1780,6 +1812,7 @@ void MenuFunctions::RunSetup()
|
||||
// Select update
|
||||
whichUpdateMenu.parentMenu = &deviceMenu;
|
||||
addNodes(&whichUpdateMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
|
||||
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
|
||||
changeMenu(whichUpdateMenu.parentMenu);
|
||||
});
|
||||
addNodes(&whichUpdateMenu, text_table1[39], TFT_GREEN, NULL, WEB_UPDATE, [this]() {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,10 @@ bool SDInterface::initSD() {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
pinMode(SD_CS, OUTPUT);
|
||||
|
||||
delay(10);
|
||||
|
||||
if (!SD.begin(SD_CS)) {
|
||||
Serial.println(F("Failed to mount SD Card"));
|
||||
|
||||
@@ -357,6 +357,9 @@ void WiFiScan::startWiFiAttacks(uint8_t scan_mode, uint16_t color, String title_
|
||||
esp_wifi_set_promiscuous(true);
|
||||
esp_wifi_set_max_tx_power(82);
|
||||
this->wifi_initialized = true;
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.attackLED();
|
||||
#endif
|
||||
initTime = millis();
|
||||
}
|
||||
|
||||
@@ -369,6 +372,10 @@ bool WiFiScan::shutdownWiFi() {
|
||||
esp_wifi_set_mode(WIFI_MODE_NULL);
|
||||
esp_wifi_stop();
|
||||
esp_wifi_deinit();
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.offLED();
|
||||
#endif
|
||||
|
||||
this->wifi_initialized = false;
|
||||
return true;
|
||||
@@ -385,6 +392,10 @@ bool WiFiScan::shutdownBLE() {
|
||||
|
||||
pBLEScan->clearResults();
|
||||
BLEDevice::deinit();
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.offLED();
|
||||
#endif
|
||||
|
||||
this->ble_initialized = false;
|
||||
return true;
|
||||
@@ -407,6 +418,7 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
(currentScanMode == WIFI_SCAN_PWN) ||
|
||||
(currentScanMode == WIFI_SCAN_ESPRESSIF) ||
|
||||
(currentScanMode == WIFI_SCAN_EAPOL) ||
|
||||
(currentScanMode == WIFI_SCAN_ACTIVE_EAPOL) ||
|
||||
(currentScanMode == WIFI_SCAN_ALL) ||
|
||||
(currentScanMode == WIFI_SCAN_DEAUTH) ||
|
||||
(currentScanMode == WIFI_ATTACK_BEACON_LIST) ||
|
||||
@@ -432,6 +444,9 @@ void WiFiScan::StopScan(uint8_t scan_mode)
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.display_buffer->clear();
|
||||
#ifdef SCREEN_BUFFER
|
||||
display_obj.screen_buffer->clear();
|
||||
#endif
|
||||
//Serial.print("display_buffer->size(): ");
|
||||
Serial.println(display_obj.display_buffer->size());
|
||||
|
||||
@@ -499,6 +514,10 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
sd_obj.openCapture("ap");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
Serial.println(text_table4[9] + (String)access_points->size());
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
@@ -508,9 +527,11 @@ void WiFiScan::RunAPScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[44],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[44],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -667,11 +688,11 @@ void WiFiScan::RunInfo()
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setCursor(0, 100);
|
||||
display_obj.tft.setCursor(0, SCREEN_HEIGHT / 3);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.setTextColor(TFT_CYAN);
|
||||
display_obj.tft.println(text_table4[20]);
|
||||
display_obj.tft.println(text_table4[21] + display_obj.version_number + "\n");
|
||||
display_obj.tft.println(text_table4[21] + display_obj.version_number);
|
||||
display_obj.tft.println(text_table4[22] + (String)esp_get_idf_version());
|
||||
#endif
|
||||
|
||||
@@ -728,6 +749,10 @@ void WiFiScan::RunInfo()
|
||||
void WiFiScan::RunEspressifScan(uint8_t scan_mode, uint16_t color) {
|
||||
sd_obj.openCapture("espressif");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
@@ -736,9 +761,11 @@ void WiFiScan::RunEspressifScan(uint8_t scan_mode, uint16_t color) {
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[36],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[36],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -757,38 +784,62 @@ void WiFiScan::RunEspressifScan(uint8_t scan_mode, uint16_t color) {
|
||||
|
||||
void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
sd_obj.openCapture("packet_monitor");
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
Serial.println("Using TFT DIY");
|
||||
#ifndef MARAUDER_MINI
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
|
||||
//display_obj.tft.setFreeFont(1);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); // Buttons
|
||||
display_obj.tft.fillRect(12, 0, 90, 32, TFT_BLACK); // color key
|
||||
|
||||
delay(10);
|
||||
|
||||
display_obj.tftDrawGraphObjects(x_scale); //draw graph objects
|
||||
display_obj.tftDrawColorKey();
|
||||
display_obj.tftDrawXScaleButtons(x_scale);
|
||||
display_obj.tftDrawYScaleButtons(y_scale);
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
#ifdef HAS_SCREEN
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
|
||||
//display_obj.tft.setFreeFont(1);
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); // Buttons
|
||||
display_obj.tft.fillRect(12, 0, 90, 32, TFT_BLACK); // color key
|
||||
|
||||
delay(10);
|
||||
|
||||
display_obj.tftDrawGraphObjects(x_scale); //draw graph objects
|
||||
display_obj.tftDrawColorKey();
|
||||
display_obj.tftDrawXScaleButtons(x_scale);
|
||||
display_obj.tftDrawYScaleButtons(y_scale);
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
display_obj.print_delay_1 = 15;
|
||||
display_obj.print_delay_2 = 10;
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[38],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Serial.println("Running packet scan...");
|
||||
@@ -806,45 +857,92 @@ void WiFiScan::RunPacketMonitor(uint8_t scan_mode, uint16_t color)
|
||||
|
||||
void WiFiScan::RunEapolScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
num_eapol = 0;
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#endif
|
||||
|
||||
sd_obj.openCapture("eapol");
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
//Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
//Serial.println("Using TFT DIY");
|
||||
#ifndef MARAUDER_MINI
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.tft.init();
|
||||
display_obj.tft.setRotation(1);
|
||||
display_obj.tft.fillScreen(TFT_BLACK);
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); // Buttons
|
||||
display_obj.tft.fillRect(12, 0, 90, 32, TFT_BLACK); // color key
|
||||
sd_obj.openCapture("eapol");
|
||||
|
||||
delay(10);
|
||||
|
||||
display_obj.tftDrawGraphObjects(x_scale); //draw graph objects
|
||||
display_obj.tftDrawEapolColorKey();
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
#ifdef HAS_SCREEN
|
||||
#ifdef TFT_SHIELD
|
||||
uint16_t calData[5] = { 391, 3491, 266, 3505, 7 }; // Landscape TFT Shield
|
||||
//Serial.println("Using TFT Shield");
|
||||
#else if defined(TFT_DIY)
|
||||
uint16_t calData[5] = { 213, 3469, 320, 3446, 1 }; // Landscape TFT DIY
|
||||
//Serial.println("Using TFT DIY");
|
||||
#endif
|
||||
display_obj.tft.setTouch(calData);
|
||||
|
||||
display_obj.tft.setFreeFont(NULL);
|
||||
display_obj.tft.setTextSize(1);
|
||||
display_obj.tft.fillRect(127, 0, 193, 28, TFT_BLACK); // Buttons
|
||||
display_obj.tft.fillRect(12, 0, 90, 32, TFT_BLACK); // color key
|
||||
|
||||
delay(10);
|
||||
|
||||
display_obj.tftDrawGraphObjects(x_scale); //draw graph objects
|
||||
display_obj.tftDrawEapolColorKey();
|
||||
display_obj.tftDrawChannelScaleButtons(set_channel);
|
||||
display_obj.tftDrawExitScaleButtons();
|
||||
#endif
|
||||
#else
|
||||
sd_obj.openCapture("eapol");
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
display_obj.print_delay_1 = 15;
|
||||
display_obj.print_delay_2 = 10;
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[38],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
esp_wifi_init(&cfg);
|
||||
esp_wifi_set_storage(WIFI_STORAGE_RAM);
|
||||
//esp_wifi_set_mode(WIFI_MODE_NULL);
|
||||
esp_wifi_set_mode(WIFI_AP_STA);
|
||||
esp_wifi_set_mode(WIFI_MODE_AP);
|
||||
|
||||
esp_err_t err;
|
||||
wifi_config_t conf;
|
||||
err = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_LR);
|
||||
if (err != 0)
|
||||
{
|
||||
Serial.print("could not set protocol : err=0x");
|
||||
Serial.println(err, HEX);
|
||||
}
|
||||
|
||||
esp_wifi_get_config((wifi_interface_t)WIFI_IF_AP, &conf);
|
||||
conf.ap.ssid[0] = '\0';
|
||||
conf.ap.ssid_len = 0;
|
||||
conf.ap.channel = this->set_channel;
|
||||
conf.ap.ssid_hidden = 1;
|
||||
conf.ap.max_connection = 0;
|
||||
conf.ap.beacon_interval = 60000;
|
||||
|
||||
err = esp_wifi_set_config((wifi_interface_t)WIFI_IF_AP, &conf);
|
||||
if (err != 0)
|
||||
{
|
||||
Serial.print("AP config set error, Maurauder SSID might visible : err=0x");
|
||||
Serial.println(err, HEX);
|
||||
}
|
||||
|
||||
esp_wifi_start();
|
||||
esp_wifi_set_promiscuous(true);
|
||||
esp_wifi_set_promiscuous_filter(&filt);
|
||||
@@ -868,9 +966,11 @@ void WiFiScan::RunMimicFlood(uint8_t scan_mode, uint16_t color) {
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(" Mimic Flood ",120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(" Mimic Flood ",120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
#endif
|
||||
|
||||
@@ -890,6 +990,10 @@ void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
sd_obj.openCapture("pwnagotchi");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
@@ -898,9 +1002,11 @@ void WiFiScan::RunPwnScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[37],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[37],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -922,6 +1028,10 @@ void WiFiScan::RunBeaconScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
sd_obj.openCapture("beacon");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
@@ -930,9 +1040,11 @@ void WiFiScan::RunBeaconScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_WHITE, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[38],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[38],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -953,6 +1065,10 @@ void WiFiScan::RunDeauthScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
sd_obj.openCapture("deauth");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
@@ -961,9 +1077,11 @@ void WiFiScan::RunDeauthScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[39],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[39],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_RED, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -986,6 +1104,10 @@ void WiFiScan::RunProbeScan(uint8_t scan_mode, uint16_t color)
|
||||
{
|
||||
sd_obj.openCapture("probe");
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.sniffLED();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.TOP_FIXED_AREA_2 = 48;
|
||||
display_obj.tteBar = true;
|
||||
@@ -994,9 +1116,11 @@ void WiFiScan::RunProbeScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[40],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[40],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_GREEN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -1034,9 +1158,11 @@ void WiFiScan::RunBluetoothScan(uint8_t scan_mode, uint16_t color)
|
||||
display_obj.initScrollValues(true);
|
||||
display_obj.tft.setTextWrap(false);
|
||||
display_obj.tft.setTextColor(TFT_BLACK, color);
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[41],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#ifndef MARAUDER_MINI
|
||||
display_obj.tft.fillRect(0,16,240,16, color);
|
||||
display_obj.tft.drawCentreString(text_table4[41],120,16,2);
|
||||
display_obj.touchToExit();
|
||||
#endif
|
||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||
display_obj.setupScrollArea(display_obj.TOP_FIXED_AREA_2, BOT_FIXED_AREA);
|
||||
#endif
|
||||
@@ -1414,6 +1540,8 @@ void WiFiScan::apSnifferCallbackFull(void* buf, wifi_promiscuous_pkt_type_t type
|
||||
Serial.print(" ");
|
||||
}
|
||||
|
||||
ap.rssi = snifferPacket->rx_ctrl.rssi;
|
||||
|
||||
access_points->add(ap);
|
||||
|
||||
Serial.print(access_points->size());
|
||||
@@ -1536,8 +1664,8 @@ void WiFiScan::apSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
snifferPacket->payload[14],
|
||||
snifferPacket->payload[15]},
|
||||
false,
|
||||
NULL};
|
||||
|
||||
NULL,
|
||||
snifferPacket->rx_ctrl.rssi};
|
||||
|
||||
access_points->add(ap);
|
||||
|
||||
@@ -2211,6 +2339,14 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
|
||||
int len = snifferPacket->rx_ctrl.sig_len;
|
||||
|
||||
String display_string = "";
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
int buff = display_obj.display_buffer->size();
|
||||
#else
|
||||
int buff = 0;
|
||||
#endif
|
||||
|
||||
if (type == WIFI_PKT_MGMT)
|
||||
{
|
||||
len -= 4;
|
||||
@@ -2219,18 +2355,44 @@ void WiFiScan::wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
const WifiMgmtHdr *hdr = &ipkt->hdr;
|
||||
|
||||
// If we dont the buffer size is not 0, don't write or else we get CORRUPT_HEAP
|
||||
if (snifferPacket->payload[0] == 0x80)
|
||||
{
|
||||
num_beacon++;
|
||||
}
|
||||
else if ((snifferPacket->payload[0] == 0xA0 || snifferPacket->payload[0] == 0xC0 ))
|
||||
{
|
||||
num_deauth++;
|
||||
}
|
||||
else if (snifferPacket->payload[0] == 0x40)
|
||||
{
|
||||
num_probe++;
|
||||
}
|
||||
#ifndef MARAUDER_MINI
|
||||
if (snifferPacket->payload[0] == 0x80)
|
||||
{
|
||||
num_beacon++;
|
||||
}
|
||||
else if ((snifferPacket->payload[0] == 0xA0 || snifferPacket->payload[0] == 0xC0 ))
|
||||
{
|
||||
num_deauth++;
|
||||
}
|
||||
else if (snifferPacket->payload[0] == 0x40)
|
||||
{
|
||||
num_probe++;
|
||||
}
|
||||
#endif
|
||||
|
||||
char addr[] = "00:00:00:00:00:00";
|
||||
getMAC(addr, snifferPacket->payload, 10);
|
||||
display_string.concat(addr);
|
||||
|
||||
int temp_len = display_string.length();
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
for (int i = 0; i < 40 - temp_len; i++)
|
||||
{
|
||||
display_string.concat(" ");
|
||||
}
|
||||
|
||||
//Serial.print(" ");
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
if (display_obj.display_buffer->size() == 0)
|
||||
{
|
||||
display_obj.loading = true;
|
||||
display_obj.display_buffer->add(display_string);
|
||||
display_obj.loading = false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (save_packet)
|
||||
sd_obj.addPacket(snifferPacket->payload, len);
|
||||
@@ -2247,6 +2409,8 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
wifi_pkt_rx_ctrl_t ctrl = (wifi_pkt_rx_ctrl_t)snifferPacket->rx_ctrl;
|
||||
int len = snifferPacket->rx_ctrl.sig_len;
|
||||
|
||||
String display_string = "";
|
||||
|
||||
if (type == WIFI_PKT_MGMT)
|
||||
{
|
||||
len -= 4;
|
||||
@@ -2255,6 +2419,12 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
const WifiMgmtHdr *hdr = &ipkt->hdr;
|
||||
}
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
int buff = display_obj.display_buffer->size();
|
||||
#else
|
||||
int buff = 0;
|
||||
#endif
|
||||
|
||||
// Found beacon frame. Decide whether to deauth
|
||||
if (send_deauth) {
|
||||
if (snifferPacket->payload[0] == 0x80) {
|
||||
@@ -2283,9 +2453,10 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
new_packet[21] = snifferPacket->payload[15];
|
||||
|
||||
// Send packet
|
||||
//esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
//esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
delay(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -2295,18 +2466,42 @@ void WiFiScan::eapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
num_eapol++;
|
||||
Serial.println("Received EAPOL:");
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
char hexCar[4];
|
||||
sprintf(hexCar, "%02X", snifferPacket->payload[i]);
|
||||
Serial.print(hexCar);
|
||||
char addr[] = "00:00:00:00:00:00";
|
||||
getMAC(addr, snifferPacket->payload, 10);
|
||||
display_string.concat(addr);
|
||||
|
||||
int temp_len = display_string.length();
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
for (int i = 0; i < 40 - temp_len; i++)
|
||||
{
|
||||
display_string.concat(" ");
|
||||
}
|
||||
|
||||
Serial.print(" ");
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
if (display_obj.display_buffer->size() == 0)
|
||||
{
|
||||
display_obj.loading = true;
|
||||
display_obj.display_buffer->add(display_string);
|
||||
display_obj.loading = false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// for (int i = 0; i < len; i++) {
|
||||
// char hexCar[4];
|
||||
// sprintf(hexCar, "%02X", snifferPacket->payload[i]);
|
||||
// Serial.print(hexCar);
|
||||
//Serial.print(snifferPacket->payload[i], HEX);
|
||||
if ((i + 1) % 16 == 0)
|
||||
Serial.print("\n");
|
||||
else
|
||||
Serial.print(" ");
|
||||
}
|
||||
// if ((i + 1) % 16 == 0)
|
||||
// Serial.print("\n");
|
||||
// else
|
||||
// Serial.print(" ");
|
||||
// }
|
||||
|
||||
Serial.print("\n");
|
||||
// Serial.print("\n");
|
||||
}
|
||||
|
||||
if (save_packet)
|
||||
@@ -2336,6 +2531,8 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
if (snifferPacket->payload[0] == 0x80) {
|
||||
// Build packet
|
||||
|
||||
//Serial.println("Recieved beacon frame");
|
||||
|
||||
uint8_t new_packet[26] = {
|
||||
0xc0, 0x00, 0x3a, 0x01,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
@@ -2359,9 +2556,10 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
new_packet[21] = snifferPacket->payload[15];
|
||||
|
||||
// Send packet
|
||||
//esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
//esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
esp_wifi_80211_tx(WIFI_IF_AP, new_packet, sizeof(new_packet), false);
|
||||
delay(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -2370,18 +2568,18 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
num_eapol++;
|
||||
Serial.println("Received EAPOL:");
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
char hexCar[4];
|
||||
sprintf(hexCar, "%02X", snifferPacket->payload[i]);
|
||||
Serial.print(hexCar);
|
||||
// for (int i = 0; i < len; i++) {
|
||||
// char hexCar[3];
|
||||
// snprintf(hexCar, 3, "%02X", snifferPacket->payload[i]);
|
||||
// Serial.print(hexCar);
|
||||
//Serial.print(snifferPacket->payload[i], HEX);
|
||||
if ((i + 1) % 16 == 0)
|
||||
Serial.print("\n");
|
||||
else
|
||||
Serial.print(" ");
|
||||
}
|
||||
// if ((i + 1) % 16 == 0)
|
||||
// Serial.print("\n");
|
||||
// else
|
||||
// Serial.print(" ");
|
||||
// }
|
||||
|
||||
Serial.print("\n");
|
||||
// Serial.print("\n");
|
||||
}
|
||||
|
||||
if (save_packet)
|
||||
@@ -2796,6 +2994,12 @@ void WiFiScan::activeEapolSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t
|
||||
// showMetadata(snifferPacket, type);
|
||||
//}
|
||||
|
||||
void WiFiScan::changeChannel(int chan) {
|
||||
this->set_channel = chan;
|
||||
esp_wifi_set_channel(this->set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
delay(1);
|
||||
}
|
||||
|
||||
void WiFiScan::changeChannel()
|
||||
{
|
||||
esp_wifi_set_channel(this->set_channel, WIFI_SECOND_CHAN_NONE);
|
||||
@@ -2842,13 +3046,17 @@ void WiFiScan::main(uint32_t currentTime)
|
||||
else if (currentScanMode == WIFI_PACKET_MONITOR)
|
||||
{
|
||||
#ifdef HAS_SCREEN
|
||||
packetMonitorMain(currentTime);
|
||||
#ifndef MARAUDER_MINI
|
||||
packetMonitorMain(currentTime);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_EAPOL)
|
||||
{
|
||||
#ifdef HAS_SCREEN
|
||||
eapolMonitorMain(currentTime);
|
||||
#ifndef MARAUDER_MINI
|
||||
eapolMonitorMain(currentTime);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else if (currentScanMode == WIFI_SCAN_ACTIVE_EAPOL)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "TemperatureInterface.h"
|
||||
#include "settings.h"
|
||||
#include "Assets.h"
|
||||
#include "flipperLED.h"
|
||||
//#include "MenuFunctions.h"
|
||||
|
||||
#define bad_list_length 3
|
||||
@@ -74,6 +75,7 @@ extern Buffer buffer_obj;
|
||||
extern BatteryInterface battery_obj;
|
||||
extern TemperatureInterface temp_obj;
|
||||
extern Settings settings_obj;
|
||||
extern flipperLED flipper_led;
|
||||
|
||||
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, bool en_sys_seq);
|
||||
//int ieee80211_raw_frame_sanity_check(int32_t arg, int32_t arg2, int32_t arg3);
|
||||
@@ -90,6 +92,7 @@ struct AccessPoint {
|
||||
int bssid[6];
|
||||
bool selected;
|
||||
LinkedList<char>* beacon;
|
||||
int rssi;
|
||||
};
|
||||
|
||||
class WiFiScan
|
||||
@@ -295,6 +298,7 @@ class WiFiScan
|
||||
String getApMAC();
|
||||
String freeRAM();
|
||||
void changeChannel();
|
||||
void changeChannel(int chan);
|
||||
void RunInfo();
|
||||
void RunShutdownWiFi();
|
||||
void RunShutdownBLE();
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
#define POLISH_POTATO
|
||||
|
||||
#define MARAUDER_MINI
|
||||
//#define MARAUDER_MINI
|
||||
//#define MARAUDER_V4
|
||||
//#define MARAUDER_V6
|
||||
//#define MARAUDER_KIT
|
||||
//#define GENERIC_ESP32
|
||||
//#define MARAUDER_FLIPPER
|
||||
#define MARAUDER_FLIPPER
|
||||
|
||||
#define MARAUDER_VERSION "v0.9.10"
|
||||
#define MARAUDER_VERSION "v0.9.15"
|
||||
|
||||
//// BUTTON DEFINITIONS
|
||||
#ifdef MARAUDER_MINI
|
||||
@@ -201,6 +201,10 @@
|
||||
#define TOUCH_CS 21
|
||||
#define SD_CS 4
|
||||
|
||||
#define SCREEN_BUFFER
|
||||
|
||||
#define MAX_SCREEN_BUFFER 9
|
||||
|
||||
#define BANNER_TEXT_SIZE 1
|
||||
|
||||
#ifndef TFT_WIDTH
|
||||
@@ -210,7 +214,8 @@
|
||||
#ifndef TFT_HEIGHT
|
||||
#define TFT_HEIGHT 128
|
||||
#endif
|
||||
|
||||
|
||||
#define CHAR_WIDTH 6
|
||||
#define SCREEN_WIDTH TFT_WIDTH // Originally 240
|
||||
#define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
|
||||
#define HEIGHT_1 TFT_WIDTH
|
||||
@@ -346,7 +351,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
#define SD_CS -1
|
||||
#define SD_CS 10
|
||||
#endif
|
||||
//// END SD DEFINITIONS
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ https://www.online-utility.org/image/convert/to/XBM
|
||||
#include "settings.h"
|
||||
#include "CommandLine.h"
|
||||
#include "lang_var.h"
|
||||
#include "flipperLED.h"
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
#include "Display.h"
|
||||
@@ -60,6 +61,7 @@ LedInterface led_obj;
|
||||
EspInterface esp_obj;
|
||||
Settings settings_obj;
|
||||
CommandLine cli_obj;
|
||||
flipperLED flipper_led;
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
Display display_obj;
|
||||
@@ -117,9 +119,15 @@ void setup()
|
||||
#ifdef HAS_SCREEN
|
||||
digitalWrite(TFT_CS, HIGH);
|
||||
#endif
|
||||
|
||||
pinMode(SD_CS, OUTPUT);
|
||||
|
||||
delay(10);
|
||||
|
||||
digitalWrite(SD_CS, HIGH);
|
||||
|
||||
delay(10);
|
||||
|
||||
Serial.begin(115200);
|
||||
|
||||
//Serial.begin(115200);
|
||||
@@ -134,6 +142,10 @@ void setup()
|
||||
// Serial.println("Does not have screen");
|
||||
//#endif
|
||||
|
||||
#ifdef MARAUDER_FLIPPER
|
||||
flipper_led.RunSetup();
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCREEN
|
||||
display_obj.RunSetup();
|
||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
@@ -271,6 +283,11 @@ void setup()
|
||||
void loop()
|
||||
{
|
||||
currentTime = millis();
|
||||
bool mini = false;
|
||||
|
||||
#ifdef MARAUDER_MINI
|
||||
mini = true;
|
||||
#endif
|
||||
|
||||
// Update all of our objects
|
||||
#ifdef HAS_SCREEN
|
||||
@@ -292,8 +309,8 @@ void loop()
|
||||
temp_obj.main(currentTime);
|
||||
#endif
|
||||
settings_obj.main(currentTime);
|
||||
if ((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) &&
|
||||
(wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL)) {
|
||||
if (((wifi_scan_obj.currentScanMode != WIFI_PACKET_MONITOR) && (wifi_scan_obj.currentScanMode != WIFI_SCAN_EAPOL)) ||
|
||||
(mini)) {
|
||||
#ifdef HAS_SCREEN
|
||||
menu_function_obj.main(currentTime);
|
||||
#endif
|
||||
|
||||
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_flipper.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_flipper.bin
Normal file
Binary file not shown.
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_kit.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_kit.bin
Normal file
Binary file not shown.
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_mini.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_mini.bin
Normal file
Binary file not shown.
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_new_hardware.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_new_hardware.bin
Normal file
Binary file not shown.
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_old_hardware.bin
Normal file
BIN
esp32_marauder/esp32_marauder_v0_9_15_20220907_old_hardware.bin
Normal file
Binary file not shown.
41
esp32_marauder/flipperLED.cpp
Normal file
41
esp32_marauder/flipperLED.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "flipperLED.h"
|
||||
|
||||
void flipperLED::RunSetup() {
|
||||
pinMode(B_PIN, OUTPUT);
|
||||
pinMode(G_PIN, OUTPUT);
|
||||
pinMode(R_PIN, OUTPUT);
|
||||
|
||||
delay(50);
|
||||
|
||||
digitalWrite(B_PIN, LOW);
|
||||
delay(500);
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, LOW);
|
||||
delay(500);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, LOW);
|
||||
delay(500);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
}
|
||||
|
||||
void flipperLED::attackLED() {
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
delay(10);
|
||||
digitalWrite(R_PIN, LOW);
|
||||
}
|
||||
|
||||
void flipperLED::sniffLED() {
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
delay(10);
|
||||
digitalWrite(B_PIN, LOW);
|
||||
}
|
||||
|
||||
void flipperLED::offLED() {
|
||||
digitalWrite(B_PIN, HIGH);
|
||||
digitalWrite(G_PIN, HIGH);
|
||||
digitalWrite(R_PIN, HIGH);
|
||||
}
|
||||
19
esp32_marauder/flipperLED.h
Normal file
19
esp32_marauder/flipperLED.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef flipperLED_h
|
||||
#define flipperLED_h
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define B_PIN 4
|
||||
#define G_PIN 5
|
||||
#define R_PIN 6
|
||||
|
||||
class flipperLED {
|
||||
|
||||
public:
|
||||
void RunSetup();
|
||||
void attackLED();
|
||||
void sniffLED();
|
||||
void offLED();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -129,9 +129,9 @@ PROGMEM const char text4_1[] = "Potential Skimmer: ";
|
||||
PROGMEM const char text4_2[] = "Already Connected";
|
||||
PROGMEM const char text4_3[] = "Failed to connect";
|
||||
PROGMEM const char text4_4[] = "Connected";
|
||||
PROGMEM const char text4_5[] = "Force PMKID";
|
||||
PROGMEM const char text4_6[] = "Force Probe";
|
||||
PROGMEM const char text4_7[] = "Save PCAP";
|
||||
PROGMEM const char text4_5[] = "ForcePMKID";
|
||||
PROGMEM const char text4_6[] = "ForceProbe";
|
||||
PROGMEM const char text4_7[] = "SavePCAP";
|
||||
PROGMEM const char text4_8[] = "Probe Flood";
|
||||
PROGMEM const char text4_9[] = "Clearing APs...";
|
||||
PROGMEM const char text4_10[] = "APs Cleared: ";
|
||||
@@ -144,21 +144,21 @@ PROGMEM const char text4_16[] = "Shutting down WiFi...";
|
||||
PROGMEM const char text4_17[] = "WiFi not currently initialized";
|
||||
PROGMEM const char text4_18[] = "Shutting down BLE...";
|
||||
PROGMEM const char text4_19[] = "BLE not currently initialized";
|
||||
PROGMEM const char text4_20[] = " Firmware: Marauder"; //From 20 to 35 add spaces so : is in line like it is now
|
||||
PROGMEM const char text4_21[] = " Version: ";
|
||||
PROGMEM const char text4_22[] = " ESP-IDF: ";
|
||||
PROGMEM const char text4_23[] = " WSL Bypass: enabled\n";
|
||||
PROGMEM const char text4_24[] = " WSL Bypass: disabled\n";
|
||||
PROGMEM const char text4_25[] = " Station MAC: ";
|
||||
PROGMEM const char text4_26[] = " AP MAC: ";
|
||||
PROGMEM const char text4_27[] = " ";
|
||||
PROGMEM const char text4_28[] = " SD Card: Connected";
|
||||
PROGMEM const char text4_29[] = " SD Card Size: ";
|
||||
PROGMEM const char text4_30[] = " SD Card: Not Connected";
|
||||
PROGMEM const char text4_31[] = " SD Card Size: 0";
|
||||
PROGMEM const char text4_32[] = " IP5306 I2C: supported";
|
||||
PROGMEM const char text4_33[] = " Battery Lvl: ";
|
||||
PROGMEM const char text4_34[] = " IP5306 I2C: not supported";
|
||||
PROGMEM const char text4_20[] = "Firmware: Marauder"; //From 20 to 35 add spaces so : is in line like it is now
|
||||
PROGMEM const char text4_21[] = "Version: ";
|
||||
PROGMEM const char text4_22[] = "ESP-IDF: ";
|
||||
PROGMEM const char text4_23[] = "WSL Bypass: enabled";
|
||||
PROGMEM const char text4_24[] = "WSL Bypass: disabled";
|
||||
PROGMEM const char text4_25[] = "Station MAC: ";
|
||||
PROGMEM const char text4_26[] = "AP MAC: ";
|
||||
PROGMEM const char text4_27[] = "";
|
||||
PROGMEM const char text4_28[] = "SD Card: Connected";
|
||||
PROGMEM const char text4_29[] = "SD Card Size: ";
|
||||
PROGMEM const char text4_30[] = "SD Card: Not Connected";
|
||||
PROGMEM const char text4_31[] = "SD Card Size: 0";
|
||||
PROGMEM const char text4_32[] = "IP5306 I2C: supported";
|
||||
PROGMEM const char text4_33[] = "Battery Lvl: ";
|
||||
PROGMEM const char text4_34[] = "IP5306 I2C: not supported";
|
||||
PROGMEM const char text4_35[] = "Internal temp: ";
|
||||
PROGMEM const char text4_36[] = " Detect Espressif ";
|
||||
PROGMEM const char text4_37[] = " Detect Pwnagotchi ";
|
||||
|
||||
@@ -162,6 +162,7 @@ bool Settings::saveSetting<bool>(String key, bool value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Settings::toggleSetting(String key) {
|
||||
@@ -263,19 +264,19 @@ bool Settings::createDefaultSettings(fs::FS &fs) {
|
||||
//jsonBuffer["Settings"][1]["range"]["min"] = 1;
|
||||
//jsonBuffer["Settings"][1]["range"]["max"] = 10;
|
||||
|
||||
jsonBuffer["Settings"][0]["name"] = "Force PMKID";
|
||||
jsonBuffer["Settings"][0]["name"] = "ForcePMKID";
|
||||
jsonBuffer["Settings"][0]["type"] = "bool";
|
||||
jsonBuffer["Settings"][0]["value"] = true;
|
||||
jsonBuffer["Settings"][0]["range"]["min"] = false;
|
||||
jsonBuffer["Settings"][0]["range"]["max"] = true;
|
||||
|
||||
jsonBuffer["Settings"][1]["name"] = "Force Probe";
|
||||
jsonBuffer["Settings"][1]["name"] = "ForceProbe";
|
||||
jsonBuffer["Settings"][1]["type"] = "bool";
|
||||
jsonBuffer["Settings"][1]["value"] = true;
|
||||
jsonBuffer["Settings"][1]["range"]["min"] = false;
|
||||
jsonBuffer["Settings"][1]["range"]["max"] = true;
|
||||
|
||||
jsonBuffer["Settings"][2]["name"] = "Save PCAP";
|
||||
jsonBuffer["Settings"][2]["name"] = "SavePCAP";
|
||||
jsonBuffer["Settings"][2]["type"] = "bool";
|
||||
jsonBuffer["Settings"][2]["value"] = true;
|
||||
jsonBuffer["Settings"][2]["range"]["min"] = false;
|
||||
|
||||
@@ -19,9 +19,6 @@ class Settings {
|
||||
|
||||
private:
|
||||
String json_settings_string;
|
||||
|
||||
void printJsonSettings(String json_string);
|
||||
bool createDefaultSettings(fs::FS &fs);
|
||||
|
||||
public:
|
||||
bool begin();
|
||||
@@ -50,6 +47,8 @@ class Settings {
|
||||
//uint8_t loadSetting<uint8_t>(String key);
|
||||
|
||||
String getSettingsString();
|
||||
bool createDefaultSettings(fs::FS &fs);
|
||||
void printJsonSettings(String json_string);
|
||||
void main(uint32_t currentTime);
|
||||
};
|
||||
|
||||
|
||||
BIN
pictures/IMG_5876 - Copy.jpg
Normal file
BIN
pictures/IMG_5876 - Copy.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
BIN
pictures/IMG_5877 - Copy.jpg
Normal file
BIN
pictures/IMG_5877 - Copy.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
BIN
pictures/IMG_5878 - Copy.jpg
Normal file
BIN
pictures/IMG_5878 - Copy.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
BIN
pictures/IMG_5879 - Copy.jpg
Normal file
BIN
pictures/IMG_5879 - Copy.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 147 KiB |
Reference in New Issue
Block a user