ESP32 Bit Pirate home
  • General commands
  • Beginner
  • 1 min
  • Serial CLI

Recipe · Beginner · General commands

How to switch protocol modes

Use m, mode, or direct mode names to move from the global prompt to UART, I2C, SPI, DIO and other tools.

Protocol lab with bus signals and command blocks.
Mode selection is the fastest way to reach the right protocol workflow.
Step 1

Commands

These commands are documented as global or quick-start commands.

Result

What it means

If the command returns the expected output, the firmware and terminal session are ready for the next workflow.

Troubleshooting

  • Type mode without arguments to open the selector.
  • Use lowercase mode names first, such as mode uart.
  • Return to the global help if you are not sure which mode is active.

Next steps

  • Try the same workflow on a known safe pin or target.
  • Save the useful command as a note or alias.
  • Move to the protocol-specific recipe once the basics work.

Protocol mode selection FAQ

Why switch modes instead of typing every command globally?

Each mode loads the command set and defaults for a specific bus such as UART, I2C, SPI or DIO. Switching modes keeps commands shorter and reduces confusion about which pins and settings are active.

How do I know which mode is currently active?

Check the prompt and run help in the current context. If you are unsure, return to the mode selector and choose the protocol again before wiring or sending traffic.

Can I change modes while a target is connected?

Yes, but make the target safe first. Avoid leaving a line driven in one mode and then reusing the same pin in another mode without checking direction, voltage and pull-up state.

Go deeper