Mugz Posted June 7, 2021 Report Posted June 7, 2021 I have VPC Stick MT-50CM2 VID: 3344PID:4130 Trying com.readfeature or com.writefeature but no luck. I'm trying to capture USB port data, but FSUIPC nothing to get or send to USB device. Vendor = 0x3344 Product = 0x4130 Device = 0 Report = 0 Pollrate = 25 -------------------------------------------------------- dev, rd, wrf, wr, init = com.openhid(Vendor, Product, Device, Report) if dev == 0 then ipc.log("Could not open HID") ipc.exit() end ipc.set("dev",dev) ipc.set("wrf",wrf) dev = ipc.get("dev") wrf = ipc.get("wrf") gt, n = com.readfeature(dev, wrf) if n ~= 0 then ipc.log(gt) else ipc.log("Error getting Features") end str = "0265010000B900000000000000000000000000000000000000000000000000000000000000F0" out = str:gsub('%x%x',function(c)return c.char(tonumber(c,16))end) i = com.writefeature(dev, out, wrf)
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 Okay, seems i can write feature. Changed Device to 1 (not sure why, i have only one device), but still can not read feature.
John Dowson Posted June 8, 2021 Report Posted June 8, 2021 I think the second argument to the com.readfeature call should be the report number, so try gt, n = com.readfeature(dev, Report) Maybe also try setting Report to 1 (which is the default), rather than 0, in your init section (of 0 does not work). On 6/8/2021 at 5:25 AM, Mugz said: Changed Device to 1 (not sure why, i have only one device), Expand I'm not sure why this should be if you only have one of those devices....
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 On 6/8/2021 at 12:15 PM, John Dowson said: I'm not sure why this should be if you only have one of those devices.... Expand Yes. It's strange for me also. When i use Device = 0, i got wrf = 0, with device = 1 i have wrf = something like 192. No other device with same name or VID/PID exist. On 6/8/2021 at 12:15 PM, John Dowson said: Maybe also try setting Report to 1 (which is the default), rather than 0, in your init section (of 0 does not work). Expand I contact with device vendor, and he told me what this functionality is not implemented So, based on all the actions, it remains to understand how Device works
John Dowson Posted June 8, 2021 Report Posted June 8, 2021 On 6/8/2021 at 12:26 PM, Mugz said: I contact with device vendor, and he told me what this functionality is not implemented Expand Ah, ok. On 6/8/2021 at 12:26 PM, Mugz said: So, based on all the actions, it remains to understand how Device works Expand I don't know why this is and cannot really look into it as I don't have such a device. Could it be that it has multiple registry entries (just a thought)? Anyway, if it works with device 1, just use that.
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 On 6/8/2021 at 12:39 PM, John Dowson said: I don't know why this is and cannot really look into it as I don't have such a device. Could it be that it has multiple registry entries (just a thought)? Anyway, if it works with device 1, just use that. Expand How i can check this? Can you give me a patch in registry to check and find Device number?
John Dowson Posted June 8, 2021 Report Posted June 8, 2021 On 6/8/2021 at 12:43 PM, Mugz said: How i can check this? Can you give me a patch in registry to check and find Device number? Expand You could disconnect your device and just remove the registry entries for that device anyway, reboot and re-connect to get them added again. Take a backup of your registry first, and then save the following text in a .reg file (e.g. removeVPCStick.reg) and then execute by double-clicking: Windows Registry Editor Version 5.00 [-HKCU\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput\VID_3344&PID_4130] [-HKCU\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_3344&PID_4130] [-HKCU\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput\VID_3344&PID_4130] [-HKCU\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_3344&PID_4130] As I said, I'm not sure if this is the issue or will help, but worth a try. Otherwise, just continue to use device 1, thats not really an issue. 1
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 On 6/8/2021 at 1:44 PM, John Dowson said: Otherwise, just continue to use device 1, thats not really an issue. Expand Yes. Indeed it's not issue, but is very hard do diagnose other issue, why it is not working 😃
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 It's possible implement for future not use Device number. just VID and PID and if system exist two same device - send control all of them? Just like option. Like Device = -1 # Use both device with same VID/PID
Mugz Posted June 8, 2021 Author Report Posted June 8, 2021 On 6/8/2021 at 1:44 PM, John Dowson said: As I said, I'm not sure if this is the issue or will help, but worth a try. Expand So, i deleted all registry, and reconnect device. All VPC device created new keys with two number. 0 and 1. Seems it's by design. Anyway thanks for your help
John Dowson Posted June 9, 2021 Report Posted June 9, 2021 On 6/8/2021 at 7:34 PM, Mugz said: It's possible implement for future not use Device number. just VID and PID and if system exist two same device - send control all of them? Just like option. Like Device = -1 # Use both device with same VID/PID Expand I don't see much point in this, sorry. On 6/8/2021 at 7:41 PM, Mugz said: All VPC device created new keys with two number. 0 and 1. Seems it's by design. Expand Yes, I think so. And I don't see this as an issue.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now