Main Content

Find ESP32 Port on Windows, Mac, and Linux

Before you use arduino object to establish a connection to your ESP32 board, it is required that you identify the port to which the ESP32 board is connected.

Note

If you are not able to find the port name after connecting an ESP32 board and following the steps mentioned in the below sections, refer to ESP32 Board Setup Tips.

Find Port Number on Windows

  1. Connect the ESP32 board to one of the USB ports on your computer running MATLAB® Support Package for Arduino® Hardware.

    If you are connecting the board for the first time, ensure that the driver installation is also complete.

  2. Open Device Manager (In the search box on the Windows Taskbar, type Device Manager).

  3. In the Device Manager window, expand the Ports (COM & LPT) list.

  4. Note the port name (COM#) corresponding to Silicon Labs CP210x USB to UART Bridge.

    You will be using this name (for example, COM12) as the value of Port input argument while creating the arduino object to establish connection to ESP32 board.

Find Port Number on Macintosh

  1. Connect the ESP32 board to one of the USB ports on your Mac running MATLAB Support Package for Arduino Hardware.

    If you are connecting the board for the first time, ensure that the driver installation is also complete.

  2. Open Terminal in macOS. To do this, you can either use Spotlight Search (search for Terminal) or use the Finder window (launch Finder, click Go > Utilities, and double-click Terminal).

  3. At the command prompt in the Terminal, go to the root directory (run this command: cd /).

  4. In the root directory, run this command: ls /dev/*.

  5. Note the port name /dev/tty.usbmodem* or /dev/tty.usbserial*.

    You will be using this name (for example, /dev/tty.usbmodem1421) as the value of Port input argument while creating the arduino object to establish connection to ESP32 board.

Find Port Number on Linux

  1. Connect the ESP32 board to one of the USB ports on your computer running MATLAB Support Package for Arduino Hardware.

    If you are connecting the board for the first time, ensure that the driver installation is also complete.

  2. Open a Terminal in Linux.

  3. At the command prompt in the Terminal, go to the root directory (run this command: cd /).

  4. In the root directory, run this command: ls /dev/tty*.

  5. Note the port name /dev/ttyUSB* or /dev/ttyACM*.

    You will be using this name (for example, /dev/ttyUSB0) as the value of Port input argument while creating the arduino object to establish connection to ESP32 board.