Introduction
This article provides a detailed, step-by-step guide to updating the firmware of NCD sensors (Gen 2) via a USB-serial interface using a Python script. The process is designed to be simple and straightforward, making it accessible even for those new to firmware updates, while ensuring reliability for seasoned users. Both the necessary firmware files and the Python script are conveniently available in GitHub repositories, streamlining the setup and empowering you to enhance your NCD sensors with the latest features and improvements.
Overview
This is an overview of updating the firmware on your NCD sensor using a USB-to-serial converter. To get started, you’ll need to download the Python script and the latest firmware file from our GitHub repository. Next, connect the USB-to-serial device to your NCD sensor, and then run the Python script to kick off the firmware update process.

Requierements
In order to perform a firmware update via USB Serial some requiremets are necessaries, here we describe each necesary tool you need to have:
- NCD Sensor to perform a Firmware update.
- A USB to Serial Adapter.
- USB-Serial driver.
- Python Interpreter (some windows PC already comes with Python installed).
- Pyserial Python library.
Procedure
Step 5. Next, navigate to the PRxx-xxx-main folder and find the ncd_py_bootloader_v2 file. Move this file to the same location as the Vx_PRxx-xx.ncd file. If you’re using the Enterprise-Sensor-Firmware-main, the ncd_py_bootloader_v2 file should already be in place. For simplicity, we recommend using the /Downloads folder as your working directory. Once this step is complete, your file setup should look something like this:
Step 8. Before proceeding, ensure that your PC has the necessary USB-to-serial driver installed. To confirm this, connect the USB-to-serial adapter to your PC and open Device Manager. If the driver is installed correctly, you’ll see a COM port number listed, similar to the example below:
Step 11. To start the firmware update, enter the following command, replacing “xx” with your specific values:
python ncd_py_bootloader_v2.py ./Vxx_PRxx_xx.ncd 240
For example:
python ncd_py_bootloader_v2.py COM4 ./V10_PR55-4.ncd 240
Step 16. Wait for the process to complete. Once finished, you should see the message ‘Sending Reboot’, indicating that the device will reboot.
Step 17. At the end of the procedure, you can safely disconnect the USB programmer.
Drawbacks
Sometimes you need to install the: python or the pyserial module. You can check the Python version on Windows operating systems by typing the following command in a Command Prompt window:
python --version
If Python is not already installed on your Windows PC, you will need to install it.
Installing Python on windows
Step 1. First, go to the following link:
Step 4: Click the Install Now option to begin the installation process.
Step 5: Once the Setup was successful message appears, click the Close button to finish.
Step 6: After completing the Python installation, verify it by opening a new Command Prompt window and typing:
python --version
Press Enter to check that Python is installed correctly.
Step 7: Running the command should display the installed Python version, such as:
Python 3.8.x.
Installing PySerial
Once you’ve completed the pyserial module installation, close the Command Prompt window. Then, open a new Command Prompt window and attempt to run the NCD Python script for the firmware update again.
Could not open port COM
- Check for Other Applications Using the COM Port: Ensure that no other applications on your computer, such as XCTU, Node-RED, or similar tools, are currently using the COM port. If any are, close them temporarily while performing the firmware update.
- Inspect the USB Cable: Confirm that the USB cable is in good working condition. If you suspect an issue, try swapping it with a different USB cable and test the connection again.
Summary
This article walks you through the process of updating the firmware on your NCD sensor using a USB-to-serial converter and a Python script. Start by downloading the necessary Python script and firmware file from our GitHub repository, then connect your USB-to-serial adapter to the sensor. Ensure Python 3.8 is installed with the pyserial module, and organize the files in your /Downloads folder. Run the script from a Command Prompt window to initiate the update, pressing the reset button to begin the process—look for confirmation messages like Startup msg received and Manifest store success!. If you encounter errors such as No module named ‘serial’ or could not open port ‘COMx’, troubleshoot by installing missing modules, checking for COM port conflicts, or inspecting your USB cable. With these steps, you’ll have your NCD sensor’s firmware updated smoothly and efficiently.
Thanks, NCD Team
Share this on: