Burning the Taranis Firmware under linux
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Burning the Taranis Firmware under linux
So...
I have df-util and companion working under windows. Easy.
Under linux... df-util always complains.
Anyone got any hints on how to configure it?
Rob
I have df-util and companion working under windows. Easy.
Under linux... df-util always complains.
Anyone got any hints on how to configure it?
Rob
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
Dfu-util is only needed for flashing the firmware, NOT for transferring the eeprom.
Eeprom is accessed as a disk drive when the radio is on.
On linux you should be able to install dfu-util from your favorite package source, or dowbload/build as usual.
Sent via mobile
Eeprom is accessed as a disk drive when the radio is on.
On linux you should be able to install dfu-util from your favorite package source, or dowbload/build as usual.
Sent via mobile
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Burning the Taranis Firmware under linux
dfu-util supplied by several distributions is rather old...
You need at least 0.6, but 0.7 will be your friend....
You need at least 0.6, but 0.7 will be your friend....
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
OK. I am on 0.5
That may well be the issue.
Yes.. Well aware needed for flashing only
Sent from my GT-I9300 using Tapatalk 2
That may well be the issue.
Yes.. Well aware needed for flashing only
Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
Right. I have some success.
To get this all working, the first thing you MUST have is the right version of dfu-util.
Version 0.7 works well. Download it from here: http://dfu-util.gnumonks.org/
You will need to compile this. (assume you have compile software installed)
So...
It should have ended up in /usr/local/bin/dfu-util
Now.. a few things need to be done for companion. First things first - you need to run with elevated privileges. As this is a gui app, we will use a gui version of sudo.
Edit your launcher for companion too:
This starts companion with elevated privileges. The -k option tells gksudo to keep the profile settings in your home folder!
Now. Once you have setup a profile in companion for taranis, you need to edit the burn preferences.
By default these are set to use /usr/bin/dfu-util
Change the path to /usr/local/bin/dfu-util
Done!
To get this all working, the first thing you MUST have is the right version of dfu-util.
Version 0.7 works well. Download it from here: http://dfu-util.gnumonks.org/
You will need to compile this. (assume you have compile software installed)
So...
Code: Select all
tar -xvzf dfu-util-0.7.tar.gz
cd dfu-util-0.7/
./configure
sudo make install
Now.. a few things need to be done for companion. First things first - you need to run with elevated privileges. As this is a gui app, we will use a gui version of sudo.
Edit your launcher for companion too:
Code: Select all
gksudo -k /usr/bin/companion9x
Now. Once you have setup a profile in companion for taranis, you need to edit the burn preferences.
By default these are set to use /usr/bin/dfu-util
Change the path to /usr/local/bin/dfu-util
Done!
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
dfu-util uses libusb, which opens the USB devices raw. Most distros don't allow that to non root users.
Running c9x as root works. Better would be to fix the permissions of the USB devices. Either by udev rule for that specific device, or I think some distros have a group names usb or so that has permissions to access raw devices.
I ran c9x on my mates Ubuntu computer (btw Ubuntu has a dfu-util package as has probably any other distro) that is why I went the easy route to run it via sudo.
Once I do the same in my on computer, I will fix the permissions right...
Harmless compared to how it went with Windows8. I pity the fool who tries. The kind of hoops you have to jump to install unsigned drivers is insane. Once I got avdrude working (force the driver) and running avrdude as Administrator I tried dfu-util. Forget it!
I gave up after three hours or so. No idea if it is possible. I went with Win because I thought that will be the easiest way. 10min later I had it all done on Ubuntu.
Running c9x as root works. Better would be to fix the permissions of the USB devices. Either by udev rule for that specific device, or I think some distros have a group names usb or so that has permissions to access raw devices.
I ran c9x on my mates Ubuntu computer (btw Ubuntu has a dfu-util package as has probably any other distro) that is why I went the easy route to run it via sudo.
Once I do the same in my on computer, I will fix the permissions right...
Harmless compared to how it went with Windows8. I pity the fool who tries. The kind of hoops you have to jump to install unsigned drivers is insane. Once I got avdrude working (force the driver) and running avrdude as Administrator I tried dfu-util. Forget it!
I gave up after three hours or so. No idea if it is possible. I went with Win because I thought that will be the easiest way. 10min later I had it all done on Ubuntu.
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
Agreed
Then reason I suggested the option is because most people don't have a clue how to setup udev.
The Sudo option is generally easy for all
Sent from my GT-I9300 using Tapatalk 2
Then reason I suggested the option is because most people don't have a clue how to setup udev.
The Sudo option is generally easy for all
Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
PS: Perhaps I should mention that somewhere else. But I thought I mention it. The c9x workflow of upfating firmware and backing up models before is broken.
Because for one the radio has to be running and USB plugged in. And for the other the radio needs to be off. It will have to prompt the user to put the radio in the right mode, or have a way to do that via USB.
Because for one the radio has to be running and USB plugged in. And for the other the radio needs to be off. It will have to prompt the user to put the radio in the right mode, or have a way to do that via USB.
Re: Burning the Taranis Firmware under linux
We should write a udev rule for that and add it to the linux build of c9x.Rob Thomson wrote:Agreed
Then reason I suggested the option is because most people don't have a clue how to setup udev.
Once one has build one that works.
Re: Burning the Taranis Firmware under linux
Backup is disabled if the radio is a Taranis - not sure it has made it to release yet though.
Sent via mobile
Sent via mobile
Re: Burning the Taranis Firmware under linux
Oh well, that solves that problem.Kilrah wrote:Backup is disabled if the radio is a Taranis - not sure it has made it to release yet though.
Taranis will no longer need model memories to be merged after being upgraded?
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
You fancy writing it?tilmanb wrote:We should write a udev rule for that and add it to the linux build of c9x.Rob Thomson wrote:Agreed
Then reason I suggested the option is because most people don't have a clue how to setup udev.
Once one has build one that works.
I am sure Romolo would be happy if you supplied it for him .
Rob
Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
Eeprom only needed to be processed by c9x when the format changed maybe once or twice a year, the rest of the time the process is only to restore the exact same as eeprom got wiped when flashing the avr.
Sent via mobile
Sent via mobile
Re: Burning the Taranis Firmware under linux
I suppose we can still expect that to happen again?
I would rather have the migration in the radio. I have never seen the code which did that, but would you think it would be possible to have that same code running on the TX with Taranis? Would make things a lot more robust. Especially if you share models via SD card.
I would rather have the migration in the radio. I have never seen the code which did that, but would you think it would be possible to have that same code running on the TX with Taranis? Would make things a lot more robust. Especially if you share models via SD card.
Re: Burning the Taranis Firmware under linux
Yes there is already a mechanism in place to upgrade eeprom within the TX.
IMO at some point a backup of the full EEPROM to card will be needed though, as having everything on the radio means a bug in the conversion would cause damage.
IMO at some point a backup of the full EEPROM to card will be needed though, as having everything on the radio means a bug in the conversion would cause damage.
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Burning the Taranis Firmware under linux
Anyway about udev rules.
I do not agree that companion changes them during install or at runtime.
I hate programs modding system settings without explaining.
Maybe we can supply a small standalone tool to install the rules, explaining what we are doing and for which reasons...
(Once we will have understood how to modify them).
I do not agree that companion changes them during install or at runtime.
I hate programs modding system settings without explaining.
Maybe we can supply a small standalone tool to install the rules, explaining what we are doing and for which reasons...
(Once we will have understood how to modify them).
-
- Posts: 2
- Joined: Tue Nov 20, 2012 8:51 pm
- Country: -
- Location: Eastbourne, East Sussex
- Contact:
Re: Burning the Taranis Firmware under linux
Has the 'check firmware compatibility' tick been removed for Taranis too, as that suffers the same issue as Tilman raised re: Tx needing to be on and off at the same time
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Burning the Taranis Firmware under linux
thanks for highlighting...norty303 wrote:Has the 'check firmware compatibility' tick been removed for Taranis too, as that suffers the same issue as Tilman raised re: Tx needing to be on and off at the same time
Re: Burning the Taranis Firmware under linux
I strongly disagree.Romolo wrote:Anyway about udev rules.
I do not agree that companion changes them during install or at runtime.
I hate programs modding system settings without explaining.
Maybe we can supply a small standalone tool to install the rules, explaining what we are doing and for which reasons...
(Once we will have understood how to modify them).
First we don't modify rules, we add them. (rules.d/)
And c9x is a hardware near programme, practically a driver. Drivers bring their own udev rules of course.
And secondly we can't just fully open permissions Willi Nilly. Either we give the devices to the plugdev group or we install a companion group. The user still has to add himself to that group.
Re: Burning the Taranis Firmware under linux
I concur with tilmanb. A properly written udev rule will not affect other devices and give the permissions needed to access the hardware. The rule will even stay in place if udev or the OS is upgraded
tilmanb wrote:I strongly disagree.Romolo wrote:Anyway about udev rules.
I do not agree that companion changes them during install or at runtime.
...snip..
First we don't modify rules, we add them. (rules.d/)
And c9x is a hardware near programme, practically a driver. Drivers bring their own udev rules of course.
And secondly we can't just fully open permissions Willi Nilly. Either we give the devices to the plugdev group or we install a companion group. The user still has to add himself to that group.
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
So who is going to write us a little rule?
My UDEV skills are rubbish!
My UDEV skills are rubbish!
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
this page is a good start
https://code.google.com/p/eepe/#Fixes_in_Linux/Ubuntu
and the above link has already accounted for changes in udev noted here
http://openrcforums.com/forum/viewtopic ... hilit=udev
# this one is for my usbasp
What is needed for the Taranis is the idVendor and idProduct which could be found by running 'lsusb'
My assumption is that the DEVTYPE is still "usb_device". If the above line doesnt work by inserting the proper idVendor and idProduct of the Taranis, the DEVTYPE would be the first thing to investigate
https://code.google.com/p/eepe/#Fixes_in_Linux/Ubuntu
and the above link has already accounted for changes in udev noted here
http://openrcforums.com/forum/viewtopic ... hilit=udev
# this one is for my usbasp
Code: Select all
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", MODE="0666"
My assumption is that the DEVTYPE is still "usb_device". If the above line doesnt work by inserting the proper idVendor and idProduct of the Taranis, the DEVTYPE would be the first thing to investigate
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
Right.... got it working.
Rule as follows:
To sort. Create a file in
/etc/udev/rules.d
Call it: 45-taranis.rules
Insert the code above!
Rob
Rule as follows:
Code: Select all
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
MODE:="0666"
/etc/udev/rules.d
Call it: 45-taranis.rules
Insert the code above!
Rob
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
Re: Burning the Taranis Firmware under linux
How easy it is to use Linux?
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: Burning the Taranis Firmware under linux
great
now if the software developers choose to add this file to their linux packages, their application will have access to the users hardware without the application running at an elevated privilege level.
I have been reading that the taranis either needs to be on or off to update the device depending on whether it is the flash or the eeprom that is being updated. Is the idVendor and IdProduct the same under both conditions ?
now if the software developers choose to add this file to their linux packages, their application will have access to the users hardware without the application running at an elevated privilege level.
I have been reading that the taranis either needs to be on or off to update the device depending on whether it is the flash or the eeprom that is being updated. Is the idVendor and IdProduct the same under both conditions ?
Re: Burning the Taranis Firmware under linux
No but when it is on the SD card and EEPROM both appear as more-than-standard mass storage drives. So no problem there.
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: Burning the Taranis Firmware under linux
Romolo already sorting thisrperkins wrote:great
now if the software developers choose to add this file to their linux packages, their application will have access to the users hardware without the application running at an elevated privilege level.
Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Burning the Taranis Firmware under linux
The rule has been added in the new c9x packages...
Re: Burning the Taranis Firmware under linux
I am using trying to flash Taranis using Linux Mint. Thanks to this thread I found out that I need to build dfu-util to get version 0.7 rather than 0.5.Rob Thomson wrote:Right. I have some success.
To get this all working, the first thing you MUST have is the right version of dfu-util.
Version 0.7 works well. Download it from here: http://dfu-util.gnumonks.org/
You will need to compile this. (assume you have compile software installed)
So...Code: Select all
tar -xvzf dfu-util-0.7.tar.gz cd dfu-util-0.7/ ./configure sudo make install
My problem is that the configuration step fails. I get this:
...
checking pkg-config is at least version 0.9.0... yes
checking for USB... no
configure: error: *** Required libusb-1.0 >= 1.0.0 not installed ***
But libusb is installed. To be more exact libusb-1.0-0 version 2:1.0.12-2ubuntu1 is installed. This is the latest version available via Synaptic.
Anyone has any idea about what to do?