Author Topic: [TMK] HHKB Alt Controller with Mini-B/Type-C connector  (Read 521652 times)

0 Members and 2 Guests are viewing this topic.

Offline nathanchere

  • Posts: 706
Re: [TMK] HHKB Alt Controller
« Reply #600 on: Mon, 15 April 2019, 04:08:50 »
hi, hasu. I am making that ble version and firstly big thanks for your work on it.
I have a question that how you confirmed the hhkb should work with 5v. Maybe I can get some advice from you.
I used 5v at the beginning. But some day I just wanted to (maybe just want to find something to do) have a try how low the voltage can be when it works. I found that it can work with 3.3v.  Then I began to make new version and test with it. Yes, it works fine with both my HHKB Pro2 and JP(both type-s). Pro2 is already daily used for 13 days(without charging).

here is the 6th ver I made. It still keep 5v on it. But if it realy works well with only 3.3v, I may remove the 5v part next version.
BTW, FC660C works with only 3.3v well too.
(Attachment Link)

Super exciting news :D  Sorry for the ignorant question but what is the inner USB socket for?

I will post more infomation after it is done.

Offline yangdigi

  • Posts: 79
  • Location: China
Re: [TMK] HHKB Alt Controller
« Reply #601 on: Tue, 16 April 2019, 02:25:39 »
hi, hasu. I am making that ble version and firstly big thanks for your work on it.
I have a question that how you confirmed the hhkb should work with 5v. Maybe I can get some advice from you.
I used 5v at the beginning. But some day I just wanted to (maybe just want to find something to do) have a try how low the voltage can be when it works. I found that it can work with 3.3v.  Then I began to make new version and test with it. Yes, it works fine with both my HHKB Pro2 and JP(both type-s). Pro2 is already daily used for 13 days(without charging).

here is the 6th ver I made. It still keep 5v on it. But if it realy works well with only 3.3v, I may remove the 5v part next version.
BTW, FC660C works with only 3.3v well too.
(Attachment Link)

Super exciting news :D  Sorry for the ignorant question but what is the inner USB socket for?

I will post more infomation after it is done.
Inner USB Disk and its power is controlled by keyboard.
217390-0

Offline edencao

  • Posts: 1
Re: [TMK] HHKB Alt Controller
« Reply #602 on: Tue, 30 April 2019, 17:16:38 »
I have received your board and it's works fine.Thanks for your work!
By the way,is there some plan to upgrade bluetooth to v4.x?

Offline menuhin

  • Posts: 1225
  • Location: Germany
Re: [TMK] HHKB Alt Controller
« Reply #603 on: Wed, 01 May 2019, 04:32:25 »
Yang's project added some nice extra features to the bluetooth controller.

Here're some questions:

1. the cables coming out of the socket circled on the right are quite crowded, you may turn the socket 180° or 90°.
2. What are these LEDs for? Just bugging for the project for yourself or there's some LED features?
3. Is the switch on the left going to face outward of the case in the final versions?

More


I am also interested in how long you can foresee to stay inside the community to maintain contact for aftersales technical issues.
Wishlist: 1) nice thick Alps caps; 2) Cherry profile POM;
More
Wishful-list: 1) We order from keyboard-layout-editor.com; 2) usable Trackpoint module for all keyboards
IBM M13 black
NeXT non-ADB keyboard (AAE)
HHKB Pro 2 HasuBT
[~90WPM, in love with Emacs, and Lisp]

Offline jgogstad

  • Posts: 0
Re: [TMK] HHKB Alt Controller
« Reply #604 on: Wed, 10 July 2019, 12:09:38 »
Hi,

I received my hasu controller a couple of weeks ago for my HHKB2, and it worked perfectly. I flashed it twice, and now it has stopped working. The keyboard does not send events when I use it, and I don't seem to be able to contact it:

Code: [Select]
$ dfu-programmer atmega32u4 erase --force
dfu-programmer: no device present.

I have probably done something wrong, but I have no idea what as it worked the first time. I understand this is a very general error scenario, but do you have any tips on debugging it or resetting the firmware?

Some random facts and observations that might help

* The LED is orange when I plug in the keyboard, so the cable seems to work
* On macOS
* Using USB controller for HHKB Pro2

I've tried pushing the red button and doing the LSHIFT+RSHIFT+Fn+P combination to no avail.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #605 on: Wed, 10 July 2019, 18:26:44 »
I think you already check first post but you may want to check it again, especially 'TROUBLESHOOT' section.
And refer to this about how to flash with dfu-programmer.
https://github.com/tmk/tmk_keyboard/wiki#dfu-programmer-for-windows-mac-and-linux

