Giter Club home page Giter Club logo

usbpassthru's Introduction

USBPassThru

Arduino USB pass through demos

All the demos use one of following hardware configurations.

  • Arduino Leonardo + Arduino USB Host Shield
  • Adafruit ItsyBitsy 32u4 @ 8 MHz and 3.3V + USB Host Shield mini

The demos do not decode the USB HID reports. They pass the HID reports from the USB host shield unchanged to the USB device output.

Understanding pass through is required for keyboard/mouse extenders or IP KVMs.

Other uses are to make a hardware key macro that work on any OS. No need to install key macro software.

Swap certain keys such as Caps Lock and Ctrl keys.

Swap the mouse left and right buttons.

USBKbdPassThru

USB Keyboard -> USB Host Shield -> Leonardo -> Computer USB port

USBMsePassThru

USB Mouse -> USB Host Shield -> Leonardo -> Computer USB port

Alternative hardware option

A smaller and cheaper option is to use an Adafruit ItsyBitsy 32u4 @ 8 MHz and 3.3V logic levels. The 32u4 is the same microcontroller used in the Arduino Leonardo. And a USB Host mini board. The UH mini uses 3.3V logic levels so the 32u4 board must also use 3.3V. Soldering and cutting traces is required.

https://www.circuitsathome.com/arduino_usb_host_shield_projects/

usbpassthru's People

Contributors

gdsports avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

usbpassthru's Issues

Question

Sorry for maybe putting an issue but i didnt find any other way to get in contact with you, i have used your libraries a lot and also the codes, thank you. Now i am wondering if there is anyway to get pass thru on the newer SAMD usb host library?

Example for passthrough of a composite device?

Have a composite device here, Mouse report ID 0, Keyboard 1(with several other reports) Below an example of the HID report descriptor

HID Descriptor Page 1
HID Descriptor Page 2

How would you initialize a composite device? Like this?

HIDBoot < USB_HID_PROTOCOL_KEYBOARD | USB_HID_PROTOCOL_MOUSE > HidComposite(&Usb);
HIDBoot<USB_HID_PROTOCOL_KEYBOARD>    HidKeyboard(&Usb);  // Is this needed with composite init above??
HIDBoot<USB_HID_PROTOCOL_MOUSE>    HidMouse(&Usb); // Is this needed with composite init above?

KbdRptParser KbdPrs;
MouseRptParser MousePrs;

void setup()
{
  Serial.begin( 115200 );
  uint8_t attempts = 30;
  while (!Serial && attempts--) {
    delay(100); // Wait for serial port to connect for up to 3 seconds
  }
  Serial.println("Start");

  if (Usb.Init() == -1) {
    Serial.println("USB host shield did not start.");
  }
  delay( 200 );

  HidComposite.SetReportParser(1, &KbdPrs);
  HidComposite.SetReportParser(0, &MousePrs);
  HidKeyboard.SetReportParser(1, &KbdPrs);  // needed if using HidComposite?
  HidMouse.SetReportParser(0, &MousePrs);  // needed if using HidComposite?

  // begin both? or should I used another library for composites?
  Keyboard.begin(); 
  Mouse.begin();
}

HID data modify demo

Would you consider adding a demo showing how to modify certain things regarding an USB mouse? Such as it's hardware ID and etc.

Could you also provide a wiring for USB host shield to Leonardo Pro Mini?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.