path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-08-17WIP firmware reverse engineeringlogitech-unifyingPeter Wu5-8/+240
Not touched since 7 April 2014.
2014-04-01unifying: handle K800-specific HID++ 1.0 regsPeter Wu1-0/+56
Add these regs to prevent reporting errors. Some of the regs are not implemented fully. Signed-off-by: Peter Wu <>
2014-04-01unifying: fix keyboard LED for HID++ modePeter Wu1-1/+6
2014-04-01unifying: partially implement TouchpadRawXY for T650Peter Wu1-1/+21
This feature will probably not be supported. Right now it reports some information, but as the emulated device does not send raw output, it is kind of broken. Signed-off-by: Peter Wu <>
2014-04-01unifying: implement unknown hidden 0x2101 feature for T400Peter Wu1-1/+26
This got called during the initial start up of SetPoint. It probably has something to do with scrolling. Signed-off-by: Peter Wu <>
2014-04-01unifying: implement FeatureInfo (guessed).Peter Wu1-1/+25
It seems to be used to mark the features which got replaced by this feature? Signed-off-by: Peter Wu <>
2014-04-01unifying: enable more features, implement somePeter Wu1-13/+98
This makes the feature indices consistent with real hardware which makes it easier to compare/test against real hw. Some features are (partially) implemented per spec (0x6110 TouchMouseRawPoints; 0x2200 MousePointer). Others are guessed based on results from hw (0x2100 VerticalScrolling, 0x2120 HiresScrolling). The spec for 0x6100 TouchpadRawXY is available, but not implemented yet. It is assumed that the reprogrammable v1 and v2 features are similar to the reprogramcontrols feature (which seems to hold so far). Signed-off-by: Peter Wu <>
2014-04-01unifying: add T400 devicePeter Wu3-0/+50
This also has the DFU capability :-) Signed-off-by: Peter Wu <>
2014-04-01unifying: less magic numbers, fix device type for T650Peter Wu3-16/+17
This makes it easier to switch between devices. Signed-off-by: Peter Wu <>
2014-03-31unifying: add firmware versions for K800, T650Peter Wu1-0/+2
2014-03-31unifying: fix double reporting when in HID++ modePeter Wu1-3/+27
Keys would appear "stuck" before this patch. It turns out that interrupt transfers to EP1 (keyboard) and EP2 (mouse) were still happening while the devices really are in HID++ mode instead of HID. To fix this, pretend there is no data when in HID++ mode. Signed-off-by: Peter Wu <>
2014-03-31unifying: fix HID++ 2.0 GetFeatureId indexingPeter Wu1-4/+8
2014-03-31unifying: Fix PID of T650 touchpadPeter Wu2-2/+5
Also safe-guard against missing feature array for HID++ 2.0 devices. Signed-off-by: Peter Wu <>
2014-03-31unifying: fix Pairing info registerPeter Wu1-13/+14
Fix LSB/MSB mix-up, fix incorrect matching against request type. Signed-off-by: Peter Wu <>
2014-03-25unifying: add T650 features, start re firmware updatePeter Wu2-1/+60
The M525 was nice for testing stuff out, but it gets really interesting with the T650 which has a firmware update available. Details will be available in Add the initial feature set for T650, complete M525 feature set (commented out since unknown and seemingly uninteresting to implement). Signed-off-by: Peter Wu <>
2014-03-24unifying: add fw version for M525, fix fw indicesPeter Wu2-4/+5
Signed-off-by: Peter Wu <>
2014-03-24unifying: mouse compat with Win guests, other mouse fixesPeter Wu2-4/+10
Two stupid mistakes slipped in while refactoring the HID report generation in 3615170bd1ed6f09f878a8b538321044efddd8e0 ("unifying: fix mouse report format, DRY"). This makes evtest in Linux report mouse events again and openbox seems happy too. Another mistake went in the calculation of the Y field, the high and low bits of Y were accidentally swapped. As the descriptor for interface 2 (mouse, etc.) includes Report IDs, this ID must be prepended to the HID payload for mice reports. This makes the mouse function for Windows guests. (See section 8.1 of HID 1.11). Signed-off-by: Peter Wu <>
2014-03-24unifying: prevent sending HID++ reports if not enabledPeter Wu2-2/+3
Interrupts were enabled for EP3, but the WinXP driver did not support the reports sent through it. Prevent generating HID++ reports for devices that are not in DJ mode (i.e. in standard HID mode). Signed-off-by: Peter Wu <>
2014-03-24unifying: allow keyboard to be disabled with nokbdPeter Wu3-5/+21
Used for debugging WinXP. Turns out that even usb-kbd is broken, so it must be the USB stack used by WinXP that is problematic. Signed-off-by: Peter Wu <>
2014-03-24unifying: make Get_Report provide sane mouse reportsPeter Wu2-9/+4
...and ignore Get_Report for HID++ queries. 0x20 and 0x21 already return EPIPE on real hw, but even querying 0x10 and 0x11 does not make sense as the device index is not known. Signed-off-by: Peter Wu <>
2014-03-24unifying: fix mouse report format, DRYPeter Wu3-21/+47
Introduce new function to retrieve HID data for a given HIDState (if any) and fix the incompatibility between the HID format for mice as used by QEMU and the format described by the report (it contains an extra field for buttons). Signed-off-by: Peter Wu <>
2014-03-24unifying: partially implement ReprogControlsPeter Wu1-0/+15
The actual controls themselves are not implemented, for now always return as if there are no re-programmable controls for software. Signed-off-by: Peter Wu <>
2014-03-24unifying: add WirelessDeviceStatus and unknown featuresPeter Wu1-1/+16
Features 1DF3, 1DF0 and 1F03 are not documented, its functionality is unknown. WirelessDeviceStatus has no functions, it only exists for broadcast events. Signed-off-by: Peter Wu <>
2014-03-24unifying: implement BatteryStatusPeter Wu3-5/+71
Battery percentage is fuzzy... ok. Signed-off-by: Peter Wu <>
2014-03-24unifying: impl HID++ 2.0 DeviceName, adjust device infoPeter Wu3-3/+51
Set K800 to use HID++ 1.0; add a device_name field to store long device names for HID++ 2.0 devices. The device types constants are slightly different between HID++ 1.0 and HID++ 2.0, two constants are not implemented (and those will probably never be implemented). Signed-off-by: Peter Wu <>
2014-03-24unifying: implement DeviceFwVersionPeter Wu1-0/+49
Based on information for M525 (entitycount == 0), and T650 (BL and HW). Signed-off-by: Peter Wu <>
2014-03-24unifying: fix report ID for HID++ 2.0 responsesPeter Wu3-8/+9
The input report ID can be 0x10 or 0x11, the responses are always 0x11. Signed-off-by: Peter Wu <>
2014-03-24unifying: implement IRoot completelyPeter Wu2-14/+34
Do not treat IRoot special in hidpp_process_device_hidpp20, but implement it as a generic feature using hidpp20_feature_call. This makes it easier to re-use the error reporting stuff. Signed-off-by: Peter Wu <>
2014-03-23unifying: implement feature FeatureSet, init for M525Peter Wu1-0/+35
2014-03-23unifying: interface with HID++ 2.0 featuresPeter Wu4-2/+95
Prepare for adding more HID++ 2.0 features.
2014-03-20unifying: remove unnecessary commented out codePeter Wu1-5/+0
The USB_CFG_ATT_WAKEUP seems to be ignored by the device, perhaps it gets handled by the OS. usb_desc_attach is not necessary because we only have one full-speed configuration. If there would also be a high-speed (or super-speed) configuration, then usb_desc_attach must be added back to allow picking an appropriate configuration based on the speed of the controller port (UHCI, EHCI, XHCI). usb_desc_init() takes care of setting the initial configuration (there is only one now). Signed-off-by: Peter Wu <>
2014-03-20usbdump: support xhciPeter Wu2-10/+23
The XHCI HCD sends an OUT packet which was unexpected by the usbdump code. That was the case because the core USB code that was normally calling handle_control only called when the full data was received from the host (from the Status stage, with PID == USB_TOKEN_IN). Then there is also the do_parameter function as used by XHCI that was not really handled. Fix this by allowing OUT tokens, also document why this is necessary. Signed-off-by: Peter Wu <>
2014-03-20unifying: introduce usbdump property to specify dump namePeter Wu2-2/+10
Stop hard-coding capture file and introduce the "usbdump" property to specify the capture file path. When omitted, no capture will be done. Signed-off-by: Peter Wu <>
2014-03-20hid: introduce usbdump property to specify dump namePeter Wu1-2/+12
Stop hard-coding capture file and introduce the "usbdump" property to specify the capture file path. When omitted, no capture will be done. Signed-off-by: Peter Wu <>
2014-03-20unifying: start implementing HID++ 2.0 for devicesPeter Wu2-8/+67
New Hidpp20Msg type helps reading the HID++ 2.0 function format. Implemented error responses (undocumented), and IRoot.GetProtocol(). Signed-off-by: Peter Wu <>
2014-03-20unifying: version reg F1 for receiver and HID++ 1.0 devsPeter Wu1-0/+40
Signed-off-by: Peter Wu <>
2014-03-19unifying: start implementing device report processingPeter Wu1-2/+41
Signed-off-by: Peter Wu <>
2014-03-19unifying: reject long DJ writes unconditionallyPeter Wu1-11/+5
Reports 0x21 always fails (-EPIPE) for Set_Report. Signed-off-by: Peter Wu <>
2014-03-19unifying: implemented pairing info info for receiverPeter Wu1-0/+18
Undocumented, so it's guesswork based on Signed-off-by: Peter Wu <>
2014-03-19unifying: fix long reg read, implement reg b5 readPeter Wu1-2/+43
Signed-off-by: Peter Wu <>
2014-03-19unifying: implement 0x41 notification, trigger on reg 02Peter Wu2-1/+39
Signed-off-by: Peter Wu <>
2014-03-19unifying: fix mixup of reporting flags, HidppMsg tweaksPeter Wu2-15/+25
The "address" and "value" split for short and long HID++ messages only make sense for HID++ 1.0 register accesses. For others, use "params". Also fix a mixup of reporting flags. Signed-off-by: Peter Wu <>
2014-03-19unifying: implement activity counters and rcvr reg B3Peter Wu2-0/+17
Signed-off-by: Peter Wu <>
2014-03-19unifying: handle receiver regs 0 and 2Peter Wu2-4/+52
2014-03-19unifying: pass pointer to msg, handle kbd LED requestPeter Wu1-15/+18
It is not dangerous to modify the original data buffer, so just pass a pointer for the message instead. Also implement DJ report type 0x0E (LEDS). Signed-off-by: Peter Wu <>
2014-03-19unifying: process receiver reports earlierPeter Wu1-5/+28
The idea of the input queue is probably that wireless devices cannot immediately be queried, but the receiver is able to respond immediately. Signed-off-by: Peter Wu <>
2014-03-19unifying: fill in more device and receiver infoPeter Wu2-2/+20
These serial numbers are obviously fake, the product and device names, however, are real. Signed-off-by: Peter Wu <>
2014-03-19unifying: fix device indices, fix error formatPeter Wu1-8/+12
Also enable processing of input reports. Now at least keyboard events work and the enumeration order is slightly more sane, yay! Signed-off-by: Peter Wu <>
2014-03-19unifying: ensure that report lengths are validPeter Wu1-0/+7
The length should match our expectations, but let's check that to be sure. Signed-off-by: Peter Wu <>
2014-03-19unifying: move mode to LHIdDevice, init/reset functionalityPeter Wu3-7/+177
WIP (partially untested). Handle input reports, respond with HID events if there are no queued output reports. Implemented input report processing for receiver: 0x80 (Switch and Keep-Alive), 0x81 (Get Paired Devices). Signed-off-by: Peter Wu <>