Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifying the need of for zadig & flashing methods #46

Open
wants to merge 4 commits into
base: 2.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 92 additions & 36 deletions companion/flashing.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
## Flashing your FrSky radio

As mentioned before, the program of your radio can be replaced, either
to change the display language or to take advantage of new functions
or corrections. The first thing to do is to power your radio off and
connect it to your computer's USB port.
### Are Additional Drivers Required?

## Installing the driver \(for Windows only\)
Most new transmitter such as the Taranis series do not require any additional drivers to be installed on the computer to use it with Companion for configuration and model editing. Flashing the remotes via PC (with dfu-util) needs drivers installed but this can be avoided by flashing with the bootloader. The exception is the FrSKY Horus X12S that, unlike the Taranis model, does not have a bootloader that allows flashing without additional drivers. Once flashed using the bootloader menu (described below) the bootloader is also updated and windows drivers will not be required for FrSKY transmitters except the Horus X12S.

Installing the driver is only needed when you want or need to flash
your radio directly from the PC. The Taranis models all have a
bootloader that allows flashing without these drivers. For flashing a
Horus TX or if you need to recover your Taranis, you will need to
install these drivers.
You do not need install these drivers unless you are sure you need it.

To power up the transmitter in Bootloader mode:
* Power off the transmitter
* Pull the two horizontal trims towards the centre
* Power on the transmitter
* Release the trims
* Check the bootloader version number on the top line of the LCD screen