Did you try adding 'sudo' to the command?

Just push red button and then run commands. It should work.


[EDIT] And use proper firmware for your controller.
USB Alt controller has no orange LED and it is green which turns on only when capslock is activated.
yours is Bluetooth one, perhaps?

Hi,

I received my hasu controller a couple of weeks ago for my HHKB2, and it worked perfectly. I flashed it twice, and now it has stopped working. The keyboard does not send events when I use it, and I don't seem to be able to contact it:

Code: [Select]
$ dfu-programmer atmega32u4 erase --force
dfu-programmer: no device present.

I have probably done something wrong, but I have no idea what as it worked the first time. I understand this is a very general error scenario, but do you have any tips on debugging it or resetting the firmware?

Some random facts and observations that might help

* The LED is orange when I plug in the keyboard, so the cable seems to work
* On macOS
* Using USB controller for HHKB Pro2

I've tried pushing the red button and doing the LSHIFT+RSHIFT+Fn+P combination to no avail.
« Last Edit: Wed, 10 July 2019, 18:30:26 by hasu »

Offline giammin

  • Posts: 64
  • Location: bologna, italy
Re: [TMK] HHKB Alt Controller
« Reply #606 on: Thu, 11 July 2019, 02:35:49 »
USB Alt controller has no orange LED and it is green which turns on only when capslock is activated.
yours is Bluetooth one, perhaps?

lol

Offline Altis

  • Posts: 974
  • Location: Canada
Re: [TMK] HHKB Alt Controller
« Reply #607 on: Thu, 11 July 2019, 16:33:08 »
Received my HHKB Pro 2 USB controllers. Installed and flashed without issues.

Really nice to be able to customize it a little bit. My biggest issue was with the navigation keys, so I created a Layer 2 using the Right OS key (the diamond one) and the existing arrow keys for PgUp/Home/End/PgDown. This lets me navigate quickly with either Fn or Right OS key (pinky and thumb naturally sit on) while leaving my hands on the arrow diamond.

Thanks Hasu!
WhiteFox (Gateron Brown) -- Realforce 87U 45g -- Realforce 104UG (Hi Pro 45g) -- Realforce 108US 30g JIS -- HHKB Pro 2 -- IBM Model M ('90) -- IBM Model M SSK ('87) -- NMB RT-101 & RT-8255C+ (Hi-Tek Space Invaders) -- Chicony KB-5181 (Monterey Blue Alps) -- KPT-102 (KPT Alps) -- KUL ES-87 (62/65g Purple Zealios) -- CM QFR (MX Red) -- Apple Aluminum BT -- Realforce 23u Numpad -- Logitech K740 -- QSENN DT-35 -- Zenith Z-150 (Green Alps)

Offline jgogstad

  • Posts: 0
Re: [TMK] HHKB Alt Controller
« Reply #608 on: Tue, 06 August 2019, 12:54:22 »
Thanks for the reply

I think you already check first post but you may want to check it again, especially 'TROUBLESHOOT' section.
And refer to this about how to flash with dfu-programmer.
https://github.com/tmk/tmk_keyboard/wiki#dfu-programmer-for-windows-mac-and-linux

Did you try adding 'sudo' to the command?

Yes, it made no difference

Code: [Select]
$ sudo dfu-programmer atmega32u4 erase --force
Password:
dfu-programmer: no device present.

Quote
Just push red button and then run commands. It should work.


[EDIT] And use proper firmware for your controller.
USB Alt controller has no orange LED and it is green which turns on only when capslock is activated.
yours is Bluetooth one, perhaps?

Pushing the red button does not make a difference. It might be that I flashed it using the wrong firmware, I don't think I did, but it's possible. Anyway, the LED is definitely orange and it's definitely a USB controller. See attached image.


Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #609 on: Tue, 06 August 2019, 13:42:06 »
 jgogstad,
hmm, bootloader should work whenever the button is pressed unless its hardware is insane.
And LED never light when booloader is running. There may be someting wrong on hardware.

Contact seller with email. (probably me?)



Offline joric

  • Posts: 136
Re: [TMK] HHKB Alt Controller
« Reply #610 on: Sun, 25 August 2019, 13:07:29 »
Warning, YDKB battery connector is reversed comparing with Hasu. Why???



Also YDKB firmware for mdbt40 module is available here:
https://github.com/yangdigi/tmk_keyboard/tree/master/keyboard/hhkb_ble

