Recovering MTM Module Firmware via CLI¶
Lets take a look at how we can recover a BrainStem module after it has become unresponsive (aka: “Bricked”). This is also very helpful when dealing with old devices with a firmware version that might not be compatible with the new Updater utility.
In order to preform this recovery process you will need a USB to Serial Module. There are many other devices that will also work; however, this one is equipped with a connector that easily connects to the UART port on our breakout boards.
Before starting make sure your device is connected and has power. Refer to the Getting Started page for additional information.
Preparing Device for Recovery¶
Using the image below for reference make the UART connection as show. Additionally, you will need to press and hold the reset button for 5 seconds; This will prepare the device to programmed via the UART port.
Finding your Communications Port¶
Windows¶
The communications port (COM) on Windows can be found by navigating to the Device Manager and expanding the “Ports (COM & LPT)” section. If you do not immediately recognize your device you can open each and inspect the details or you can simply disconnect and reconnect the device and monitor which one disappears and then reappears (You may need to select Action > Scan for hardware changes between the disconnect and reconnect).
Once you have figured out which device is yours make note of the port number. In my case it would be “COM5”
Mac/Linux¶
Open terminal and type in the following command (root access is required).
$> ls /dev/tty.*
This command will return all the serial devices connected to your machine. Locate the one you are wanting to work with. If you are not sure which serial device to use you can run the command twice. Once with the device connected and once without. The one that changes is the device you are interested in.
/dev/tty.Bluetooth-Incoming-Port
/dev/tty.Bluetooth-Modem
/dev/tty.usbserial-A601R8QJ
On my machine the device I am interested in is: “/dev/tty.usbserial-A601R8QJ”. Make note of your device as it will be needed later.
Recovering your Device with Updater¶
Finally, we are ready to recover the device. Below you will see the command required to the recover the device. We will be using the communications port we found above and don’t forget to configure your device for recovery.
If you have forgotten some of the commands please see Using Updater via CLI where we explained how to use the -H command to find more information about the Updater utility including examples.
Windows¶
$> ./Updater -U -t RECOVER -s COM5
Mac/Linux¶
$> ./Updater -U -t RECOVER -s /dev/tty.usbserial-A601R8QJ
After the recover process has completed you will need to press the reset button twice to put the device back into normal operating mode. Whether you are using a Mac, Linux or Windows your output should look similar to the following.
Home directory:[/Users/Mitch]
Application parameters:[Updater]
[Updater]
[-U]
[-t]
[REVOCER]
[-s]
[/dev/tty.usbserial-A601R8QJ]
Updater [Version 0.2 Dec 9 2015 14:14:42] [Copyright (C) 1994-2015, Acroname Inc.]
Firmware_Recovery via Serial Interface:
Sync to Device:
Get Info from Device:
Device responded with version: 2.4
Device responded with part number: 637615927
Device ID: [ 05005006 AE061446 508B34C6 F5001E43 ]
Device [05005006 AE061446 508B34C6 F5001E43] ==> Serial#:71E3928C, Build=130702287
GetBuild BIRD [/Users/Mitch/.acroname/updater/71E3928C/130702287.bird] VERIFIED.
Unlock Memory:
Device ID: [ 05005006 AE061446 508B34C6 F5001E43 ]
Transferring firmware to device from [/Users/Mitch/.acroname/updater/71E3928C/130702287.bird]
Transferring firmware block 0, 772 bytes
Transferred 768 of 768 bytes (100%)
Transferring firmware block 1, 49668 bytes
Transferred 4096 of 49664 bytes (8%)
Transferred 8192 of 49664 bytes (16%)
Transferred 12288 of 49664 bytes (25%)
Transferred 16384 of 49664 bytes (33%)
Transferred 20480 of 49664 bytes (41%)
Transferred 24576 of 49664 bytes (49%)
Transferred 28672 of 49664 bytes (58%)
Transferred 32768 of 49664 bytes (66%)
Transferred 36864 of 49664 bytes (74%)
Transferred 40960 of 49664 bytes (82%)
Transferred 45056 of 49664 bytes (91%)
Transferred 49152 of 49664 bytes (99%)
Transferred 49664 of 49664 bytes (100%)
Transferred 2 blocks, 50432 total bytes
Rebooting Device
END of Firmware_Recovery via Serial Interface
Completed processing: Updater [Version 0.2 Dec 9 2015 14:14:42] [Copyright (C)
1994-2015, Acroname Inc.]