You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A radio with an internal MULTI-Module (e.g. T16, T18, TX16S), or
5
+
* A Jumper JP4IN1-SE or RadioBoss JP4IN1 MULTI-Module, or
6
+
* Any other MULTI-Module which is identified as a CP2102 device when you plug it, or
7
+
* Any Atmega32p-based MULTI-Module
8
+
9
+
You can stop reading now - this does not matter to you.
10
+
11
+
**If you have a Jumper JP4IN1, iRangeX IRX4, Banggood, or any other STM32 MULTI-Module, please read this information - if you use the USB port on your module, you will need to take action!**
12
+
13
+
If you want to cut to the chase, skip to the [what you need to do](#what-you-need-to-do) section.
14
+
15
+
## Introduction
16
+
The latest version of Flash Multi, v0.5.0, gives you the ability to flash a new bootloader to your MULTI-Module.
17
+
18
+
The new bootloader changes the behaviour of the USB port on your MULTI-module when you plug the module into a computer.
19
+
20
+
| Action | Old Bootloader (COM Port Mode) | New Bootloader (Sticky DFU Mode) |
21
+
| --- | --- | --- |
22
+
| Connect the module to the computer, radio is off | Module starts in DFU mode then switches to COM port mode | Module starts in DFU mode and stays in DFU mode |
23
+
| Connect the module to the computer, radio is on | Computer will detect a USB COM port | Computer will detect an unidentified device |
24
+
25
+
## Reason for Change
26
+
Historically, the MULTI-Module firmware has always included code to make the USB COM port work when the module is running. However, the USB COM port is only used in two ways:
27
+
* Switching the module to firmware update (DFU) mode when it is being flashed by using Flash Multi or the Arduino IDE
28
+
* Debug output when running a debug-enabled build (typically only used by developers)
29
+
30
+
And, there is never need for an internal MULTI-Module to have the USB COM port code, but it was always included. When this decision was made the firmware was around 80KB, and we had plenty of free space in the 128KB available flash on the STM32 MCU.
31
+
32
+
Fast-forward three years and we have all but run out of space in the STM32. In an effort to free some space up, we are removing USB support from the firmware. **This change saves 5KB of flash.** This may not seem like much, but it's room for several more protocols.
33
+
34
+
**Firmware without USB support will start to be released later in 2020.**
35
+
36
+
Because we're removing the mechanism that would allow flashing tools to put the module into DFU mode, we have to provide a different way to do that.
37
+
38
+
This is where the new bootloader comes in - it keeps the module in DFU mode when it is plugged in via USB, removing the need to use the COM port to switch it into DFU mode.
39
+
40
+
## What you need to do
41
+
**You will need to use Flash Multi to upgrade the bootloader on your MULTI-Module _before_ you flash firmware which does not have USB support.**
42
+
43
+
### Upgrading to the new bootloader
44
+
There is a one-time process to update the bootloader on the module. After the bootloader upgrade you will need to flash new firmware to your module.
**You must pay attention to the instructions. DO NOT unplug the module until the red LED has gone out for at least two seconds.**
57
+
58
+
You will now need to write new MULTI-Module firmware to the module in the normal way:
59
+
1. Check that the COM port is set to **DFU Device**
60
+
1. Select the firmware file
61
+
1. Click **Write Module**
62
+
63
+
You will get a warning reminding you that you needed to update the bootloader, you may check the box to stop the message showing again.
64
+
65
+
Once you have written new firmware to your module, if you unplug it and plug it back in, the module should stay in DFU mode with the red LED blinking continuously.
66
+
67
+
## Frequently Asked Questions
68
+
## When should I update the bootloader?
69
+
You can do it any time after the release of Flash Multi v0.5.0. The new bootloader works with all previous MULTI-Module firmware releases.
70
+
71
+
### If I only ever flash my MULTI-Module from the radio do I have to do the bootloader update?
72
+
No, you don't have to do it. You can also wait and do it later if you want to.
73
+
74
+
### How do I know which bootloader my MULTI-Module has?
75
+
Plug it in via USB
76
+
* If the red LED blinks rapidly then starts to blink slowly and the green LED comes on you have the old bootloader
77
+
* If the red LED blinks rapidly continuously you have the new bootloader
78
+
* If the green LED comes on and the red LED stays off you have a module which does not use the bootloader for the USB port
79
+
80
+
### I flashed new firmware without USB support from the radio and now my USB port doesn't work, how do I fix it?
81
+
You have the old bootloader. Use Flash Multi to flash the module bootloader, as explained above. You will have to unplug and replug the module when instructed.
82
+
83
+
### I have to unplug and re-plug my module every time I flash it, how do I fix it?
84
+
You have the old bootloader. Use Flash Multi to flash the module bootloader, as explained above. You will have to unplug and replug the module when instructed.
85
+
86
+
### Why doesn't this apply to JP4IN1-SE or Radioboss modules?
87
+
They use a different USB interface which does not use DFU mode to flash firmware. They will work happily with the old or new bootloaders and do not require updating this way.
88
+
89
+
### Why doesn't this apply to radios with internal modules?
90
+
Because internal modules don't have USB ports they do not require any update to work properly with the new firmware which does not have USB support.
printf"flash-multi $VERSION\n\nThis program is Free Software and has NO WARRANTY.\nhttps://github.com/benlye/flash-multi/\n\n";
26
26
27
27
# Prepare simple help text to display when needed
28
-
USAGE="Usage: flash-multi [options] -f [firmware file] -p [serial device]\n\nOptions:\n -h Print this message and exit\n -r Read and display the firmware file information and exit\n -s Don't prompt for confirmation\n\n"
28
+
USAGE="Usage: flash-multi [options] -f [firmware file] -p [serial device]\n\nOptions:\n -h Print this message and exit\n -l Install legacy bootloader\n -r Read and display the firmware file information and exit\n -s Don't prompt for confirmation\n -b Baud rate (57600, 115200, 500000)\n\n"
29
29
30
30
# Get the command line options
31
-
whilegetopts":f:p:hrs" opt;do
31
+
whilegetopts":f:p:b:hrsl" opt;do
32
32
case$optin
33
33
f) FWFILE="$OPTARG"
34
34
;;
@@ -38,8 +38,12 @@ while getopts ":f:p:hrs" opt; do
38
38
;;
39
39
r) SHOWINFO="True"
40
40
;;
41
+
l) LEGACY="True"
42
+
;;
41
43
s) SILENT="True"
42
44
;;
45
+
b) BAUDRATE="$OPTARG"
46
+
;;
43
47
\?) printf"Invalid argument -$OPTARG\n\n";>&2
44
48
;;
45
49
:) printf"Missing value for argument -$OPTARG\n\n";>&2
0 commit comments