Also here's my firmware for Pro Micro and nRFMicro but I'm still trying to figure out the timings. Do I really need a microsecond timer in the inner loop?
https://github.com/joric/nrfmicro/wiki/hhkb-ble

This one:
Code: [Select]
if (TIMER_DIFF_RAW(TIMER_RAW, last) > 20/(1000000/TIMER_RAW_FREQ)) {
    matrix[row] = matrix_prev[row];
}
May I just comment it out? I works with Atmega32u4 but there's no microsecond timer on Nordic and the millsecond one is not enough as figures.
« Last Edit: Sun, 25 August 2019, 13:30:17 by joric »

Offline nathanchere

  • Posts: 706
Re: [TMK] HHKB Alt Controller
« Reply #611 on: Mon, 26 August 2019, 03:59:13 »
I've been using my Hasu BT controller without a battery for a loooong time because I never found a battery connector that fits the PCB and I didn't want to leave my prototyping pins in there. Can anyone recommend the appropriate part number or where to buy just the battery connector tip? I have a suitable battery, just without the connector at the end of the wires.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #612 on: Tue, 27 August 2019, 03:17:56 »
joric,
I don't know and can't say about their controller. Just ask seller of your controller.

For TMK controller, don't comment the lines out. They are needed for reliable matrix scan.

nathanchere,
Battery connector is JST PH, you can find it anywhere including clones. I'd recommend genuine, though.
You can use AWG24 wire with these.

https://www.digikey.com/short/prj0z5
https://www.digikey.com/short/prj0mh

Offline joric

  • Posts: 136
Re: [TMK] HHKB Alt Controller
« Reply #613 on: Wed, 28 August 2019, 08:37:32 »
I mean, it kind of works, when I comment out the timer code, but there's trailing 222 after each key. Did you experience the same behavior while debugging the matrix code? Microsecond timer on nordic is not so easy to get as on AVR, I guess, there should be a clock register but I'm not entirely sure. See the video. Also https://github.com/joric/nrfmicro/wiki/HHKB-BLE

It's not bluetooth-related because I'm using wired USB connection for debug, it's just timings (bluetooth works, and behaves the same way). Tried uint32_t last = NRF_RTC0->COUNTER, if (NRF_RTC0->COUNTER > last) matrix[row] = matrix_prev[row]; but it just got worse (NRF_RTC0->COUNTER resolution is 32khz so every tick is about 30 us). The '2' key appears to be COL0/ROW0 but when I try to drop its bit it just repeats the nearest key (qqq, wwww and so on).

« Last Edit: Wed, 28 August 2019, 14:48:32 by joric »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #614 on: Wed, 28 August 2019, 19:02:38 »
joric,
You need to create own thread for your problem in "Making Stuff Together!" or talk with its designer and  It is not related to TMK Alt controller.
I want to use this thread for support and discussion about TMK controller and dont' want people here to be confused with infos of diferent controller.

EDIT: Or instead of creating your own thread you can discuss with people about technical topics of HHKB at this thread: https://geekhack.org/index.php?topic=12047.0
« Last Edit: Wed, 28 August 2019, 19:26:40 by hasu »

Offline joric

  • Posts: 136
Re: [TMK] HHKB Alt Controller
« Reply #615 on: Thu, 29 August 2019, 03:44:17 »
I AM "its designer" but okay.

Offline emyebantracl

  • Posts: 0
Re: [TMK] HHKB Alt Controller
« Reply #616 on: Thu, 29 August 2019, 18:57:20 »
Dear Hasu,

I have had my hhkb pro 2 with the hasu controller for about a year. This morning the keys were not working but the green light was on and I was connected via a cable. Bluetooth also would connect, but keys wouldn't work. I tried restarting my computer and resetting my Mac's SMC and pram. Nothing changed. I came back after a few hours and tried again. With the cable nothing worked and I got a notice from my mac saying: "USB Accessories Disabled" Unplug the accessory using to much power to re-enable USB device. Next, I tried plugging the keyboard into a different power source and using bluetooth. The bluetooth didn't work unless it wasn't plugged in. With the keyboard connected to power and bluetooth on I was able to type a little and then random keys started to execute. 


The keyboard has been on my desk for months, so I am doubtful it was damaged or spilled on without my knowledge.

I wasn't able to re-flash it, since when it is plugged in the computer didn't recognize it.

Any ideas on what to do next? Could I just need a new battery?

