Skip to content
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Bruce is a versatile ESP32 firmware packed with offensive-security tools, built to make Red Team operations fast and portable.

It also supports [M5Stack](https://shop.m5stack.com), [LILYGO](https://lilygo.cc) and [Elecrow](https://www.elecrow.com) products, and works great with the Cardputer, Sticks, M5Cores, T-Decks and T-Embeds.
It also supports [M5Stack](https://shop.m5stack.com), [LILYGO](https://lilygo.cc) , [RockBase IoT](https://www.rockbaseiot.com) and [Elecrow](https://www.elecrow.com) products, and works great with the Cardputer, Sticks, M5Cores, T-Decks and T-Embeds.

## :zap: Get Our Official DevKit!

Expand Down Expand Up @@ -245,6 +245,7 @@ Also, [read our FAQ](https://wiki.bruce.computer/faq/)
| [Bruce RF Reaper](https://www.elecrow.com/bruce-pcb-rf-reaper.html) | :ok: | :ok: | :x: | :ok: but w/ ST25R3916 | :x: | :ok: | :ok: | :x: | :ok: | :x: |
| [Elecrow 24B](https://www.elecrow.com/2-4inch-esp32-miner-lcd-display-2pcs-cryptocurrency-solo-miner-with-1000kh-s-hashrate.html) | :ok: | :ok: | :ok: | :ok: | :x: | :ok:¹ | :x: | :x: | :x: | :x:² |
| [Elecrow 3.5"](https://www.elecrow.com/esp-terminal-with-esp32-3-5-inch-parallel-480x320-tft-capacitive-touch-display-rgb-by-chip-ili9488.html) | :ok: | :ok: | :ok: | :ok: | :x: | :ok:¹ | :x: | :x: | :x: | :x:² |
| [NM-CYD-C5 + RF HAT](https://rockbase.shop/products/nm-cyd-c5-colorful) | :ok: | :ok: | :x: | :ok: | :x: | :ok: | :ok: | :x: | :ok: | :x: |
² CYD have a LITE_VERSION version for Launcher Compatibility
¹ Core, CYD and StickCs Bad-USB: [here](https://wiki.bruce.computer/features/others/#badusb)

Expand All @@ -258,6 +259,7 @@ Bruce stems from a keen observation within the community focused on devices like
![Bruce on M5Core](./media/pictures/core.png)
![Bruce on Stick](./media/pictures/stick.png)
![Bruce on CYD](./media/pictures/cyd.png)
![Bruce on CYD with NM-RF-HAT](./media/pictures/bruce-cyd.png)

Other media can be [found here](./media/).

Expand Down
12 changes: 6 additions & 6 deletions boards/CYD-2432S028/CYD-2432S028.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ build_flags =
-DBAD_RX=GROVE_SCL

; SERIAL (GPS) dedicated pins
-DSERIAL_TX=1
-DSERIAL_RX=3
-DSERIAL_TX=3
-DSERIAL_RX=1
-DGPS_SERIAL_TX=SERIAL_TX
-DGPS_SERIAL_RX=SERIAL_RX

Expand All @@ -75,14 +75,14 @@ build_flags =

;Infrared Led default pin and state
-DIR_TX_PINS='{{"Pin 22", 22}, {"Pin 27", 27}}'
-DIR_RX_PINS='{{"Pin 22", 22}, {"Pin 27", 27}, {"Pin 35", 35}}'
-DIR_RX_PINS='{{"Pin 27", 27}, {"Pin 22", 22}, {"Pin 35", 35}}'
-DTXLED=22 ;NEED TO SET SOMETHING HERE, at least -1
-DLED_ON=HIGH
-DLED_OFF=LOW

;Radio Frequency (one pin modules) pin setting
-DRF_TX_PINS='{{"Pin 22", 22}, {"Pin 27", 27}}'
-DRF_RX_PINS='{{"Pin 22", 22}, {"Pin 27", 27}, {"Pin 35", 35}}'
-DRF_RX_PINS='{{"Pin 27", 27}, {"Pin 22", 22}, {"Pin 35", 35}}'

;CC1101 SPI connection pins
; best connection pins for higher speed https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/spi_master.html#gpio-matrix-and-io-mux
Expand Down Expand Up @@ -116,7 +116,7 @@ build_flags =

;Screen Setup
-DHAS_SCREEN=1
-DROTATION=1
-DROTATION=3
-DBACKLIGHT=21
-DMINBRIGHT=160

Expand Down Expand Up @@ -339,7 +339,7 @@ build_flags =
extends=env:CYD-2432S028
build_flags =
${env:CYD-2432S028.build_flags}
-DTFT_INVERSION_ON
;-DTFT_INVERSION_ON
-DDEVICE_NAME='"CYD-2USB"'

[env:LAUNCHER_CYD-2USB]
Expand Down
34 changes: 34 additions & 0 deletions boards/CYD-2432S028/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,40 @@ void _post_setup_gpio() {
pinMode(TFT_BL, OUTPUT);
ledcAttach(TFT_BL, TFT_BRIGHT_FREQ, TFT_BRIGHT_Bits);
ledcWrite(TFT_BL, 255);

// Force sync color inversion to prevent bruceConf.json from overriding
// the value set in _setup_gpio(). For CYD variants with TFT_INVERSION_ON,
// the init() sequence sends INVON; we send INVOFF here to ensure normal colors.
#ifdef TFT_INVERSION_ON
bruceConfig.colorInverted = 0;
tft.invertDisplay(0);
#else
bruceConfig.colorInverted = 1;
tft.invertDisplay(1);
#endif

bruceConfigPins.gps_bus.rx = (gpio_num_t)GPS_SERIAL_RX;
bruceConfigPins.gps_bus.tx = (gpio_num_t)GPS_SERIAL_TX;
bruceConfigPins.gpsBaudrate = 9600;

bool pinsChanged = false;
if (bruceConfigPins.rfTx != 22) {
bruceConfigPins.rfTx = 22;
pinsChanged = true;
}
if (bruceConfigPins.rfRx != 27) {
bruceConfigPins.rfRx = 27;
pinsChanged = true;
}
if (bruceConfigPins.irTx != 22) {
bruceConfigPins.irTx = 22;
pinsChanged = true;
}
if (bruceConfigPins.irRx != 27) {
bruceConfigPins.irRx = 27;
pinsChanged = true;
}
if (pinsChanged) bruceConfigPins.saveFile();
}

/*********************************************************************
Expand Down
8 changes: 8 additions & 0 deletions boards/CYD-2432S028/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ static const uint8_t T9 = 32;
static const uint8_t DAC1 = 25;
static const uint8_t DAC2 = 26;

// I2C
#define GROVE_SDA 27
#define GROVE_SCL 22

// InfraRed
#define RXLED 27
#define TXLED 22

// Deepsleep
#define DEEPSLEEP_WAKEUP_PIN 36 // Touch interrupt
#define DEEPSLEEP_PIN_ACT LOW
Expand Down
24 changes: 18 additions & 6 deletions boards/nm-cyd-c5/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ void _setup_gpio() {
digitalWrite(SDCARD_CS, HIGH);
digitalWrite(W5500_SS_PIN, HIGH);
digitalWrite(TFT_CS, HIGH);
#ifdef ST7789_DRIVER
bruceConfig.colorInverted = 0;
#endif
#ifdef ILI9341_DRIVER
bruceConfig.colorInverted = 0;
#endif
}
/***************************************************************************************
** Function name: _post_setup_gpio()
Expand All @@ -60,6 +54,24 @@ void _post_setup_gpio() {
bruceConfigPins.gpsBaudrate = 9600;
bruceConfigPins.rfTx = 8;
bruceConfigPins.rfRx = 9;

// Force disable color inversion for ST7789/ILI9341 on nm-cyd-c5.
// Must be done here because begin_storage() loads bruceConf.json which may
// override the value set in _setup_gpio().
#ifdef ST7789_DRIVER
bruceConfig.colorInverted = 0;
tft.invertDisplay(0);
#endif
#ifdef ILI9341_DRIVER
bruceConfig.colorInverted = 0;
tft.invertDisplay(0);
#endif

// Force set I2C bus pins for nm-cyd-c5.
// brucePins.conf may have stale/wrong i2c_bus values, so override them
// to ensure PN532 and other I2C devices use the correct GPIO9(SDA)/GPIO8(SCL).
bruceConfigPins.i2c_bus.sda = (gpio_num_t)GROVE_SDA;
bruceConfigPins.i2c_bus.scl = (gpio_num_t)GROVE_SCL;
}

/***************************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions boards/nm-cyd-c5/nm-cyd-c5.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ build_flags =
-DGPS_SERIAL_RX=4
; grove pins
; defaults from https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h
-DGROVE_SDA=8 ; default RF TX pin
-DGROVE_SCL=9 ; default IR/RF RX pin
-DGROVE_SDA=9 ; default IR/RF RX pin
-DGROVE_SCL=8 ; default IR/RF TX pin
;-DALLOW_ALL_GPIO_FOR_IR_RF=1 ; Set this option to make use of all GPIOs, from 1 to 44 to be chosen, except TFT and SD pins

; ir led pin
Expand Down
6 changes: 4 additions & 2 deletions boards/nm-cyd-c5/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ static const uint8_t LP_TX = 11;
// UART
#define SERIAL_TX 11
#define SERIAL_RX 12

// I2C
#define GROVE_SDA 8
#define GROVE_SCL 9
#define GROVE_SDA 9
#define GROVE_SCL 8

// SPI
#define SPI_SCK_PIN 6
#define SPI_MOSI_PIN 7
Expand Down
Binary file added media/pictures/bruce-cyd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ build_flags =
-DCONFIG_ESP32_JTAG_SUPPORT_DISABLE=1
# Restrict IR protocols to save Flash on 4mb devices
-D_IR_ENABLE_DEFAULT_=false
-DDECODE_HASH=true
-DDECODE_NEC=true
-DSEND_NEC=true
-DDECODE_SAMSUNG=true
Expand Down
6 changes: 6 additions & 0 deletions src/core/menu_items/WifiMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#ifndef LITE_VERSION
#include "modules/pwnagotchi/pwnagotchi.h"
#include "modules/wifi/channel_analyzer.h"
#if defined(NM_CYD_ESP32C5)
#include "modules/wifi/dual_band_analyzer.h"
#endif
#include "modules/wifi/jam_detect.h"
#include "modules/wifi/wifi_recover.h"
#endif
Expand Down Expand Up @@ -74,6 +77,9 @@ void WifiMenu::optionsMenu() {
options.push_back({"SSH", lambdaHelper(ssh_setup, String(""))});
options.push_back({"Sniffer", sniffer_setup});
options.push_back({"Channel Analyzer", channel_analyzer_setup});
#if defined(NM_CYD_ESP32C5)
options.push_back({"Dual Band Analyzer", dual_band_analyzer_setup});
#endif
options.push_back({"Jam Detect", jam_detect_setup});
options.push_back({"Scan Hosts", [=]() {
bool doScan = true;
Expand Down
Loading
Loading