Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting new devices stops device from working #25

Open
Furyspark opened this issue Mar 6, 2016 · 30 comments
Open

Connecting new devices stops device from working #25

Furyspark opened this issue Mar 6, 2016 · 30 comments

Comments

@Furyspark
Copy link

As brilliant as this software is, it is giving me issues when connecting new devices.

Every time (after a reboot) I connect a keyboard OR mouse for the 4th time(possibly related to the amount of (virtual) keyboards/mice I have connected), that device doesn't transmit anything to Windows anymore. But it does still light up, and the other devices that were already connected still work fine. After that, any device I connect has the same issues. Until a reboot of Windows, which (usually) fixes things. Until I (re)connect devices again in the same way.

Now mind, this is BEFORE I ran any programs to create a context at all. And after I uninstall Interception and reboot my pc, and try connecting devices in the same way, everything works like expected again.

Also note, it doesn't matter if it's the same device or different devices I (re)connect. 4th time is the charm (in my case). Also not sure if related to Windows 10 or if this would be the case for all Windows systems, as I don't have a W8/W7 device to test it on. Though my notebook is giving the same issues (also W10).

@oblitum
Copy link
Owner

oblitum commented Mar 6, 2016

Thanks for reporting this... I suspect I realize what's happening here but I'm unable publish a fix because it means resigning the drivers, which I'm not able to do at the moment.

What I think is happening is that your reattaching process is increasing the suffix Windows use to name its device objects (device objects can be browsed with OSR DeviceTree for example). It's like something KbdClass0, KbdClass1, and so on. I've implemented Interception to filter devices up to the 9 suffix since previously I didn't know how the suffixes would go beyond that, increase to 10 or to the ASCII char coming after the character for 9, and indeed, it counts using just one char through the ASCII table. I've implemented Interception to just ignore and don't filter devices not ending with a 0-9 suffix, there may be a problem here. Your reattaching, I guess, instead of assigning the same name with same suffix for the same device on every attachment should be giving instead a newly suffixed device name.

@Furyspark
Copy link
Author

Ah, that would explain it. Would you perhaps know of a way to reset the count and/or rename the device objects? That would be a temporary fix, at least.

I don't believe I can remove all the excess devices to start at 2/3, unfortunately. Razer and Logitech install a (virtual) keyboard AND mouse driver for every device I connect, and I don't know of a way (at the moment) to do something against that.

@oblitum
Copy link
Owner

oblitum commented Mar 6, 2016

Sorry, I dunno. This naming scheme is really internal behaviour of Windows drivers.

@oblitum
Copy link
Owner

oblitum commented Mar 29, 2016

Closing for now since solution is known and can be solved increasing maximum number of devices with access to driver sources. That's, in case this is indeed the solution for this particular report.

@oblitum oblitum closed this as completed Mar 29, 2016
@Furyspark
Copy link
Author

That is no solution, however. It can happen without starting any Interception-dependent program, after just having installed the driver and just unplugging and replugging a device a couple of times.

We can compile all we want, but in the end, it is most likely something in the part of the source code we have no access to without a license.

And yes, just to be sure, I have tried this, and also compiled the accessible source code with max mice and max keyboards set to 500.

@oblitum
Copy link
Owner

oblitum commented Apr 1, 2016

Hi, this has never been a issue for me and I've previously licensed it with specific purpose of having an increase of the number of devices supported, so, people interested enough may indeed have access to this by licensing. Changing library headers is not advised since library and drivers must be in-sync regarding such configuration, changing header alone can only bring more problems.

@AlexMKX
Copy link

AlexMKX commented Mar 2, 2017

@oblitum it is fixed in licensed version?
If yes, how I can get it?

@TaranVH
Copy link

TaranVH commented Jun 14, 2017

"Can be solved by increasing maximum number of devices with access to driver sources"... what does that mean? How do I do that?

@Furyspark
Copy link
Author

I'm not 100% sure either, but it seems this issue has been fixed regardless in the currently latest release (v1.0.1)

@oblitum
Copy link
Owner

oblitum commented Jun 14, 2017

As can be read at https://github.com/oblitum/Interception#license. There's a license that gives access to all source code including drivers. With access to them, increasing the limit and doing a custom build is trivial. The only remaining issue is signing, which requires acquiring a certificate to run it on any machine, or using the updated drivers through a self-signed certificate in a machine that's started with TESTSIGNING on.

I currently assume it as solved because I've licensed the drivers to companies and helped them doing exactly that. They needed more devices, they licensed drivers sources, signed with their own certificate, and the limit was trivially increased.

@TaranVH
Copy link

TaranVH commented Jun 14, 2017

Mikau, I did uninstall 1.0.0, and I installed 1.0.1, but I still have the same issue.

