Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/package_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ jobs:
run: |
# zip up just the files we uploaded for the release
zip_name="wireless-debug-display-${{ matrix.build.name }}_$(git describe --tags --dirty).zip"
cd ${{ matrix.build.path }}
zip -r -j $zip_name build/*.bin build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flasher_args.json build/flash_args
echo "artifact_path=${{ matrix.build.path }}/$zip_name" >> "$GITHUB_ENV"
echo "artifact_path=$zip_name" >> "$GITHUB_ENV"

- name: Attach files to release
uses: softprops/action-gh-release@v2
Expand Down
134 changes: 123 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,32 @@ will print the data to a text log for display.

https://github.com/esp-cpp/wireless-debug-display/assets/213467/f835922f-e17f-4f76-95ee-5d6585e84656

## Configuration

You'll need to configure the build using `idf.py set-target <esp32 or esp32s3>`
and then `idf.py menuconfig` to then set the `Wireless Debug Display
Configuration` which allows you to set which hardware you want to run it on, as
well as the WiFi Access Point connection information (ssid/password). It also
allows customization of the port of the UDP server that the debug display is
running.

## Use
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**

- [Wireless Debug Display](#wireless-debug-display)
- [Description](#description)
- [Use](#use)
- [Program](#program)
- [Configure](#configure)
- [Sending Data to the Display](#sending-data-to-the-display)
- [Commands](#commands)
- [Plotting](#plotting)
- [Logging](#logging)
- [Development](#development)
- [Environment](#environment)
- [Build and Flash](#build-and-flash)
- [Output](#output)
- [Console Logs:](#console-logs)
- [Python script:](#python-script)
- [ESP32-WROVER-KIT](#esp32-wrover-kit)
- [LILYGO T-DECK](#lilygo-t-deck)
- [ESP32-S3-BOX](#esp32-s3-box)
- [ESP32-S3-BOX-3](#esp32-s3-box-3)

<!-- markdown-toc end -->

## Description

This code receives string data from a UDP server. It will parse that string data
and determine which of the following three types of data it is:
Expand All @@ -44,6 +60,84 @@ discovery using mDNS.
send messages or a file to the debug display. NOTE: zeroconf may not be
installed / accessible within the python environment used by ESP-IDF.

## Use

You must first program your hardware. Afterwards, you can configure it via a USB
connection using its built-in CLI.

### Program

Download the release `programmer` executable from the latest [releases
page](https://github.com/esp-cpp/wireless-debug-display/releases) for `windows`,
`macos`, or `linux` - depending on which computer you want to use to perform the
one-time programming. There are a few programmers pre-built for the
`ESP-BOX`, the `LilyGo T-Deck`, or the `ESP32-Wrover-Kit`.

1. Download the programmer
2. Unzip it
3. Double click the `exe` (if windows), or open a terminal and execute it from
the command line `./wireless-debug-display-<hardware>_programmer_v2.0.0_macos.bin`,
where hardware is one of `esp-box` or `t-deck` or `wrover-kit`.

### Configure

To configure it, simply connect it to your computer via USB and open the serial
port in a terminal (e.g. `screen`, `PuTTY`, etc.) at 115200 baud. Once there,
you can use it as you would any other CLI - and the `help` command will provide
info about the commands available.

Any SSID/Password you set will be securely saved in the board's NVS, which is
managed by the ESP-IDF WiFi subsystem.

```console
sta> help
Commands available:
- help
This help message
- exit
Quit the session
- log <verbosity>
Set the log verbosity for the wifi sta.
- connect
Connect to a WiFi network with the given SSID and password.
- connect <ssid> <password>
Connect to a WiFi network with the given SSID and password.
- disconnect
Disconnect from the current WiFi network.
- ssid
Get the current SSID (Service Set Identifier) of the WiFi connection.
- rssi
Get the current RSSI (Received Signal Strength Indicator) of the WiFi connection.
- ip
Get the current IP address of the WiFi connection.
- connected
Check if the WiFi is connected.
- mac
Get the current MAC address of the WiFi connection.
- bssid
Get the current BSSID (MAC addressof the access point) of the WiFi connection.
- channel
Get the current WiFi channel of the connection.
- config
Get the current WiFi configuration.
- scan <int>
Scan for available WiFi networks.
- memory
Display minimum free memory.
- switch_tab
Switch to the next tab in the display.
- clear_info
Clear the Info display.
- clear_plots
Clear the Plot display.
- clear_logs
Clear the Log display.
- push_data <data>
Push data to the display.
- push_info <info>
Push info to the display.
```

## Sending Data to the Display

This display is designed to receive data from any other device on the network,
Expand Down Expand Up @@ -97,7 +191,25 @@ All other text is treated as a log and written out to the log
window. Note, we do not wrap lines, so any text that would go off the
edge of the screen is simply not rendered.

## Build and Flash
## Development

You'll need to configure the build using `idf.py set-target <esp32 or esp32s3>`
and then `idf.py menuconfig` to then set the `Wireless Debug Display
Configuration` which allows you to set which hardware you want to run it on, as
well as the WiFi Access Point connection information (ssid/password). It also
allows customization of the port of the UDP server that the debug display is
running.

### Environment

This project is an ESP-IDF project, currently [ESP-IDF
v.5.4](https://github.com/espressif/esp-idf).

For information about setting up `ESP-IDF v5.4`, please see [the official
ESP-IDF getting started
documentation](https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32s3/get-started/index.html).

### Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

Expand Down
3 changes: 3 additions & 0 deletions components/gui/include/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class Gui {

void switch_tab();

void clear_plots();
void clear_logs();

void push_data(const std::string &data);
std::string pop_data();

Expand Down
16 changes: 16 additions & 0 deletions components/gui/src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ std::string Gui::pop_data() {
void Gui::clear_info() {
std::lock_guard<std::recursive_mutex> lk{mutex_};
info_window_.clear_logs();
// refresh the display
lv_obj_invalidate(tabview_);
}

void Gui::clear_plots() {
std::lock_guard<std::recursive_mutex> lk{mutex_};
plot_window_.clear_plots();
// refresh the display
lv_obj_invalidate(tabview_);
}

void Gui::clear_logs() {
std::lock_guard<std::recursive_mutex> lk{mutex_};
log_window_.clear_logs();
// refresh the display
lv_obj_invalidate(tabview_);
}

void Gui::add_info(const std::string &info) {
Expand Down
Loading