| Electronics > Beginners |
| Making a µC act as a HID? |
| (1/3) > >> |
| Sudo_apt-get_install_yum:
Hey all! So I’m using an esp32 for a project and I need it to act as a simple keyboard. I haven’t been able to find a software implementation for this. What I want to do is print out a huge value (64bit) as fast as possible and if there is a software implementation like V-USB it’s most likely going to be too slow. So is there an IC with built in hardware support for USB-HID that I can communicate with over SPI or HS-I2C and send keyboard strokes to a PC. I did some searching and found FTDI's FT260 but I’m not sure it’s doing the same thing I want it to do. I also made a version that sends the data to an ATMega32u4 that acts as a keyboard. But it’s not as fast as id hope... The reason for this project is to "check in/out" at work using your fingerprint. The biggest problem with this project is the fact that the current system that this is going to replace is not designed to be enhanced. The sequence goes as following. RFID tag sends a 64bit integer to a pc PC checks two text files stored on a local server Searches the text file with the RFID number Compares it to the employee ID text file When it matches it then writes time and employee id to a file on the local server Se the attached image for a visual representation. This system has been in place since 2012, as of now nobody is allowed to rewrite the code for the server side or for the pc checking side. So the only way I can make this happen is by emulating a keyboard just like the RFID tag reader. |
| nsrmagazin:
A keyboard from a USB port should be more than enough at terms of speed, especially if its a USB 3.0 port. I don't get the need for the MCU, unless it acts as the PC? If its only for converting the output from the PC to the ESP32, this will help you: https://diolan.com/usb-spi-adapters I you want to build a keyboard by yourself instead of using a ready one this makes more sence? Maybe this will help you. https://www.adafruit.com/product/2264 |
| sokoloff:
--- Quote from: Sudo_apt-get_install_yum on January 22, 2019, 01:21:05 pm ---I did some searching and found FTDI's FT260 but I’m not sure it’s doing the same thing I want it to do. I also made a version that sends the data to an ATMega32u4 that acts as a keyboard. But it’s not as fast as id hope... --- End quote --- Even if you encode the bytes in hex and add a CR (making the 64 bit number 17 bytes long), that's only ~1.2 ms at 115200 baud. A single hard drive access is likely to be 8 ms or longer and so if speeding things up is important, caching the file in a running program hashtable/dictionary and hooking the filesystem to be notified of updates is probably better. IOW, I don't think the USB is your limiting factor on speed. 64 bits isn't huge. As for keyboard interfaces, I wouldn't roll my own in software on the ESP32, but would use an off-the-shelf chip that presents as HID or write a custom software driver that sends keystrokes on the PC side. |
| Fred27:
I've successfully used a MSP430F5529 Launchpad to emulate a keyboard. Fairly easy with example code supplied by TI. |
| Sudo_apt-get_install_yum:
Sorry I must have been unclear. The esp32 handles the data from the fingerprint reader and in the future I want it to replace the PC completely. At the time of writing this nobody is allowed to rewrite the server side of the code due to prior mad experiences... Since I can’t touch the code on the server or pc I’m forced to make the esp32 act like the RFID reader (a HID keyboard). The problem is that I have no way of interfacing with the pc as a keyboard when using the esp32. Is there a USB HID controller that can act as the middle man between the esp32 and the host pc. I’m not able to find such an interface IC... I only need to build around 5 of these so I don’t really care if the IC is discontinued or so |
| Navigation |
| Message Index |
| Next page |