Forgive me for being daft, but I still don't get it. Much of this stuff is very new to me, and I'm simply using a tool called intercept.exe created by Kamaz.

Is the problem that Logitech and Corsair are not using the drivers that Oblitum has provided to them...?

Or am I supposed to install a "self-signed certificate" onto my own computer? (And how?)

Or... should I uninstall all these devices in my device manager, http://i.imgur.com/BmMw9GF.png then plug them in and hope that Windows finds and installs the newest drivers for all my USB devices?

Or... do I just need to "contact francisco@oblita.com for acquiring a commercial license?" How much does that cost?

Any help is greatly appreciated. I'm trying hard to learn this stuff, but I'm not a programmer, I'm just a video editor who wants to have more keyboards for macro keys.

@oblitum
Copy link
Owner

oblitum commented Jun 14, 2017

@TaranVH I'm not affiliated with the tool you refer to but it's based upon my project, the Interception library and drivers, it should rely on it for it to work. Please read the README and check licenses, prices and anything is explained already. I'm sorry but the full source code commercial license is the only one through which driver's source code is available and through which device limit can be altered. From start, as explained on a legacy Interception web page linked at the current Interception's web page, once device counting reaches 10, for mouse or keyboard, there's no support in the downloadable version.

@Furyspark
Copy link
Author

@TaranVH Based on your description, and having briefly looked at the tool that you linked, I think (though I'm not 100% sure if this is the only problem) that the tool uses the dll for Interception v1.0.0.

Another tool that I used which makes use of Interception loaded the .dll for it from outside, which meant I could just replace it with the one from the Interception v1.0.1 release. The tool you linked, however, doesn't seem to have a .dll file stored within its zip at first glance, so I don't think you'll have much luck unless you can convince the creator to recompile his project with the newer .dll or do it yourself (it does seem to include the source code for the tool, but if you don't have programming experience this will be a hassle).

The tool I mentioned that I use is only for mouse acceleration, so not really that useful to you, I'd guess.

@TaranVH
Copy link

TaranVH commented Jun 15, 2017

Thanks oblitum for editing your comment to link to the legacy page; I didn't find that info otherwise.

Okay, this is all starting to make sense. The 10-device limit is an intentional part of the free license. According to interception.pdf, the cost for a commercial license, which allows the removal of this limitation, is $2,200 USD.

I'm perfectly happy to pay for useful software, but this is far outside of my price range. I'm not a developer looking to build a new product, I'm just a video editor who wants a few extra keyboards for macros.

The unfortunate thing is that 6 of my 10 HID Keyboard Devices are "virtual devices" that I can't get rid of, (one of them is my mouse!?) meaning that I'm left with just 4 physical keyboards to work with.

A real first-world problem, to be sure.

I wish the limit was 15 rather than 10, but I'm sure there are reasons for it. I'll make it work.

@oblitum
Copy link
Owner

oblitum commented Jun 15, 2017

I still hope to further improve the project and remove this limitation but there's no estimate and getting new certificates for signing drivers these days a real hassle. Back in the days I could do it as an individual developer, now one needs a company and EV certificates are needed, which are really expensive.

@vickash
Copy link

vickash commented Dec 1, 2017

I'm not 100% sure either, but it seems this issue has been fixed regardless in the currently latest release (v1.0.1)

The tool I mentioned that I use is only for mouse acceleration, so not really that useful to you, I'd guess.

@MikauSchekzen Is it the current version of povohat's mouse acceleration software?
Let's be real. What else would it be?

I'm having the same problem (using a cheap non-DDM KVM to swap my keyboard between Win and Mac so it's REALLY annoying), and dropping the 1.0.1 DLL into the interaccel folder didn't fix it. I also made sure to uninstall the driver that shipped with interaccel 2.7 and reinstall using the installer in the latest release of this repo. Not that it matters anyway, since that wasn't changed apparently.

It looks like a header file changed in 1.0.1. Did you recompile interaccel by chance? I notice you mentioned recompiling something after changing the limits, but that was over a year before you concluded 1.0.1 fixed the reconnect issue.

@Furyspark
Copy link
Author

Yeah, you're right, it's povohat's program I was talking about. What I did was use the dll I compiled for a program I was developing. I had expected the dll that's shipped with Interception 1.0.1 to work just as well, though.