UPDATE: I removed the battery and the keyboard works with bluetooth, but not the cable alone.
« Last Edit: Thu, 29 August 2019, 19:43:51 by emyebantracl »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #617 on: Thu, 29 August 2019, 21:29:35 »
Hi,
That error "USB Accessories Disabled: Unplug the accessory using too much power to re-enable USB device." looks really bad symptom. It may happens short circuit or serious fault  somewehre.

I'd suspect USB cable or port first, though, the controller itself can be already damaged.
Did you try another cable or USB port?

A) At first, check where it works as USB keyobard.
1. Remove battery and turn off Bluetooth with the slide switch.
2. Plug into port with USB cable.

Does the LED turns green and the keyboard registers keys?
Also try Windows or Linux if you have any.

If not try another cables get from reliable source. There are many many bad cable in the market unfortunately.
Use cable comes with HHKB, it is enough reliable unless it is damaged.

If it doesn't still work, try reflashing default firmware downloaded from Keymap Editor.


B) Check your HHKB is still safe and work with its original controller.
Does the keyboard work well with the genuine contoller and the cable?




Dear Hasu,

I have had my hhkb pro 2 with the hasu controller for about a year. This morning the keys were not working but the green light was on and I was connected via a cable. Bluetooth also would connect, but keys wouldn't work. I tried restarting my computer and resetting my Mac's SMC and pram. Nothing changed. I came back after a few hours and tried again. With the cable nothing worked and I got a notice from my mac saying: "USB Accessories Disabled" Unplug the accessory using to much power to re-enable USB device. Next, I tried plugging the keyboard into a different power source and using bluetooth. The bluetooth didn't work unless it wasn't plugged in. With the keyboard connected to power and bluetooth on I was able to type a little and then random keys started to execute. 


The keyboard has been on my desk for months, so I am doubtful it was damaged or spilled on without my knowledge.

I wasn't able to re-flash it, since when it is plugged in the computer didn't recognize it.

Any ideas on what to do next? Could I just need a new battery?

UPDATE: I removed the battery and the keyboard works with bluetooth, but not the cable alone.


Offline emyebantracl

  • Posts: 0
Re: [TMK] HHKB Alt Controller
« Reply #618 on: Fri, 30 August 2019, 11:17:16 »
A)
- LED turns green, I have not tested on PC or Linux yet. I have tried a second mac.
- Mac isn't recognizing that there is a keyboard in the USB port.
- I tried two cables, including original hhkb cable.
- When I run: dfu-programmer atmega32u4 erase --force, I get the message "dfu-programmer: no device present." I am assuming that my mac isn't recognizing that the keyboard is there. Is "atmega32u4" the right controller?

B)
The original hhkb genuine controller does work with a cable. And the Hasu controller works with no battery and bluetooth on, but not with the cord by itself and no battery.


Hi,
That error "USB Accessories Disabled: Unplug the accessory using too much power to re-enable USB device." looks really bad symptom. It may happens short circuit or serious fault  somewehre.

I'd suspect USB cable or port first, though, the controller itself can be already damaged.
Did you try another cable or USB port?

A) At first, check where it works as USB keyobard.
1. Remove battery and turn off Bluetooth with the slide switch.
2. Plug into port with USB cable.

Does the LED turns green and the keyboard registers keys?
Also try Windows or Linux if you have any.

If not try another cables get from reliable source. There are many many bad cable in the market unfortunately.
Use cable comes with HHKB, it is enough reliable unless it is damaged.

If it doesn't still work, try reflashing default firmware downloaded from Keymap Editor.


B) Check your HHKB is still safe and work with its original controller.
Does the keyboard work well with the genuine contoller and the cable?




Dear Hasu,

I have had my hhkb pro 2 with the hasu controller for about a year. This morning the keys were not working but the green light was on and I was connected via a cable. Bluetooth also would connect, but keys wouldn't work. I tried restarting my computer and resetting my Mac's SMC and pram. Nothing changed. I came back after a few hours and tried again. With the cable nothing worked and I got a notice from my mac saying: "USB Accessories Disabled" Unplug the accessory using to much power to re-enable USB device. Next, I tried plugging the keyboard into a different power source and using bluetooth. The bluetooth didn't work unless it wasn't plugged in. With the keyboard connected to power and bluetooth on I was able to type a little and then random keys started to execute. 


The keyboard has been on my desk for months, so I am doubtful it was damaged or spilled on without my knowledge.

I wasn't able to re-flash it, since when it is plugged in the computer didn't recognize it.

Any ideas on what to do next? Could I just need a new battery?

