hid

I cannot mimic sniffed urb interruption using libusb for Ruby

谁说胖子不能爱 提交于 2019-12-11 04:25:26
问题 Sniffed URB_INTERRUPTions I sniffed communication between some application (SoundLab) and device (sonometer with usb). I found a packet responsible for returning current state: USB URB [Source: host] [Destination: 1.1.2] USBPcap pseudoheader length: 27 IRP ID: 0xffff858d126f4a60 IRP USBD_STATUS: USBD_STATUS_SUCCESS (0x00000000) URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (0x0009) IRP information: 0x00, Direction: FDO -> PDO 0000 000. = Reserved: 0x00 .... ...0 = Direction: FDO ->

USB USPS Postage Scale API

只愿长相守 提交于 2019-12-11 04:23:05
问题 I'm trying to integrate a USPS postage scale with a C# application and I'm having no luck. I actually have 2 scales, one is a Mettler Toledo PS60 and the other is the USPS PS-100 (http://www.measurement-ltd.com/ps-100-det.html). The MT scale works beautifully with Mike O'Brien's HidLibrary (https://github.com/mikeobrien/HidLibrary). However, the USPS scale does not (Please note that this is NOT the Stamps.com scale, which DOES appear to work with the HidLibrary). I know the scale is working

WriteFile returning error code 87

允我心安 提交于 2019-12-11 02:23:05
问题 I am working on a program that is writing to an HID device and am getting the error 87, Invalid parameter on the WriteFile function. I got the functions from Jan Axelson's USB Complete so I'm not sure why I am getting the error. I am using this to find my device: private void USBInit() { IntPtr deviceInfoSet; Int32 memberIndex = 0; SP_DEVICE_INTERFACE_DATA MyDeviceInterfaceData = new SP_DEVICE_INTERFACE_DATA(); Int32 bufferSize = 0; IntPtr detailDataBuffer; Boolean success = false;

python 3, try to read from multiple HID inputs, Raspberry Pi

[亡魂溺海] 提交于 2019-12-10 23:37:21
问题 I have a barcode scanner connected to my RasPi without any tty, which means headless without a monitor. In other words, a keylogger for number inputs. This scanner reads numerical barcodes like GTIN or EAN. It works, the script is started by sh on boot. The script I use looks like that: import sys tStr = '' while 1: fp = open('/dev/hidraw3', 'rb') buffer = fp.read(8) for c in buffer: if c: if c == 40 or c == 88: # [ENTER-key] function_to_handle_result (tStr) tStr = '' elif c == 98 or c == 39:

How can I prevent linux from initializing a USB HID device

有些话、适合烂在心里 提交于 2019-12-10 23:34:26
问题 I have a USB HID device that can work in two different modes. The selection of modes is based on the sequence of USB enumeration/initialization packets sent to it. I am using a Raspberry Pi 3 running Raspbian, however I also see the same issue if I compile my code for my desktop Ubuntu distro. The issue I have is that linux is recognizing the USB device as a HID device and then sending the sequence of commands that it deems necessary to start the device, and this works correctly and starts

Not able to connect a Bluetooth Keyboard to an android device

拥有回忆 提交于 2019-12-10 22:47:21
问题 I am trying to programmatically connect an Android phone to a Bluetooth device (which is already paired). I am using createRfcommSocketToServiceRecord(UUID) method in a thread. I know the Bluetooth keyboard is a HID device so I am using UUID as 00001124-0000-1000-8000-00805f9b34fb The above method returns a BluetoothSocket object, but it fails to connect to the HID device, when bluetoothSocket.connect() is called. It gives IOException: discovery failed I have searched about this a lot, but no

Detecting input from any USB HID in C# using HidLibrary

点点圈 提交于 2019-12-10 15:36:46
问题 First of all i am new to C#. I want to create an application that detects any usb hid device (I have used HidLibrary and it detects the HIDs) but i want to get input from the hid as well (I have used Raw input but that doesn't work i think its only for keyboards). for example if i have connected a mouse then any type of input from that mouse either movement or clicks will cause a function to run. All i want to know is that which function is executed in the HidLibrary when an input comes from

Raw access to HID devices in OS X

浪尽此生 提交于 2019-12-10 12:41:37
问题 What is the simplest way to get raw access to HID devices on OS X? I've been looking through the IOKit examples, but even opening a device seems needlessly complex, involving multiple callbacks and include things from half a dozen libraries. libusb is available for OS X, but the kernel grabs all HID devices for exclusive access, and I have been getting strange behavior while trying to use a codeless .kext to block it from associating with my device (it prevents the kernel from grabbing the

Access raw keyboard input in Universal Windows App (IoT)

99封情书 提交于 2019-12-10 11:51:41
问题 I'm trying to build an app that will accept keyboard input from a remote control that emulates a keyboard. I need to capture all keys from the remote, including volume up/down (it emulates a multimedia keyboard, fwiw). I can't figure out how to do that in a UWA. I've tried Windows.UI.Input.KeyboardDeliveryInterceptor and Windows.UI.Core.CoreWindow.GetForCurrentThread().KeyDown, which capture some input, but not all keys (it doesn't capture the special keys). I don't plan to include this app

MacOS Virtual Input Devices

和自甴很熟 提交于 2019-12-10 10:54:54
问题 How can I create a virtual HID device in code? I'm trying to avoid writing a kernel extension to accomplish this, but it seems to be the only way. I need to be able to create virtual HID devices of all types, and have an app running in the background feed them events. Is there a way to do this in user-space, or must I venture into kernel land? 回答1: The typical way of creating HID devices is to use the IOHID* classes in IOKit. You can write a userclient that passes events in and out. I'm not