Reworked A_Config.h
Now all hardware configurations are in one file and it's just a matter of commenting out one line to switch from one board to another.
This commit is contained in:
parent
20a2be51dd
commit
32c2294f90
|
@ -1,29 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 12
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE D-duino-b-v5 with the LED Ring Shield
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 12 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |Disabled |
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 10
|
||||
#define BUTTON_DOWN 9
|
||||
#define BUTTON_A 14
|
||||
#define BUTTON_B 12
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE Deauther Boy
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 10 |
|
||||
| Button Down | GPIO 9 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |GPIO 12 |
|
|
@ -1,82 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
//#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
0x3c = I2C address
|
||||
SDA = GPIO 5 (D1)
|
||||
SCL/SCK = GPIO 4 (D2) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE Deauther v3 & DSTIKE NodeMCU-07 v2
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812b) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,27 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE Deauther OLED v1.5S
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,18 +0,0 @@
|
|||
# DSTIKE Deauther OLED v1 - v1.5
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 16 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,26 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,18 +0,0 @@
|
|||
# DSTIKE Deauther OLED v2 - v3
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 16 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,26 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE Deauther OLED v3.5, v4 & DSTIKE Deauth Monster
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 4
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE USB Deauther v2
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812b) |
|
||||
| LED Pin | GPIO 4 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up | disabled |
|
||||
| Button Down | disabled |
|
||||
| Button A | disabled |
|
||||
| Button B | disabled |
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
#define HIGHLIGHT_LED 16
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRBW + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
# DSTIKE Deauther Wristband and Deauther Mini
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | 16 |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
|
@ -1,83 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
|
||||
//#define DEFAULT_SSID "pwned"
|
||||
//#define HIGHLIGHT_LED 16
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
//#define NEOPIXEL_LED
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
*/
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
//#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,20 +0,0 @@
|
|||
# Default Config
|
||||
Default configuration for all boards without using a display or RGB LED.
|
||||
The display can be enabled over the settings.
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 2 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 16 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 14 (D5) |
|
||||
| Button Down | GPIO 12 (D6) |
|
||||
| Button A | GPIO 13 (D7) |
|
||||
| Button B |disabled |
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
#define DEFAULT_SSID "Dickbutt " + bytesToStr(&(settings.getMacAP()[3]), 3)
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 255 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
|
@ -1,22 +0,0 @@
|
|||
# MrRobotBadge Dickbutt Shitty Addon
|
||||
|
||||
-> https://twitter.com/MrRobotBadge
|
||||
|
||||
Has a default SSID "Dickbutt 00:11:22" (00:11:22 = last 3 bytes of the MAC address)
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | disabled |
|
||||
| LED G | disabled |
|
||||
| LED B | 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 14 (D5) |
|
||||
| Button Down | GPIO 12 (D6) |
|
||||
| Button A | GPIO 13 (D7) |
|
||||
| Button B |disabled |
|
|
@ -1,26 +0,0 @@
|
|||
# Config Files
|
||||
|
||||
Here you find a bunch of modified config files for different boards.
|
||||
The default config should be fine for all boards that don't have a display or a RGB LED (like the NodeMCU).
|
||||
|
||||
Copy the `A_config.h` file and paste it in the Arduino sektch and replace the default config file.
|
||||
|
||||
- [Default Config (NodeMCU, Wemos d1 mini, ...)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
|
||||
- DSTIKE Deauther (without OLED)
|
||||
- [DSTIKE Deauther v1, v2, v3](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE Deauther v3.5](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_v3.5_and_NodeMCU-07_v2/A_config.h)
|
||||
- DSTIKE Deauther OLED
|
||||
- [DSTIKE Deauther OLED v1, v1.5](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v1_v1.5/A_config.h)
|
||||
- [DSTIKE Deauther OLED v1.5S (with RGB)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v1.5S/A_config.h)
|
||||
- [DSTIKE Deauther OLED v2, v2.5, v3](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v2_v2.5_v3/A_config.h)
|
||||
- [DSTIKE Deauther OLED v3.5, v4](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v3.5_v4_Monster/A_config.h)
|
||||
- [DSTIKE Deauther OLED Mini](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Wristband_Mini/A_config.h)
|
||||
- [DSTIKE Deauther Wristband](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Wristband_Mini/A_config.h)
|
||||
- [DSTIKE Deauther Monster](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v3.5_v4_Monster/A_config.h)
|
||||
- [DSTIKE Deauther Boy](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_Boy/A_config.h)
|
||||
- [DSTIKE NodeMCU-07 v1](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE NodeMCU-07 v2](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_v3.5_and_NodeMCU-07_v2/A_config.h)
|
||||
- [DSTIKE USB Deauther v1](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE USB Deauther v2 (with RGB)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_USB_Deauther_v2/A_config.h)
|
||||
- [DSTIKE D-duino with LED Ring Shield](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_D-duino_with_LED_Ring_Shield/A_config.h)
|
|
@ -1,83 +1,331 @@
|
|||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
|
||||
//#define DEFAULT_SSID "pwned"
|
||||
//#define HIGHLIGHT_LED 16
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
//#define NEOPIXEL_LED
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
*/
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
//#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
/* !!! Uncomment the board taht you're using !!! */
|
||||
|
||||
// #define NODEMCU
|
||||
// #define WEMOS_D1_MINI
|
||||
// #define USB_DEAUTHER
|
||||
// #define DEAUTHER
|
||||
// #define DEAUTHER_V1
|
||||
// #define DEAUTHER_V2
|
||||
// #define DEAUTHER_V3
|
||||
// #define D_DUINO_B_V5_LED_RING
|
||||
// #define DEAUTHER_BOY
|
||||
// #define DEAUTHER_V3_5
|
||||
// #define NODEMCU_07
|
||||
// #define NODEMCU_07_V2
|
||||
// #define DEAUTHER_OLED_V1_5_S
|
||||
// #define DEAUTHER_OLED
|
||||
// #define DEAUTHER_OLED_V1_5
|
||||
// #define DEAUTHER_OLED_V2
|
||||
// #define DEAUTHER_OLED_V2_5
|
||||
// #define DEAUTHER_OLED_V3
|
||||
// #define DEAUTHER_OLED_V3_5
|
||||
// #define DEAUTHER_OLED_V4
|
||||
// #define DEAUTHER_MOSTER
|
||||
// #define USB_DEAUTHER
|
||||
// #define USB_DEAUTHER_V2
|
||||
// #define DEAUTHER_WRISTBAND
|
||||
// #define DEAUTHER_WRISTBAND_V2
|
||||
// #define DEAUTHER_MINI
|
||||
|
||||
#define DEFAULT_ESP8266
|
||||
|
||||
// ========== CONFIGS ========== //
|
||||
#if defined(DEFAULT_ESP8266) || defined(NODEMCU) || defined(WEMOS_D1_MINI) || defined(USB_DEAUTHER) || defined(NODEMCU_07) || defined(DEAUTHER) || defined(DEAUTHER_V1) || defined(DEAUTHER_V2) || defined(DEAUTHER_V3)
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
#elif defined(D_DUINO_B_V5_LED_RING)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 12
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_BOY)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 10
|
||||
#define BUTTON_DOWN 9
|
||||
#define BUTTON_A 14
|
||||
#define BUTTON_B 12
|
||||
|
||||
#elif defined(DEAUTHER_V3_5) || defined(NODEMCU_07_V2)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V1_5_S)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED) || defined(DEAUTHER_OLED_V1_5)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_B 2
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SSD1306_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V2) || defined(DEAUTHER_OLED_V2_5) || defined(DEAUTHER_OLED_V3)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_B 2
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V3_5) || defined(DEAUTHER_OLED_V4) || defined(DEAUTHER_MOSTER)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(USB_DEAUTHER_V2)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 4
|
||||
|
||||
#elif defined(DEAUTHER_WRISTBAND) || defined(DEAUTHER_WRISTBAND_V2) || defined(DEAUTHER_MINI)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
#define HIGHLIGHT_LED 16
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
#endif /* if defined(DEFAULT_ESP8266) || defined(NODEMCU) || defined(WEMOS_D1_MINI) || defined(USB_DEAUTHER) || defined(NODEMCU_07) || defined(DEAUTHER) || defined(DEAUTHER_V1) || defined(DEAUTHER_V2) || defined(DEAUTHER_V3) */
|
||||
// ============================== //
|
||||
|
||||
|
||||
// ========= FALLBACK ========= //
|
||||
|
||||
#ifndef DEFAULT_SSID
|
||||
#define DEFAULT_SSID "pwned"
|
||||
#endif /* ifndef DEFAULT_SSID */
|
||||
|
||||
// ===== LED ===== //
|
||||
#ifndef LED_PIN_R
|
||||
#define LED_PIN_R 255
|
||||
#endif /* ifndef LED_PIN_R */
|
||||
|
||||
#ifndef LED_PIN_G
|
||||
#define LED_PIN_G 255
|
||||
#endif /* ifndef LED_PIN_G */
|
||||
|
||||
#ifndef LED_PIN_B
|
||||
#define LED_PIN_B 255
|
||||
#endif /* ifndef LED_PIN_B */
|
||||
|
||||
#ifndef LED_ANODE
|
||||
#define LED_ANODE false
|
||||
#endif /* ifndef LED_ANODE */
|
||||
|
||||
#ifndef LED_MODE_BRIGHTNESS
|
||||
#define LED_MODE_BRIGHTNESS 10
|
||||
#endif /* ifndef LED_MODE_BRIGHTNESS */
|
||||
|
||||
#if defined(LED_NEOPIXEL_RGB) || defined(LED_NEOPIXEL_GRB)
|
||||
#define NEOPIXEL_LED
|
||||
#endif /* if defined(LED_NEOPIXEL_RGB) || defined(LED_NEOPIXEL_GRB) */
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#ifndef DISPLAY_TEXT
|
||||
#define DISPLAY_TEXT ""
|
||||
#endif /* ifndef DISPLAY_TEXT */
|
||||
|
||||
#ifndef FLIP_DIPLAY
|
||||
#define FLIP_DIPLAY false
|
||||
#endif /* ifndef USE_DISPLAY */
|
||||
|
||||
#if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI)
|
||||
#define SSD1306_I2C
|
||||
#define USE_DISPLAY false
|
||||
#else /* if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI) */
|
||||
#define USE_DISPLAY true
|
||||
#endif /* if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI) */
|
||||
|
||||
#ifndef I2C_ADDR
|
||||
#define I2C_ADDR 0x3C
|
||||
#endif /* ifndef I2C_ADDR */
|
||||
|
||||
#ifndef I2C_SDA
|
||||
#define I2C_SDA 5
|
||||
#endif /* ifndef I2C_SDA */
|
||||
|
||||
#ifndef I2C_SCL
|
||||
#define I2C_SCL 4
|
||||
#endif /* ifndef I2C_SCL */
|
||||
|
||||
#ifndef SPI_RES
|
||||
#define SPI_RES 5
|
||||
#endif /* ifndef SPI_RES */
|
||||
|
||||
#ifndef SPI_DC
|
||||
#define SPI_DC 4
|
||||
#endif /* ifndef SPI_DC */
|
||||
|
||||
#ifndef SPI_CS
|
||||
#define SPI_CS 15
|
||||
#endif /* ifndef SPI_CS */
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#ifndef BUTTON_UP
|
||||
#define BUTTON_UP 255
|
||||
#endif // ifndef BUTTON_UP
|
||||
|
||||
#ifndef BUTTON_DOWN
|
||||
#define BUTTON_DOWN 255
|
||||
#endif // ifndef BUTTON_DOWN
|
||||
|
||||
#ifndef BUTTON_A
|
||||
#define BUTTON_A 255
|
||||
#endif // ifndef BUTTON_A
|
||||
|
||||
#ifndef BUTTON_B
|
||||
#define BUTTON_B 255
|
||||
#endif // ifndef BUTTON_B
|
||||
|
||||
// ======== AVAILABLE SETTINGS ========== //
|
||||
|
||||
/*
|
||||
#define DEFAULT_SSID "something"
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
#define LED_RGB
|
||||
#define LED_NEOPIXEL
|
||||
#define MY92
|
||||
|
||||
#define LED_ANODE false
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_G 255
|
||||
#define LED_PIN_B 2
|
||||
|
||||
#define LED_NEOPIXEL_RGB
|
||||
#define LED_NEOPIXEL_GRB
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 255
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 100
|
||||
|
||||
#define MY92_NUM 1
|
||||
#define MY92_DATA 4
|
||||
#define MY92_CLOCK 5
|
||||
#define MY92_CH_R 0
|
||||
#define MY92_CH_G 1
|
||||
#define MY92_CH_B 2
|
||||
#define MY92_CH_BRIGHTNESS 3
|
||||
#define MY92_MODEL MY92XX_MODEL_MY9291
|
||||
#define MY92_MODEL MY92XX_MODEL_MY9231
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define USE_DISPLAY false
|
||||
#define FLIP_DIPLAY false
|
||||
|
||||
#define SSD1306_I2C
|
||||
#define SSD1306_SPI
|
||||
#define SH1106_I2C
|
||||
#define SH1106_SPI
|
||||
|
||||
#define I2C_ADDR 0x3C
|
||||
#define I2C_SDA 5
|
||||
#define I2C_SCL 4
|
||||
|
||||
#define SPI_RES 5
|
||||
#define SPI_DC 4
|
||||
#define SPI_CS 15
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 255
|
||||
#define BUTTON_DOWN 255
|
||||
#define BUTTON_A 255
|
||||
#define BUTTON_B 255
|
||||
|
||||
*/
|
||||
|
||||
#endif /* ifndef config_h */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -26,21 +26,21 @@ class LED {
|
|||
|
||||
uint8_t brightness = 100;
|
||||
|
||||
#if defined(NEOPIXEL_LED)
|
||||
Adafruit_NeoPixel strip(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, LED_NEOPIXEL_MODE);
|
||||
#if defined(LED_NEOPIXEL_RGB)
|
||||
Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, NEO_RGB + NEO_KHZ400);
|
||||
#elif defined(LED_NEOPIXEL_GRB)
|
||||
Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, NEO_GRB + NEO_KHZ400);
|
||||
#elif defined(MY92)
|
||||
my92xx myled(MY92_MODEL, MY92_NUM, MY92_DATA, MY92_CLK, MY92XX_COMMAND_DEFAULT);
|
||||
my92xx myled = my92xx(MY92_MODEL, MY92_NUM, MY92_DATA, MY92_CLK, MY92XX_COMMAND_DEFAULT);
|
||||
#endif // if defined(NEOPIXEL_LED)
|
||||
|
||||
public:
|
||||
void setup() {
|
||||
analogWriteRange(0xff);
|
||||
|
||||
#if defined(LED_MODE_BRIGHTNESS)
|
||||
brightness = LED_MODE_BRIGHTNESS;
|
||||
#endif // if defined(LED_MODE_BRIGHTNESS)
|
||||
|
||||
#if defined(DIGITAL_LED) || defined(RGB_LED)
|
||||
#if defined(LED_DIGITAL) || defined(LED_RGB)
|
||||
if (LED_PIN_R < 255) pinMode(LED_PIN_R, OUTPUT);
|
||||
if (LED_PIN_G < 255) pinMode(LED_PIN_G, OUTPUT);
|
||||
if (LED_PIN_B < 255) pinMode(LED_PIN_B, OUTPUT);
|
||||
|
@ -56,7 +56,7 @@ class LED {
|
|||
myled->setChannel(3, 100);
|
||||
myled.setState(true);
|
||||
myled.update();
|
||||
#endif // if defined(DIGITAL_LED) || defined(RGB_LED)
|
||||
#endif // if defined(LED_DIGITAL) || defined(LED_RGB)
|
||||
}
|
||||
|
||||
void update();
|
||||
|
@ -74,7 +74,7 @@ class LED {
|
|||
void setColor(uint8_t r, uint8_t g, uint8_t b, bool output = false) {
|
||||
if (output) printColor(r, g, b);
|
||||
|
||||
#if defined(DIGITAL_LED)
|
||||
#if defined(LED_DIGITAL)
|
||||
if (LED_ANODE) {
|
||||
if (LED_PIN_R < 255) digitalWrite(LED_PIN_R, r > 0);
|
||||
if (LED_PIN_G < 255) digitalWrite(LED_PIN_G, g > 0);
|
||||
|
@ -84,7 +84,7 @@ class LED {
|
|||
if (LED_PIN_G < 255) digitalWrite(LED_PIN_G, g == 0);
|
||||
if (LED_PIN_B < 255) digitalWrite(LED_PIN_B, b == 0);
|
||||
}
|
||||
#elif defined(RGB_LED)
|
||||
#elif defined(LED_RGB)
|
||||
if ((r > 0) && (brightness > 0)) r = r * brightness / 100;
|
||||
if ((g > 0) && (brightness > 0)) g = g * brightness / 100;
|
||||
if ((b > 0) && (brightness > 0)) b = b * brightness / 100;
|
||||
|
@ -99,9 +99,6 @@ class LED {
|
|||
analogWrite(LED_PIN_G, g);
|
||||
analogWrite(LED_PIN_B, b);
|
||||
#elif defined(NEOPIXEL_LED)
|
||||
if ((r > 0) && (brightness > 0)) r = r * brightness / 100;
|
||||
if ((g > 0) && (brightness > 0)) g = g * brightness / 100;
|
||||
if ((b > 0) && (brightness > 0)) b = b * brightness / 100;
|
||||
|
||||
for (size_t i = 0; i < LED_NEOPIXEL_NUM; i++) {
|
||||
strip.setPixelColor(i, r, g, b);
|
||||
|
@ -115,7 +112,7 @@ class LED {
|
|||
myled->setChannel(MY92_CH_BRIGHTNESS, brightness);
|
||||
myled->setState(true);
|
||||
myled->update();
|
||||
#endif // if defined(DIGITAL_LED)
|
||||
#endif // if defined(LED_DIGITAL)
|
||||
}
|
||||
|
||||
void tempEnable();
|
||||
|
|
|
@ -1,139 +1,139 @@
|
|||
#ifndef Settings_h
|
||||
#define Settings_h
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <FS.h>
|
||||
extern "C" {
|
||||
#include "user_interface.h"
|
||||
}
|
||||
#include "ArduinoJson.h"
|
||||
#include "language.h"
|
||||
#include "A_config.h"
|
||||
|
||||
#define VERSION "v2.1.0"
|
||||
|
||||
extern void checkFile(String path, String data);
|
||||
extern JsonVariant parseJSONFile(String path, DynamicJsonBuffer& jsonBuffer);
|
||||
extern bool writeFile(String path, String& buf);
|
||||
extern void saveJSONFile(String path, JsonObject& root);
|
||||
extern String macToStr(uint8_t* mac);
|
||||
extern void getRandomMac(uint8_t* mac);
|
||||
extern bool strToMac(String macStr, uint8_t* mac);
|
||||
extern void setWifiChannel(uint8_t ch);
|
||||
extern String fixUtf8(String str);
|
||||
extern void copyWebFiles(bool force);
|
||||
extern bool macValid(uint8_t* mac);
|
||||
|
||||
class Settings {
|
||||
public:
|
||||
Settings();
|
||||
void load();
|
||||
void load(String filepath);
|
||||
void save(bool force);
|
||||
void save(bool force, String filepath);
|
||||
void reset();
|
||||
void print();
|
||||
|
||||
void set(const char* str, String value);
|
||||
String get(const char* str);
|
||||
|
||||
String getVersion();
|
||||
uint16_t getDeauthsPerTarget();
|
||||
uint8_t getDeauthReason();
|
||||
bool getBeaconChannel();
|
||||
uint8_t getForcePackets();
|
||||
bool getAutosave();
|
||||
uint32_t getAutosaveTime();
|
||||
bool getBeaconInterval();
|
||||
uint8_t getChannel();
|
||||
String getSSID();
|
||||
String getPassword();
|
||||
bool getCLI();
|
||||
bool getDisplayInterface();
|
||||
bool getWebInterface();
|
||||
uint16_t getChTime();
|
||||
uint8_t* getMacSt();
|
||||
uint8_t* getMacAP();
|
||||
bool getRandomTX();
|
||||
uint32_t getAttackTimeout();
|
||||
bool getLedEnabled();
|
||||
uint8_t getProbesPerSSID();
|
||||
bool getHidden();
|
||||
bool getCaptivePortal();
|
||||
uint16_t getMinDeauths();
|
||||
uint32_t getDisplayTimeout();
|
||||
String getLang();
|
||||
bool getSerialEcho();
|
||||
bool getWebSpiffs();
|
||||
|
||||
void setDeauthsPerTarget(uint16_t deauthsPerTarget);
|
||||
void setDeauthReason(uint8_t deauthReason);
|
||||
void setBeaconChannel(bool beaconChannel);
|
||||
void setForcePackets(uint8_t forcePackets);
|
||||
void setAutosave(bool autosave);
|
||||
void setAutosaveTime(uint32_t autosaveTime);
|
||||
void setBeaconInterval(bool beaconInterval);
|
||||
void setChannel(uint8_t channel);
|
||||
void setSSID(String ssid);
|
||||
void setPassword(String password);
|
||||
void setCLI(bool cli);
|
||||
void setDisplayInterface(bool displayInterface);
|
||||
void setWebInterface(bool webInterface);
|
||||
void setChTime(uint16_t chTime);
|
||||
void setMacSt(String macStr);
|
||||
bool setMacSt(uint8_t* macSt);
|
||||
void setMacAP(String macStr);
|
||||
bool setMacAP(uint8_t* macAP);
|
||||
void setRandomTX(bool randomTX);
|
||||
void setAttackTimeout(uint32_t attackTimeout);
|
||||
void setLedEnabled(bool ledEnabled);
|
||||
void setProbesPerSSID(uint8_t probesPerSSID);
|
||||
void setHidden(bool hidden);
|
||||
void setCaptivePortal(bool captivePortal);
|
||||
void setMinDeauths(uint16_t minDeauths);
|
||||
void setDisplayTimeout(uint32_t displayTimeout);
|
||||
void setLang(String lang);
|
||||
void setSerialEcho(bool serialEcho);
|
||||
void setWebSpiffs(bool webSpiffs);
|
||||
|
||||
private:
|
||||
bool changed = false;
|
||||
|
||||
String version = VERSION;
|
||||
|
||||
bool beaconChannel = false;
|
||||
bool autosave = true;
|
||||
bool beaconInterval = false;
|
||||
bool cli = true;
|
||||
bool displayInterface = USE_DISPLAY;
|
||||
bool webInterface = true;
|
||||
bool webSpiffs = false;
|
||||
bool randomTX = false;
|
||||
bool ledEnabled = true;
|
||||
bool serialEcho = true;
|
||||
|
||||
uint32_t attackTimeout = 600;
|
||||
uint32_t autosaveTime = 10000;
|
||||
uint32_t displayTimeout = 600;
|
||||
uint16_t deauthsPerTarget = 20;
|
||||
uint16_t chTime = 384;
|
||||
uint16_t minDeauths = 3;
|
||||
uint8_t forcePackets = 1;
|
||||
uint8_t channel = 9;
|
||||
uint8_t deauthReason = 1;
|
||||
uint8_t* macSt;
|
||||
uint8_t* macAP;
|
||||
uint8_t probesPerSSID = 1;
|
||||
|
||||
String ssid = "pwned";
|
||||
String password = "deauther";
|
||||
bool hidden = false;
|
||||
bool captivePortal = true;
|
||||
String lang = "en";
|
||||
|
||||
String FILE_PATH = "/settings.json";
|
||||
|
||||
String getJsonStr();
|
||||
};
|
||||
|
||||
#endif // ifndef Settings_h
|
||||
#ifndef Settings_h
|
||||
#define Settings_h
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <FS.h>
|
||||
extern "C" {
|
||||
#include "user_interface.h"
|
||||
}
|
||||
#include "ArduinoJson.h"
|
||||
#include "language.h"
|
||||
#include "A_config.h"
|
||||
|
||||
#define VERSION "v2.2.0"
|
||||
|
||||
extern void checkFile(String path, String data);
|
||||
extern JsonVariant parseJSONFile(String path, DynamicJsonBuffer& jsonBuffer);
|
||||
extern bool writeFile(String path, String& buf);
|
||||
extern void saveJSONFile(String path, JsonObject& root);
|
||||
extern String macToStr(uint8_t* mac);
|
||||
extern void getRandomMac(uint8_t* mac);
|
||||
extern bool strToMac(String macStr, uint8_t* mac);
|
||||
extern void setWifiChannel(uint8_t ch);
|
||||
extern String fixUtf8(String str);
|
||||
extern void copyWebFiles(bool force);
|
||||
extern bool macValid(uint8_t* mac);
|
||||
|
||||
class Settings {
|
||||
public:
|
||||
Settings();
|
||||
void load();
|
||||
void load(String filepath);
|
||||
void save(bool force);
|
||||
void save(bool force, String filepath);
|
||||
void reset();
|
||||
void print();
|
||||
|
||||
void set(const char* str, String value);
|
||||
String get(const char* str);
|
||||
|
||||
String getVersion();
|
||||
uint16_t getDeauthsPerTarget();
|
||||
uint8_t getDeauthReason();
|
||||
bool getBeaconChannel();
|
||||
uint8_t getForcePackets();
|
||||
bool getAutosave();
|
||||
uint32_t getAutosaveTime();
|
||||
bool getBeaconInterval();
|
||||
uint8_t getChannel();
|
||||
String getSSID();
|
||||
String getPassword();
|
||||
bool getCLI();
|
||||
bool getDisplayInterface();
|
||||
bool getWebInterface();
|
||||
uint16_t getChTime();
|
||||
uint8_t* getMacSt();
|
||||
uint8_t* getMacAP();
|
||||
bool getRandomTX();
|
||||
uint32_t getAttackTimeout();
|
||||
bool getLedEnabled();
|
||||
uint8_t getProbesPerSSID();
|
||||
bool getHidden();
|
||||
bool getCaptivePortal();
|
||||
uint16_t getMinDeauths();
|
||||
uint32_t getDisplayTimeout();
|
||||
String getLang();
|
||||
bool getSerialEcho();
|
||||
bool getWebSpiffs();
|
||||
|
||||
void setDeauthsPerTarget(uint16_t deauthsPerTarget);
|
||||
void setDeauthReason(uint8_t deauthReason);
|
||||
void setBeaconChannel(bool beaconChannel);
|
||||
void setForcePackets(uint8_t forcePackets);
|
||||
void setAutosave(bool autosave);
|
||||
void setAutosaveTime(uint32_t autosaveTime);
|
||||
void setBeaconInterval(bool beaconInterval);
|
||||
void setChannel(uint8_t channel);
|
||||
void setSSID(String ssid);
|
||||
void setPassword(String password);
|
||||
void setCLI(bool cli);
|
||||
void setDisplayInterface(bool displayInterface);
|
||||
void setWebInterface(bool webInterface);
|
||||
void setChTime(uint16_t chTime);
|
||||
void setMacSt(String macStr);
|
||||
bool setMacSt(uint8_t* macSt);
|
||||
void setMacAP(String macStr);
|
||||
bool setMacAP(uint8_t* macAP);
|
||||
void setRandomTX(bool randomTX);
|
||||
void setAttackTimeout(uint32_t attackTimeout);
|
||||
void setLedEnabled(bool ledEnabled);
|
||||
void setProbesPerSSID(uint8_t probesPerSSID);
|
||||
void setHidden(bool hidden);
|
||||
void setCaptivePortal(bool captivePortal);
|
||||
void setMinDeauths(uint16_t minDeauths);
|
||||
void setDisplayTimeout(uint32_t displayTimeout);
|
||||
void setLang(String lang);
|
||||
void setSerialEcho(bool serialEcho);
|
||||
void setWebSpiffs(bool webSpiffs);
|
||||
|
||||
private:
|
||||
bool changed = false;
|
||||
|
||||
String version = VERSION;
|
||||
|
||||
bool beaconChannel = false;
|
||||
bool autosave = true;
|
||||
bool beaconInterval = false;
|
||||
bool cli = true;
|
||||
bool displayInterface = USE_DISPLAY;
|
||||
bool webInterface = true;
|
||||
bool webSpiffs = false;
|
||||
bool randomTX = false;
|
||||
bool ledEnabled = true;
|
||||
bool serialEcho = true;
|
||||
|
||||
uint32_t attackTimeout = 600;
|
||||
uint32_t autosaveTime = 10000;
|
||||
uint32_t displayTimeout = 600;
|
||||
uint16_t deauthsPerTarget = 20;
|
||||
uint16_t chTime = 384;
|
||||
uint16_t minDeauths = 3;
|
||||
uint8_t forcePackets = 1;
|
||||
uint8_t channel = 9;
|
||||
uint8_t deauthReason = 1;
|
||||
uint8_t* macSt;
|
||||
uint8_t* macAP;
|
||||
uint8_t probesPerSSID = 1;
|
||||
|
||||
String ssid = "pwned";
|
||||
String password = "deauther";
|
||||
bool hidden = false;
|
||||
bool captivePortal = true;
|
||||
String lang = "en";
|
||||
|
||||
String FILE_PATH = "/settings.json";
|
||||
|
||||
String getJsonStr();
|
||||
};
|
||||
|
||||
#endif // ifndef Settings_h
|
Loading…
Reference in New Issue