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
  • 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?

Children
  • 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.

  • Configuration Descriptor 1
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 02h Configuration
    2 wTotalLength 2 0096h
    4 bNumInterfaces 1 05h
    5 bConfigurationValue 1 01h
    6 iConfiguration 1 04h "Default configuration"
    7 bmAttributes 1 E0h Self Powered, Remote Wakeup
    4..0: Reserved ...00000 
    5: Remote Wakeup ..1.....  Yes
    6: Self Powered .1......  Yes
    7: Reserved (set to one)
    (bus-powered for 1.0)
    1....... 
    8 bMaxPower 1 FAh 500 mA
    Interface Descriptor 0/0 HID, 1 Endpoint
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 04h Interface
    2 bInterfaceNumber 1 00h
    3 bAlternateSetting 1 00h
    4 bNumEndpoints 1 01h
    5 bInterfaceClass 1 03h HID
    6 bInterfaceSubClass 1 01h Boot Interface
    7 bInterfaceProtocol 1 01h Keyboard
    8 iInterface 1 00h
    HID Descriptor
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 21h HID
    2 bcdHID 2 0111h 1.11
    4 bCountryCode 1 00h
    5 bNumDescriptors 1 01h
    6 bDescriptorType 1 22h Report
    7 wDescriptorLength 2 003Fh 63 bytes
    Endpoint Descriptor 81 1 In, Interrupt, 1 ms
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 81h 1 In
    3 bmAttributes 1 03h Interrupt
    1..0: Transfer Type ......11  Interrupt
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 01h 1 ms
    Interface Descriptor 1/0 HID, 1 Endpoint
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 04h Interface
    2 bInterfaceNumber 1 01h
    3 bAlternateSetting 1 00h
    4 bNumEndpoints 1 01h
    5 bInterfaceClass 1 03h HID
    6 bInterfaceSubClass 1 01h Boot Interface
    7 bInterfaceProtocol 1 01h Keyboard
    8 iInterface 1 00h
    HID Descriptor
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 21h HID
    2 bcdHID 2 0111h 1.11
    4 bCountryCode 1 00h
    5 bNumDescriptors 1 01h
    6 bDescriptorType 1 22h Report
    7 wDescriptorLength 2 0030h 48 bytes
    Endpoint Descriptor 82 2 In, Interrupt, 1 ms
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 82h 2 In
    3 bmAttributes 1 03h Interrupt
    1..0: Transfer Type ......11  Interrupt
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 01h 1 ms
    Interface Descriptor 2/0 HID, 1 Endpoint
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 04h Interface
    2 bInterfaceNumber 1 02h
    3 bAlternateSetting 1 00h
    4 bNumEndpoints 1 01h
    5 bInterfaceClass 1 03h HID
    6 bInterfaceSubClass 1 01h Boot Interface
    7 bInterfaceProtocol 1 00h
    8 iInterface 1 00h
    HID Descriptor
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 21h HID
    2 bcdHID 2 0111h 1.11
    4 bCountryCode 1 00h
    5 bNumDescriptors 1 01h
    6 bDescriptorType 1 22h Report
    7 wDescriptorLength 2 0022h 34 bytes
    Endpoint Descriptor 83 3 In, Interrupt, 1 ms
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 83h 3 In
    3 bmAttributes 1 03h Interrupt
    1..0: Transfer Type ......11  Interrupt
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 01h 1 ms
    Interface Association Descriptor Abstract Control Model
    Offset Field Size Value Description
    0 bLength 1 08h
    1 bDescriptorType 1 0Bh Interface Association
    2 bFirstInterface 1 03h
    3 bInterfaceCount 1 02h
    4 bFunctionClass 1 02h CDC Control
    5 bFunctionSubClass 1 02h Abstract Control Model
    6 bFunctionProtocol 1 01h AT Commands: V.250 etc
    7 iFunction 1 00h
    Interface Descriptor 3/0 CDC Control, 1 Endpoint
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 04h Interface
    2 bInterfaceNumber 1 03h
    3 bAlternateSetting 1 00h
    4 bNumEndpoints 1 01h
    5 bInterfaceClass 1 02h CDC Control
    6 bInterfaceSubClass 1 02h Abstract Control Model
    7 bInterfaceProtocol 1 01h AT Commands: V.250 etc
    8 iInterface 1 00h
    Header Functional Descriptor
    Offset Field Size Value Description
    0 bFunctionLength 1 05h
    1 bDescriptorType 1 24h CS Interface
    2 bDescriptorSubtype 1 00h Header
    3 bcdCDC 2 0110h 1.10
    Call Management Functional Descriptor
    Offset Field Size Value Description
    0 bFunctionLength 1 05h
    1 bDescriptorType 1 24h CS Interface
    2 bDescriptorSubtype 1 01h Call Management
    3 bmCapabilities 1 03h
    7..2: Reserved 000000.. 
    1: Data Ifc Usage ......1.  Call management over Data Ifc
    0: Call Management .......1  Handles call management itself
    4 bDataInterface 1 04h
    Abstract Control Management Functional Descriptor
    Offset Field Size Value Description
    0 bFunctionLength 1 04h
    1 bDescriptorType 1 24h CS Interface
    2 bDescriptorSubtype 1 02h Abstract Control Management
    3 bmCapabilities 1 02h
    7..4: Reserved 0000.... 
    3: Connection ....0... 
    2: Send Break .....0.. 
    1: Line Coding ......1.  Line Coding requests and Serial State notification supported
    0: Comm Features .......0 
    Union Functional Descriptor
    Offset Field Size Value Description
    0 bFunctionLength 1 05h
    1 bDescriptorType 1 24h CS Interface
    2 bDescriptorSubtype 1 06h Union
    3 bControlInterface 1 03h
    4 bSubordinateInterface0 1 04h CDC Data
    Endpoint Descriptor 84 4 In, Interrupt, 16 ms
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 84h 4 In
    3 bmAttributes 1 03h Interrupt
    1..0: Transfer Type ......11  Interrupt
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 10h 16 ms
    Interface Descriptor 4/0 CDC Data, 2 Endpoints
    Offset Field Size Value Description
    0 bLength 1 09h
    1 bDescriptorType 1 04h Interface
    2 bInterfaceNumber 1 04h
    3 bAlternateSetting 1 00h
    4 bNumEndpoints 1 02h
    5 bInterfaceClass 1 0Ah CDC Data
    6 bInterfaceSubClass 1 00h
    7 bInterfaceProtocol 1 00h
    8 iInterface 1 00h
    Endpoint Descriptor 85 5 In, Bulk, 64 bytes
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 85h 5 In
    3 bmAttributes 1 02h Bulk
    1..0: Transfer Type ......10  Bulk
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 00h
    Endpoint Descriptor 01 1 Out, Bulk, 64 bytes
    Offset Field Size Value Description
    0 bLength 1 07h
    1 bDescriptorType 1 05h Endpoint
    2 bEndpointAddress 1 01h 1 Out
    3 bmAttributes 1 02h Bulk
    1..0: Transfer Type ......10  Bulk
    7..2: Reserved 000000.. 
    4 wMaxPacketSize 2 0040h 64 bytes
    6 bInterval 1 00h
    Interface 0 HID Report Descriptor Keyboard
    Item Tag (Value) Raw Data
    Usage Page (Generic Desktop) 05 01 
    Usage (Keyboard) 09 06 
    Collection (Application) A1 01 
        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 Count (1) 95 01 
        Report Size (8) 75 08 
        Input (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 03 
        Report Count (5) 95 05 
        Report Size (1) 75 01 
        Usage Page (LEDs) 05 08 
        Usage Minimum (Num Lock) 19 01 
        Usage Maximum (Kana) 29 05 
        Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02 
        Report Count (1) 95 01 
        Report Size (3) 75 03 
        Output (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 03 
        Report Count (224) 95 E0 
        Report Size (1) 75 01 
        Logical Minimum (0) 15 00 
        Logical Maximum (1) 25 01 
        Usage Page (Keyboard/Keypad) 05 07 
        Usage Minimum (Undefined) 19 00 
        Usage Maximum (Undefined) 29 DF 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
    End Collection C0 
    Interface 1 HID Report Descriptor Consumer Control
    Item Tag (Value) Raw Data
    Usage Page (Consumer Devices) 05 0C 
    Usage (Consumer Control) 09 01 
    Collection (Application) A1 01 
        Report ID (2) 85 02 
        Usage Minimum (Consumer Control) 19 01 
        Usage Maximum 2A FF 02 
        Logical Minimum (0) 15 00 
        Logical Maximum (668) 26 9C 02 
        Report Size (16) 75 10 
        Report Count (2) 95 02 
        Input (Data,Ary,Abs) 81 00 
    End Collection C0 
    Usage Page (Generic Desktop) 05 01 
    Usage (System Control) 09 80 
    Collection (Application) A1 01 
        Report ID (3) 85 03 
        Usage Minimum (System Power Down) 19 81 
        Usage Maximum 29 B8 
        Logical Minimum (0) 15 00 
        Logical Maximum (1) 25 01 
        Report Size (1) 75 01 
        Report Count (56) 95 38 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
    End Collection C0 
    Interface 2 HID Report Descriptor Vendor-Defined 1
    Item Tag (Value) Raw Data
    Usage Page (Vendor-Defined 1) 06 00 FF 
    Usage (Vendor-Defined 1) 09 01 
    Collection (Application) A1 01 
        Usage (Vendor-Defined 1) 09 01 
        Logical Minimum (0) 15 00 
        Logical Maximum (255) 26 FF 00 
        Report Size (8) 75 08 
        Report Count (64) 95 40 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Usage (Vendor-Defined 2) 09 02 
        Logical Minimum (0) 15 00 
        Logical Maximum (255) 26 FF 00 
        Report Size (8) 75 08 
        Report Count (64) 95 40 
        Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 02 
    End Collection C0 

    and this is the desc i modify in nrf5 sdk.it can work in mac os well. 

  • Hi,

    Could you share your entire project code here? (along with any modifications that you have made)

    -Priyanka

Related