uhid code taken from https://github.com/bentiss/hid-tools and stripped out from the not required parts here