Skip to content

Commit

Permalink
Merge pull request #97 from dj1ch/development
Browse files Browse the repository at this point in the history
patches
  • Loading branch information
dj1ch authored Nov 23, 2024
2 parents 73f8c61 + 811e548 commit 781fff7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 82 deletions.
27 changes: 16 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,6 @@ There are multiple different screen types available:

Set `bool Config::display = false;` to true, and `std::string Config::screen = "<YOUR_SCREEN_TYPE>";` to one of those screen types if your screen is supported.

- This next line is also imporant, whether or not you use a screen.

```cpp
// quick and dirty way to save space if you're not using a display
#define disp 0
```
Here, we define whether or not we use a display (at least for the libraries). The reason we need this is because it determines whether or not your screen libraries will be included in the final sketch. It saves a lot of space because libraries tend to take up most of the program memory. If you're not using a display, keep this setting at `0`. If you are, set it to `1`.
- There should also be a line that says:

```cpp
Expand All @@ -122,7 +113,20 @@ int Config::channels[13] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};

Usually, this shouldn't be changed as these are the only channels we can access on the ESP32. Some ESP32s may be able to access 5ghz channels but not all of them. These are only 2.4 ghz channels.

- Save and exit the file when you have configured everything to your liking. Note you cannot change this after it is flashed onto the board.
- Save and exit this file when you have configured everything to your liking. Note you cannot change this after it is flashed onto the board.

- Additionally, you will need to change the file `config.h`

- This line is also imporant, whether or not you use a screen.

```cpp
// quick and dirty way to save space if you're not using a display
#define disp 0
```
Here, we define whether or not we use a display (at least for the libraries). The reason we need this is because it determines whether or not your screen libraries will be included in the final sketch. It saves a lot of space because libraries tend to take up most of the program memory. If you're not using a display, keep this setting at `0`. If you are, set it to `1`.
- After you're done with that, save all your files and proceed to the next steps. Once you flash, you will not be able to change your settings unless you flash again. (The only exception of this is the whitelist)
### Step 2: Building and flashing
Expand All @@ -142,7 +146,7 @@ https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32

- Open up the Minigotchi folder through the IDE by pushing `Ctrl+O`, or by going to `File` > `Open`, then selecting the folder the .ino is in. If other tabs don't show up, along with `minigotchi-ESP32.ino`, make sure to copy and paste the files into the same directory/folder as that lone `.ino` file. It won't be able to compile if that happens.

- Install the following dependencies (with their dependencies as well) with the library manager:
- Install the following dependencies (with their dependencies as well) with the library manager.:
- `ArduinoJson`
- `Adafruit GFX`
- `Adafruit SSD1306`
Expand All @@ -152,6 +156,7 @@ https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32
- `AsyncTCP`
- Remove/uninstall/modify your screen library depending on your display for `Config::screen` below, some of these dependencies may have already been installed previously.
- Sometimes the repository owner of certain libraries may require you to install it a certain way, be sure to follow their guides if needed/included.
- Keep in mind if `disp` is set to `0` in `config.h` then you won't need to install screen libraries at the cost of no screen being used

| `SSD1306` | `WEMOS_OLED_SHIELD` | `CYD` | `T_DISPLAY_S3` | Any `M5`\* board | `SSD1305` | `IDEASPARK_SSD1306` | `SH1106` |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------ | -------------------------- | -------------------------- | -------------------------- |
Expand Down
8 changes: 4 additions & 4 deletions minigotchi-ESP32/ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ void Ble::init() {
* Starts BLE
*/
void Ble::start() {
Serial.println(mood.getIntense() + " Starting Advertisement...");
Display::updateDisplay(mood.getIntense(), "Starting Advertisement...");
Serial.println(mood.getIntense() + " Starting BLE Spam...");
Display::updateDisplay(mood.getIntense(), "Starting BLE Spam...");
pAdvertising->start();
delay(delaySeconds * 1000);
pAdvertising->stop();
Display::updateDisplay(mood.getNeutral(), "Advertisement Stopped");
Serial.println(mood.getNeutral() + " Advertisement Stopped");
Display::updateDisplay(mood.getNeutral(), "BLE Spam Stopped");
Serial.println(mood.getNeutral() + " BLE Spam Stopped");
}

/**
Expand Down
3 changes: 0 additions & 3 deletions minigotchi-ESP32/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ bool Config::parasite = false;
bool Config::display = false;
std::string Config::screen = "";

// quick and dirty way to save space if you're not using a display
#define disp 0

// define baud rate
int Config::baud = 115200;

Expand Down
3 changes: 3 additions & 0 deletions minigotchi-ESP32/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include <string>
#include <vector>

// quick and dirty way to save space if you're not using a display
#define disp 0

class Config {
public:
static bool deauth;
Expand Down
32 changes: 4 additions & 28 deletions minigotchi-ESP32/deauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,10 @@ Mood &Deauth::mood = Mood::getInstance();
*
*/

uint8_t Deauth::deauthTemp[26] = {
/* 0 - 1 */ 0xC0,
0x00, // Type, subtype: c0 => deauth, a0 => disassociate
/* 2 - 3 */ 0x00,
0x00, // Duration (handled by the SDK)
/* 4 - 9 */ 0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF, // Reciever MAC (To)
/* 10 - 15 */ 0xCC,
0xCC,
0xCC,
0xCC,
0xCC,
0xCC, // Source MAC (From)
/* 16 - 21 */ 0xCC,
0xCC,
0xCC,
0xCC,
0xCC,
0xCC, // BSSID MAC (From)
/* 22 - 23 */ 0x00,
0x00, // Fragment & squence number
/* 24 - 25 */ 0x01,
0x00 // Reason code (1 = unspecified reason)
};
uint8_t Deauth::deauthTemp[26] = {0xC0, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xCC, 0xCC, 0xCC, 0xCC,
0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
0xCC, 0x00, 0x00, 0x01, 0x00};

uint8_t Deauth::deauthFrame[26];
uint8_t Deauth::disassociateFrame[26];
Expand Down
39 changes: 3 additions & 36 deletions minigotchi-ESP32/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,9 @@ Mood &Frame::mood = Mood::getInstance();

// Don't even dare restyle!
const uint8_t Frame::header[]{
/* 0 - 1 */ 0x80,
0x00, // frame control, beacon frame
/* 2 - 3 */ 0x00,
0x00, // duration
/* 4 - 9 */ 0xff,
0xff,
0xff,
0xff,
0xff,
0xff, // broadcast address
/* 10 - 15 */ 0xde,
0xad,
0xbe,
0xef,
0xde,
0xad, // source address
/* 16 - 21 */ 0xde,
0xad,
0xbe,
0xef,
0xde,
0xad, // bssid
/* 22 - 23 */ 0x00,
0x00, // fragment and sequence number
/* 24 - 32 */ 0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00, // timestamp
/* 33 - 34 */ 0x64,
0x00, // interval
/* 35 - 36 */ 0x11,
0x04, // capability info
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0xad,
0xbe, 0xef, 0xde, 0xad, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x11, 0x04,
};

// get header length
Expand Down

0 comments on commit 781fff7

Please sign in to comment.