- Posts: 40
Need testers for USBcode
- BitOne
- Offline
Why don't you try with a Linux LiveCD or a Linux bootable USB key ? This way you could use Phractured Blue's program to update your TX.
It's pretty simple:
- install the following program:
httpb://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
- choose the last Mint Linux Distribution
- install it on a USB key (be careful, the content of the USB key will be removed)
- boot from the USB key
- download Deviation
- download Phractured Blue program
- open a terminal
- switch to root (sudo -s)
- connect your TX with the USB cable
- launch PB's program (java -jar <pbprogram) following the instructions provided by PB's
- and voilĂ
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
1) uninstall DFuSe
2) Download Zadig from here: sourceforge.net/projects/libwdi/files/zadig/
3) Plug in your Tx and turn it on in programming mode
4) Run Zodig (as Administrator) select the device, select 'libusb-win32' and select 'Install'
5) Start a cmd shell as Administrator
6) Make sure you have the proper version of Java installed (64bit java for 64bit OS)
7) Follow the instructions here to test and run: www.deviationtx.com/forum/7-development/...ers-for-usbcode#9489
If you ever want to go back to DFuse, you must remove the driver (Device Manager->USB->...) before installing DFuse
Please Log in or Create an account to join the conversation.
- BitOne
- Offline
- Posts: 40
Thanks for the info, didn't know that.
It's even easier than what I described !
Please Log in or Create an account to join the conversation.
- jb57
- Offline
- Posts: 4
As per your and BitOne's instructions. Is this the jar file that I should be using: www.deviationtx.com/media/kunena/attachm...ith-dependencies.zip ? Are there any other downloads that I need before doing the firmware update?
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
phil@dv2:~/Downloads$ java -jar DeviationUpload-0.5-jar-with-dependencies.jar -list
Found: Runtime [003f0:171d] cfg=1, intf=3, alt=0, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=0, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=1, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=2, name='Unknown'
phil@dv2:~/Downloads$ java -jar DeviationUpload-0.5-jar-with-dependencies.jar -send -dfu ~/MyDeviation/builds/newest-deviation-devo7e-v4.0.1-7a32ad9/deviation-devo7e-v4.0.1-7a32ad9.dfu
Found: Runtime [003f0:171d] cfg=1, intf=3, alt=0, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=0, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=1, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=2, name='Unknown'
Error: Did not find matching device for VID:0x483 PID:0xdf11 alt:0
phil@dv2:~/Downloads$
any suggestions on how to get this working?
thanks in advance
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
I just did a quick test (at the moment I don't want to flash my TX):
manfred@elsi:~> java -jar DeviationUpload-0.5-jar-with-dependencies.jar -l
Found: DFU [00483:df11] cfg=1, intf=0, alt=0, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=1, name='Unknown'
Found: DFU [00483:df11] cfg=1, intf=0, alt=2, name='Unknown'
manfred@elsi:~> sudo java -jar DeviationUpload-0.5-jar-with-dependencies.jar -l
Found: DFU [00483:df11] cfg=1, intf=0, alt=0, name='@Internal Flash '
Found: DFU [00483:df11] cfg=1, intf=0, alt=1, name='@SPI Flash: Config'
Found: DFU [00483:df11] cfg=1, intf=0, alt=2, name='@SPI Flash: Library'
Please Log in or Create an account to join the conversation.
- cstratton
- Offline
- Posts: 46
To me the error message looks more like the device is not connected or not in DFU mode.
First step in debugging would be to run lsusb and see if something with that VID & PID shows up, or if not that, what combination does show up when the TX is plugged in and allegedly in DFU mode. If nothing shows up, run dmesg and look for error messages about a misbehaving USB device.
Incidentally, the preferred solution to the USB device permission issue is a udev rule granting unprivileged users access to that specific device. Examples can be found in the Android SDK adb setup docs, the stlink project, etc.
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
linux-user wrote: You may need root privileges.
that was it bud, thanks
cstratton wrote: I believe linux libusb clients can find devices they don't have privilege to, they just can't use them.
To me the error message looks more like the device is not connected or not in DFU mode.
as i posted above it was a permissions issue, also the device is clearly there and connected in DFU mode, the three DFU devices found after the list command clearly show this
i've used udev rules before to create specific permanent nodes for specific flash drives so i can use scripts for transferring data without having to worry about what device node (sda, sdb etc) each one gets allocated when plugged in and it's a very powerful thing. so i'll look to use it to set the permissions correctly for the 7e, thanks
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- cstratton
- Offline
- Posts: 46
All steps must be performed as root; thereafter normal users should have access
1. Create the file /etc/udev/rules.d/51-deviation.rules with the following content:
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", MODE="0666", GROUP="plugdev"
2) chmod a+r /etc/udev/rules.d/51-deviation.rules
3) Inform the running udev of your changes. This may be a command such as 'sudo udevadm control --reload-rules' though rebooting works too.
- If the transmitter was already plugged in, it would probably have to be re-plugged at this point.
- Someone doing development with an stlink adapter may not want the global rule for all ST devices, as at least the stlink open source project has its own rule that also creates a symlink - not sure if that is used, but it might be worth modeling a PID-specific rule on the stlink project one instead in that case:
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0666", GROUP="plugdev"
Please Log in or Create an account to join the conversation.
- Schugy
- Offline
- Posts: 37
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Here is version 0.6. this is the 1st version with a functional GUI.
Features:
- It can upload zip files containing separate firmware and libraries, or the new format zip files that include both firmware and libraries (you don't need to go into the fiesystem mode after updating the dfu anymore)
- You can select whether to overwrite your tx.ini, hardware.ini, or models.
- It can format your drive for you
- It still supports DFU files if desired
- It will not allow you to upload firmware not intended for your transmitter
- cmdline mode is still available
These things have not yet been tested:
Uploading Walkera official firmware zip files
Uploading to the Devo12
Detection of Devo F12, F12E, 12E, or F7 transmitters (I would be interested in how these transmitters show up on the screen but DO NOT try to install a dfu or zip on any of these transmitters!)
I would be really interested in anyone who could provide feedback on using it either usability, or bugs. I intend to make this the officially supported upload method for Deviation in the next release, so getting testing in would be really valuable.
NOTE: It should not be possible to irreversibly harm our transmitter using this software, but you need to ensure you have a known-good dfu file to install in case you need to go back to the Walkera DFuse installer.
This software does require that Java be installed, but should have no other dependencies. In Linux you must ensure you have USB permissions or run as root.
Please Log in or Create an account to join the conversation.
- mwm
- Offline
I had to install Java on the Windows VM, but that at least seems to work. Is there a minimal version of Java required?
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
java -jar deviation-uploader-0.6.jar -h
and if that works, try:
java -jar deviation-uploader-0.6.jar -l
My Java version says:
java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
But I don't expect it to matter much which version you have. I don't use any new-fangled capabilities I think.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
In windows I do:
- Download zadig from here: zadig.akeo.ie/
- turn on your tx in firmware mode
- run zadig
- Select Options->List All devices (you should see 'STM32 DFU')
- Select 'WinUSB' and click 'Replace Driver'
To go back, it is easiest to just re-install the walkera uploader. I will try to build a utility that lets you switch between the drivers with one click and maybe even incorporate it into the uploader tool.
I'm going to 'eat my own dogfood' here and just stick with my uploader going forward.
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
Found: Runtime [00483:df11] cfg=0, intf=0, alt=0, name='1155:57105:@Internal Flash :@SPI Flash: Config:@SPI Flash: Library'
Hmm. does this bite me?
PhracturedBlue wrote:
It will not allow you to upload firmware not intended for your transmitter
# java -jar deviation-uploader-0.6.jar
Error: Dfu Tx type 'Devo 10' does not match transmitter type 'Unknown'
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Here is 0.6.1 which makes the DFU tab work properly.
Please Log in or Create an account to join the conversation.
- mwm
- Offline
Running with -h gets the Deviation Uploader help.
Running with -l exits with no output. Plugging in a 6S and attaching it to that VM finds the device.
There seems to be a permissions issue. Running as me gets failures to open device.
Also seems to be an interaction with my window manager. Replacing xmonad with twm fixes the blank window problem. Possibly it's getting upset that the WM won't let it resize the window?
Finally, the issue with BSD seems to be that usb4java doesn't run on the BSD version of libusb. At least, not yet.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
/etc/udev/rules.d/10-local.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
I then added a 'usb' group and added myself to it. Adding udev rules for the stm32 is certainly possible, and I've done it in the past, but I find the above to be easier overall.
As for BSD support, it should be easy enough to add. Would require a BSD vm though. I'll look at it sometime
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
1.) after canceling Install/Upgrade you don't get a second chance
- click Install/Upgrade
- click "cancel"
- click "Install/Upgrade"
=> It won't do it anymore. "cancel" would be your only choice.
=> need to restart the software
Edit: I am not sure, but I think you never get a 2nd chance to "Install/Upgrade" regardless if you have canceled or not.
2.) When Upgrade is finished there is no obvious message in the GUI:
- You see the progress bar
- While "Install/Upgrade" is running you have the option to "cancel"
- When finished the "cancel" button changes to "Install/Upgrade"
A "FINISHED" message in the GUI would be nice
3.) Naming convention:
Filesystem / Library is confusing.
4.) What is the difference between "Format Root" and "Format Media"?
BTW:
My Devo10 didn't like this cancel experiments. Needed to remove the battery to revive it
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- Need testers for USBcode