kissfc-logo


Flashing the KISS FC from command line (Mac and Linux)

Notes before start:

– You will need to use the terminal for this guide
– You will need to copy and paste some text into the terminal
– You will learning something about command line interface.

Prerequisites Mac

You’ll need to install the brew package manager for OS X, go to the site and install it

After you completed the installation be sure the brew installation is working typing:

$ brew

in the terminal (note: the $ is not intended to be copied)

you should see something like:

Example usage:
brew [info | home | options ] [FORMULA…] brew install FORMULA…
brew uninstall FORMULA…
brew search [foo] brew list [FORMULA…] brew update
brew upgrade [FORMULA…] brew pin/unpin [FORMULA…] [full output omitted]

Now you need to install the dfu-util (http://dfu-util.sourceforge.net/) program we wiil use for flashing the FC. Install it by typing:

$ brew install dfu-util

after that verify the correct installation typing:

$ dfu-util

you should see something like:

dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.g
[full output omitted]

Prerequisites Linux

in linux you can install the dfu-util with your distro package manager, in ubuntu you can do it with:

$ sudo apt-get install dfu-util

after that verify the correct installation typing:

$ dfu-util

you shoudl see something like:

dfu-util 0.8
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.g
[full output omitted]

Flashing

Now that you have dfu-util installed you can flash the FC. Download the FW extract it and go in the extracted directory.
If you type:

$ pwd

in the terminal you will see the directory where you are, mine for example is:

/Users/teo/

if we have downloaded and extracted the firmware in the Download directory, we can go there typing:

$ cd Downloads/

(you dont need to typing the complete word, type the initial letters and simply hit tab, the terminal will try to autocomplete it)

and we can verify the content of the directory typing:

$ ls

and you should see the list of the files, mine is:

KISSFC_v1.011_HWv1.02.dfu KISSFC_v1.02_RC16.dfu KISSFC_v1.02_RC25.dfu KISSFC_v1.02_beta74_HWv1.02.dfu

now you can grab a simple script that execs the dfu-command for you by doing:

$ curl -o flash.sh https://gist.githubusercontent.com/tejo/247b6e9a7081af5fe59ecb79cf02950e/raw/639c10266fbf29995a4929865f356a0109d93598/flash.sh

make it executable with

$ chmod +x flash.sh

Now if you flash for example the previoulsy downloaded the fw KISSFC_v1.02_RC16.dfu you can connect the FC (with soldered boot pins or pressing the boot switch) and then type:

$ ./flash.sh KISSFC_v1.02_RC16.dfu

if you see some text and progress bar flashing on the terminal you are done. Now you can un-solder the boot pins (or release the boot switch) and reboot the FC with the new firmware.

With linux you may have to prepend the flash.sh command with sudo and type your password, like:

$ sudo ./flash.sh KISSFC_v1.02_RC16.dfu

General trouble shooting

Your FC must been recognize by your system by the GUI. If you cannot connect your FC with the kiss FC GUI, this guide unlikely will work for you.

Must issue with command line are related to file paths and name cases. Make sure you are in the right directory with pwd and ls commands, and avoid to type the file names by your own, use the tab key to autocomplete them.

If you are curious about the script you can take a look at it here:

https://gist.github.com/tejo/247b6e9a7081af5fe59ecb79cf02950e