Manually Update Notecard Firmware

Hi folks! As you may know by now, the Q1 release from Blues Wireless includes updated firmware for your Notecard devices. While we recommend you use Notehub to update device firmware, some of you may want to manually update over USB. Here are some (relatively) quick instructions on how to do so.

Prerequisites

STM32CubeProgrammer Installation Notes

STM32CubeProgrammer is a bit finicky when it comes to installation:

Windows

Note: If you’re on a version of Windows older than Windows 10, you’ll first need to install the STM32 Virtual COM Port Driver.

Download and extract the zip package and run the installer (ignoring the security issues from Windows of course!).

macOS

Download and extract the zip package.

Using your terminal app of choice, navigate to the extracted directory and launch the installer in CLI mode (as of this writing, the latest version of STM32CubeProgrammer is 2.6.0):

./SetupSTM32CubeProgrammer-2.6.0.app/Contents/MacOs/SetupSTM32CubeProgrammer-2_6_0_macos

Linux

Prior to installation, make sure you have the following packages installed:

  • libusb-1.0-0-dev
  • unzip

If you are using a USB port to connect to the STM32 device, install the libusb1.0 package by typing the following command:

sudo apt-get install libusb-1.0.0-dev

To use ST-LINK probe or USB DFU to connect to a target, copy the rules files located under Driver/rules folder in /etc/udev/rules.d/ on Ubuntu (sudo cp *.* /etc/udev/rules.d).

Note: libusb1.0.12 version or higher is required to run STM32CubeProgrammer.

Download and extract the zip package and execute:

SetupSTM32CubeProgrammer-2.6.0.linux

Firmware Update Process

Connect your Notecard device to your computer via USB. Verify that your terminal emulator (e.g. dev.blues.io, CoolTerm, or TinyTerm) is able to connect to the device by sending the card.version command:

{"req": "card.version"}

The body of the response should look similar to this:

{
    "org":"Blues Wireless",
    "product":"Notecard",
    "version":"notecard-1.2.3-v11",
    "ver_major":1,
    "ver_minor":2,
    "ver_patch":3,
    "ver_build":9950,
    "built":"May 20 2020 17:11:56"
}

Important: Launch the built-in bootloader firmware by sending the bootloader command via your terminal emulator.

Note: In Windows Device Manager, this causes Notecard to disappear as a “Ports (COM & LPT)/USB Serial Device (VID 0x30A4, PID 0x0001)” and to reappear as a “Universal Serial Bus devices/STM32 BOOTLOADER (VID 0x0438, PID 0xDF11)”.

Now, you have two choices as to how to proceed. You may update the Notecard firmware via the STM32CubeProgrammer CLI or GUI.

CLI Method

Make sure STM32_Programmer_CLI.exe is in your PATH (or provide its absolute path in the command below). The program should have been installed in the same directory as STM32CubeProgrammer.exe.

Run the following command, substituting the path to your desired .bin firmware file:

STM32_Programmer_CLI --connect port=USB1 --write [path/to/binary.bin] 0x08000000 --verify --go 0x08000000

Note: On Windows be sure to reference STM32_Programmer_CLI.exe as the executable in the above command.

GUI Method

Open the STM32CubeProgrammer application.

Select “USB” from the dropdown menu provided in the upper-right corner:

select usb

Select the port corresponding to your Notecard in the “Port” dropdown menu (likely “USB1”).

Note: You may need to click the button next to the port dropdown to refresh the list.

Click the “Connect” button and the log should update and display Data read successfully.

Next, access the “Erasing & Programming” screen by clicking the menu button with the arrow pointing down:

Follow the other configuration options in the image above:

  • Select the appropriate firmware .bin file.
  • Check the “Verify programming” box.
  • Check the “Run after programming” box.

Finally, click the “Start Programming” button. After a few seconds of commands displayed in the log, you should see multiple dialog warnings/notifications to click through and confirm.

Results

With either the CLI or GUI method, once the update process is complete, your Notecard will reset and reconnect. You can verify the firmware process was successful by executing another card.version request and inspecting the version parameter.

Run into trouble? Let us know by replying in this thread!

3 Likes

Rob,

How to get the latest firmware in a zip format, so I can update manual?

Regards,
Rob Oudendijk

Installed the STM32 programmer on Linux Mint added the UDEV rules (as mentioned in the instructions), but the Airnote does not connect. I can connect to the Airnote by a browser (Edge).

In the instructions, it was mentioned:
Launch the built-in bootloader firmware by sending the bootloader command via your terminal emulator.

How to do that?

Any suggestions?

You’ll need to use a serial terminal emulator like one of the ones mentioned:

Once connected you can issue the bootloader command.

Thanks for the fast reply. I used dev.blue.io. terminal and could flash correctly. Maybe a bit more details on how to do it would be appreciated. For example:

  1. Open browser compatible browser(Edge)
  2. Go to dev.blues.io
  3. Connect AIRNOTE by USB.
  4. Type “bootloader” in the terminal and press enter key.
  5. Start the STM32Cube programmer.
  6. Select the USB port.
  7. press “connect” button.
    etc…

From the terminal:

Welcome to the Notecard In-Browser Terminal.
Start making requests below.


bootloader

After Programming succesfully:

t
R00:15.87 trace is now on
S00:19.23 lcd test completed
S00:20.24 air: activated
S00:21.47 bme280: 29.20 C, 94561.80 pA, 49.52 %rh (0 retries)
{“req”:“card.version”}{“req”:“card.version”}
{“body”:{“org”:“Blues Wireless”,“product”:“Notecard”,“version”:“notecard-1.5.5”,“ver_major”:1,“ver_minor”:5,“ver_patch”:5,“ver_build”:13080,“built”:“May 28 2021 17:11:58”},“version”:“notecard-1.5.5.13080”,“device”:“dev:864475041076562”,“name”:“Blues Wireless Notecard”,“sku”:“NOTE-NBGL500”,“board”:“1.11”,“api”:1}

1 Like