Skip to content

[Bug] USB device not recognized (Windows error) #466

Description

@frsvme

Describe the Bug

Hi. I took the time and disassembled the keyboard from this issue.
The pins of the columns and rows were found by searching on the Internet and self-calling with multimetr.

Image What is circled in orange is rows, what is red is columns. The matrix type turned out to be ROW2COL

The first test firmware confirmed the information above (The "ESC", "Tilda", "TAB", "CAPSLOCK", "L SHIFT", "L CTRL" buttons are on the same line - they all have one contact in common):
keyboard.json

{
    "keyboard_name": "KD87A ESC Test",
    "manufacturer": "DarkProject",
    "processor": "SN32F299F",
    "bootloader": "sn32-dfu",
    "diode_direction": "ROW2COL",
    "matrix_pins": {
        "rows": ["A4"],
        "cols": ["B14", "B15"]
    },
    "matrix": {
        "rows": 1,
        "cols": 2
    },
    "usb": {
        "vid": "0xFEED",
        "pid": "0x6060"
    },
    "layouts": {
        "LAYOUT_esc": {
            "layout": [
                {"label": "ESC", "matrix": [0,0], "x": 0, "y": 0},
                {"label": "~",  "matrix": [0,1], "x": 1, "y": 0}
            ]
        }
    }
}

keymap.c
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    [0] = LAYOUT_esc(
        KC_ESC, KC_GRV
    )
};

config.h

#pragma once

#define VENDOR_ID 0x1C11
#define PRODUCT_ID 0xFF01
#define DEVICE_VER 0x1337
#define MANUFACTURER "frsvme"
#define PRODUCT "OneKey SN32F290"

#define MATRIX_ROWS 1
#define MATRIX_COLS 2
#define DIODE_DIRECTION ROW2COL

rules.mk

BOOTLOADER = sn32-dfu
MCU = SN32F299F
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
PRINT_ENABLE = yes

Pressing these two keys was transferred to the QMK Toolbox (both in the HID Console and in the Keytest).

Image

The multimeter found out that for the Esc->Ctrl row there is the following correspondence:
A4
ESC = B14 (work)
Tilda = B15 (work)
TAB = B19
CapsLock = D19
L SHIFT = A19
L CTRL = A18

However, it is worth adding one of the following contacts circled in red (B19, D19, A19, A18) and prescribe approximately the following parameters:

...
"matrix_pins": {
        "rows": ["A4"],
        "cols": ["B14", "B15", "**"] //any of the pins listed above
    },
    "matrix": {
        "rows": 1,
        "cols": 3
    },
...
...
#define MATRIX_ROWS 1
#define MATRIX_COLS 3
...
...
    [0] = LAYOUT_esc(
        KC_ESC, KC_GRV, ** //any button that matches the pin above
    )
};

Contacts on the MCU:
Image

When using this configuration, the keyboard is not recognized by Windows: The device is not recognized.
And this spreads when you try to use exactly those contacts, the screenshot of which is inserted above.

Please help me figure out the problem - I am very confused.

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output


Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions