Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • My goal is to read the same USB device in two diferent computers, one of them is the MT7688. Because the particularities of the USB comunication, I tought the simplest way to do that is the way I describe: receive the HID information in the MPU and forward the information through an MCU who has native HID interface, but you and @telcoM pointed out a very good point: I didn't know the data I read on dev/input/event0 was already converted to be show as events. I tought it was raw data. Commented Sep 4, 2018 at 14:20
  • Perhaps I am running away from the Linux/Unix theme when I said "Arduino keyboard class" because I was referencing the Arduino IDE and its way to send reports. Thanks for the orientation, but maybe you are right: it has nothing to do with forwarding HID data through UART. Can you suggest another way to achieve it? Commented Sep 4, 2018 at 14:20
  • What is the other computer where you want to read the USB keyboard? Is it connected to the ATmega? If yes, how? Via USB, and the ATmega acts as HID device for it? Does the MT7688 need to do anything with the keyboard events? (If you just want to connect the USB keyboard to one device, and access it from a different device, have a look at usbip. Much simpler than trying to process HID reports and using an ATmega as USB device). Commented Sep 4, 2018 at 17:09
  • The other computer is a regular PC (Win or Linux). Yes, it is connected to Atmega via USB and the Atmega is acting like a HID for it. The scenario I am trying to build could be described as a keylogger: where the data goes to diferent ways: on the PC side it needs to act like a regular USB keyboard and in the MPU side, (in my case), I decided what to do with it (logging, trigger some others events, etc). Commented Sep 4, 2018 at 19:18
  • I had the idea to do with this setup because the MT7688 has the USB host and the ATMega32U could act like a HID, and they are on the same board and comunicating by native UART. But its getting far away from a Linux question and becoming an Arduino issue, because after all your explanation I can see that all will be solved if I was good enough to write a arduino sketch that reads every possiblity of input. In other words, I need to write a driver for it. Commented Sep 4, 2018 at 19:23