Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAVI-Embed

Dual-mode NFC firmware for LilyGO T-Embed CC1101 and T-Embed CC1101 Plus (ESP32-S3 + PN532 + ST7789).

It toggles on-the-fly between:

  1. USB HID Keyboard: Standalone badge reader. Reads ISO14443A / MIFARE / NTAG cards and types the hexadecimal UID followed by Enter. Single-shot capture prevents duplicate keystrokes while the tag remains on the antenna.
  2. libnfc Serial Bridge (pn532_uart over USB CDC): Transparent serial bridge for PC security auditing tools (nfc-list, mfoc, mfcuk, nfc-mfclassic) on Linux, Kali Linux, and VirtualBox VMs (/dev/ttyACM0 at 115200 baud). Uses single-shot atomic I2C reads to prevent byte-shift checksum errors.

Features a Copland OS inspired interface on the 320x170 ST7789 IPS display with real-time RX/TX frame counters.


Controls

Input Action
Rotary Dial (CW) Switch to LIBNFC BRIDGE mode
Rotary Dial (CCW) Switch to HID KEYBOARD mode
Center Knob Click (<400ms) Toggle operating mode
User Button Click (<400ms) Toggle operating mode
Knob / Button Hold (>3s) Deep Sleep power down

Installation

Option 1: MicroSD via bmorcelli / Launcher (Recommended)

  1. Copy NAVI-Embed.bin to your MicroSD card.
  2. Boot into bmorcelli / Launcher.
  3. Select NAVI-Embed.bin and launch.

Option 2: Direct Flash via USB (Offset 0x0)

Windows (PowerShell):

python -m esptool --chip esp32s3 -p COMx -b 921600 write_flash 0x0 NAVI-Embed.bin

Linux / macOS:

esptool.py --chip esp32s3 -p /dev/ttyACM0 -b 921600 write_flash 0x0 NAVI-Embed.bin

Kali Linux / libnfc Setup

  1. Forward the USB device (303a:1001) to the VM.
  2. Disable ModemManager to prevent serial port lockouts:
    sudo systemctl stop ModemManager
    sudo systemctl disable ModemManager
  3. Configure /etc/nfc/libnfc.conf:
    device.name = "LilyGO T-Embed PN532"
    device.connstring = "pn532_uart:/dev/ttyACM0"
    allow_autoscan = false
    allow_intrusive_scan = false
  4. Switch T-Embed to MODE:[LIBNFC BRIDGE] and run:
    sudo nfc-list
    sudo mfoc -O dump.mfd

Hardware Pinout Reference

Function Pin Notes
PN532 I2C SDA / SCL GPIO 18 / GPIO 8 100 kHz bus, Address 0x24
PN532 IRQ / Reset GPIO 1 / GPIO 3 Active LOW IRQ
ST7789 MOSI / SCLK GPIO 9 / GPIO 11 40 MHz SPI
ST7789 CS / DC / BL GPIO 41 / GPIO 16 / GPIO 21 Backlight active HIGH
Encoder A / B / Key GPIO 4 / GPIO 5 / GPIO 0 Pull-up enabled
User Button GPIO 6 Pull-up enabled
Power Enable GPIO 15 / GPIO 46 VDD enable (Standard & Plus)

Build from Source

git clone https://github.com/your-username/NAVI-Embed.git
cd NAVI-Embed
pio run

Generate the unified binary:

python -m esptool --chip esp32s3 merge_bin -o bin/NAVI-Embed.bin --flash_mode qio --flash_size 16MB 0x0 .pio/build/lilygo-t-embed-cc1101/bootloader.bin 0x8000 .pio/build/lilygo-t-embed-cc1101/partitions.bin 0x10000 .pio/build/lilygo-t-embed-cc1101/firmware.bin

License

MIT License.

Releases

Packages

Contributors

Languages