Author Topic: USB to USB remapping, choosing a SOC(ie. banana pi like) with 2+ USB controllers  (Read 1348 times)

0 Members and 1 Guest are viewing this topic.

Offline mivanov

  • Thread Starter
  • Posts: 27
  • something something
The basic idea is to create an hardware device which will allow custom remapping(layouts too ofc), macros, etc on the hardware level, hence will work regardless of OS and Keyboard.

Currently it's hard to do such remapping in software, especially remapping keys that are not letters, symbols(like Ctrl,etc.). And it's not portable either.
Hence this device is needed.

For those who have read about Soarer's converter - this is basically the core idea, but I'd like for this device to work with USB keyboards too.

Nkro is a must too. So we need USB 2, since 1 has only 6 slots and can only do a 6kro.

I am looking for a SoC that must support Linux and have at least two USB controllers, one must be OTG compliant.

My idea is to use the SoC to remap USB keyboards, connecting them to the normal USB port(host mode) and getting the SoC to pretend being a keyboard on the OTG port(guest mode).

My current ideas as follows:

1. Using a Wr703n connected to an Arduino via RS232-TTL, the keyboard will be connected to the Wr703N and the PC will be connected to the Arduino which will pretend being a keyboard.

2. A Banana Pi is said to have 2 USB controllers, one having OTG capability. But so far I haven't found any article about what I am trying to do.

3. An Arduino with a USB host shield - I don't like this one, too limited. What's the point in saving 20 $ on something you're gonna use with multiple keyboards that costs 100$? Also the USB host shield is unreasonably expensive for something so limited.

The other thing I've read is that it's also possible to emulate USB with GPIO pins, but people are saying this is a bad idea. Also I want USB 2 for Nkro and I don't know if that will work that well. So it sounds to me more reasonable to use an arduino to pretend being the keyboard.


I am open to any suggestions or comments.

Offline hasu

  • Posts: 3475
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Quote
Nkro is a must too. So we need USB 2, since 1 has only 6 slots and can only do a 6kro.
Full speed is not necessarily needed to implement USB NKRO keyboard, even with Low speed you can send larger HID report than packet size(8 bytes) theoretically. I never tried it and I don't know it works practically, though.

Anyway, I concur with you in using USB2 controller(for both host and device) is better.

Each and every USB NKRO keyboard on the current market can use diffent report format. You certailnly need full fledged HID stack to parse its report descriptor, or Linux in fact.

Offline mivanov

  • Thread Starter
  • Posts: 27
  • something something
I am kinda settled on using a Banana PI, what I am currently researching is how to use OTG on it to make it pretend being a keyboard, I am sure it can be done, since Android(with it's mutated Linux kernel with random patches) devices pretend being Mass storage and stuff which works in the same way. If I can do that - the rest is easy.

By the way on the specs it says USB 2.0 OTG, so I sure hope that's hi-speed and not full speed(as that should be called USB1.1 anyway).

Also if you have cheaper SoCs in mind which support USB OTG, please share.

And one question I have, can I use a hub on an OTG port to get a Banana Pi to pretend being multiple devices?  Since it could be cheaper to use one Banana PI for say 2-3 computers. But I doubt it could be done, since when using the OTG in Slave mode, I think you just get one address and can't multiply it. And the protocol itself seems like it can't be multiplexed on the slave side. But maybe I am wrong and it can be done.