UPDATE: I removed the battery and the keyboard works with bluetooth, but not the cable alone.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #619 on: Fri, 30 August 2019, 17:52:59 »
It seems like charger chip is fried or USB connector is damaged perhaps.
I can offer free repair service if you cover postage for both ways. Contact me at hasu@tmk-kbd.com.

A)
- LED turns green, I have not tested on PC or Linux yet. I have tried a second mac.
- Mac isn't recognizing that there is a keyboard in the USB port.
- I tried two cables, including original hhkb cable.
- When I run: dfu-programmer atmega32u4 erase --force, I get the message "dfu-programmer: no device present." I am assuming that my mac isn't recognizing that the keyboard is there. Is "atmega32u4" the right controller?

B)
The original hhkb genuine controller does work with a cable. And the Hasu controller works with no battery and bluetooth on, but not with the cord by itself and no battery.



Offline the_marsbar

  • Posts: 193
Re: [TMK] HHKB Alt Controller
« Reply #620 on: Thu, 12 December 2019, 06:10:13 »
I am experiencing something really strange.

I've used my keyboard a lot with the USB controller. All of a sudden, the CMD keys don't work. Any idea what that could be? How to solve it (probably re-flash)?
 

Offline the_marsbar

  • Posts: 193
Re: [TMK] HHKB Alt Controller
« Reply #621 on: Thu, 12 December 2019, 13:01:07 »
I am experiencing something really strange.

I've used my keyboard a lot with the USB controller. All of a sudden, the CMD keys don't work. Any idea what that could be? How to solve it (probably re-flash)?

Update: re-flashed the controller, and it seems to work again. However, I'm still curious how it happened, and I would definitely like to avoid it in the future. Especially since I use it as my travel-keyboard. Any ideas? I have been plugging the keyboard into two different computers several times today, but I wouldn't think that should be an issue (I also believe I have done this many times before)?
 

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #622 on: Thu, 12 December 2019, 17:17:43 »
One of Boot Magic features caused your problem probably. 'Disable GUI' feature is enabled by plugging in keyboard with holding down Space and LGUI key. You could clear all of its configurations by plugin with holding Space and Backspace.
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch

Many users had suffered from Boot Magic enabled unintentionally, Boot Magic have not been included in prebuilt firmware since Sep 2016.


I am experiencing something really strange.

I've used my keyboard a lot with the USB controller. All of a sudden, the CMD keys don't work. Any idea what that could be? How to solve it (probably re-flash)?

Update: re-flashed the controller, and it seems to work again. However, I'm still curious how it happened, and I would definitely like to avoid it in the future. Especially since I use it as my travel-keyboard. Any ideas? I have been plugging the keyboard into two different computers several times today, but I wouldn't think that should be an issue (I also believe I have done this many times before)?


Offline Snappo

  • Posts: 47
  • Location: UK
  • meme
Re: [TMK] HHKB Alt Controller
« Reply #623 on: Fri, 17 January 2020, 11:10:48 »
Hi everyone,

Just to check, is there a way to map the shift output of a key? For example, changing the output of shift+4 from ($) to (£) etc using TMK?

Many thanks,



Offline Aerizu

  • Posts: 188
  • Location: Japan
  • Professional Lurker
Re: [TMK] HHKB Alt Controller
« Reply #624 on: Sat, 18 January 2020, 10:01:29 »
Any plans for HHKB classic?

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #625 on: Sat, 18 January 2020, 17:13:28 »
Hi everyone,

Just to check, is there a way to map the shift output of a key? For example, changing the output of shift+4 from ($) to (£) etc using TMK?

Many thanks,

What's your OS and keyboard layout? And how do you input £ on your current evironment?

This may help.
https://github.com/tmk/tmk_keyboard/wiki/FAQ-Keymap#input-special-charactors-other-than-ascii-like-c%C3%A9dille-%C3%87


Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #626 on: Sat, 18 January 2020, 17:18:48 »
Any plans for HHKB classic?

Maybe. I got one  and open it at least :D

Offline GoatMaster

  • Formerly Franatic89
  • Posts: 154
  • Location: Germany
Re: [TMK] HHKB Alt Controller
« Reply #627 on: Mon, 10 February 2020, 05:06:54 »
Hasu is there any chance for a hhkb alt controller for the new hhkb version?

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller
« Reply #628 on: Mon, 10 February 2020, 21:29:18 »
Hasu is there any chance for a hhkb alt controller for the new hhkb version?

