A USB proxy based on raw-gadget and libusb

Overview

usb-proxy

This software is a USB proxy based on raw-gadget and libusb. It is recommended to run this repo on a computer that has an USB OTG port, such as Raspberry Pi 4 or other hardware that can work with raw-gadget, otherwise might need to use dummy_hcd kernel module to set up virtual USB Device and Host controller that connected to each other inside the kernel.

------------     -----------------------------------------------     -----------------------
|          |     |                                             |     |                     |
|          |     |-------------                     -----------|     |-------------        |
|   USB    <----->     USB    |    Host COMPUTER    |   USB    <----->     USB    |  USB   |
|  device  |     |  host port |  running usb-proxy  | OTG port |     |  host port |  Host  |
|          |     |-------------   with raw-gadget   -----------|     |-------------        |
|          |     |                                             |     |                     |
------------     -----------------------------------------------     -----------------------
------------     ------------------------------------
|          |     |                                  |
|          |     |-------------    Host COMPUTER    |
|   USB    <----->     USB    |  running usb-proxy  |
|  device  |     |  host port |   with raw-gadget   |
|          |     |-------------    and dummy_hcd    |
|          |     |                                  |
------------     ------------------------------------

How to use

Step 1: Prerequisite

Please clone the raw-gadget, and compile the kernel modules(if you need dummy_hcd as well, please compile it, otherwise only need to compile raw-gadget) in the repo, then load raw-gadget kernel module, you will be able to access /dev/raw-gadget afterward.

Install the package

sudo apt install libusb-1.0-0-dev

Step 2: Check device and driver name

Please check the name of device and driver on your hardware with the following command. If you are going to use dummy_hcd, then this step can be skipped, because usb-proxy will use dummy_hcd by default.

# For device name
$ ls /sys/class/udc/
fe980000.usb
# For driver name
$ cat /sys/class/udc/fe980000.usb/uevent
USB_UDC_NAME=fe980000.usb

Note: If you are not able to see the above on your Raspberry Pi 4, probably you didn't enable the dwc2 kernel module, please execute the following command and try again after reboot.

$ echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt
$ echo "dwc2" | sudo tee -a /etc/modules
$ sudo reboot

Step 3: Check vendor_id and product_id of USB device

Please plug the USB device that you want to test into Raspberry Pi 4, then execute lsusb on terminal.

$ lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1b3f:2247 Generalplus Technology Inc. GENERAL WEBCAM
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see, There is a Bus 001 Device 003: ID 1b3f:2247 Generalplus Technology Inc. GENERAL WEBCAM, and 1b3f:2247 is the vendor_id and product_id with a colon between them.

Step 4: Run

Usage:
    -h/--help: print this help message
    -v/--verbose: increase verbosity
    --device: use specific device
    --driver: use specific driver
    --vendor_id: use specific vendor_id(HEX) of USB device
    --product_id: use specific product_id(HEX) of USB device
  • If device not specified, usb-proxy will use dummy_udc.0 as default device.
  • If driver not specified, usb-proxy will use dummy_udc as default driver.
  • If both vendor_id and product_id not specified, usb-proxy will connect the first USB device it can find.

For example:

$ ./usb-proxy --device=fe980000.usb --driver=fe980000.usb --vendor_id=1b3f --product_id=2247

Please replace fe980000.usb with the device that you have when running this software, and then replace the driver variable with the string after USB_UDC_NAME= in step 2. Please also modify the vendor_id and product_id variable that you have checked in step 3.

You might also like...
GPS parser which read raw GPS messages, selects only the valid ones and sends them to CAN bus

EagleTRT GPS System for Fenice GPS parser which read raw GPS messages, selects only the valid ones and sends them to CAN bus Compiling GPS Logger gps_

Extremely minimal raw Wayland greeter for greetd.
Extremely minimal raw Wayland greeter for greetd.

greetd-mini-wl-greeter An extremely simple raw Wayland greeter for greetd, inspired by lightdm-mini-greeter. Usage Follow the same steps as for e.g. g

POC tool to convert CobaltStrike BOF files to raw shellcode

BOF2Shellcode POC tool to convert a Cobalt Strike BOF into raw shellcode. Introduction This code was written as part of a blog tutorial on how to conv

This is for interfacing rasberry-pi's (2 cards) with an arduino for sending raw data to form the close loop system to avoid motor heating by acting on a given temperature.

This is for interfacing rasberry-pi's (2 cards) with an arduino for sending raw data to form the close loop system to avoid motor heating by acting on a given temperature. Interface is explained through a master slave approach and client server approach. another camera is used with OPEN-CV platform to interface and collect data aswell.

Scrollytroller is a crank-based USB controller, initially inteneded for use with Playdate's Pulp web-based game development tool
Scrollytroller is a crank-based USB controller, initially inteneded for use with Playdate's Pulp web-based game development tool

