Prerequisites
Before upgrading, ensure you have:- Python 3.x installed on your system
- USB cable (Type A to Type B Mini)
- BlueBus firmware file (
.hexformat) - Required Python packages:
pyserial,intelhex,tk-tools
Upgrade methods
You can upgrade firmware using either a graphical tool or command-line interface.GUI firmware tool
The graphical tool provides an easy-to-use interface for firmware upgrades.Connect your BlueBus
Connect the BlueBus module to your computer using a USB cable. The device will appear as:
- Linux:
/dev/ttyUSB* - macOS:
/dev/tty.usbserial* - Windows:
COM*
Select your device
From the dropdown menu, select your BlueBus device. The tool will automatically:
- Request the platform identifier (e.g.,
BLUEBUS_BOOTLOADER_2_4) - Display current firmware version
- Show the unit serial number
The bootloader will automatically enter bootloader mode if it doesn’t detect a valid application or if the recovery pin is pulled low.
Console firmware tool
For automated or scripted firmware upgrades, use the command-line tool.Basic upgrade
Additional commands
Entering bootloader mode
The bootloader has a 100ms timeout window to receive commands. There are several ways to enter bootloader mode:Automatic entry
The bootloader automatically activates when:- No valid application firmware is detected
- The recovery pin (RD5) is pulled low at startup
- The EEPROM bootloader mode flag is set
Manual entry from application
If the application is running, send the bootloader command:- Connect at 115200 baud (no parity)
- Send
\rto get a prompt - Send
bootloader\rcommand - Wait 500ms for mode switch
- Reconnect at 115200 baud with odd parity
- Begin bootloader communication
Memory layout
The firmware flashing process writes to specific memory regions:| Region | Start Address | End Address | Description |
|---|---|---|---|
| Bootloader | 0x0800 | 0x17FF | Protected bootloader code |
| Application Start | 0x1800 | - | Firmware upload begins here |
| Application Vector | 0x2000 | - | Application entry point |
| Application End | - | 0xAB000 | Maximum application size |
Firmware file format
BlueBus firmware uses Intel HEX format (.hex files). The tools parse this format and:
- Extract 24-bit instruction words from the HEX file
- Package data in 82-instruction blocks (164 bytes)
- Prepend each block with a 3-byte address
- Send blocks sequentially via the bootloader protocol
Troubleshooting
Device not detected
- Verify USB cable is connected properly
- Check that USB drivers are installed (especially on Windows)
- Try a different USB port
- On Linux, ensure you have permission to access
/dev/ttyUSB*(add user todialoutgroup)
Timeout errors
If you see “Failed to get a response within X seconds”:- Disconnect and reconnect the USB cable
- Ensure no other applications are using the serial port
- Try manually entering bootloader mode with the recovery pin
- Verify the baud rate and parity settings (115200 baud, odd parity)
Write failures
If firmware writes fail:- Verify the
.hexfile is not corrupted - Ensure sufficient power supply to the BlueBus
- Try the upgrade process again (the bootloader erases all flash before writing)
Platform not recognized
The tool expects one of these platform identifiers:BLUEBUS_BOOTLOADER_1_3BLUEBUS_BOOTLOADER_1_4BLUEBUS_BOOTLOADER_1_5BLUEBUS_BOOTLOADER_2_0BLUEBUS_BOOTLOADER_2_1BLUEBUS_BOOTLOADER_2_2BLUEBUS_BOOTLOADER_2_3BLUEBUS_BOOTLOADER_2_4