Yes, I have vague plan for Classic. I got a Classic and looke into its internals at least.
But I don't start designing controller yet and it will take long.

Fun fact, Classic hardware itself is already programmable, though not spported officially unlike Hybrid.
Hackers in keyboard community with some efforts may find way to program open source firmeware without hardware modification in the end.

This is pic album of internal of my Classic if you are interested.
https://imgur.com/a/p9dWvM0

Offline GoatMaster

  • Formerly Franatic89
  • Posts: 154
  • Location: Germany
Re: [TMK] HHKB Alt Controller
« Reply #629 on: Tue, 11 February 2020, 08:04:54 »
Nice, Classic is exactly what I am waiting for.

As soon as it is possible to progamm the Classic I will buy one.

Thank you for the information.

Offline heyitsqi

  • Posts: 69
Re: [TMK] HHKB Alt Controller
« Reply #630 on: Tue, 11 February 2020, 12:49:47 »
What are the chances we can potentially reverse engineer the base firmware (now that you can program in windows using their tool) to be able to flash our own firmware? Or where could I go to maybe mess around with?

Offline crsayen

  • Posts: 4
Re: [TMK] HHKB Alt Controller
« Reply #631 on: Tue, 21 April 2020, 18:03:12 »
What are the chances we can potentially reverse engineer the base firmware (now that you can program in windows using their tool) to be able to flash our own firmware? Or where could I go to maybe mess around with?

I have been digging around in the HHKBKeymapTool.exe looking to see if the Classic has been excluded superficially. There is a flag read from JSON file that's actually inside the install folder. (C:\\Program Files\PFU\Happy Hacking Keyboard Keymap Tool\keyboardDataList.json) the parameter is isKeymapChangeable.

I am not brave enough to try setting this to true. But I am following the logic from that point to see if it might not be as simple as changing that flag. I doubt it's so easy. I will keep you updated

edit:



setting the flag to true gets you past the "the Keymap can't be modified". I am tempted to see what happens. I am hoping I can just refresh the thing if it bricks. Otherwise I will be needing an alt board either way. hmm.

edit:

it successfully read the state of my dipswitches.
« Last Edit: Tue, 21 April 2020, 18:27:22 by crsayen »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #632 on: Tue, 21 April 2020, 18:38:33 »
What are the chances we can potentially reverse engineer the base firmware (now that you can program in windows using their tool) to be able to flash our own firmware? Or where could I go to maybe mess around with?

I have been digging around in the HHKBKeymapTool.exe looking to see if the Classic has been excluded superficially. There is a flag read from JSON file that's actually inside the install folder. (C:\\Program Files\PFU\Happy Hacking Keyboard Keymap Tool\keyboardDataList.json) the parameter is isKeymapChangeable.

I am not brave enough to try setting this to true. But I am following the logic from that point to see if it might not be as simple as changing that flag. I doubt it's so easy. I will keep you updated

edit:

Show Image


setting the flag to true gets you past the "the Keymap can't be modified". I am tempted to see what happens. I am hoping I can just refresh the thing if it bricks. Otherwise I will be needing an alt board either way. hmm.

edit:

it successfully read the state of my dipswitches.

Interesting. Nice find.
Did you try remapping keys actually on your board?
I believe you can recover it with simple hardware hack even if it brick your board. You can consult me if needed.

I will try it some later.

Offline crsayen

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #633 on: Tue, 21 April 2020, 18:49:20 »
What are the chances we can potentially reverse engineer the base firmware (now that you can program in windows using their tool) to be able to flash our own firmware? Or where could I go to maybe mess around with?

I have been digging around in the HHKBKeymapTool.exe looking to see if the Classic has been excluded superficially. There is a flag read from JSON file that's actually inside the install folder. (C:\\Program Files\PFU\Happy Hacking Keyboard Keymap Tool\keyboardDataList.json) the parameter is isKeymapChangeable.

I am not brave enough to try setting this to true. But I am following the logic from that point to see if it might not be as simple as changing that flag. I doubt it's so easy. I will keep you updated

edit:

Show Image


setting the flag to true gets you past the "the Keymap can't be modified". I am tempted to see what happens. I am hoping I can just refresh the thing if it bricks. Otherwise I will be needing an alt board either way. hmm.

edit:

it successfully read the state of my dipswitches.

Interesting. Nice find.
Did you try remapping keys actually on your board?
I believe you can recover it with simple hardware hack even if it brick your board. You can consult me if needed.

I will try it some later.

With this in mind, I think I will try to map some keys.

