M5 Stick C firmware for high-tech pranks
Go to file
Noah Axon 9563c17e70 Update documentation 2023-11-19 01:22:44 -06:00
.gitattributes Initial commit 2023-09-21 00:13:04 -05:00
.gitignore QOL Changes 2023-11-14 20:11:51 +01:00
LICENSE Timer-driven AppleJuice Advertising 2023-09-22 13:44:29 -05:00
M5-Nemo.jpg Image 2023-11-14 23:16:02 -06:00
README.md Update documentation 2023-11-19 01:22:44 -06:00
WORLD_IR_CODES.h Initial commit 2023-09-21 00:13:04 -05:00
applejuice.h Cleanup 2023-09-24 20:55:42 -05:00
m5stick-nemo.ino Merge pull request #20 from IMXNOOBX/main 2023-11-19 00:51:42 -06:00
tvbg.h Unify TRIGGER logic on TVBG flow 2023-11-13 12:49:12 -06:00
wifispam.h Fix some Cardputer stuff 2023-11-18 00:55:47 -06:00

README.md

M5Stick-NEMO

Firmware for high-tech pranks on M5Stack ESP32 Devices

Name and Background

NEMO started a personal project to help me learn more about ESP32 development with the Arduino IDE. I decided to replicate a few common, trending pranks that were getting a lot of attention in the tech community, as a challenge to myself, and to also better understand these attacks.
NEMO is named after the small, clever and stubborn fish in Finding Nemo. This project stands in contrast to another high-tech gadget that's associated with certain sea-dwelling creatures. I did want to prove that there are a lot of things you can do with a small development kit and some curiosity. I have no delusions of superseding the capabilities of any similar device with this project. It's just for fun, and my own education.

M5-Nemo on M5StickC+ and M5Cardputer

Features

  • TV B-Gone port (thanks to MrArm's HAKRWATCH) to shut off many infrared-controlled TVs, projectors and other devices
  • AppleJuice iOS Bluetooth device pairing spam
  • WiFi Spam - Funny SSIDs, WiFi Rickrolling, and a Random mode that creates hundreds of randomly-named SSIDs per minute
  • WiFi SSID Scanner - Display 2.4 GHz SSIDs nearby and get information about them
  • User-adjustable 24 Hour digital clock backed by the M5 Stick RTC so it holds relatively stable time even in deep sleep and low battery mode
  • EEPROM-backed Settings for rotation, brightness and, automatic dimming
  • Battery level and credits in settings menu

User Interface

There are three main controls:

  • Home - Stops the current process and returns you to the menu from almost anywhere in NEMO

  • Next - Moves the cursor to the next menu option. In function modes, this usually stops the process and returns you to the previous menu.

  • Select - Activates the currently-selected menu option, and wakes up the dimmed screen in function modes

  • StickC and StickC-Plus

    • Power: Long-press the power button for 6 seconds to turn off the unit
    • Home: Tap the power button (closest to the USB port)
    • Next: Tap the side button
    • Select: Tap the M5 button on the front of the unit
  • Cardputer

    • Home: Tap the Esc/~/` key or the Left-Arrow/, key
    • Next/Prev: Tap the Down-Arrow/. key and Up-Arrow/; keys to navigate
    • Select: Tap the OK/Enter key or Right-Arrow/? key

Install from M5Burner

This is the absolute easiest way to get NEMO

  • M5Stick C Plus Quick Start has links to the M5Burner app for Linux, MacOS and Windows. This is the official tool to install UIFlow and other official firmware. I provide up-to-date binaries for NEMO there.
  • Launch M5Burner
  • Select "StickC" from the menu on the left (or StampS3 for Cardputer)
  • Use the search at the top of the app to look for "NEMO". My official builds will be uploaded by "4x0nn" and have photos.
  • Click Download
  • Click Burn

Install .bin files manually with esptool.py

  • Install ESP-IDF tools per the Espressif Getting Started Guide
  • Open the esp-idf CMD tool (on Windows) - on Mac or Linux, esp-idf.py and esptool.py should be in the system path.
  • esptool.py --port COMPORT -b 115200 write_flash -z 0x0 M5Nemo-VERSION.bin
    • port may be a COM port e.g. COM4, COM11 on Windows. On Mac and Linux it will usually be in /dev such as /dev/ttyUSB0, /dev/ttyACM0 or /dev/cu.usbserial-3
    • M5Nemo-VERSION.bin should be a version you downloaded from a GitHub Release -- preferably the latest available.

Building from Source

If you want to customize NEMO or contribute to the project, you should be familiar with building NEMO from source.

  • Install Arduino IDE. I've used Arduino 1.8 on Linux and Windows, and Arduino 2.2 on Windows successfully.
  • Install the M5Stack boards for Arduino IDE: In File -> Preferences, paste this URL into the "Boards Manager URLs" text box. Use commas between URLs if there are already URLs present. https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
  • If M5Stack -> M5Stick-C-Plus doesn't show up under Tools -> Boards, then use Tools -> Boards -> Boards Manager and search for M5Stack. This will install support for most of the M5Stack boards including the Stick C Plus.
  • Ensure the correct device model (e.g. M5Stick-C, M5Stick-C-Plus or M5Cardputer) is selected in the boards menu.
  • Install necessary libraries. In Sketch -> Include Library -> Library Manager, search for and install the following libraries and any dependencies they require:
    • M5StickCPlus, M5StickC or M5Cardputer
    • IRRemoteESP8266
  • Un-comment the appropriate #define line near the top for your platform (STICK_C, STICK_C_PLUS or CARDPUTER)
  • Switch partition schemes. Tools -> Partition Scheme -> No OTA (Large APP) - sometimes this option is labeled Huge APP
  • Configuration
    • The code should compile cleanly and work on an M5Stick C Plus out of the box from the master branch or a release tag.
    • Uncomment only the one appropriate #define option or compiler errors will occur.
    • If for some reason the screen jumps from very dim at level 0 to almost fully bright at level 1 and further brightness levels don't affect anything, set the pct_brightness variable to false.
  • Compile and upload the project

Contributing

Contributions are welcome. Please look at the GitHub Issues for ideas to help enhance the project. When submitting a Pull Request, please target the develop branch. The easiest way to do this is to fork ALL branches, or to simply create a "develop" branch in your own fork, then use GitHub to Sync your develop branch. Take note of how certain hardware (like the LED and RTC) are defined and gated in the code and try to stick to those patterns.

Things I'd like help on:

  • A new "Region" of TV-B-Gone that's full of additional IR codes that can turn RGB LED strips, air conditioners, fans, sound bars and the like on and off
  • Help refactoring how menus work. The way it was built was fine when it was one main menu with a few options. Now, adding a new sub-menu involves a lot of duplicated code.

Things I probably won't merge in:

  • Bulk wifi deauthentication spamming
  • Bluetooth spam that potentially disrupts health and fitness trackers, smart watches, etc.