Comments (23)
Yeah I don't distribute dfu-programmer with the source code. You have to install it yourself if you want to program directly through the keymapper. Otherwise, you can just use it the old fashioned way: save a binary and program it with your tool of choice.
from easyavr.
But it is installed:
$ whereis dfu-programmer dfu-programmer: /usr/bin/dfu-programmer /usr/share/man/man1/dfu-programmer.1.gz
from easyavr.
Oh, actually I think it's not constructing the command line correctly for linux. Ugh, supporting windows and linux with one tool... not fun. Especially when you can't test one of them.
from easyavr.
oh, I also had that problem, but assumed that it was my setup's fault. What I end up doing is generating the .hex file and using the dfu-programmer
by hand in the terminal (no big deal). I assumed it was because I need sudo
to use dfu-programmer
and I don't want to use EasyAVR
with sudo
, I don't think I even tried that.
from easyavr.
pretty sure the problem is the quotes, which are for protection in Windows, but wouldn't be useful for *nix
from easyavr.
Witch quotas you mean:
programming.py:
loader_tools = [ 'dfu-programmer.exe', 'dfu-programmer', ]
or
this:
cmd = ('"%s" %s erase') % (self.tool_path, self.info.device.lower())
from easyavr.
I have committed a probable fix. If you download the latest code from the Master branch you can try it
from easyavr.
The double quotas i have also tryed
Same problem:
from easyavr.
Well then, you probably need to either fix permissions (chown) or make it executable (chmod +x)
from easyavr.
I have updated the link.
from easyavr.
Which file did you mean that i should set with chown or chmod?
from easyavr.
/usr/bin/dfu-programmer
from easyavr.
Hi,
dfu-programmer needs no chmod +x because it could be exec as normal user. So i have figured out that the ATm32U4DFU usb device is the problem why we need sudo to programm the keyboard.
Now i have defined a udev rule sudo vim /etc/udev/rules.d/50-atmel-dfu.rules
with inside:
# Atmel ATMega32U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"
get the above atributes from dmesg:
[ 1292.718521] usb 1-1.1: new full-speed USB device number 5 using ehci-pci
[ 1292.829457] usb 1-1.1: New USB device found, idVendor=03eb, idProduct=2ff4
[ 1292.829460] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1292.829470] usb 1-1.1: Product: ATm32U4DFU
[ 1292.829471] usb 1-1.1: Manufacturer: ATMEL
[ 1292.829472] usb 1-1.1: SerialNumber: 1.0.0
and now it is possible to programm the keyboard without sudo:
dfu-programmer atmega32u4 erase
dfu-programmer atmega32u4 flash EasyAVR/keymapper/my_gh60.hex
dfu-programmer atmega32u4 start
But we have still the error on EasyAVR:
from easyavr.
I have try this to test if it works:
vim call.py:
#!/usr/bin/env python
import os
cmd = os.popen("dfu-programmer --help").readlines()
print cmd
this prints me with python call.py
:
Usage: dfu-programmer target[:usb-bus,usb-addr] command [options] [global-options] [file|data]
global-options:
--quiet
--debug level (level is an integer specifying level of detail)
Global options can be used with any command and must come
after the command and before any file or data value
commands:
configure {BSB|SBV|SSB|EB|HSB} [--suppress-validation] data
dump
dump-eeprom
dump-user
erase [--suppress-validation]
flash [--suppress-validation] [--suppress-bootloader-mem]
[--serial=hexdigits:offset] {file|STDIN}
flash-eeprom [--suppress-validation]
[--serial=hexdigits:offset] {file|STDIN}
flash-user [--suppress-validation]
[--serial=hexdigits:offset] {file|STDIN}
get {bootloader-version|ID1|ID2|BSB|SBV|SSB|EB|
manufacturer|family|product-name|
product-revision|HSB}
getfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE}
setfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE} data
setsecure
reset
start
[]
But im not a developer so i hope only this helps here to solve the problem. If i can try something for you i could do it.
from easyavr.
Okay I re-read the python docs and found the problem. I should be able to fix it pretty quick.
from easyavr.
Alright, I've committed more changes to Master. This should work.
The Popen object works somewhat differently on Unix platforms. Thanks for doing the testing on Linux, I have no way to do it myself.
from easyavr.
now it looks better but "launch" needs to be replaced by "start"
Usage: dfu-programmer target[:usb-bus,usb-addr] command [options] [global-options] [file|data]
global-options:
--quiet
--debug level (level is an integer specifying level of detail)
Global options can be used with any command and must come
after the command and before any file or data value
commands:
configure {BSB|SBV|SSB|EB|HSB} [--suppress-validation] data
dump
dump-eeprom
dump-user
erase [--suppress-validation]
flash [--suppress-validation] [--suppress-bootloader-mem]
[--serial=hexdigits:offset] {file|STDIN}
flash-eeprom [--suppress-validation]
[--serial=hexdigits:offset] {file|STDIN}
flash-user [--suppress-validation]
[--serial=hexdigits:offset] {file|STDIN}
get {bootloader-version|ID1|ID2|BSB|SBV|SSB|EB|
manufacturer|family|product-name|
product-revision|HSB}
getfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE}
setfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE} data
setsecure
reset
start
[]
from easyavr.
What version are you using?
D:\Code\EasyAVR\keymapper\easykeymap\exttools>dfu-programmer.exe --help
dfu-programmer 0.7.0
https://github.com/dfu-programmer/dfu-programmer
Usage: dfu-programmer target[:usb-bus,usb-addr] command [options] [global-options] [file|data]
global-options:
--quiet
--debug level (level is an integer specifying level of detail)
Global options can be used with any command and must come
after the command and before any file or data value
command summary:
launch [--no-reset]
read [--force] [--bin] [(flash)|--user|--eeprom]
erase [--force] [--suppress-validation]
flash [--force] [(flash)|--user|--eeprom]
[--suppress-validation]
[--suppress-bootloader-mem]
[--serial=hexdigits:offset] {file|STDIN}
setsecure
configure {BSB|SBV|SSB|EB|HSB} [--suppress-validation] data
get {bootloader-version|ID1|ID2|BSB|SBV|SSB|EB|
manufacturer|family|product-name|
product-revision|HSB}
getfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE}
setfuse {LOCK|EPFL|BOOTPROT|BODLEVEL|BODHYST|
BODEN|ISP_BOD_EN|ISP_IO_COND_EN|
ISP_FORCE} data
additional details:
launch: Launch from the bootloader into the main program using a watchdog
reset. To jump directly into the main program use --no-reset.
read: Read the program memory in flash and output non-blank pages in ihex
format. Use --force to output the entire memory and --bin for binary
output. User page and eeprom are selected using --user and --eprom
erase: Erase memory contents if the chip is not blank or always with --force
flash: Flash a program onto device flash memory. EEPROM and user page are
selected using --eeprom|--user flags. Use --force to ignore warning
when data exists in target memory region. Bootloader configuration
uses last 4 to 8 bytes of user page, --force always required here.
Note: version 0.6.1 commands still supported.
from easyavr.
This is the standard version on ubuntu 16.04 TLS:
~$ dfu-programmer --version
dfu-programmer 0.6.1
from easyavr.
WTF? Goddamn package managers over there are slacking. Version 0.7.0 is almost 3 years old
from easyavr.
okay i've committed what should be the last fix. I've tried it on Windows and it works
from easyavr.
Greate job now it works. If you have something to test within linux you can ask me ;-).
from easyavr.
Great, thanks.
from easyavr.
Related Issues (20)
- Edit Menu Error HOT 7
- Python 3.9 support
- wxPython: stdout/stderr when selecting "Define Keyboard" HOT 5
- Problem with OneKeyBoard from TechKeys HOT 1
- This program can't start beacuse api-ms-win-core-path-l1-1-1.dll is missing HOT 3
- Not sure if this is an "issue". More so a question.... Would this software work with these products? HOT 2
- fl-esport keyboard support HOT 1
- Keyboard Macros HOT 3
- WXPython fails to build on Ubuntu 20.04 LTS.
- Issue loading old configuration in new client HOT 1
- ISO key not working (hash/tilde on iso-uk) HOT 6
- Ubuntu 18.0.1 LTS - Unable to install. ?errors HOT 4
- Automod with Left mods HOT 6
- [Tada68] .bin file doesn't work when flashed according to instructions HOT 2
- Feature request: Mod one time only. HOT 3
- Feature request: KEY WILDCARD. HOT 4
- Issue with mouse multi-press movement HOT 2
- Issue using Shift with the new feature Sticky HOT 2
- Shift Sticky bug, more than a capital letter. HOT 2
- Teensy 2.0 ++ Boot Mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyavr.