Hello,
I want to send two control character sequences to a device with an USB interface. The device supports this!!! I connected a standard USB keyboard and keyed the sequences in, works.
Than I created a sketch for my Arduino Nano ESP32 and tested it with my laptop. I focused to a program accepting this sequences and it works out. I also see my board as HID device listed.
But when I connect the Arduino to the device to (remote) control, nothing happens.
My guess is now, that I have to set VID, PID, device name and ...
So I read out this infos from my test-keyboard and tried to set this values in my sketch hoping that this helping me out ... but no!
I checked the VID, PID of the Arduino, which running the sketch and found out, that the vendor is 'Arduino SA' and the PID is also different.
My question: How can I fake a keyboard so perfectly that my device will accept it, which means, looks like a Logitech USB keyboard?
I use
#include "USB.h"
#include "USBHIDKeyboard.h" and tried:
// initialize control over the keyboard, the serial interface isn't available any longer
USB.productName("USB Keyboard");
USB.manufacturerName("Logitech, Inc.");
USB.PID(0xC34B);
USB.VID(0x046d);
USB.serialNumber("1234567");
kbd.begin();
USB.begin();
Works on a windows PC but not with a SoundSystems MixPre-10 box.
Thanks a lot for helping .
With best regards
Gerhard
is this a real Nano ESP32 (Arduino branded) or some sort of clone ESP32. This matters a lot for our answers.
I bought the board from Arduino it looks the same as the official images ... so I think its ok.
And I get VID 0x2341 which is Arduino SA. My sttings I never found some where, so I start asking for help.
Have you studied the example sketches designed for the Arduino NANO ESP32? It looks like your answer could be there.
Looked at all this stuff. As far as I can see, the sketch waits for a device plugged in and report the VID etc. using a serial interface (serial monitor window of IDE for instance). But I want to build an USB device with the ESP which is plugged in another (computer) box. My ESP should fake a keyboard.
My sketch works with PC (Windows 10) but not with that box (PreMix recorder by Sound Systems).
With best regards
Gerhard
Good morning,
so I think I know whats going on:
The Arduino Nano ESP32 board uses a esp32S3 chip, which has a native USB interface and supports OTG, but has only one USB socket.
Now Arduino writes special driver and implements lot of different logical interfaces using this socket and so they need a special driver on a PC.
I tested now with a PC, cutoff from network (so the USB stuff can't load the driver from the network) and get a notification, that some of the functionality can't be offered. The keyboard I implemented is flagged 'Ok'.
Now I try to send my control sequences and focused on a program (Notepad.exe undrstands Ctrl+s) and viola, works.
BUT, if my MixPre-10 box from Sound Systems finds out, that there were some interfaces which the box can't bring to work and discard the whole device, the keyboard interface is discarded also.
I hope that a ESP32-S3-DevKitC-1-N32R16V board, which has a serial and an USB socket can do the job. Do anybody know something about that?
Maybe Arduino also uses the USB socket with a special driver for multiprotocol and I run into the same problems.
Is there a solution to have a native USB interface where only the user can define its functionality? I need an USB socket offering only one protocol: 'I am a keyboard'.
Thanks for helping.
With best regards
Gerhard