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

0 Members and 1 Guest are viewing this topic.

Offline zhaochenhan1992

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #650 on: Sun, 21 March 2021, 22:38:02 »
Hi Hasu.
Recently I am working on a project, that need to use led light on alt controller of hhkb to show which key is pressed. I have a question of your firmware code. When in BT pairing mode, the right led light flash into red once per second, how can I change this, for example flash twice per second or not flash at all. I just tried to adjust all the corresponding code snippet about DDRE6 and PORTE6 in rn42_task.c, rn42.c. Unluckily, none of them works. Could you please tell me which part of the code related to the BT led light and how can I change the code to achieve turn off the led light during pairing mode. Thanks a lot.

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 #651 on: Sun, 21 March 2021, 22:53:33 »
Hi,
In sort answer, you can't change the behaviour basically from keyboard firmware, the red LED(D9) is controled directly by GPIO5(22) of RN42 module.

But I may be able to change or disable the GPIO5 using module commands. Check datasheet and references.
https://ww1.microchip.com/downloads/en/DeviceDoc/bluetooth_cr_UG-v1.0r.pdf
https://www.microchip.com/wwwproducts/en/RN42


EDIT:
what the PE6 pin controls is green(yellow) part(D9) of the dual color LED.
D9 is actually red/green dual LED. D10 is not populated on PCB, btw.

You can find schematics here.
https://github.com/tmk/HHKB_controller/blob/master/schematic/HHKB_controller_revG.pdf
« Last Edit: Sun, 21 March 2021, 23:02:59 by hasu »

Offline zhaochenhan1992

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #652 on: Mon, 22 March 2021, 08:09:09 »
Thanks Hasu! Do I need some extra cable to connect to RN42 in order to visit the command mode? Or I can just connect keyboard via usb cable to my pc and use uart terminal interacting with RN42? 
Hi,
In sort answer, you can't change the behaviour basically from keyboard firmware, the red LED(D9) is controled directly by GPIO5(22) of RN42 module.

But I may be able to change or disable the GPIO5 using module commands. Check datasheet and references.
https://ww1.microchip.com/downloads/en/DeviceDoc/bluetooth_cr_UG-v1.0r.pdf
https://www.microchip.com/wwwproducts/en/RN42


EDIT:
what the PE6 pin controls is green(yellow) part(D9) of the dual color LED.
D9 is actually red/green dual LED. D10 is not populated on PCB, btw.

You can find schematics here.
https://github.com/tmk/HHKB_controller/blob/master/schematic/HHKB_controller_revG.pdf

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 #653 on: Mon, 22 March 2021, 09:41:59 »
I think you can access to config mode of RN42 with hid_listen console. But this function is not be fully supported, you may have some trouble. Refer to this.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/rn42/RN42.txt#L102-L122

If this doesn't work you need to connect 3.3V-level UART cable to pinouts(RX,TX) on the pcb.

Offline zhaochenhan1992

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #654 on: Mon, 22 March 2021, 13:23:15 »
Thanks Hasu. For the battery led, is it possible to turn it off by changing the firmware? While in the firmware Battery_led(off) seems to let the led always on in green.

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 #655 on: Mon, 22 March 2021, 18:25:52 »
Kind of. The batery LED is another green/red dual LED(D3). Green one is connected directly to USB power or Lipo battery, you can't control it at all. Red one always turns on during battery charging, you can control it by PF5 otherwise.

Offline zhaochenhan1992

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #656 on: Wed, 24 March 2021, 17:42:05 »
Hi, Hasu. Sorry to bother you again. I met a bug of the hook_matrix_change() function. If I randomly press a key which leads to a matrix  change, the hook_matrix_change() function would be excuted twiced. Have you ever met this problem when using hook?

