Main Content

Configure Host and Bootloader COM Port Manually

Simulink® software automatically detects the COM port settings of the USB connection between your host computer and the Arduino® hardware. Optionally, you can also configure these settings manually.

Configure Host and Bootloader COM Port on Windows

To configure the COM port and bootloader COM port settings manually on Windows®:

  1. Press the Arduino RESET button twice to run the hardware in bootloader mode.

  2. In the Configuration Parameters dialog window, select your Arduino board from the Hardware board parameter.

  3. In the Hardware Implementation pane, browse to Target Hardware Resources > Host-board connection. Change the Host-board connection parameter to Manually and leave the Configuration Parameters dialog open.

  4. Open Devices and Printers in Windows.

  5. Navigate to Ports (COM & LPT), expand the list, and locate your Arduino device.

    1. Search for the board name that appears as <name of your board> <(COMx). x is the host COM port number.

    2. Search for the board name that appears as <name of your board> bootloader <(COMy). y is the bootloader COM port number.

    1

  6. Right-click the Arduino device and select Properties from the menu.

  7. Click the Port Settings tab and set the Bits per second parameter.

  8. In the Configuration Parameters dialog window, go to Host-board connection. Set Set host COM port to either Manually Select or Manually Specify and update the COM port number and Bootloader COM port to match the ports numbers in Windows. For more information on how to set these parameters, see Host-board connection.

  9. In the Configuration Parameters dialog window, go to Serial port properties, and update the Serial 0 baud rate to match the bits per second specified in Windows. For more information, see Serial port properties.

  10. Click OK and save the model.

Configure COM Port on Mac OS X

To configure the COM port settings manually on Mac OS X:

  1. In the Configuration Parameters dialog window, select your Arduino board from the Hardware board parameter.

  2. In the Hardware Implementation pane, change the Host-board connection > Set host COM port parameter to Manually and leave the Configuration Parameters dialog open.

  3. On your Mac OS X host computer, open a terminal window and enter the following command:

    ls /dev/cu.usb*
    This command lists the path and file name of the USB device connected to the Arduino hardware. For example:
    /dev/cu.usbmodemfa131

  4. In Configuration Parameters, update Host-board connection > Set host COM port with the path and file name of the USB device. For example, enter /dev/cu.usbmodemfa131.

  5. Click OK and save the model.

Note

On a Mac, the COM port number and the Bootloader COM port have the same port numbers. Simulink software detects the specified COM port number and automatically assigns the same port number to the bootloader COM port.

Configure COM Port on Linux

To configure the COM port settings manually on Linux®:

  1. In the Configuration Parameters dialog window, select your Arduino board from the Hardware board parameter.

  2. In the Hardware Implementation pane, change the Host-board connection > Set host COM port parameter to the Manually, and leave the Configuration Parameters dialog open.

  3. On your Linux host computer, open a terminal window and enter:

    ls /dev/ttyACM*

    This command lists the path and file name of the USB device connected to the Arduino hardware.

    For example, enter:

    /dev/ttyACM0

  4. In the Configuration Parameters dialog box, update the Host-board connection > Set host COM port parameter with the path and file name of the USB device.

    For example, enter:

    /dev/ttyACM0

Note

In Linux, the COM port number and the Bootloader COM port have the same port numbers. Simulink software detects the specified COM port number and automatically assigns the same port number to the bootloader COM port.


1 Microsoft® product screenshot(s) reprinted with permission from Microsoft Corporation.