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

Bulk OUT works , but IN not

I inserted code.

OUT 0x04 endpoint works, but 0x84 IN endpoint doesn't. 

I use libusb from Linux PC to communicate with nrf52840 via USB. At PC I call function "libusb_bulk_transfer" - it results in timeout - and at SOC no enter to event handler.

I see USB registers - IN endpoint packet counter don't increment, and no response.UGate.23.03.2020.zipUNrf.23.03.2020.zip

Parents
  • Hi,

     

    Thanks for providing both firmware and host software to test with. Makes it very easy to look into.

    Firmware built with SDK v16.0.0 (SES)

    I built the software on ubuntu 19.10, and ran it:

    ======= Wallit USB BLE Node server ==========================================================
    === LibUSB init ..... done. ===
    === Get Device List ..... done. ===
    
    === USB devices:
    ==============================================================================================
    VID:0a5c,PID:5801 (bus 1, device address: 4) path: 1.5
     - Intel - 
    VID:8087,PID:07dc (bus 1, device address: 3) path: 1.3
     - Intel - 
    VID:8087,PID:8000 (bus 1, device address: 2) path: 1
     - Linux Foundation - 
    VID:1d6b,PID:0002 (bus 1, device address: 1)
     - Linux Foundation - 
    VID:1d6b,PID:0003 (bus 3, device address: 1)
     - Segger - 
    VID:1366,PID:1015 (bus 2, device address: 101) path: 6
    VID:1bcf,PID:28a0 (bus 2, device address: 3) path: 4
     - Logitech - 
    VID:046d,PID:c52b (bus 2, device address: 2) path: 2
     - Nordic - 
    - Size of this descriptor                                    - 18 
    - Descriptor type                                            - 1 
    - USB specification release number                           - 200 
    - USB-IF class    code for the device                        - 0 
    - USB-IF subclass code for the device                        - 0 
    - USB-IF protocol code for the device                        - 0 
    - Maximum packet size for endpoint 0                         - 64 
    - USB-IF vendor  ID                                          - 1915 
    - USB-IF product ID                                          - 7777 
    - Device release number in binary-coded decimal              - 257 
    - Index of string descriptor describing manufacturer         - 1 
    - Index of string descriptor describing product              - 2 
    - Index of string descriptor containing device serial number - 0 
    - Number of possible configurations                          - 1 
    - CONFIG DESCRIPTOR: ---------------------------------------------------------- 
    - bLength                                                    - 9 
    - MaxPower                                                   - 49 
    - interface num_altsetting                                   - 1 
    - bmAttributes                                               - 224 
    - extra_length                                               - 0 
    - wTotalLength                                               - 32 
    - bNumInterfaces                                             - 1 
    - iConfiguration                                             - 0 
    - bDescriptorType                                            - 2 
    - bConfigurationValue                                        - 1 
    === Endpoint No0 
    EP Address - 4   
    PacketSize - 512   
    Interval   - 0   
    === Endpoint No1 
    EP Address - 132   
    PacketSize - 512   
    Interval   - 0   
    VID:1915,PID:7777 (bus 2, device address: 107) path: 1
     - Linux Foundation - 
    VID:1d6b,PID:0002 (bus 2, device address: 1)
    ==============================================================================================
    
    === found descriptor for open device ===
    opening bus.dev: 2.107 
    === Nordic normally opened === 
    no active kernel driver.
    === Prepare data EP ===
    === EP transfer 0 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 1 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 2 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 3 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 4 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 5 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 6 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 7 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 8 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 9 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 10 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 11 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 12 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 13 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 14 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 15 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 16 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 17 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 18 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 19 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 20 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 21 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 22 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 23 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    === EP transfer 24 ===
    bulk ep callback - actual_length = 32 
    complete. 
    LIBUSB_TRANSFER_COMPLETED 
    === NRF Received ===
    
    
    
    
    === COMPLETED ===
    

    Seems to be working? Could it be that I'm missing something?

     

    Kind regards,

    Håkon

  • I got something different

    ==============================================================================================

    === found descriptor for open device ===
    opening bus.dev: 3.62
    === Nordic normally opened ===
    no active kernel driver.
    === Prepare data EP ===
    === EP transfer 0 ===
    bulk ep callback - actual_length = 0
    complete.
    LIBUSB_TRANSFER_STALL
    Segmentation fault

    I insert you cycle with send_ep() as you advised - got above mentioned message

  • Hi,

     

    Here's the edited project I'm using:

    UGate.zip

    I also included the .hex file I've used in the build folder.

     

    Could you see if this works?

     

    Kind regards,

    Håkon

Reply Children
No Data
Related