Offline zhaochenhan1992

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #657 on: Wed, 24 March 2021, 18:22:12 »
Hi, Hasu. Sorry to bother you again. I met a bug of the hook_matrix_change() function. If I randomly press a key which leads to a matrix  change, the hook_matrix_change() function would be excuted twiced. Have you ever met this problem when using hook?
Hasu, I know where the problem is, maybe you could update the code and fix the bug. https://github.com/tmk/tmk_keyboard/blob/6271878a021fcf578b71e2b7e97cd43786efa7dd/tmk_core/common/keyboard.c Line 137 and 138. In fact, the line 137 corresponds to the function
Code: [Select]
void action_exec(keyevent_t event)
{
    if (!IS_NOEVENT(event)) {
        dprint("\n---- action_exec: start -----\n");
        dprint("EVENT: "); debug_event(event); dprintln();
        hook_matrix_change(event);
    }
there is already a hook_matrix _change(event),but in line 138 hook_matrix _change(event) is excuted again.
So just delete either of them.

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 #658 on: Wed, 24 March 2021, 18:25:11 »
Great! Open the issue on github.
I'll fix it later.

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 #659 on: Sun, 11 April 2021, 19:38:09 »
Revised price of controller and shipping rate

Offline note96e

  • Posts: 0
  • Location: Japan
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #660 on: Wed, 29 December 2021, 20:16:25 »
I want to switch layers and Bluetooth/USB at the same time.
I've tried changing the code, but is there another way?
https://github.com/note96e/tmk_keyboard/commit/7fbb65b431b65237d253a5d200fc814db56fe03a

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 #661 on: Wed, 29 December 2021, 21:56:03 »
It looks good. and I think it is right way.

Offline note96e

  • Posts: 0
  • Location: Japan
Re: [TMK] HHKB Alt Controller with Mini-B connector
« Reply #662 on: Wed, 29 December 2021, 22:41:46 »
Thank you, Hasu.
I'll buy the Bluetooth controller when it comes in.

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 #663 on: Thu, 30 December 2021, 00:18:37 »
Thank you, Hasu.
I'll buy the Bluetooth controller when it comes in.

Bluetooth controller is not in stock but I can make it on make-to-order basis.
Its price is 75USD now due to recent price rise of electronic components, especially Bluetooth module.
Assembly process will start after making payment and takes one week or so.

Email me if you are still interested.

Offline TheNeonKnight

  • Posts: 25
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #664 on: Thu, 13 April 2023, 13:04:40 »
Hey Hasu! Is there any plans to do a revision of these with a new controller such as stm32 or RP2040? Would certainly lower the cost and allow for larger internal storage for things like VIAL 

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #665 on: Thu, 13 April 2023, 18:04:35 »
No plan at this time.

Hey Hasu! Is there any plans to do a revision of these with a new controller such as stm32 or RP2040? Would certainly lower the cost and allow for larger internal storage for things like VIAL 


Offline sporkus

  • Posts: 0
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #666 on: Fri, 19 May 2023, 16:23:02 »
Does qmk work on this board?

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #667 on: Fri, 19 May 2023, 23:19:58 »
Does qmk work on this board?

Probably . It should work.
Just note that I won't support QMK and can't help you when you are in trouble. But this won't be a problem in most cases.
« Last Edit: Fri, 19 May 2023, 23:23:06 by hasu »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #668 on: Tue, 30 May 2023, 01:24:07 »
I found that the bluetooth module was back in stock in a shop with 50% higher price than before.

You can order bluetooth controller if you don't mind its cost.
The controller is assembled after your payment and it takes a week or two to be shipped.

Thanks

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #669 on: Tue, 28 November 2023, 01:29:53 »
Type-C USB Controller for Pro1 is available now.

See the first post. Thank you

Offline TheOtherAdam

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #670 on: Tue, 02 January 2024, 22:10:07 »
Hey Hasu

Are you still selling these?

Cheers
Adam

Offline mohawk1367

  • Posts: 231
  • Location: Rochester, New York
  • Typing on: HHKB Pro Hybrid Type-S
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #671 on: Wed, 03 January 2024, 07:46:50 »
Hey Hasu

Are you still selling these?

Cheers
Adam

they should be
someone needs to make an aussie keyboard community called QMƎɹ┴⅄. get it? haha :D

Offline TheOtherAdam

  • Posts: 4
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #672 on: Sun, 07 January 2024, 04:01:23 »
Hey Hasu

Are you still selling these?

Cheers
Adam

they should be

I emailed the email address in the first post on 2nd Jan and haven't heard back, maybe he is away!

Edit: Yup away, my controller is on its way.
« Last Edit: Tue, 16 January 2024, 15:16:19 by TheOtherAdam »

Offline websitelover

  • Posts: 1
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #673 on: Tue, 16 January 2024, 13:38:17 »

Hello,

For anyone wondering about the current EMS shipping time:

I ordered on 1/12/2023 (MM/DD/YYYY) and got my controller on 1/16/2023, I live in NY, USA.

Shipping time is great, the controller is awesome, and my Pro 2 is now wireless and USB-C without any modifications to the port holes. Thank you, Hasu!

Offline Djankie

  • Posts: 26
  • Location: Netherlands
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #674 on: Sat, 17 February 2024, 12:33:11 »
Any battery available for the pro 2? Everything seems to be sold out...

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] HHKB Alt Controller with Mini-B/Type-C connector
« Reply #675 on: Mon, 19 February 2024, 03:20:23 »
It is difficult to find proper Lipo battery recently.

These seem to fit in the cavity but it may be too thick a bit, perhaps.

https://www.ebay.co.uk/itm/124445009690
https://ja.aliexpress.com/item/4001270844363.html?gatewayAdapt=glo2jpn