Main Content

Set COM Port for Upload and Communication in金宝app

In most of the Pixhawk®boards, the COM port required to upload the firmware (bootloader COM port) and the COM port required to establish the connection with computer over MAVLink (Communications COM Port) are the same. You can use the same port to upload the firmware and communicate with the Pixhawk board after the firmware is uploaded. In such cases, you can use theAutomatically determine serial port for firmware uploadoption in Simulink®Model settings to detect the COM port.

No additional settings are required in External Mode, Connected I/O or PIL tab for the corresponding simulation modes. You can continue to use the same serial port.

However, for some Pixhawk boards, the bootloader COM Port and the main communications COM Port are different. When you connect to such boards, the bootloader port appears first in the Device Manager. The port shows for a few seconds and then the main communications port appears. A sample GIF image is shown here. The bootloader COM port is needed for firmware upload and the communication port is needed for MAVLink communication.

确保您指定正确的COM端口firmware upload and MAVLink communication. You will be unable to upload the firmware if you specify the communication COM port value instead of bootloader COM port value for firmware upload. In such cases, perform the following steps to set the upload and communication port correctly for a Pixhawk board in the Simulink model for different modes of simulation.

Set Bootloader COM Port for Firmware Upload and Deploy

  1. For the Simulink model, launch theModel Settings.

    A sample image of the default settings for hardware implementation is shown here.

  2. Clear theAutomatically determine serial port for firmware uploadoption and enter the bootloader serial port inSerial Port for firmware upload(This should be the bootloader port).

  3. Deploy the Simulink model. On theHardwaretab, in theModesection, selectRun on boardand then clickBuild, Deploy & Start.

Set Communication COM Port for Monitor & Tune (External Mode)

  1. Perform the settings for Build options as shown in the topicSet Bootloader COM Port for Firmware Upload and Deploy.

  2. InExternal modetab, clear theUse the same host serial port for External Mode as used for firmware uploadoption and mention the main communications port inHost Serial Port(this must be different from the bootloader port you mentioned earlier inBuild options).

  3. Run External Mode for the model.

Set Communication COM Port for PIL

  1. Perform the settings for Build options as shown in the topicSet Bootloader COM Port for Firmware Upload and Deploy.

  2. InPILTab, clear theUse the same host serial port for PIL as used for firmware uploadoption and mention the main communications port inHost Serial port(this must be different from the bootloader port you mentioned earlier inBuild options).

Set Communication COM Port for Connected IO

  1. Perform the settings for Build options as shown in the topicSet Bootloader COM Port for Firmware Upload and Deploy.

  2. InConnected I/Otab, clear theUse the same host serial port for Connected I/O as used for firmware uploadoption and mention the main communications port inHost Serial Port(this must be different than the bootloader port you mentioned earlier inBuild options).