• k0uchpad BLE

    TinLethax08/06/2022 at 07:00 0 comments

    Several years ago I have a project called KouchPad. I reuse the Synaptics trackpad as a touch keyboard + trackpad. And STM32 as USB HID thingy.

    After I get the Q30 keyboard working with nRF51822 over HID BLE. I though that this project might be another KouchPad. But to name it like Wac0m Rif0ff. I went for the name "k0uchpad BLE". 

    Yesterday I have some test with it (trackpad part). And I managed to crash Windows and get GSOD (Yes, I literally mean Green screen). For some reason the Windows driver kernel (win32kbase.sys) hates 2 or more trackpad on 1 Laptop. I have to change the usage from trackpad to touchscreen to not crash my laptop. Face palm moment

    Right now I'm waiting the PCB and working on Key matrix scanning (with STM8L151F3). The code is here : k0uchpad BLE 

  • Q30 keyboard. Pinout fully mapped!!

    TinLethax07/31/2022 at 16:03 0 comments

    After couple months of finding. Finally, a complete pinout of Blackberry Q30 Keyboard !

    Right now I'm working on the driver of Synaptics touch controller IC. It turned out that my previous keyboard has Synaptics S3501B and my current keyboard has Synaptics S3508A instead. These are RMI4 compliance chip from Synaptics. And I confirmed that S3508A works with RMI4 driver on Linux.

    Above pic is Dmesg log from my F1C100s board. The driver has a problem parsing IRQ number from device tree, so I did some quick workaround patch in rmi_drive.c . pdata->irq = 39 is to request irq from irq number 39. Which is GPIO Port E interrupt number.


    Some quick patch

    Since this thing is work correctly. I did some logic analyzing on the I2C bus. Especially with the HID report.

    I was able to decode the HID report of the Synaptics IC. I'll update on this soon but this is what I got:

    page number : 0x00

    function : 0x12

    HID report : 0x05 for finger detection, 0x06 for HID report

    0x06 report : 88 bytes with following format

    // Finger 1
    // F12_report[0] -> Finger 1 present (1/0)
    // F12_report[1] -> ABS_X LSB
    // F12_report[2] -> ABS_X MSB
    // F12_report[3] -> ABS_Y LSB
    // F12_report[4] -> ABS_Y MSB
    // F12_report[5] -> pressure 
    // F12_report[6] -> ABS_MT_TOUCH_MINOR
    // F12_report[7] -> ABS_MT_TOUCH_MAJOR

    // Finger 2
    // F12_report[8] -> Finger 2 present (1/0)
    // F12_report[9] -> ABS_X LSB
    // F12_report[10] -> ABS_X MSB
    // F12_report[11] -> ABS_Y LSB
    // F12_report[12] -> ABS_Y MSB
    // F12_report[13] -> pressure 
    // F12_report[14] -> ABS_MT_TOUCH_MINOR
    // F12_report[15] -> ABS_MT_TOUCH_MAJOR

    // F12_report[16] to F12_report[85] are all at 0x00

    // F12_report[86] -> BTN_TOUCH single finger == 1, 2 fingers == 3
    // F12_report[87] is 0x00

    For now I have to port the code to STM8 and STM32. So please stay tuned for next update!

  • Found LED pinout!

    TinLethax07/25/2022 at 08:30 0 comments

    Today after I took 4th covid vax jab. I can't move much since my arm hurts xD. So I decided to revisit this project after I've been working on oscilloscope project and before I go back to Bangkok (Uni) soon.

    Jump to the pinout. I already found the LED pinout of this keyboard. It turned out that each row (1-3) has its own LEDs. They share cathode (-) on same row. So pin 20, 21 and 24 are LED cathode pin for row number 1 2 and 3. These LEDs separated anode (+) pin. Pin 7 is for left side and pin 22 is for right side.  So the configuration is something like this :

  • All Key scan matrix are mapped !

    TinLethax04/19/2022 at 03:36 0 comments

    Couple day ago, replacement keyboard finally arrived. I came back to probe more keys and came up with this new Matrix map 


    I also probed the LEDs pinout, but for some reason the diodes connection configuration is quite confusing

    As for the Synaptics Touch Controller pin map is still remain no change.

  • Initial probe. Didn't go well as I thought.

    TinLethax03/24/2022 at 03:32 0 comments

    Because I have no idea about pinout of this keyboard. I ended up borrowing Arduino Mega 2560 from my friend living next door for this project. I wrote a small(?) code that use roughly 16 GPIOs to scan each pin. By the scanning pin set as input pull-up mode, other pin as output with logic 0. When button is pressed, it completes the circuit and pull the input pin down to GND level. With this setup I can easily map out every single button and create buttons matrix map. Unfortunately, my hardware setup is to cozy and I need to put the keyboard in weird angle. Ended up tearing the FFC cable. I be able to only map few pins, Until the new keyboard arrive. This is by far the most mapping I can get :