![bootloadersmall](https://user-images.githubusercontent.com/20209851/29190168-1b415e06-7de7-11e7-8d92-0010df929bbd.png)


| Tx | OpenTX Bootloader | Flash method |
| --- | ------------------- | ------ |
| X7 | 2.2 | Bootloader, Dfu-util |
| X9D | 1.x | Dfu-util |
| X9D | 2.x | Bootloader, Dfu-util |
| X9D+ | 2.x | Any | Bootloader, Dfu-util |
| X9E | 2.x | Any | Bootloader, Dfu-util |
| X12S | 2.2 + later | Dfu-util |

Companion 2.2 for Mac and Windows comes with Dfu-util. Linux distribution usuall have a package for dfu-util. Windows needs drivers installed via Zadiag utility


## Installing The Windows Driver with Zadiag (optional)

The first thing to do is to power your radio off and connect it to your computer's USB port.

For flashing a
Horus TX or if you need to recover your Taranis, you will need to install these drivers.

Installing the driver is only required the first time you flash your
radio on a given computer. If already done this step, you can skip
Expand Down Expand Up @@ -41,43 +63,77 @@ Zadig will install the driver, and should report success. When done you can dism
Should none of these options work, you can download the driver here and install it manually \(instructions are on the download page\).
When the driver is properly installed, you should see this in the device manager:

### Installing the flashing utility \(Linux\)
### Installing The Linux Flashing Utility

Dfu-util is avaialble in most distributions. For example in Ubuntu it can be installed by

```
sudo apt-get install dfu-util
```

### Setup for Mac OS X
### Flashing Using A Mac OS

Companion for Mac OS already includes the required \`\`dfu-util'' tool
and does not require any additional installation of tools or drivers.

## Downloading and flashing the firmware

In OpenTX companion's preferences window, make sure the proper
firmware is selected \(OpenTX for FrSky Taranis \(X9D\), or OpenTX for
Taranis Plus \(X9D+\) according to the hardware you have\), and the
language / options match your preference, then click the top Download
button and select a location for the file. This will automatically
build and download the latest available version of OpenTX for Taranis.
Close the Preferences window, and select the Burn -> Write Flash
memory command. Make sure your radio is powered off and connected.
Browse for the file you just downloaded. It will be recognised
automatically and the version will be displayed. If you wish to
replace the radio's splash screen, you can either load one from a file
or select it from the available library, and click the "Substitute
image in firmware" box. Click "Burn to TX". Once the progress bar is
done and the success prompt is shown you can dismiss it and disconnect
your radio :\) If you get an error about the dfu-util executable not
being found, open the flashing tool settings with the Burn ->
Configure menu item. Browse for the dfu-util executable, which should
be: On Windows: In the OpenTX companion installation folder \(by
default C:\Program Files\companion9x\dfu-util.exe on 32-bit systems,
and C:\Program Files \(x86\)\companion9x\dfu-util.exe on 64-bit
systems\). On Mac OS: `/Applications/OpenTX Companion
2.2.app/Contents/Resources/dfu-util`
## Downloading The OpenTX Firmware

The only recommended way to download the OpenTX firmware is using Companion. This process compiles/builds the firmware on the OpenTX servers and downloads a copy to the computer.

To download the firmware follow these steps:

* Radio Profile: Make sure the correct transmitter profile is selected
* Build Options: Make sure the build options selected are the ones you want
* Download Firmware: File -> Download
* Click on Download firmware (The download could take a few minutes)
* Save the firmware .bin file on the computer
* You may be prompted to write the firmware to the transmitter
* If you want to choose yes connect the transmitter to the computer in bootloader mode
* Click on Yes
* Select Check Hardware compatibility to make sure the firmware being written to the transmitter is for that particular hardware.
* Click on Write to TX
* Eject the mounted drives
* Disconnect the USB cable
* Power the transmitter off

# Writing The OpenTX Firmware

Connect the transmitter to the computer in bootloader mode.

There are two options to write the firmware:
* Using The Bootloader Menu
* Using Companion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not accurate!

First using dfu-util on Windows requires Zadig driver. So they are tied together. On Linux/MAC there is no need for Zadig driver (since driver is built into the kernel), only dfu-util is needed.

Flashing from Companion, these are possible ways:

  • radio off - connect to computer - you are in STM Bootloader - Companion auto detects this and uses zadig/dfu-util to flash
  • radio on with trim held inwards - you are in OpenTX Bootloader, connect to computer. Now you have two sub choices:
    • either flash directly from Companion - this will work without any drivers, the bin file is copied to special file (using mass storage USB mode) that represents the flash of the radio.
    • or copy the file on the SD card (via file manager), disconnect radio - use menu in OpenTX Bootloader to flash it.

Then there is also procedure to update the OpenTX Bootloader itself. It is similar to the last option above, just the flashing is done from the regular OpenTX, using the same file.

Copy link
Contributor Author

@RCdiy RCdiy Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what is the goal of this section?
For me the goal is to guide users to get things done; not list every single technical way things can be done. These extra ways can be in an advanced trouble shooting section.

When it says there are two options to write the firmware it is under the sentence connect the transmitter to the computer in boot loader mode. Then there will be a boot loader screen image and then the rest of that text.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not need to explain every detail. But what it explains should be correct.

Copy link
Contributor Author

@RCdiy RCdiy Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed...

Writing The OpenTX Firmware

+Connect the transmitter to the computer in bootloader mode.
companion-bootloader
+There are two options to write the firmware:
+* Using The Bootloader Menu
+* Using Companion
So when the Tx is turned on in boot loader moder this screen appears

Now there are two choices
Write the firmeware using that menu
Plug in the usb cable and use companion to write the firmware
What is not accurate? What do I need to change?
It is formatted easier to read here
http://rcdiy.ca/opentx-guide/introduction-to-opentx-companion/#Writing_The_OpenTX_Firmware

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a separate section on boot loader... what it is and the ways it get updated...


## Using The Bootloader Menu

* Place a copy of the firmware on the sd card in the FIRMWARE folder
* Rename the firmware file so that the filename including the .bin extension is 35 characters or less.
* Eject the two mounted drives
* Disconnect the USB cable
* Choose Write Firmware from the bootloader menu
* Select the firmware to be written
* Press ENT
* Hold ENT down to start writing the firmware
* When the “Writing Complete” message is displayed press EXIT
* Power the transmitter off

## Using Companion (dfu-util)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is wrong.

In order for Companion to use dfu-util/zadig the radio has to be in STM Bootloader. So the radio has to be OFF and then connected to computer.

What you describe below is also possible, using OpenTX Bootloader like you described above. But in this case dfu-util/zadig is not used. This method uses USB mass storage mode (that is implemented by the OpenTX Bootloader) so no special driver needed for this.

Copy link
Contributor Author

@RCdiy RCdiy Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the confusion is that we have writing firmware under the driver section... the writing firmware may be clearer if put in its own section... When I wrote the writing firmware instructions I wrote if for a majority audience of FrSKY Tx purchased today and going forward... well purchased within the last year... for this audience informaing them about dfu/zadig etc. is unnecessary and adds confusion... many users forst want to know how to do something and only want to know the why and underlying details later on out of curiosity or have problems... This section makes more sense when arranged as it is in this article
http://rcdiy.ca/opentx-guide/introduction-to-opentx-companion/
Where I state
Transmitter Read & Write

Connecting The Transmitter In Bootloader Mode

Most new transmitter such as the Taranis series do not require any additional software or drivers to be installed on the computer. One exception is the FrSKY Horus X12S which is covered here (link).

So how do I remove this section from here while retaining the other edits that have passed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've browsed trough your page (link above) and there instructions are much more clear. I agree that skipping whole dfu-util/zadig is a good thing.

But on the other hand dfu-util/zadig has to be documented somewhere because it is needed for X12 and can be helpul/needed for X9D.

So how do I remove this section from here while retaining the other edits that have passed?

Just move the dfu-util/zadig to a separate section.

Copy link
Contributor Author

@RCdiy RCdiy Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh... I went back up and noticed this table which is not how I wrote it....

Tx OpenTX Bootloader Flash method
X7 2.2 Bootloader, Dfu-util
X9D 1.x Dfu-util
X9D 2.x Bootloader, Dfu-util
X9D+ 2.x Any
X9E 2.x Any
X12S 2.2 + later Dfu-util

I wrote is as below after gaining a consensus here
#24
Is Zadig required

bootloadersmall

Tx OpenTX Boot Loader PC OS Add PC Driver
X7 2.2 Any No
X9D 1.x Windows Zadig
X9D 1.x Linux Dfu-util
X9D 1.x Mac Dfu-util
X9D 2.x Any No
X9D+ 2.x Any No
X9E 2.x Any No
X12S 2.2 + later Windows Zadig
X12S 2.2 + later Linux Dfu-util
X12S 2.2 + later Mac Dfu-util

MAC Note: Companion 2.2 for Mac comes with Dfu-util. (Need some wording for linux?)


The difference is

  • do I as a user need to install a driver

versus

  • telling me the user what is being used....

I wrote the rest of the instructions in the context on how to get something done without the what is being used....

So should I just close this pull request?
Or will someone fix its...
The way it is now we have mixed two different approaches which is beyond me to fix...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your last table looks good.

Still I hope you realize that for example a 9XE with 2.x can also be written with dfu-util. Perhaps your way of mentioning only no driver needed is more appropriate since it is less confusing to the user. But the fact is that all radios in the above table regardless of the OpenTX version installed support dfu-util/zadig method, just that some of them also support no driver needed method.


If you get an error about the dfu-util executable not
being found, open the flashing tool settings menu item. Browse for the dfu-util executable, which should be: On Windows: In the OpenTX companion installation folder \(by default\)
`C:\Program Files\OpenTX Companion 2.2\dfu-util.exe` on 32-bit systems,
and `C:\Program Files\OpenTX Companion 2.2\dfu-util.exe` on 64-bit
systems. On Mac OS: `/Applications/OpenTX Companion 2.2.app/Contents/Resources/dfu-util`


* Read/Write -> Write Firmware to Radio
* A Flash Firmware window appears
* Click on Load and select the firmware file downloaded using companion
* Select Check Hardware compatibility to make sure the firmware being written to the transmitter is the correct one
* Click on Write to TX
* Eject the two mounted drives
* Disconnect the USB cable
* Power off the transmitter

## Downloading and installing SD card content.

Expand Down