This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Buttonless DFU without BLE

My application is on the nRF52840 Dongle using ESB protocol, receiving data from an number of PTXs, . The device appears as an HID.

I would like to add Buttonless DFU, without adding BLE.

Can you outline the steps required to get nRF_Connect to recognize my device as capable of Buttonless DFU, and then actually triggering it?

Parents Reply Children
  • Ok, you can try to use the same approach as in the connectivity/ble_connectivity/ser_s140_usb_hci example, where nrf_dfu_trigger_usb_init() is called in usbd_enable().

  • Sorry for the delay -- other projects.

    Without the DFU Trigger, USBlyzer tells me this:

    Connection Status Device connected 
    Current Configuration 1 
    Speed Full (12 Mbit/s) 
    Device Address 9 
    Number Of Open Pipes 2 
    
    Device Descriptor HT4 Receiver
    Offset Field Size Value Description 
    0 bLength 1 12h  
    1 bDescriptorType 1 01h Device 
    2 bcdUSB 2 0200h USB Spec 2.0 
    4 bDeviceClass 1 00h Class info in Ifc Descriptors 
    5 bDeviceSubClass 1 00h  
    6 bDeviceProtocol 1 00h  
    7 bMaxPacketSize0 1 40h 64 bytes 
    8 idVendor 2 1915h Linksys 
    10 idProduct 2 521Bh  
    12 bcdDevice 2 0401h 4.01 
    14 iManufacturer 1 01h "Vald Performance Pty Ltd" 
    15 iProduct 1 02h "HT4 Receiver" 
    16 iSerialNumber 1 03h "D2E6D7700216" 
    17 bNumConfigurations 1 01h  
    
    Configuration Descriptor 1 Bus Powered, 100 mA
    Offset Field Size Value Description 
    0 bLength 1 09h  
    1 bDescriptorType 1 02h Configuration 
    2 wTotalLength 2 0029h  
    4 bNumInterfaces 1 01h  
    5 bConfigurationValue 1 01h  
    6 iConfiguration 1 04h "Default configuration" 
    7 bmAttributes 1 A0h Bus Powered, Remote Wakeup 
     4..0: Reserved  ...00000   
     5: Remote Wakeup  ..1.....  Yes 
     6: Self Powered  .0......  No, Bus Powered 
     7: Reserved (set to one)
    (bus-powered for 1.0)  1.......   
    8 bMaxPower 1 32h 100 mA 
    
    Interface Descriptor 0/0 HID, 2 Endpoints
    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 02h  
    5 bInterfaceClass 1 03h HID 
    6 bInterfaceSubClass 1 00h  
    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 0021h 33 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 
    
    Endpoint Descriptor 01 1 Out, Interrupt, 1 ms
    Offset Field Size Value Description 
    0 bLength 1 07h  
    1 bDescriptorType 1 05h Endpoint 
    2 bEndpointAddress 1 01h 1 Out 
    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 0 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 Minimum (Vendor-Defined 1) 19 01  
        Usage Maximum (Vendor-Defined 64) 29 40  
        Logical Minimum (0) 15 00  
        Logical Maximum (255) 26 FF 00  
        Report Size (8) 75 08  
        Report Count (64) 95 40  
        Input (Data,Ary,Abs) 81 00  
        Usage Minimum (Vendor-Defined 1) 19 01  
        Usage Maximum (Vendor-Defined 16) 29 10  
        Report Size (8) 75 08  
        Report Count (16) 95 10  
        Output (Data,Ary,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 00  
    End Collection C0  
    

    After adding in DFU Trigger (as above);

    Connection Status Device connected 
    Current Configuration 1 
    Speed Full (12 Mbit/s) 
    Device Address 10 
    Number Of Open Pipes 2 
    
    Device Descriptor HT4 Receiver
    Offset Field Size Value Description 
    0 bLength 1 12h  
    1 bDescriptorType 1 01h Device 
    2 bcdUSB 2 0200h USB Spec 2.0 
    4 bDeviceClass 1 00h Class info in Ifc Descriptors 
    5 bDeviceSubClass 1 00h  
    6 bDeviceProtocol 1 00h  
    7 bMaxPacketSize0 1 40h 64 bytes 
    8 idVendor 2 1915h Linksys 
    10 idProduct 2 521Bh  
    12 bcdDevice 2 0401h 4.01 
    14 iManufacturer 1 01h "Vald Performance Pty Ltd" 
    15 iProduct 1 02h "HT4 Receiver" 
    16 iSerialNumber 1 03h "D2E6D7700216" 
    17 bNumConfigurations 1 01h  
    
    Configuration Descriptor 1 Bus Powered, 100 mA
    Offset Field Size Value Description 
    0 bLength 1 09h  
    1 bDescriptorType 1 02h Configuration 
    2 wTotalLength 2 003Bh  
    4 bNumInterfaces 1 02h  
    5 bConfigurationValue 1 01h  
    6 iConfiguration 1 04h "Default configuration" 
    7 bmAttributes 1 A0h Bus Powered, Remote Wakeup 
     4..0: Reserved  ...00000   
     5: Remote Wakeup  ..1.....  Yes 
     6: Self Powered  .0......  No, Bus Powered 
     7: Reserved (set to one)
    (bus-powered for 1.0)  1.......   
    8 bMaxPower 1 32h 100 mA 
    
    Interface Descriptor 0/0 HID, 2 Endpoints
    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 02h  
    5 bInterfaceClass 1 03h HID 
    6 bInterfaceSubClass 1 00h  
    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 0021h 33 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 
    
    Endpoint Descriptor 01 1 Out, Interrupt, 1 ms
    Offset Field Size Value Description 
    0 bLength 1 07h  
    1 bDescriptorType 1 05h Endpoint 
    2 bEndpointAddress 1 01h 1 Out 
    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 Vendor-Specific, 0 Endpoints
    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 00h  
    5 bInterfaceClass 1 FFh Vendor-Specific 
    6 bInterfaceSubClass 1 01h  
    7 bInterfaceProtocol 1 01h  
    8 iInterface 1 00h  
    
    Unrecognized Class-Specific Descriptor 
    Offset Field Size Value Description 
    0 bLength 1 09h  
    1 bDescriptorType 1 21h  
    2  7 09 00 00 00 00 10 01   
    
    Interface 0 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 Minimum (Vendor-Defined 1) 19 01  
        Usage Maximum (Vendor-Defined 64) 29 40  
        Logical Minimum (0) 15 00  
        Logical Maximum (255) 26 FF 00  
        Report Size (8) 75 08  
        Report Count (64) 95 40  
        Input (Data,Ary,Abs) 81 00  
        Usage Minimum (Vendor-Defined 1) 19 01  
        Usage Maximum (Vendor-Defined 16) 29 10  
        Report Size (8) 75 08  
        Report Count (16) 95 10  
        Output (Data,Ary,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) 91 00  
    End Collection C0  
    

    nRF Connect Programmer doesn't find the DFU Trigger, and shows:

    2019-08-15T23:51:33.879Z ERROR Error while probing usb device at bus.address 1.11: LIBUSB_ERROR_NOT_FOUND. Please check that a libusb-compatible kernel driver is bound to this device, see https://github.com/NordicSemiconductor/pc-nrfconnect-core/blob/master/doc/win32-usb-troubleshoot.md

  • Hi,

    Sorry for the late reply, this one slipped through the cracks. I think you need to use the Nordic Semiconductor USB Vendor ID (and a USB Product ID reserved for development) for the programmer app to work. E.g. for the connectivity ser_s140_usb_hci example to actually work with the programmer app, you also need to apply this SDK15.3 patch found here. In the Device Manager it should then look like this:

    For a customer end-product you likely won't be using the programmer app, but instead use e.g. nrfutil to create a program to do the DFU.

  • Thanks -- I assumed that was the case (about the VID/PID).

    What do you mean by "SDK15.3 patch"? What exactly is in those HEX files?

  • The connectivity firmware that is used in the nRFConnect - Bluetooth Low Energy app, is the connectivity example in the SDK + this nRF5_SDK_15.3.0_connectivity.patch applied. Looking at the changes, the PID is set to 0xC00A. This is the same PID value that is used in the nrfconnect_dfu_trigger.inf driver at this link.

Related