Scrollytroller Scrollytroller is a crank-based USB controller, initially inteneded for use with Playdate's Pulp web-based game development tool. This

code for the Proxy DLL example blog post

ProxyDLLExample A simple DLL for Windows that can be used to demonstrate a DLL Proxy Attack. This project uses GCC through MinGW was tested on Ubuntu

Cloud-native high-performance edge/middle/service proxy
Cloud-native high-performance edge/middle/service proxy

Cloud-native high-performance edge/middle/service proxy Envoy is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wan

An example of COM hijacking using a proxy DLL.

COM-Hijacking An example of COM hijacking using a proxy DLL. Demo using getmac/wbemprox.dll In this demo, we use the fact that the getmac.exe command

Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL8821AU Chipsets

Click for USB WiFi Adapter Information for Linux 8821au ( 8821au.ko ) 🚀 Linux Driver for USB WiFi Adapters that are based on the RTL8811AU and RTL882

Comments
  • Fix type of return value by data.find

    Fix type of return value by data.find

    Hi.

    I use usb-proxy to analyze USB devices and it is very useful. However, it required minor fix to use injection feature in my environment.

    Problem

    In aarch64, a std::out_of_range exception is thrown if a injection rule doesn't match.

    [email protected]:~/work/usb-proxy $ lsb_release -d
    Description:    Debian GNU/Linux 11 (bullseye)
    [email protected]:~/work/usb-proxy $ uname -a
    Linux raspberrypi 5.15.56-v8+ #1575 SMP PREEMPT Fri Jul 22 20:31:26 BST 2022 aarch64 GNU/Linux
    [email protected]:~/work/usb-proxy $ sudo ./usb-proxy --device=fe980000.usb --driver=fe980000.usb --vendor_id=0590 --product_id=001a --enable_injection
    Device is: fe980000.usb
    Driver is: fe980000.usb
    vendor_id is: 1424
    product_id is: 26
    Injection enabled
    Parsed injection file: injection.json
    Device opened successfully
    Setup USB config successfully
    Start hotplug_monitor thread, thread id(32888)
    Start for EP0, thread id(32886)
    event: connect, length: 0
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 8
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_DEVICE
    terminate called after throwing an instance of 'std::out_of_range'
      what():  basic_string::replace: __pos (which is 4294967295) > this->size() (which is 8)
    Aborted
    

    std::basic_string::find returns std::string::npos if the pattern doesn't match. std::string::npos is 18446744073709551615UL in aarch64, but when it is assigned to __u32, it overflows and becomes 4294967295.

    Fix

    Use std::string::size_type instead of __u32. std::string::size_type is the correct return type for std::basic_string::find.

    Alternatively, we can use the auto keyword without std::string::size_type explicitly.

    opened by msawahara 3
  • error Proxing a keyboard: ioctl(USB_RAW_IOCTL_EP0_WRITE): Cannot send after transport endpoint shutdown

    error Proxing a keyboard: ioctl(USB_RAW_IOCTL_EP0_WRITE): Cannot send after transport endpoint shutdown

    first of all thanks for sharing your work, I successfuly proxied a ethernet adapter but fails with all HID i have

    [email protected]:~/usb-proxy $ sudo ./usb-proxy --device=fe980000.usb --driver=fe980000.usb --vendor_id=1997 --product_id=2433 Device is: fe980000.usb Driver is: fe980000.usb vendor_id is: 6551 product_id is: 9267 Device opened successfully Start hotplug_monitor thread, thread id(2326) Setup USB config successfully Start for EP0, thread id(2324) event: connect, length: 0 event: control, length: 8 bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 64 type = USB_TYPE_STANDARD req = USB_REQ_GET_DESCRIPTOR desc = USB_DT_DEVICE ep0: transferred 18 bytes (in) event: control, length: 8 bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18 type = USB_TYPE_STANDARD req = USB_REQ_GET_DESCRIPTOR desc = USB_DT_DEVICE ep0: transferred 18 bytes (in) event: control, length: 8 bRequestType: 0x80 (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 255 type = USB_TYPE_STANDARD req = USB_REQ_GET_DESCRIPTOR desc = USB_DT_CONFIG ioctl(USB_RAW_IOCTL_EP0_WRITE): Cannot send after transport endpoint shutdown

    Any idea whats causing this?

    opened by Alphadan28 14
  • libusb_handle_events_completed cause seqfault

    libusb_handle_events_completed cause seqfault

    Hi. Nice work! I have some problems with running proxy.

    Is it possible to "mitm" the communication between the flash drive and my external computer?

    "pendrive" <-> (USB <- raspberrypi -> USB OTG) <-> my external pc

    My setup: Raspberry Pi 4 B - 8gb ram Kernel 5.15.34 libusb-1.0.25

    Im getting seqfault in libusb_handle_events_completed(NULL, NULL); Zrzut ekranu 2022-05-1 o 18 10 03 stacktrace: Zrzut ekranu 2022-05-1 o 18 10 17

    After commenting this line libusb_handle_events_completed(NULL, NULL); it looks working better, but still failing?

    Device is: fe980000.usb
    Driver is: fe980000.usb
    vendor_id is: 2316
    product_id is: 4096
    5 Devices in list
    Target device not found
    Device opened successfully
    Setup USB config successfully
    Start hotplug_monitor thread, thread id(3243)
    Start for EP0, thread id(3241)
    event: connect, length: 0
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0100, wIndex: 0x0000, wLength: 18
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_DEVICE
    Control transfer succeed
    ep0: transferred 18 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0302, wIndex: 0x0409, wLength: 2
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_STRING
    Control transfer succeed
    ep0: transferred 2 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0302, wIndex: 0x0409, wLength: 18
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_STRING
    Control transfer succeed
    ep0: transferred 18 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0301, wIndex: 0x0409, wLength: 2
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_STRING
    Control transfer succeed
    ep0: transferred 2 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0301, wIndex: 0x0409, wLength: 32
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_STRING
    Control transfer succeed
    ep0: transferred 32 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0f00, wIndex: 0x0000, wLength: 5
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_BOS
    Control transfer succeed
    ep0: transferred 5 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0f00, wIndex: 0x0000, wLength: 22
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_BOS
    Control transfer succeed
    ep0: transferred 22 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 9
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_CONFIG
    Control transfer succeed
    ep0: transferred 9 bytes (in)
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0200, wIndex: 0x0000, wLength: 44
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_CONFIG
    Control transfer succeed
    ep0: transferred 44 bytes (in)
    event: control, length: 8
      bRequestType: 0x00 (OUT), bRequest: 0x09, wValue: 0x0001, wIndex: 0x0000, wLength: 0
      type = USB_TYPE_STANDARD
      req = USB_REQ_SET_CONFIGURATION
    Found desired configuration at index: 0
    ep #0:
      name: ep1in
      addr: 1
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #1:
      name: ep1out
      addr: 1
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #2:
      name: ep2in
      addr: 2
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #3:
      name: ep2out
      addr: 2
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #4:
      name: ep3in
      addr: 3
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #5:
      name: ep3out
      addr: 3
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #6:
      name: ep4in
      addr: 4
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #7:
      name: ep4out
      addr: 4
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #8:
      name: ep5in
      addr: 5
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #9:
      name: ep5out
      addr: 5
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #10:
      name: ep6in
      addr: 6
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #11:
      name: ep6out
      addr: 6
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    ep #12:
      name: ep7in
      addr: 7
      type: iso blk int
      dir : in  ___
      maxpacket_limit: 1024
      max_streams: 0
    ep #13:
      name: ep7out
      addr: 7
      type: iso blk int
      dir : ___ out
      maxpacket_limit: 1024
      max_streams: 0
    bNumEndpoints is 2
    bulk_out: addr = 1, ep = #1
    Creating thread for EP01
    Start reading thread for EP01, thread id(3244)
    bulk_in: addr = 2, ep = #2
    Creating thread for EP82
    Start writing thread for EP01, thread id(3245)
    Start reading thread for EP82, thread id(3246)
    process_eps done
    Start writing thread for EP82, thread id(3247)
    event: control, length: 8
      bRequestType: 0xa1  (IN), bRequest: 0xfe, wValue: 0x0000, wIndex: 0x0000, wLength: 1
      type = USB_TYPE_CLASS
      req = unknown = 0xfe
    Control transfer succeed
    ep0: transferred 1 bytes (in)
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 36 bytes to queue
    EP82(bulk_in): wrote 36 bytes to host
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 36 bytes to queue
    EP82(bulk_in): wrote 36 bytes to host
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    event: control, length: 8
      bRequestType: 0x80  (IN), bRequest: 0x06, wValue: 0x0300, wIndex: 0x0000, wLength: 255
      type = USB_TYPE_STANDARD
      req = USB_REQ_GET_DESCRIPTOR
      desc = USB_DT_STRING
    Control transfer succeed
    ep0: transferred 4 bytes (in)
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 18 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 18 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 8 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 8 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 4 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 4 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 36 bytes to queue
    EP82(bulk_in): wrote 36 bytes to host
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    EP82(bulk_in): wrote 512 bytes to host
    EP82(bulk_in): wrote 13 bytes to host
    EP1(bulk_out): read 31 bytes from host
    EP1(bulk_out): enqueued 31 bytes to queue
    EP82(bulk_in): enqueued 1024 bytes to queue
    EP82(bulk_in): enqueued 512 bytes to queue
    EP82(bulk_in): enqueued 13 bytes to queue
    ioctl(USB_RAW_IOCTL_EP_WRITE): Cannot send after transport endpoint shutdown
    ioctl(USB_RAW_IOCTL_EP_READ): Cannot send after transport endpoint shutdown
    
    opened by patryk4815 2
  • host to device transfer size

    host to device transfer size

    Hi, I've tested on Raspberry PI 4 and BeagleBone Black and on both there seems to be an issue with data from host to device. The issue may come from raw-gadget itself but I'm not sure what would be the right approach. It seems that when we get data from the host, it could contain more than just one packet (up to info.eps[i].limits.maxpacket_limit) which aside from the weird behavior on the actual device, it may also get lost when sent via libusb_interrupt_transfer in send_data (I'm unable to actually verify this on the device).

    On BeagleBone Black I can see this when adding traces for data reception in ep_loop_read:

    #[email protected]>481B/0x07/out
    #[email protected]>545B/0x07/out
    #[email protected]>481B/0x07/out
    #[email protected]>545B/0x07/out
    #[email protected]>545B/0x07/out
    #[email protected]>481B/0x07/out
    #[email protected]>481B/0x07/out
    #[email protected]>481B/0x07/out
    #[email protected]>481B/0x07/out 
    #[email protected]>417B/0x07/out
    #[email protected]> 33B/0x07/out
    #[email protected]> 33B/0x07/out
    #[email protected]> 33B/0x07/out
    

    Meaning that at 253.250 (sec.ms) from starting the proxy it received 480 bytes (see first message - I added 1 byte because I am preserving the endpoint info for my own use). Sometimes the transfer size equals actual payload like in the last 3 cases where 32 bytes were received.

    On BeagleBone Black, the maxpacket_limit is reported to be 512 for the EPs assigned for use via proxy. Any chance this can be tuned to only process one message at a time?

    On Raspberry PI 4 the behavior is worse as it transfers 1024 bytes at a time most of the time and sometimes it gets blocked for a second with no transfer at all but the Raspberry PI is somewhat known to exhibit USB issues.

    The transfers from device to host don't show any issue and they respect the expected message size.

    Thanks in advance for any feedback

    opened by lmirel 3
Owner
Aristo Chen
Aristo Chen
Access USB devices from Ruby via libusb-1.x

Access USB devices from Ruby LIBUSB is a Ruby binding that gives Ruby programmers access to arbitrary USB devices. libusb is a library that gives full

Lars Kanis 148 Jan 2, 2023
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Raspberry Pi 400 as a USB HID Keyboard Hook your Pi 400 up to your PC somehow, using a USB Type-C cable into the power port. Anker make good ones- I u

Philip Howard 182 Dec 12, 2022
A simple utility for loading custom firmware onto the PS5 camera, using libusb.

A simple utility for loading custom firmware onto the PS5 camera, using libusb.

Raleigh Littles 21 Nov 10, 2022
Tiny and portable usb host and device stack for mcu with usb ip

Tiny and portable usb host and device stack for mcu with usb ip

sakumisu 545 Jan 2, 2023
USB-C_PCB_experiments - USB-C ports made from a flex PCB and an ATtiny84A

USB-C PCB Experiments This is part of an ongoing series of projects involving creative interpretations of the USB mechanical standards. You've probabl

Sam Ettinger 23 Sep 5, 2022
ESP32 software USB host through general IO pins. We can connect up to 4 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp32_usb_soft_host esp32 USB-LS pure software host thru general IO pins. Up to 4 HID devices simultaneously. board ~$3 :https://www.aliexpress.com/pr

Samsonov Dima 313 Jan 1, 2023
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp8266_usb_soft_host Test for esp8266 usb host . Works with ESP-IDF v3.4 80MHz and 160MHz. WorkInProgress Test run with mouse & combined mouse & keyb

Samsonov Dima 28 Sep 1, 2022
Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to USB.

temperature-logger Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to

Jana Marie Hemsing 50 Nov 24, 2022
Basic definitions and utility functions for GNSS raw measurement processing

gnss_comm Authors/Maintainers: CAO Shaozu (shaozu.cao AT gmail.com) The gnss_comm package contains basic definitions and utility functions for GNSS ra

HKUST Aerial Robotics Group 70 Dec 21, 2022
A dataset containing synchronized visual, inertial and GNSS raw measurements.

GVINS-Dataset Author/Maintainer: CAO Shaozu (shaozu.cao AT gmail.com), LU Xiuyuan (xluaj AT connect.ust.hk) This repository hosts dataset collected du

HKUST Aerial Robotics Group 134 Dec 21, 2022