# Komar (2022) downgrade from telega v1 to v0

**URL:** <https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326>\
**Category:** Electric drives\
**Tags:** komar\
**Created:** [November 9, 2024, 8:44pm UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326 "2024-11-09T20:44:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![psandro](https://forum.zubax.com/user_avatar/forum.zubax.com/psandro/32/2476_2.png) [@psandro](https://forum.zubax.com/u/psandro)\
**Post date:** [November 9, 2024, 8:44pm UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326/1 "2024-11-09T20:44:32Z")

</div>

I’m facing difficulties when trying to downgrade a Komar ESC from telega version 1.0 to 0.6.  
The Komar was bought in June 2022 and shipped with telega v0 firmware flashed.

The ESCs have been upgraded to telega v1, but after evaluation we decided to revert to v0 for our application.

I have a working slcan/yakut environment with the following nodes:

```auto
NodID Mode Health VSSC Uptime VProtcl VHardwr VSoftware(major.minor.vcs.crc) Unique-ID Name
   10 oper nomina 6 0d00:20:05 1.0 0.0 0.13 7c1af0cd99ae1d104c5174bcd8bcdded org.opencyphal.yakut.file_server
   88 oper nomina 46 0d00:37:41 1.0 0.0 0.13 674b81747fce75c6537666263aca99fe org.opencyphal.yakut.monitor
   92 oper nomina 94 offline 1.0 0.0 0.13 9dc9e18c708492956166c5776658ae2b org.opencyphal.yakut.call
  124 oper nomina 0 0d00:08:09 1.0 1.7 1.0.1e5c06b5751eefb2.6a34880f9af5cb71 25001e000c5030533135332000000000 com.zubax.telega

```

where `124` is the ESC I’m trying to downgrade, `10` is my fileserver serving the binary, `88` the monitor and `92` another terminal from which I call commands.

I followed these steps for the (unsuccessfull) downgrade to v0:

1. download [com.zubax.telega-1-0.6.cd758ab7.application.bin](https://files.zubax.com/products/com.zubax.telega/firmware/v0/com.zubax.telega-1-0.6.cd758ab7.application.bin)
2. rename this file to `com.zubax.telega-200.0.app.bin` and move to folder named `0_6`
3. start the firmware update procedure using `y --verbose file-server --plug-and-play allocation_table.db ./0_6 --update-software 124`

which results in the following output:

```auto
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: File server root directories: ['<HIDDEN>/0_6']
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Total update: False; trigger explicitly: [124]
2024-11-09 21:15:19 0035856 INF yakut.param.transport: Transport constructed from registers: CANTransport(SocketCANMedia('slcan0', mtu=8), local_node_id=92)
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Starting a plug-and-play allocator using file '<HIDDEN>/allocation_table.db'
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Initializing the node tracker
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Initializing the software update checker
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Node 124 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=29, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=0)
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Node 124 info: <not available>
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Node 124 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=29, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=0)
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Node 124 info: uavcan.node.GetInfo.Response.1.0(protocol_version=uavcan.node.Version.1.0(major=1, minor=0), hardware_version=uavcan.node.Version.1.0(major=1, minor=7), software_version=uavcan.node.Version.1.0(major=1, minor=0), software_vcs_revision_id=2187630895419027378, unique_id=[37, 0,30, 0,12,80,48,83,49,53,51,32, 0, 0, 0, 0], name='com.zubax.telega', software_image_crc=[7652891267415001969], certificate_of_authenticity='<\xb0\xe8_;\xd3\x0f\xbc\xf5e\xa3\xb4\xa4\x9f\x15\xfe\x1cO\xd5\x9a\x90\x8dEoLbQ!~f\xe1][7\x84\x8f\xbf\xe1o\xe5 q>\x85\xff\xd7\xc3\x9a\xc7F\x8c_:I\xbb/\x92\\l\xc0:9\x1b\xb1\xa7\x86g\xed\xc5\x7f\xf65\xff?\xd4\xf2g\xfc\x83\x9e\x8c\xf7(\x84\x08\xe2\x86b\xa5\xe5\x16\x86\x84\xeb!\x0f\xce\xd3#\x83\xe7\xe0\xcb\\hZ\xf6\xeb:S\xd8\xfd\xc7@\xfd\xe2\xff\xd1S\xcc\xe1?U\n^gF\xe28\x0b\xa5\x81\r\x9f\x1f\xdb& \x04sNi\x90*\xee\x80;\xaa{\x0b|\x07\xa0@\xdab\xc2\x03C\xc2\x16\xad\xab\xfcO\xc2\xce\xac>\xb7(E+jt\xbd7>ZEc[\x18\xf1/\rY\xc9A\x11\xa6\xc5\xc0\x05\x8fz\xf7\xdb\xa1Aa\x9c(_\xfdB\x84\xc2\xd8K\xd8\xaaq;\xe3{-\xa6\xdah\x0cV')
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Checking if node 124 requires a software update...
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: Checking if com.zubax.telega-200.0.app is equivalent...
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: No, the software version does not match.
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: Checking if this app should be updated to com.zubax.telega-200.0.app...
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: The applications appear to be compatible -- an update would not break the node. Looking further...
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: CRC is identical or not defined, checking the version information...
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: com.zubax.telega-1.7-1.0.1e5c06b5751eefb2.6a34880f9af5cb71.app: Yes, com.zubax.telega-200.0.app is of a different version and is not older than the current one.
2024-11-09 21:15:19 0035856 WAR yakut.cmd.file_server: Requesting node 124 to update its software: uavcan.node.ExecuteCommand.Request.1.1(command=65533, parameter='com.zubax.telega-200.0.app.bin')
2024-11-09 21:15:19 0035856 INF yakut.cmd.file_server: Node 124 confirmed software update command uavcan.node.ExecuteCommand.Request.1.1(command=65533, parameter='com.zubax.telega-200.0.app.bin')
2024-11-09 21:15:23 0035856 INF yakut.cmd.file_server: Node 124 went offline
[5 second delay]
2024-11-09 21:15:28 0035856 INF yakut.cmd.file_server: Node 124 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=3, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=0)

```

indicating that the ESC tried to do the firmware upgrade/downgrade but was not successful since it still runs v1.0.

I also discovered that this Komar ESC might suffer from the [bootloader regression](https://github.com/pavel-kirienko/bootloader-crc-collider). Thus I tried following the instructions from the readme, adjusting the commands for the use with yakut and cyphal since DronecanGUI does not work with cyphal.

1. run the solver `solver 1000000 124 10 > out.bin`, which gives me `65,9f,4e,64,eb,c7,98,30` as a filename.
2. execute a software update command with this as a filename:

```auto
yakut call 124 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: b"e\x9fNd\xeb\xc7\x980"}'

```

where `b"e\x9fNd\xeb\xc7\x980"` is deduced from `bytes([0x65,0x9f,0x4e,0x64,0xeb,0xc7,0x98,0x30])`

resulting in this output on the command terminal (node `92`):

```auto
435: {status: 0, output: ''}

```

and this output on the file-server (node `10`):

```auto
2024-11-09 21:25:14 0037121 INF yakut.cmd.file_server: Node 92 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=0, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=41)
2024-11-09 21:25:14 0037121 INF yakut.cmd.file_server: Node 92 info: <not available>
2024-11-09 21:25:17 0037121 INF yakut.cmd.file_server: Node 92 went offline
2024-11-09 21:25:18 0037121 INF yakut.cmd.file_server: Node 124 went offline
2024-11-09 21:25:23 0037121 INF yakut.cmd.file_server: Node 124 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=3, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=0)
2024-11-09 21:25:23 0037121 INF yakut.cmd.file_server: Node 124 info: <not available>
2024-11-09 21:25:23 0037121 INF yakut.cmd.file_server: Node 124 most recent heartbeat: uavcan.node.Heartbeat.1.0(uptime=3, health=uavcan.node.Health.1.0(value=0), mode=uavcan.node.Mode.1.0(value=0), vendor_specific_status_code=0)
2024-11-09 21:25:23 0037121 INF yakut.cmd.file_server: Node 124 info: uavcan.node.GetInfo.Response.1.0(protocol_version=uavcan.node.Version.1.0(major=1, minor=0), hardware_version=uavcan.node.Version.1.0(major=1, minor=7), software_version=uavcan.node.Version.1.0(major=1, minor=0), software_vcs_revision_id=2187630895419027378, unique_id=[37, 0,30, 0,12,80,48,83,49,53,51,32, 0, 0, 0, 0], name='com.zubax.telega', software_image_crc=[7652891267415001969], certificate_of_authenticity='<\xb0\xe8_;\xd3\x0f\xbc\xf5e\xa3\xb4\xa4\x9f\x15\xfe\x1cO\xd5\x9a\x90\x8dEoLbQ!~f\xe1][7\x84\x8f\xbf\xe1o\xe5 q>\x85\xff\xd7\xc3\x9a\xc7F\x8c_:I\xbb/\x92\\l\xc0:9\x1b\xb1\xa7\x86g\xed\xc5\x7f\xf65\xff?\xd4\xf2g\xfc\x83\x9e\x8c\xf7(\x84\x08\xe2\x86b\xa5\xe5\x16\x86\x84\xeb!\x0f\xce\xd3#\x83\xe7\xe0\xcb\\hZ\xf6\xeb:S\xd8\xfd\xc7@\xfd\xe2\xff\xd1S\xcc\xe1?U\n^gF\xe28\x0b\xa5\x81\r\x9f\x1f\xdb& \x04sNi\x90*\xee\x80;\xaa{\x0b|\x07\xa0@\xdab\xc2\x03C\xc2\x16\xad\xab\xfcO\xc2\xce\xac>\xb7(E+jt\xbd7>ZEc[\x18\xf1/\rY\xc9A\x11\xa6\xc5\xc0\x05\x8fz\xf7\xdb\xa1Aa\x9c(_\xfdB\x84\xc2\xd8K\xd8\xaaq;\xe3{-\xa6\xdah\x0cV')

```

1. try serving the otp-fix firmware from here:

> [@Workaround for a regression in the Telega Bootloader v1.x affecting the users of the legacy firmware Telega v0.x](https://forum.zubax.com/t/workaround-for-a-regression-in-the-telega-bootloader-v1-x-affecting-the-users-of-the-legacy-firmware-telega-v0-x/2014/2):
>
> [com.zubax.telega.otpfixer-255.0.4b5f3dea16d148aa.3afd0d4ad2684d76.app.release.bin](https://forum.zubax.com/uploads/short-url/4GVcq4NDL2J03LRSLBrDs1AQqmV.bin)

using and requesting an update using

```auto
yakut call 124 435:uavcan.node.ExecuteCommand '{command: 65533, parameter: "com.zubax.telega.otpfixer-255.0.4b5f3dea16d148aa.3afd0d4ad2684d76.app.release.bin"}'

```

The node restart and comes back up, still with firmware v1.0.  
What are the next steps? How can I downgrade my Komar ESCs to telega v0?

I also tried getting some debug information from the `Mitochondrik LV` by reading the output form it’s UART port. Only to find out that nothing seems to be transmitted there. Where can I find documentation of the UART functionality? The Mitochondrik LV datasheet notes the following: _Refer to the Telega Reference Manual for information_  
_regarding its functions and availability_. Though I could not find any references to UART in the Telega v1 Reference Manual.

Thank you in advance!

Best wishes,  
Sandro

P.S.: We also have some Myxa ESCs. And if I remember correctly, the switch between v0 and v1 went seamlessly in both directions for them.

---

<div class="post-metadata">

**Author:** ![pavel-kirienko](https://forum.zubax.com/user_avatar/forum.zubax.com/pavel-kirienko/32/180_2.png) [@pavel-kirienko](https://forum.zubax.com/u/pavel-kirienko)\
**Post date:** [November 9, 2024, 9:16pm UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326/2 "2024-11-09T21:16:35Z")

</div>

> [@psandro](#):
>
> I followed these steps for the (unsuccessfull) downgrade to v0:
> 
> 1. download [com.zubax.telega-1-0.6.cd758ab7.application.bin](https://files.zubax.com/products/com.zubax.telega/firmware/v0/com.zubax.telega-1-0.6.cd758ab7.application.bin)
> 2. rename this file to `com.zubax.telega-200.0.app.bin` and move to folder named `0_6`
> 3. start the firmware update procedure using `y --verbose file-server --plug-and-play allocation_table.db ./0_6 --update-software 124`

These steps are correct. Renaming is not really necessary as you can also force the Yakut file-server command to perform an update even if the firmware version is older than the current one; this is done by specifying the list of nodes to update after the `--update-software` flag. More info in `--help`.

> [@psandro](#):
>
> I also discovered that this Komar ESC might suffer from the [bootloader regression](https://github.com/pavel-kirienko/bootloader-crc-collider). Thus I tried following the instructions from the readme

This is incorrect. The instructions in the readme say this (emphasis added):

> If you need to upgrade the firmware from Telega v1, you need _not_ follow this guide.

> [@psandro](#):
>
> try serving the otp-fix firmware from here:

This is only needed if your device was originally shipped with Telega v0.4 or newer. Once it has been applied, you should try updating the firmware normally as you described in step 1. It should just work.

> [@psandro](#):
>
> Where can I find documentation of the UART functionality?

The UART port is only used by Telega v0. Telega v1 does not emit diagnostics via UART (it uses SWD for that purpose instead, which is not documented as it is not supposed to be used by the end user).

As an alternative, you can also just rewrite the ROM using any SWD adapter. On the bottom side of Mitochondrik, you will find two pads for SWDIO and SWDCLK:

 ![Screenshot_20241109_231249](https://forum.zubax.com/uploads/default/original/2X/3/3a90e20787bca19373d71d3c6123d9596516aac6.png)

You can reach them without unsoldering Mitochondrik using a fine soldering tip. Connect any JTAG/SWD adapter of your choosing and upload the following:

- Optionally, [the latest bootloader](https://files.zubax.com/products/com.zubax.telega/com.zubax.telega.bootloader.bin) at offset 0.
- Any firmware of your choosing at offset 49152 bytes.

Make sure to NOT erase memory in the range [48896, 49152); doing so will brick the device. You can save a backup copy just in case.

---

<div class="post-metadata">

**Author:** ![psandro](https://forum.zubax.com/user_avatar/forum.zubax.com/psandro/32/2476_2.png) [@psandro](https://forum.zubax.com/u/psandro)\
**Post date:** [November 9, 2024, 10:52pm UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326/3 "2024-11-09T22:52:49Z")

</div>

Thank you for the quick reply.

> [@pavel-kirienko](#):
>
> This is incorrect. The instructions in the readme say this (emphasis added):
> 
> > If you need to upgrade the firmware from Telega v1, you need _not_ follow this guide.

You’re right, I misread the readme thinking hardware _initially_ (factory) flashed with Telega v1 would not be affected. I assumed the bootloader version was crucial, not the application version.

I tried connecting to the Mitochondrik via SWD, but my Debugger (WeAct Studio MiniDebugger V1.0) was not able to do so.

```auto
$ st-info --probe 0
Failed to enter SWD mode
Found 1 stlink programmers
  version: V2J43S28
  serial: [...]
  flash: 0 (pagesize: 0)
  sram: 0
  chipid: 0x000
  dev-type: unknown

```

My programmer is working in general with other STM32 chips:

```auto
st-info --probe 130
Found 1 stlink programmers
  version: V2J43S28
  serial: [...]
  flash: 524288 (pagesize: 16384)
  sram: 131072
  chipid: 0x431
  dev-type: STM32F411xC_xE

```

Would a [BugFace BF1](https://github.com/Zubax/bugface_bf1) be able to establish a connection here?

 ![swd](https://forum.zubax.com/uploads/default/original/2X/e/e31fb690500ec2024cc85438aa1ce8b66461e56d.jpeg)

---

<div class="post-metadata">

**Author:** ![pavel-kirienko](https://forum.zubax.com/user_avatar/forum.zubax.com/pavel-kirienko/32/180_2.png) [@pavel-kirienko](https://forum.zubax.com/u/pavel-kirienko)\
**Post date:** [November 9, 2024, 11:24pm UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326/4 "2024-11-09T23:24:47Z")

</div>

The pads that you need to solder to are on the bottom side of Mitochondrik. You soldered the wires to the pads on the top side.

---

<div class="post-metadata">

**Author:** ![psandro](https://forum.zubax.com/user_avatar/forum.zubax.com/psandro/32/2476_2.png) [@psandro](https://forum.zubax.com/u/psandro)\
**Post date:** [November 10, 2024, 1:15am UTC](https://forum.zubax.com/t/komar-2022-downgrade-from-telega-v1-to-v0/2326/5 "2024-11-10T01:15:15Z")

</div>

you tricked me quite well with the PCB design… 😄 Very well hidden SWD ports. It works now, thanks!

However, when flashing the latest bootloader, the ESC is stuck in the `SOFTWARE_UPDATE` mode.

 ![flash_bootlaoder](https://forum.zubax.com/uploads/default/original/2X/2/23bc9ee175dc0e4bdea86e9b8e8412dd2f10a8cf.png)

I paid attention not to erase `[48896, 49152)`. Even tried to use the `*.compound.bin` and transfer the 256 bytes from offset region [48896, 49152) of the ESC’s ROM to the matching location in the compound.bin. Same issue as seen in the above screenshot.

Anyways, I don’t necessarily need the latest bootloader. Flashing only the application at `0x800c000` worked perfectly and the Komar is now running on 0.6 again.

Thank you for your help!
