Skip to content

Part of DoorbellCam project: firmware for esp32-based notifier

Notifications You must be signed in to change notification settings

mc-cat-tty/DoorbellCamFirmware

Repository files navigation

Firmware for custom-made notifier based on esp32 module. Notifications are received from a wireless 433MHz demodulator and shown through a series of light effects, which represent the state of the doorbell's FSM. A demux is connected to the esp32 in order to control a led ring; atm implemented animations are just forward and reverse spinner.

You can find other parts of the project at:

4Users

  1. Download receiver_fw.bin and transmitter_fw.bin from https://github.com/mc-cat-tty/DoorbellCamFirmware/releases/latest

  2. Flash them on your ESP32s

esptool.py -p /dev/ttyUSB0 -b 115200 write_flash -fm dio -z 0x00 [transmitter|receiver]_fw.bin

Warning: the upload port may be different on your setup.

4Devs

Dependencies

  • PIO - Platform IO (suggested)
  • ESP Tool
  • IDF Monitor
  • xtensa-esp32-elf package

You may need to add export PATH="$HOME/.platformio/penv/bin/:$PATH" to your ~/.bashrc or ~/.zshrc shell configuration file.

How to build

Transmitter:

pio run --environment transmitter

Receiver:

pio run --environment receiver

How to flash

Move into DoorbellCamFirmware/.pio/build/[transmitter|receiver]

esptool.py -p /dev/ttyUSB0 -b 115200 write_flash -fm dio -z 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 firmware.bin

How to debug

Move into DoorbellCamFirmware/.pio/build/[transmitter|receiver]

Dump all symbols:

readelf -s firmware.elf

Translate address to file:line (the manual way):

addr2line -e firmware.elf 0x400d19b3:0x3ffb7ed0

Where 0x400d19b3:0x3ffb7ed0 is one of the address you can find in a esp32 core dump's backtrace.

Traslate a whole backtracke (the smart way):

idf_monitor.py --port /dev/ttyUSB0 firmware.elf