FYI if anyone has experience with Windows software and is interested in hacking the Classic, please PM me, I have some good stuff.

Offline crsayen

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #634 on: Tue, 21 April 2020, 19:05:28 »
What are the chances we can potentially reverse engineer the base firmware (now that you can program in windows using their tool) to be able to flash our own firmware? Or where could I go to maybe mess around with?

I have been digging around in the HHKBKeymapTool.exe looking to see if the Classic has been excluded superficially. There is a flag read from JSON file that's actually inside the install folder. (C:\\Program Files\PFU\Happy Hacking Keyboard Keymap Tool\keyboardDataList.json) the parameter is isKeymapChangeable.

I am not brave enough to try setting this to true. But I am following the logic from that point to see if it might not be as simple as changing that flag. I doubt it's so easy. I will keep you updated

edit:

Show Image


setting the flag to true gets you past the "the Keymap can't be modified". I am tempted to see what happens. I am hoping I can just refresh the thing if it bricks. Otherwise I will be needing an alt board either way. hmm.

edit:

it successfully read the state of my dipswitches.

Interesting. Nice find.
Did you try remapping keys actually on your board?
I believe you can recover it with simple hardware hack even if it brick your board. You can consult me if needed.

I will try it some later.


Success! I remapped a single key ( tilde now = right-alt ). I am now seeing how limited the remapping software actually is. So I am not sure this would have been worth it any way.

but the point is it worked. I don't advise anybody try this unless they are willing to brick their board.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #635 on: Tue, 21 April 2020, 19:27:44 »
Great! Thanks for the info.

Offline crsayen

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #636 on: Tue, 21 April 2020, 19:47:09 »
Just an update. I have remapped fn -> control, arrows -> fn+jkli, end -> fn+o, and home to fn+u.

so far so good. works as expected. I wouldn't be surprised if there was some mapping that is problematic. But I would also be unsurprised if PFU did this superficially to sell more expensive boards.

Offline devoi

  • Posts: 39
  • Location: MA
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #637 on: Tue, 28 July 2020, 13:26:42 »
after putting it on hold for a couple years I managed to get variable-distance actuation working after writing some simple C routines  ;D
i've been out of the loop, so for all I know this has already been done and shared by someone

as of right now it uses an external atmel development board to set the "distance" value (as I currently only have the stock controller) with a very simple serial interface to write the wiper position in BU9831 via the 3 "calibration" pads. there seems to be very little risk as of right now as it loads the "default" resistance value from memory every time it is power-cycled, so if anything goes wrong I can just re-plug it in :p

at a glance it could easily be implemented within the controller, assuming there are 3 I/O pins available and assuming the user wants to solder 3 small wires directly from the controller to the main board, there's just a risk of tearing the calibration pads off if not too careful

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #638 on: Fri, 31 July 2020, 07:59:07 »
Sounds fun!
More people would find this interesting than here if you can post your code or technical details in thread: https://geekhack.org/index.php?topic=12047.0


after putting it on hold for a couple years I managed to get variable-distance actuation working after writing some simple C routines  ;D
i've been out of the loop, so for all I know this has already been done and shared by someone

as of right now it uses an external atmel development board to set the "distance" value (as I currently only have the stock controller) with a very simple serial interface to write the wiper position in BU9831 via the 3 "calibration" pads. there seems to be very little risk as of right now as it loads the "default" resistance value from memory every time it is power-cycled, so if anything goes wrong I can just re-plug it in :p

at a glance it could easily be implemented within the controller, assuming there are 3 I/O pins available and assuming the user wants to solder 3 small wires directly from the controller to the main board, there's just a risk of tearing the calibration pads off if not too careful


Offline menuhin

  • Posts: 1225
  • Location: Germany
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #639 on: Fri, 31 July 2020, 09:20:08 »
...
I managed to get variable-distance actuation working after writing some simple C routines  ;D
...
at a glance it could easily be implemented within the controller, assuming there are 3 I/O pins available and assuming the user wants to solder 3 small wires directly from the controller to the main board, there's just a risk of tearing the calibration pads off if not too careful

 :thumb: :thumb: :thumb:
Wishlist: 1) nice thick Alps caps; 2) Cherry profile POM;
More
Wishful-list: 1) We order from keyboard-layout-editor.com; 2) usable Trackpoint module for all keyboards
IBM M13 black
NeXT non-ADB keyboard (AAE)
HHKB Pro 2 HasuBT
[~90WPM, in love with Emacs, and Lisp]

