geekhack Projects > Making Stuff Together!
Hacking HHKB Professional Classic
yamamech:
--- Quote from: Duncaen on Fri, 17 February 2023, 16:26:27 ---
--- Quote from: yamamech on Fri, 17 February 2023, 12:10:51 ---
--- Quote from: Duncaen on Sun, 15 January 2023, 15:31:47 ---I'm currently flashing the firmware by shorting BOOT0 to get into the DFU bootloader, which is a bit cumbersome.
--- End quote ---
I'm currently trying to flash your firmware to my PD-KB401, but I can't figure out how to get the board into recovery mode as there doesn't seem to be any labels for a BOOT0 pin to get it into recovery mode. Is it by any chance that I'd be right in assuming it's labelled PSW2 on the board with the USB C port on it?
EDIT:
I looked up the pinout and saw that BOOT0 is on pin 60, if this is the right pin for the bootloader, what pin should I short it with / what should I use on the other end to short it?
--- End quote ---
R6 and R85 as seen on this picture from hasu https://i.imgur.com/oTwQLPg.jpeg. I just used a jumper wire without soldering, I plugged the usb cable half in, positioned the jumper wire so that they press against the right side of R6 and R85 with one hand and then plugged in usb with the other hand, this takes some tries to get right the first time, if the keyboard boots into the dfu bootloader the led will be orange.
Edit: Make sure you make backups of the flash and eeprom with dfu, I would also be interested in looking at you eeprom to compare the actuation points.
--- End quote ---
Unfortunately, in trying to get the board to use your QMK firmware, it's been flashed and now can't enter the bootloader (no orange light and won't appear with in dfu-buddy or dfu-util, and for some reason when I ran dfu-util to dump the firmware, it just dumped an empty file so my HHKB has now been rendered useless... Hopefully with it being less than 2 weeks old I can refund it from Amazon and get a new one...
Edit: Guess the jumper I was using must've mislodged itself a little bit, I managed to get it back into DFU mode but I unfortunately still have no way to restore the original firmware in lieu of QMK not working
Edit 2: I just realised in my original post I said my board was the PD-KB401, but it's actually the PD-KB401W, I don't think that'd have caused any issues but on the off chance it has I don't suppose you've got any advice do you?
Edit 3: I tried flashing this using dfu to no avail https://origin.pfultd.com/downloads/hhkb/HHKB410_FW_A429.hfb
hasu:
Item return is not fair for Amazon or saler in this situ. Warranty is void when you peel its seal and open case... I know you are joking.
You can download official firmware image from PFU site. Flashing it onto both bank1 and 2 'may' work. If not you need original bank1 image but it is not available publicly unfortunately.
(EDIT: you can get binary image from hfb file: dd bs=1 skip=4 count=65536 if=HHKB410_FW_A429.hfb > firm.bin )
You should have made backup images and retain safely before removing flash memory, anyway.
yamamech:
Unfortunately after running the dd command to extract the firmware, flashing it onto the board using dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D firm.bin or dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D firm.bin did not restore functionality to the board. Unfortunately I'm at a complete loss as to what I can do to fix it as the firmware file seems to be the correct one for the board. Running dfu-util -l returns the following (now, cannot confirm what it said before I flashed anything as I didn't make a backup of the output out of stupidity.
Found DFU: [0483:df11] ver=2200, devnum=9, cfg=1, intf=0, path="4-2.2", alt=2, name="@DATA Memory /0x08080000/2*3Ke", serial="154730420000"
Found DFU: [0483:df11] ver=2200, devnum=9, cfg=1, intf=0, path="4-2.2", alt=1, name="@Option Bytes /0x1FF80000/01*032 e", serial="154730420000"
Found DFU: [0483:df11] ver=2200, devnum=9, cfg=1, intf=0, path="4-2.2", alt=0, name="@Internal Flash /0x08000000/1536*128g", serial="154730420000"
Interestingly though, when running dfu-util -d 0483:df11 -a 0 -s 0x08000000 -U boardfirm.bin to get the firmware running on the board, it seems to error out at 64% consistently, and then reset the board out of DFU mode with the following output.
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Non-valid multiplier 'g', interpreted as type identifier instead
Limiting upload to end of memory segment, 196608 bytes
Upload [================ ] 64% 126976 bytesdfuse_upload: libusb_control_transfer returned -9 (LIBUSB_ERROR_PIPE)
hasu:
I think the firmware from PFU was built for Bank2(0x0801_0000) and it may not work on Bank1.
Note that you will need to use command like this to flash onto Bank2. (I didn't confirm this on mine, though.)
$ dfu-util -a 0 -s 0x08010000 -D firm.bin
This is md5sum of firm.bin just for reference.
$ md5sum firm.bin
ea90ed357441693940be241bb34468ae firm.bin
And this is my outputs from dfu-util. So your DFU bootloader seems to work normally.
--- Code: ---$ dfu-util -l
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Found DFU: [0483:df11] ver=2200, devnum=35, cfg=1, intf=0, path="5-1", alt=2, name="@DATA Memory /0x08080000/2*3Ke", serial="164738450000"
Found DFU: [0483:df11] ver=2200, devnum=35, cfg=1, intf=0, path="5-1", alt=1, name="@Option Bytes /0x1FF80000/01*032 e", serial="164738450000"
Found DFU: [0483:df11] ver=2200, devnum=35, cfg=1, intf=0, path="5-1", alt=0, name="@Internal Flash /0x08000000/1536*128g", serial="164738450000"
$ dfu-util -a 0 -s 0x08000000 -U hhkb_flash.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
dfu-util: Non-valid multiplier 'g', interpreted as type identifier instead
Limiting upload to end of memory segment, 196608 bytes
Upload [================ ] 64% 126976 bytesdfu-util: dfuse_upload: libusb_control_msg returned -4
$ ls -l hhkb_flash.bin
-rw-rw-r-- 1 noname noname 131072 Feb 19 23:00 hhkb_flash.bin
--- End code ---
yamamech:
Flashing it to bank2 worked and restored functionality to the board! Thank you so much for the help. I'm gonna continue to try to get QMK working however I've made sure to make backups of all three of the DFU's that list finds.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version