OpenSource-Hub

ESP32-Bit-Pirate

CLI ツール

geo-tp/ESP32-Bit-Pirate

ESP32 マルチプロトコル対応ハードウェアデバッグツール。Webコマンドラインに対応。

概要

ESP32-S3 開発ボードをマルチプロトコル解析・デバッグツールに変え、I2C、SPI、UART、1-Wire、JTAG、CAN、赤外線、Bluetooth、Wi-Fi、Sub-GHz、RFID などのプロトコルをサポートします。スニッフィング、スクリプト制御、EEPROM 読み取り、Web ターミナル機能を備えています。

README プレビュー

# ESP32 Bit Pirate\n\n[](https://geo-tp.github.io/ESP32-Bit-Pirate/)\n\n\n**ESP32 Bit Pirate** is open-source firmware that turns your device into a multi-protocol development and analysis tool, inspired by the legendary Bus Pirate.\n\nIt supports sniffing, sending, scripting, and interacting with various digital protocols (I2C, UART, 1-Wire, SPI, etc.) via a serial terminal or web-based CLI. It also communicates with radio protocols like Bluetooth, Wi-Fi, Sub-GHz and RFID.\n\nThe official project website centralizes everything: [ESP32 Bit Pirate Website](https://geo-tp.github.io/ESP32-Bit-Pirate/).\n\nFrom there you can [install the firmware](https://geo-tp.github.io/ESP32-Bit-Pirate/webflasher/), open the [web tools](https://geo-tp.github.io/ESP32-Bit-Pirate/web-tools/), follow [hardware guides](https://geo-tp.github.io/ESP32-Bit-Pirate/hardware/), explore [recipes](https://geo-tp.github.io/ESP32-Bit-Pirate/recipes/), and access the [documentation](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki).\n\n\n\n\n## Features\n\n- Interactive command-line interface (CLI) via **USB Serial or WiFi Web**.\n- **Modes for:**\n   - [HiZ](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/01-HiZ) (default)\n   - [I2C](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/05-I2C) (scan, glitch, slave mode, dump, eeprom)\n   - [SPI](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/06-SPI) (eeprom, flash, sdcard, slave mode)\n   - [UART](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/03-UART) / [Half-Duplex UART](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/04-HDUART) (bridge, read, write)\n   - [1WIRE](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/02-1WIRE) (ibutton, eeprom)\n   - [2WIRE](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/07-2WIRE) (sniff, smartcard) / [3WIRE](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/08-3WIRE) (eeprom)\n   - [DIO](https://github.com/geo-tp/ESP32-Bit-Pirate/wiki/09-DIO) (Digital I/O, read, pullup, set, pwm)\n   - [Infrared](https://github.com/geo-t

FAQ (4)

compatibility
LoRaモードはM5Stack LoRa Cap SX1262を使ったCardputer ADVで動作しますか?

はい。LoRa cap を Cardputer ADV に接続し、デフォルトのピン設定を使用してください。必要なピンはすでに事前設定されています。

参照 Issue #160
トラブル対応
IRremoteESP8266で長いエアコンリモコンのraw信号が複数のフレームに分割され、マーク/スペースが欠落する問題を修正する方法

デフォルトのrawキャプチャバッファは小さすぎます。IRremoteESP8266では、kRawBuf = 100 はmark/spaceエントリを99個しか格納できないため、繰り返し送信される72ビットフレームのような長いACリモコンの信号はバッファを超過し、分割または切り捨てられる可能性があります。InfraredService.cpp では、より大きなバッファ(例えば512)を指定して IRrecv を割り当ててください:

_receiver = new IRrecv(_rxPin, 512);

各 configure() 呼び出しで再割り当てを行う前に、大きなバッファのリークを防ぐため、以前のレシーバーを解放してください:

if (_receiver != nullptr) {
  _receiver->disableIRIn();
  delete _receiver;
  _receiver = nullptr;
}
_receiver = new IRrecv(_rxPin, 512);

その後、ESP32 Bit Pirateファームウェアをリビルドして書き込んでください。一時的な代替策としては、ライブラリの IRrecv.h 内の kRawBuf を変更する方法もありますが、IRrecv コンストラクタにサイズを渡し、オブジェクトのライフサイクルを修正する方が推奨される解決策です。

参照 Issue #154
トラブル対応
ESP32-S3FH4R2、4 MBフラッシュ、2 MB PSRAMを搭載したESP32-S3-ZeroまたはESP32-S3 SuperMiniのサポートを追加するにはどうすればよいですか?

ESP32-S3 DevKitをベースにしたカスタムのPlatformIO環境/プロファイルを使用し、board_build.flash_size = 4MBを設定します。4 MBのパーティションテーブルを作成します(例:partitions_s3_4m.csv):

# Name,     Type, SubType,   Offset,    Size,
nvs,        data, nvs,       0x9000,    0x6000,
phy_init,   data, phy,       0xF000,    0x1000,
factory,    app, factory,   0x10000,   0x390000,
spiffs,     data, spiffs,    0x3A0000,  0x60000,

board_build.partitions = partitions_s3_4m.csvでこのファイルを参照し、新しいPlatformIO環境でボード固有のGPIOを設定します。このレイアウトではcoredumpパーティションを省略し、4 MBのフラッシュに収まるように384 KBのSPIFFSパーティションを使用しています。専用環境でissue #180のmemset関連のクラッシュが発生する場合は、::memset()を明示的に呼び出すことが既知の回避策です。

参照 Issue #151
トラブル対応
M5StickS3でデフォルトのTXピンを使用している場合に、IR信号の受信または記録が機能しない問題を修正するにはどうすればよいですか?

デフォルトのTXピンではなく、RMTペリフェラルを介してM5StickS3の内蔵IR受信機を使用してください。M5StickS3のIR受信実装を含むライブラリ/ファームウェアのバージョンに更新し、M5StackのM5StickS3 IR NECサンプルに示されているように、RMTによる読み取りとデコードを使用するようにIR受信を設定してください。再ビルド後、NEC互換のリモコンで録画をテストしてください。

参照 Issue #161