Offline GoatMaster

  • Formerly Franatic89
  • Posts: 154
  • Location: Germany
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #640 on: Tue, 11 August 2020, 09:55:20 »
Any news?

Would love to see a new controller for the HHKB Professional Classic.

Offline pfoff

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #641 on: Sat, 15 August 2020, 17:33:53 »
First of all: Thanks for all the great work, especially to hasu. I have 90% of my keyboards running via TMK.
I've been reading here for a while and it answered all the questions that arised on the way.
Today I got to a point, where I decided to ask you experts for advice(or just a don't do it, it won't work...).
I am writing this on my HHKB professional2 with a Revision N hasu controller(of course!) and I realy love it. It came with the standard controller, not the bluetooth version. But now a RN42 came along and so I think about converting it to the bluetooth version. Most of the components should already be in my box, so that shouldn't be the problem. But my RN42(picture attached) seems to be  different, but as far as I know only in terms of firmware, so I wonder, if I could use the UART Interface on the pcb to reprogram the firmware to be the matching one for tmk. Anybody any ideas/help?

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #642 on: Sat, 15 August 2020, 19:15:37 »
Any news?

Would love to see a new controller for the HHKB Professional Classic.

No progress.  I don't abandon my plan but it is slow as snail, it may take a few years.

I will update this thread when any news is available. Subscribe it if you are interested.
https://geekhack.org/index.php?topic=106213.0


Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #643 on: Sat, 15 August 2020, 19:25:11 »
First of all: Thanks for all the great work, especially to hasu. I have 90% of my keyboards running via TMK.
I've been reading here for a while and it answered all the questions that arised on the way.
Today I got to a point, where I decided to ask you experts for advice(or just a don't do it, it won't work...).
I am writing this on my HHKB professional2 with a Revision N hasu controller(of course!) and I realy love it. It came with the standard controller, not the bluetooth version. But now a RN42 came along and so I think about converting it to the bluetooth version. Most of the components should already be in my box, so that shouldn't be the problem. But my RN42(picture attached) seems to be  different, but as far as I know only in terms of firmware, so I wonder, if I could use the UART Interface on the pcb to reprogram the firmware to be the matching one for tmk. Anybody any ideas/help?

The module seems same as one I used but it can have different firmware. You need version 6.15 or 6.30.

I think you can update the module through the UART interface but RN42 firmware won't be found via legal way. I don't have any experience and can't help there. Googling  'HC-05 firmware update' leads to some resources.


Edit: You better post in this thread if you need further help.
https://geekhack.org/index.php?topic=12047.0

Offline tuan nguyen

  • Posts: 1
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #644 on: Mon, 11 January 2021, 16:27:33 »
Hi Hasu, I've have your hhkb 2 alt board and using tmk web editor.
Howerver, I want to dig deeper into the customization. I read the wiki of tmk but didn't sure which file *.c I need to edit here.
In the folder keyboard/hhkb there are several .c file, such as, unimap_hhkb.c, unimap_hasu.c, keymap_hhkb.c.

Thank you!

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #645 on: Mon, 11 January 2021, 19:11:10 »
Try unimap one.

1. copy unimap_hhkb.c to unimap_you.c and edit it.
2. build and flash with commmand below:
Code: [Select]
make -f Makefile.unimap KEYMAP=you clean
make -f Makefile.unimap KEYMAP=you
make -f Makefile.unimap KEYMAP=you dfu

Offline tuan nguyen

  • Posts: 1
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #646 on: Tue, 09 February 2021, 20:46:49 »
Hi Hasu, thanks for your help!

Just wonder if I can use the board with HHKB JP, and in that case, is this able to map the keys exactly like HHKB EN layout. For example, when I press shift 2, it will return "@" but not the double quote as in the JP layout.




Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #647 on: Tue, 09 February 2021, 23:58:39 »
It is dificult if not impossible and you will need to write some amount of code.

Hi Hasu, thanks for your help!

Just wonder if I can use the board with HHKB JP, and in that case, is this able to map the keys exactly like HHKB EN layout. For example, when I press shift 2, it will return "@" but not the double quote as in the JP layout.



Offline Vadurr

  • Posts: 737
  • Location: CA
  • Valar Morghulis
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #648 on: Thu, 18 February 2021, 09:07:09 »
Hi Hasu, will you have any BLE controllers for Pro 1?
« Last Edit: Thu, 18 February 2021, 09:09:36 by Vadurr »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #649 on: Thu, 18 February 2021, 15:12:36 »
Hi Hasu, will you have any BLE controllers for Pro 1?
No probably.