Coder Social home page Coder Social logo

ble-usb-devices's Introduction

Convert USB keyboard, mouse, and MIDI to Bluetooth LE

Hardware

The CP2104 is used to get debug information so is not needed in normal operation. However, the Feather board must be powered using 5V because it powers the USB keyboard via the micro USB connector. Lithium battery voltage is too low to power USB devices.

USB host is not available on the 32u4 or the nRF52840 so this only works on the M0 Bluefruit. When the micro USB port is in USB host mode, it cannot be used for serial console. The sketches use Serial1 as the serial console. Also the Arduino IDE auto upload feature do not work. Just double click on the Feather reset button to put the board in upload mode.

Be sure to follow Adafruit's tutorial to make sure the boards work and the libraries are installed.

Required library

The USB Host Library for SAMD must be installed because it adds USB host drivers for USB keyboard, mouse, and MIDI devices.

Connection

USB         USB OTG Host
Keyboard -> cable/adapter -> Feather M0 BLE
                             GND  USB  Tx  Rx
                              |    ^   |   ^
                              |    |   |   |
                              |    |   v   |
                             GND  5V   RxD TxD
                             CP2104 USB to serial -> Computer or 5V power supply

Substitute keyboard with mouse or MIDI device and use the corresponding sketch.

USBKbdBle -- USB Keyboard to BLE

Plug in a USB keyboard and convert it to a BLE keyboard. A Bluetooth keyboard is cheaper than a Feather M0 Bluefruit LE so this only makes sense for a specialty USB keyboard. For example, a mechanical keyboard with Cherry MX switches which is not available with Bluetooth.

If a USB barcode scanner emulates a USB keyboard, this project may be able to BLE-ify it. This may also work for USB RFID scanners.

USBMouseBle -- USB Mouse to BLE

This works for USB mouse with left, right, and optional middle buttons. 12 button MMO gaming mice need not apply.

USBMidiBLE -- USB MIDI to BLE

Tested on a MIDI keyboard and an iPad using the free "midimittr" and "iGrand Piano" apps. Auto connect after power off/on does not work but forgetting the Bluefruit then re-pairing it works. Also close and opening the midimittr app is also required.

ble-usb-devices'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  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  avatar

ble-usb-devices's Issues

Support USB Hub device?

So I have a keyboard with an internal USB hub and according to USBHost's library doc: https://www.arduino.cc/en/Reference/USBHost, it seems USBHost doesn't support this.

USBHost does not support devices that are connected through USB hubs. This includes some keyboards that have an internal hub.

I wonder if you could share what kind of change is required to make it support USB Hubs connected device? Is there an alternative option other than the USBHost library? I saw you have another library https://github.com/gdsports/USB_Host_Library_SAMD and curious do you think that can solve this?

Thanks!

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.