geekhack Marketplace > TMK Keyboard Service

[TMK] HHKB Alt Controller with Mini-B/Type-C connector

<< < (131/137) > >>

zhaochenhan1992:
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.

hasu:
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

zhaochenhan1992:
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? 

--- Quote from: hasu 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

--- End quote ---

hasu:
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.

zhaochenhan1992:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version