Page 1 of 1

Today I F...ed Up by trying to flash the firmware on the Leeku 1800

Posted: 29 Aug 2015, 03:08
by derzemel
So, I really messed things up

I tried to flash the firmware on the Leeku 1800 using the instructions here: http://kbdlab.co.kr/?document_srl=54353 ... yle=viewer

I could not get it to work through CMD and I kept getting the error: main.hex file not found.

So I dug some more and I found this GH topic. I tried to see if the tool HIDBootFlash could see the Leeku and it did, so... I went with it and applied the main.hex file from the KBDLab link above. It worked for about 10 seconds, then it stopped and failed.
Now the Leeku is seen as a unrecognized device by the PC when entered through the USB and nothing happens when using PS2.

Do you have any ideea if I can do anything to fix this? :(

Thank you,

derzemel

Posted: 29 Aug 2015, 04:19
by Redmaus
What OS are you using?

Posted: 29 Aug 2015, 06:26
by derzemel
Windows 7 64 Bit

Edit: I also have a disk with XP 32bit (if necessary)

Posted: 29 Aug 2015, 07:01
by Redmaus
You have to press shift+right click and then "open command window here" in the same folder as the .hex file you want to flash it with.

What exact command are you using?

Posted: 29 Aug 2015, 07:44
by derzemel
initially I was trying to use c:\bootloadHID.exe main.hex (with the exe and hex in the same folder). I found the command here with some more information on this GH topic.
It didn't work anyway as main.hex could not be found (they were in the same folder). That's why I tried it with the HIDBootFlash tool.
Now I cannot even start the keyboard in bootloader mode.

Posted: 29 Aug 2015, 15:15
by Redmaus
I use avrdude on my pro micro's with a command that looks more like this:

avrdude -p atmega32u4 -P YOUR_SERIAL_PORT -c avr109 -U flash:w:filename.hex

Posted: 29 Aug 2015, 15:18
by tlt
Try if it gets detected on other USB ports, another computer or maybe your other windows installation. Registration of USB devices in Windows has, at least in the past been a bit buggy. If you can't get the boot loader to work you need chip programming hardware to write it over with a working one. Hopefully you can connect that somewhere on the PCB.

Posted: 29 Aug 2015, 21:24
by derzemel
I tried all usb ports on the main computer, another Win 7 machine, Linux, and Mac..nothing. I cannot get into the bootloader.
The only message I get is from the Win machines: USB device not recognized.
I have no idea what chip programming hardware I would need for an ATMega32A-AU (or I am google incompetent)
I wonder if it will work with another ATMega32A-au chip that I could solder it on the pcb (instead of the one I have)

Posted: 29 Aug 2015, 22:17
by Redmaus
Install arduino.

Looks like you don't have the drivers.

Posted: 29 Aug 2015, 23:47
by flabbergast
Redmaus wrote: Install arduino.

Looks like you don't have the drivers.
Well, AFAIK Leeku PCBs use atmega32a chip (not atmega32u4). This one doesn't have native USB, it is only bit-banged, and usually uses a non-standard (usually not arduino-compatible, i.e. avrdude-compatible) bootloader. There are a couple, but the keyboard community seems to stick with bootloadHID. As the name suggests, it is a HID-class device, which does not need extra drivers on any system. I'm pretty sure derzemel's board has this bootloader, since he managed to flash it with the bootloadHID tool once already.
derzemel wrote: The only message I get is from the Win machines: USB device not recognized.
This is (I think) good news, it means that the chip is not completely shot, because this indicates that the board at least starts to communicate with the computer over USB.
derzemel wrote: I have no idea what chip programming hardware I would need for an ATMega32A-AU (or I am google incompetent)
I can help you with that. If you have an arduino or teensy or any kind of atmel board, that would be enough. If not, I can send you one of my little programmers. But this asks for a more interactive discussion, because it's kind of long and relatively complicated when you do it for the first time. irc?
derzemel wrote: I wonder if it will work with another ATMega32A-au chip that I could solder it on the pcb (instead of the one I have)
Well if it is bootloaded, then it should help. If it is blank (i.e. just bought from a supplier), then it would not help - well precisely because it does not have a bootloader ;)

Posted: 30 Aug 2015, 01:41
by tlt
Replacing the chip should be your last resort. Desoldering SMD components without damaging the PCB is kind of hard if you don't have professional tools for it.

Posted: 30 Aug 2015, 09:10
by derzemel
Thank you for the suggestions!
flabbergast wrote: I can help you with that. If you have an arduino or teensy or any kind of atmel board, that would be enough. If not, I can send you one of my little programmers. But this asks for a more interactive discussion, because it's kind of long and relatively complicated when you do it for the first time. irc?
I'll try to get my hands on an Arduino Uno, or a ProMicro and I as soon as I get them, I'll send you a PM to ask for idiot-proof instructions :D

Thank you very much!

Posted: 13 Oct 2015, 19:32
by derzemel
HA HAAAAAA.... the Leeku 1800 is back online (with the help of a home-made AVR programmer) :D :D :D :D :D

Image

A friend helped me to fix it. We have soldered some pins to the PCB:

Image

And we connected the PCB to a HOME-MADE avr programmer:

Image

Then , with a bit of Linux magic we managed to rewrite the bootloader part on the PCB, and then it was fairly straight forward to update the firmware :D

Posted: 13 Oct 2015, 19:52
by scottc
Amazing stuff! I'm happy you got it back. Congratulations. :)

Posted: 13 Oct 2015, 19:59
by derzemel
scottc wrote: Amazing stuff! I'm happy you got it back. Congratulations. :)
Thank you!
It was a wild ride. I literally started to cry when I realized I fucked it up, especially after I worked 2 days on it (yes, I am a 100Kg, 1.9m tall bearded dude).
Now I am happy as kid in Legoland

I also have to give a shout to @flabbergast, who gave me hope :D
Thank you very much man!!!! I owe you a case of beer :D

Posted: 13 Oct 2015, 20:31
by flabbergast
Happy that you managed to fix it! Great job!

Posted: 13 Oct 2015, 20:52
by derzemel
flabbergast wrote: Happy that you managed to fix it! Great job!
Thank you very much!!

Posted: 15 Mar 2016, 14:18
by quochung1989
I want use Teensy 2.0 controller. But SCK = SCLK? Right?