I can't guarantee that it'll work (I'm no advanced programmer), but try compiling a dll yourself with the new headers, or use the dll I compiled for the program I was working on. Link: https://github.com/MikauSchekzen/LaunchZorro/blob/master/interception.dll
I compiled the dll as a 64 bit one, so I'm fairly sure it won't work with the 32 bit version of povohat's program, though.

@vickash
Copy link

vickash commented Dec 1, 2017

@MikauSchekzen, thanks a lot. Will try it a little later and let you know if it works. On 64-bit Windows 10, so that shouldn't be a problem.

Also @TaranVH, what you're trying to do (uniquely map keys on many different keyboards to unique functions) is trivial on a Mac using Karabiner or the newer Karabiner Elements. Both totally free. I think you might be limited in the sense that you can't filter 2 of the exact same device (since it works based on vendor ID and product ID), but beyond that, you can map any key to anything else, or to a shell script.

Not recommending you switch to a Mac for editing, but you could buy any old Mac, install Karabiner, hook up your keyboards, and use it purely for input. Something running at least El Capitan might be a good idea though.

Make each key run a shell script sending a unique message over the network to your Windows PC via a TCP socket, or message queue or something, then write a simple daemon for Windows that listens for those messages and triggers relevant AHK scripts. It would be a bit of a Rube Goldberg machine, but it would work.

@oblitum
Copy link
Owner

oblitum commented Dec 1, 2017

This can be done just fine on Windows using Interception, or on Linux too, using Interception Tools for Linux.

The device limit you're facing with Interception on Windows is expected. As it has been explained already, unbounded device count is not offered at the moment, and you can change the limit only if you acquire a full source code license, because it needs device driver compilation, and also new code signing for booting out of Windows "Test mode".

@oblitum
Copy link
Owner

oblitum commented Dec 1, 2017

Also, compiling the library alone won't help with that, this is set at the driver level.

@oblitum
Copy link
Owner

oblitum commented Mar 13, 2018

Folks, I just created my Patreon and Liberapay pages, if I reach my initial goal of $400/month I'll have device limitation extended or removed and will look to buy a new certificate for signing the driver. If it goes beyond my expectations, there will be more to come 🙂, if not, ¯\_(ツ)_/¯.

@oblitum oblitum reopened this Mar 13, 2018
@oblitum
Copy link
Owner

oblitum commented Mar 13, 2018

@evilC I recommend you to read this post on sustainable development of free projects: https://drewdevault.com/2018/02/24/The-road-to-sustainable-FOSS.html. I also suspect that you will consider all of his project of zero interest to you, which doesn't matter, this is about your will at patroning the person just as patroning the things the person creates.

Regarding your business proposals, thanks but I decline. I also would like to ask to reduce the noise a bit on the issue tracker regarding this, otherwise I'll have to delete messages, I have no interest in this.

@Alafalx
Copy link

Alafalx commented Aug 1, 2018

Guys, stupid question — how to uninstall interception? Thanks in advance

@oblitum
Copy link
Owner

oblitum commented Aug 1, 2018

@Alafalx

  • Obtain the installer from the download page.
  • Run install-interception.exe /uninstall from an administrator prompt.
  • Reboot.

@Alafalx
Copy link

Alafalx commented Aug 1, 2018 via email

@wmertens
Copy link

wmertens commented Apr 4, 2020

I think I might be running into this, but I have a hard time finding out. I have a waytools.com BLE keyboard that I use with AHKInterceptor and it works great from boot, but when I switch it to different hosts and come back to windows, it eventually stops working. I noticed in the monitor.ahk scripts that the virtual id of the keyboard keeps increasing, and now it doesn't show up.

When I look at device manager, I see nothing that indicates a keyboard number, is it an internal counter? When I connect the keyboard, Windows sees it:

Device BTHLEDevice\{00001812-0000-1000-8000-00805f9b34fb}_Dev_VID&01000d_PID&0000_REV&0110_b8f5e752141c\8&2ca88371&0&0045 was started.

Driver Name: hidbthle.inf
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Service: mshidumdf
Lower Filters: WUDFRd
Upper Filters: 

But it doesn't provide any input. I can't find where the interception driver intercepts it.

I totally understand your need for a device limit, but does it have to be a device-over-time limit? Can it not be a devices-connected-at-the-same-time limit?

@wmertens
Copy link

wmertens commented Apr 4, 2020

In fact, just sleeping my laptop a few times is enough to reach the limit. Every time bluetooth disconnects, the device gets a higher internal id

@TaranVH
Copy link

TaranVH commented Apr 7, 2020

yeah dude, that's just how it works, unfortunately. You gotta do a full restart to reset the IDs.
If you don't like it, you can use QMK instead...
https://www.youtube.com/watch?v=GZEoss4XIgc

@wmertens
Copy link

wmertens commented Apr 9, 2020

@TaranVH :-(

Basically I want to disable my internal keyboard while I'm using my bluetooth keyboard on top of it. Do you perhaps know of another way to do this?

@TaranVH
Copy link

TaranVH commented Apr 9, 2020 via email

Repository owner locked as spam and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants