gdsports / ble-usb-devices

Convert USB keyboard, mouse, MIDI to Bluetooth
MIT License
43 stars 3 forks source link

Other boards #1

Open willwade opened 4 years ago

willwade commented 4 years ago

Loving this project. Only problem is the M0 is on short supply. Would the M4 or similar work? https://shop.pimoroni.com/products/adafruit-feather-m4-express-featuring-atsamd51-atsamd51-cortex-m4

gdsports commented 4 years ago

The USB Host Library for SAMD works on the SAMD51/M4 but I do not see one with Bluefruit on-board like the Bluefruit M0. I suppose the M4 Feather board you linked to combined with a Bluefruit LE UART or SPI Friend should work.

I did something similar using a Trinket M0 for its USB host capability connected to a Feather nRF52840 board. Unfortunately, the Adafruit nRF52840 board is usually out of stock.

https://github.com/gdsports/usbkbdble

I prefer the nRF52840 solution because the BLE pairing works better than with the Bluefruit LE.

willwade commented 4 years ago

Hmm. In which case what about the nrf52840 express? Would that work? https://shop.pimoroni.com/products/adafruit-feather-nrf52840-express

gdsports commented 4 years ago

Yes, the nrf52840 express feather is the board I used in the https://github.com/gdsports/usbkbdble project.

willwade commented 4 years ago

Wow. Your repos are a treasure trove of USB HID fun! You may be interested in https://github.com/acecentre/RelayKeys/ which we are slowly working on (if you are in the UK apologies - we bought a load of those nrf52840 express boards and feel a bit guilty for reducing their stock numbers!)

Really interesting you have a couple of repos for Intellikeys & Game controllers - a very similar space to ourselves.

My main motivation for getting this working is to create a packagable - long term, open and low cost alternative to https://tetramouse.com/manual/TMBT-Manual.pdf - or http://handheldsci.com/kb/ (and similar products) - the drive for this is that iOS now supports mice - but a lot of AT devices draw too much power for iOS. So we need a neat USB->BT adaptor (for mice more so than keyboards really).

I'm going to try and work on this with the nrf52940 express & Trinket and see how we go.

gdsports commented 4 years ago

I never tried USB mouse to BLE mouse with the nRF52840 but it should be possible. I think I still have one nRF52840 board so I may give it a try.

The handheldsci BT-500 at $35 seems ideal. Does it not work with the Tetra Mouse? Is there something about it that an Adafruit solution will do better? It does not have an internal battery like the TetraMouse BT adapter. The TetraMouse adapter is about double the cost of the BT-500. I guess that is the cost of the battery plus a DC-DC booster to convert battery voltage to 5V.

Another possibility is to fool the iPad with USB mouse pass through. Does not use BT.

Mouse -> Trinket M0 -> UART -> Trinket M0 -> iPad
         USB host              USB "mouse"
         ^
         |
         5V

The idea is to create a USB mouse pass through device using two Trinket M0's. The one connected to the iPad reports it uses 100 ma or less. The real mouse is actually powered by a separate 5V power supply so it does not draw current from the iPad. The Trinket M0 connected to the mouse passes the USB HID mouse data from the mouse to the other Trinket M0 which passes the data to the iPad.

gdsports commented 4 years ago

Hmm, would a powered USB ub work with the Tetra Mouse and iPad? That way the Tetra Mouse is powered by the hub and not the iPad. But the iPad might still think the TM needs more than 100 mA so it might also fail. Ok, this is a long shot.

willwade commented 4 years ago

Yeah the handheldsci one is neat - just trying to mock something up whilst they are out of stock. No - tetramouse + mouse should be just fine with iPad. Its just USB HID on iPad that is particularly fussy about voltages.

Thats an interesting idea about Trinket->Trinket->iPad

Still getting my head around all this. Am I right in should be a OTG adaptor->~nrf5280 express with USB_Host_Library_SAMD ->BT LE~ - is that right?

Correction: That can't be right because the nrf52840 express isn't a SAMD board is it. Looking at it I think this is is a Trinket ->nrf->BTLE. But for that, I would need the https://github.com/gdsports/usbhostcopro - which I note hasn't got mouse support yet. Hmm. Great stuff all round.

gdsports commented 4 years ago

I added mouse support but have not pushed up yet. I also connected an nRF52840 to Trinket M0 to USB OTG cable to USB mouse. Works with IOS after enabling Accessibility Touch. Works with Android also. The repo name is https://github.com/gdsports/usbmseble. The Trinket M0 USB host mouse code is in the firmware/ directory. I will update usbhostcopro later.

The USB OTG cable plugs into the Trinket M0. The photo in the usbkbdble shows how the pieces plug together except the mouse replaces the keyboard. No photo yet of the mouse configuration.

willwade commented 4 years ago

AWESOME! I'm going to try this now..

gdsports commented 4 years ago

I pushed updates to usbmseble to reduce the mouse lag when moving very fast.

willwade commented 4 years ago

Yeah - can confirm that all works great. Thanks for all your hard work.

I'm now interested to see if we can build some kind of Speed adjustment - and acceleration curve settings on the nrf device - but also some anti tremor stuff.

Really cool. Thanks a million.

gdsports commented 4 years ago

I'm glad to hear it is working for you. I pushed up the usbhostcopro USB mouse source code to the github repo. The IOS AsstiveTouch screen has a tracking speed control near the bottom but I am not sure that is what you need.

willwade commented 4 years ago

Great. Thank you. It’s really appreciated. Yes the use cases are:

Anyway this is all a fab start. Thanks :)