linuxthor / Hackers-TTGO-Watch

Firmware for a ttgo-watch2020-v1 / ttgo-watch2020-v2 / ttgo-watch2020-v3 smartwatch based on ESP32 from LilyGo.
GNU General Public License v2.0
68 stars 7 forks source link

Hackers-TTGO-Watch

time apps iplookup bluebox ping portscan

An alternative software distribution for the TTGO smartwatch based on ESP32 from LilyGo.

Forked from the excellent software by sharandac https://github.com/sharandac/My-TTGO-Watch with some small fixes and different apps.

Install

Clone this repository and open it with platformIO. Build and upload. On a terminal in vscode you can do it with

pio run -t upload

or simple press "build and upload" in platformIO.

known issues

notes regarding t-watch-2020 v2 (gps model)

Apps

New:-

Bluebox - bluebox for the phreaks
Silver box - DTMF dialler
Netscan - Simple connect() based port scanner (slow with unreachable/blocked hosts - is there a better way working for ESP32?)
Subnet - Simple subnet calculator to see how many hosts / valid hosts
Ping - Ping some IP address
IP Lookup - Lookup who owns an IP via the ip-info API
SSH client - Password only for now (no keys - TODO) / (known hosts handling via SPIFFS - TODO)
SSID Spam - Advertise some wireless networks named like Rick Astley lyrics
WiFi mon - See how busy a wireless channel is

Existing:-

IR Remote - IR remote
Stopwatch - Stopwatch
Alarm - Alarm clock

Call for ideas

If you have something you would like to see built for the watch (especially network/security tools) then please let me know using github issues. ~I will also make a tutorial about how to program your own apps shortly.~ (Now started here: https://github.com/linuxthor/My-TTGO-Watch-Dev)

For the programmers

Internal RAM is very limited, use PSRAM as much as possible. When you work with ArduinoJson, include this

#include "hardware/json_psram_allocator.h"

and create your json with

SpiRamJsonDocument doc( 1000 );

to move your json into PSRAM, here is enough RAM for all the crazy stuff you will do. And use

ps_malloc(), ps_calloc() and ps_realloc()

as often as possible. And one very important thing: Do not talk directly to the hardware!

Sound

To play sounds from the inbuild speakers use hardware/sound.h:

#include "hardware/sound.h"
[...]
// MP3 from SPIFFS:
// void sound_play_spiffs_mp3( const char *filename );
// example:
sound_play_spiffs_mp3( "/sound.mp3" )

// or WAV from PROGMEM via
//void sound_play_progmem_wav( const void *data, uint32_t len );

There is a configuration tile to enable/disable all sound output and set the global volume.

Contributors

Massive thanks to sharadac for the TTGO Watch project.

Where they give special thanks to the following people for their help:

5tormChild
bwagstaff
chrismcna
datacute
jakub-vesely
joshvito
JoanMCD
NorthernDIY
rnisthal
paulstueber
ssspeq

Thanks also to the following projects:

ArduinoJson
AsyncTCP
ESPAsyncWebServer
LVGL
TFT_eSPI
TTGO_TWatch_Library
ESP8266Audio
pubsubclient
ESP32Ping
LibSSH-ESP32

Every Contribution to this repository is highly welcome! Don't fear to create pull requests which enhance or fix the project, you are going to help everybody.