Fix HID issues
Mixed type HID report descriptor in the current trunk doesn't work
well so this patch fixes the HID creation logic to make it use
composite configuration which has separated keyboard and mouse
HID descriptor using a single USB port.
ikvm service also should be changed using below setting after
applying this patch:
ExecStart=/usr/bin/env obmc-ikvm -v /dev/video0 -k /dev/hidg0 -p /dev/hidg1
Change-Id: I9b2975f4fdade2c6030def829951d02b24bea562
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/ikvm_args.cpp b/ikvm_args.cpp
index 61a773a..ad5b4f7 100644
--- a/ikvm_args.cpp
+++ b/ikvm_args.cpp
@@ -11,10 +11,11 @@
Args::Args(int argc, char* argv[]) : frameRate(30), commandLine(argc, argv)
{
int option;
- const char* opts = "f:hi:v:";
+ const char* opts = "f:h:k:p:v:";
struct option lopts[] = {{"frameRate", 1, 0, 'f'},
{"help", 0, 0, 'h'},
- {"input", 1, 0, 'i'},
+ {"keyboard", 1, 0, 'k'},
+ {"mouse", 1, 0, 'p'},
{"videoDevice", 1, 0, 'v'},
{0, 0, 0, 0}};
@@ -30,8 +31,11 @@
case 'h':
printUsage();
exit(0);
- case 'i':
- inputPath = std::string(optarg);
+ case 'k':
+ keyboardPath = std::string(optarg);
+ break;
+ case 'p':
+ pointerPath = std::string(optarg);
break;
case 'v':
videoPath = std::string(optarg);
@@ -47,7 +51,8 @@
fprintf(stderr, "Usage: obmc-ikvm [options]\n");
fprintf(stderr, "-f frame rate try this frame rate\n");
fprintf(stderr, "-h, --help show this message and exit\n");
- fprintf(stderr, "-i device HID gadget device\n");
+ fprintf(stderr, "-k device HID keyboard gadget device\n");
+ fprintf(stderr, "-p device HID mouse gadget device\n");
fprintf(stderr, "-v device V4L2 device\n");
rfbUsage();
}