nrf desktop in ncs SDK cant work when onnect to cmac os

When I was developing a keyboard using the nRF52840 with the NCS SDK, I found that the keyboard couldn't type on macOS when connected via USB or BLE. However, it worked perfectly on Windows and Android. I tried modifying the CONFIG_DESKTOP_DEVICE_VID and CONFIG_DESKTOP_DEVICE_PID to Apple's IDs, but it still didn't work. Could you help me solve this problem?

Parents Reply Children
  • We recommend to try to parse the HID report descriptor with external tools e.g. https://github.com/FFY00/python-hid-parser and see if the parser output matches what was intended

    It would be great if you could provide the report descriptor and what reports you send when buttons are pressed and released, ideally a whole sequence of reports that is sent when user types "test" (or any other word) on the keyboard.

    Also, I don't think there is a point to point alternative to the sample that you mentioned, but maybe you can take a look at this sample in Zephyr:
    https://docs.nordicsemi.com/bundle/ncs-2.6.2/page/zephyr/samples/subsys/usb/cdc_acm_composite/README.html 

    -Priyanka

  •   

    i have try to test it ,but it will be init cdc fail.and be stuck in a dead loop all the time. cannot work funcation

  • Hi,

    I have requested internally to try and reproduce this as I have a Windows here. 

    You have not made any modifications to the sample, right? 

    Also as mentioned earlier, we don't suggest changing the VID/PID. We would recommend to try to parse the HID report descriptor with external tools e.g. https://github.com/FFY00/python-hid-parser  and see if the parser output matches what was intended.

    We would be able to help better if you could provide the report descriptor and what reports you send when buttons are pressed and released, ideally a whole sequence of reports that is sent when user types "test" (or any other word) on the keyboard.

    pipixia_1_1 said:
    ome key like comsumer key

    Cold you tell me what this is?

  • Usage Page (Generic Desktop) 05 01  
    Usage (Keyboard) 09 06  
    Collection (Application) A1 01  
        Report ID (2) 85 02  
        Usage Page (Keyboard/Keypad) 05 07  
        Usage Minimum (Keyboard Left Control) 19 E0  
        Usage Maximum (Keyboard Right GUI) 29 E7  
        Logical Minimum (0) 15 00  
        Logical Maximum (1) 25 01  
        Report Size (1) 75 01  
        Report Count (8) 95 08  
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02  
        Report Size (8) 75 08  
        Report Count (1) 95 01  
        Input (Cnst,Ary,Abs) 81 01  
        Usage Page (Keyboard/Keypad) 05 07  
        Usage Minimum (Undefined) 19 00  
        Usage Maximum (Keypad =) 29 67  
        Logical Minimum (0) 15 00  
        Logical Maximum (1) 25 01  
        Report Size (1) 75 01  
        Report Count (104) 95 68  
        Input (Data,Ary,Abs) 81 00  
        Report ID (5) 85 05  
        Usage Page (LEDs) 05 08  
        Usage Minimum (Num Lock) 19 01  
        Usage Maximum (Kana) 29 05  
        Logical Minimum (0) 15 00  
        Logical Maximum (1) 25 01  
        Report Count (5) 95 05  
        Report Size (1) 75 01  
        Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02  
        Report Count (1) 95 01  
        Report Size (3) 75 03  
        Output (Cnst,Ary,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 01  
        Report ID (6) 85 06  
        Usage Page (Vendor-Defined 1) 06 00 FF  
        Usage (Vendor-Defined 65281) 0A 01 FF  
        Logical Minimum (0) 15 00  
        Logical Maximum (255) 26 FF 00  
        Report Size (8) 75 08  
        Report Count (62) 95 3E  
        Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02  
    End Collection C0  
    Usage Page (Generic Desktop) 05 01  
    Usage (System Control) 09 80  
    Collection (Application) A1 01  
        Report ID (3) 85 03  
        Logical Minimum (0) 15 00  
        Logical Maximum (1023) 26 FF 03  
        Usage Minimum (Undefined) 19 00  
        Usage Maximum 2A FF 03  
        Report Size (16) 75 10  
        Report Count (1) 95 01  
        Input (Data,Ary,Abs) 81 00  
    End Collection C0  
    Usage Page (Consumer Devices) 05 0C  
    Usage (Consumer Control) 09 01  
    Collection (Application) A1 01  
        Report ID (4) 85 04  
        Logical Minimum (0) 15 00  
        Logical Maximum (1023) 26 FF 03  
        Usage Minimum (Undefined) 19 00  
        Usage Maximum 2A FF 03  
        Report Size (16) 75 10  
        Report Count (1) 95 01  
        Input (Data,Ary,Abs) 81 00  
    End Collection C0  
    

    i modify the report desc.this is my report desc,and my keyboard can work in windowns well.

Related