sssata / HYKU

HYKU Tablet - A Low Latency Pen-Tablet Input Device for osu!
https://sssata.github.io/HYKU/
GNU General Public License v3.0
17 stars 1 forks source link

HYKU_Configurator.exe unable to detect tablet #6

Open Jaymusta opened 2 years ago

Jaymusta commented 2 years ago

Hi there,

I've recently attempted to update the firmware for my tablet to v0.5, but it would seem that HYKU_Configurator.exe stopped responding shortly after the CMD window popped up.

I went ahead and restarted the executable, but it would seem that the program isn't able to detect the tablet anymore.

I suspect that the tablet may be stuck in a certain mode given that its LED is fading between green and yellow/orange as it may have been waiting for the executable to flash the firmware to the device around when it stopped responding.

Some details that may have contributed to this happening include:

What I have done to try and to remedy this issue so far:

Here are the error prompts I currently get when trying to upload any settings or flash any firmware to the device:

image image

An additional detail I just now found is that Device Manager does seem to respond to me disconnecting/reconnecting the device to the computer along with the usb device connection sounds playing.

If my tablet is indeed stuck in a certain mode waiting for the .exe to flash firmware to it, is there a way to reset the device? (so that it would able to reconnect to my pc in its "factory" default mode which would be detectable to the .exe)

sssata commented 2 years ago

Hi Jaymusta, sorry you're having trouble and really appreciate the detailed issue report.

Can you try entering bootloader mode as described here? You may need to unscrew the main board from the base to access the pads, and you may want to use tape to cover the USB-C connector and any surrounding pads so you don't accidentally short them.

The pads to short should be somewhere around here: image

After entering the bootloader mode, both the green and yellow LEDs beside the USB connector should be lit and the device should be recognized by Windows as a USB Serial Device. At this point, you can try re-uploading the v0.5 firmware through the configurator program.

Jaymusta commented 2 years ago

Hey thanks for replying,

Upon taking a better look at those LEDs, it seems that the green LED was actually staying on with the yellow LED slowly fading on and off.

I went ahead and followed those instructions after finding those 2 contact pads next to the USB-C port as you specified, and the yellow LED did respond to me shorting those 2 contact pads with tweezers in that it stayed off while the tweezers were maintaining contact with the pads.

Unfortunately, it seems that the yellow LED just went back to its previous behavior of slowly fading on and off after flickering once right after shorting those pads twice as instructed via that link you provided.

It also seems that the way my PC is reading the device hasn't changed either since HYKU_Configurator.exe didn't recognize the device after shorting those pads.

I did find the device within Device Manager: image

Along with the last event my pc logged with the device in Event Viewer from about 2 hours ago:

Source: UserPnp Event ID: 20001 Task Category: (7005)

Driver Management concluded the process to install driver wpdfs.inf_amd64aade15d7efbed3c9 for Device Instance ID SWD\WPDBUSENUM\??_USBSTOR#DISK&VEN_SEEEDUIN&PROD_O_XIAO&REV_1.00#8&1241C78E&0&B8335C6650555233362E3120FF081738&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B} with the following status: 0x0.

^All that information might be doing is just confirming that my PC is still not recognizing the device properly, but I went ahead and included it anyways just in case.

Jaymusta commented 2 years ago

Alright so I read through that wiki you linked in your reply a bit more, and it seems like the device was already in bootloader mode to begin with. (At least according to the LEDs' behavior)

I tried shorting those 2 contact pads again, and this time I saw the yellow LED flashing/blinking quickly for a moment before reverting back to its previous behavior.

After checking with that wiki, it seems that this LED behavior may mean that the device entered bootloader mode while the device wasn't recognized as a USB device by the PC.

I'm going to try and connect the device to a different PC to see if it ends up being recognized properly.

Edit:

My laptop seems to recognize it as a USB storage device. image

Seeing this, I proceeded to try flashing the firmware via this laptop.

Besides the program window being sized too small, cutting off the option to upload settings and see the status of the device, it would seem that attempting to flash the firmware here also results in the same exact serial exception port error. image

I tried to toggle bootloader mode on the device while connected to my laptop, but it didn't seem to change anything.

The only difference here being that I don't seem to be able to reproduce the quick flashing behavior that I encountered on my main PC.

Edit 2:

Upon reconnecting the device to my main PC, it is recognized as a USB storage device- just like with my laptop.

No change to HYKU_Configurator.exe's ability to detect it though.

Jaymusta commented 2 years ago

I ended up going further down the rabbit hole regarding what came up in the google search results when searching for similar experiences with the Seeduino XIAO board.

I ended up finding this forum post where the OP ended up experiencing what seems similar to the situation I'm currently experiencing here.

However, upon seeing how the recommendation was to purchase and use an external device to flash a functional bootloader into the board, I ended up searching for an alternate method.

As a result, I came across this medium article that provided instructions on how to do that without an external device.

In hindsight, I probably should have run this by you before going any further (especially since my programming knowledge is limited to the basics of C++), but it seems like the bootloader in my device is more functional in that the device isn't stuck/hung up wherever it was before I followed that guide.

Despite all this, there has been no change with HYKU_Configurator.exe's ability to detect the device (including how that same serial exception port error popping up when attempting to flash firmware).

Though now that the bootloader seems like it may actually be in a functional state, there may be a way to flash the firmware or maybe even upload a sketch as mentioned in that medium article.

sssata commented 2 years ago

Thanks for all the extra work you put in. When you plug in the tablet, does a device called "USB Serial Device" show up in device manager? image

If so, can you right click on it, open up properties, select the details tab, select "Device instance path" in the dropdown, and get the resulting value listed?

image

Jaymusta commented 2 years ago

Ah yes this entire time, it seems that the tablet has consistently shown up as "USB Serial Device (COM3)" in device manager (both before and after flashing the bootloader).

Here is its Device instance path: image

USB\VID_2886&PID_002F&MI_00\7&35524896&1&0000

Though after flashing the bootloader, it seems that it also defaults to showing up as "USB Serial Device (COM5)" whenever I have it go into bootloader mode.

So I'm gonna go ahead and include the Device instance path for that as well: image

USB\VID_2341&PID_8036&MI_00\9&AA39334&0&0000

sssata commented 2 years ago

Ok, can you try downloading the .uf2 file from here and drag and drop the file onto the removable disk that appears when you plug the tablet in?

Something like this tutorial.

Jaymusta commented 2 years ago

Alright I went ahead and dropped that .uf2 file into the removable disk while it was in bootloader mode, and it immediately reconnected to my PC and showed up in Device Manager as USB Serial Device (COM5).

And to my surprise, it seemed to reconnect as a tablet instead of a storage device even though I didn't have HYKU_Configurator.exe launched and running yet.

Upon launching HYKU_Configurator.exe, the tablet was recognized like normal and I was able to upload my settings to the tablet just fine.

There does seem to be an issue that could be related to how a multi-monitor setup is handled since my cursor seems to be limited to a specific area of the screen on my primary monitor.

I went ahead and outlined that limited area in paint to help visualize the issue (Edit: Monitor resolution is 1920x1080): image

It seems like the cursor is able to go further to the right of where the screen stops, which is why there is no edge on the right side.

It also seems that all combinations of recalibrating and reconnecting the tablet doesn't change this behavior.

Moving the active area around via the X and Y offsets in the .exe seems to just offset that active area with no change to how the cursor is confined to that portion of the screen.

So it seems like the issue of having HYKU_Configurator.exe not detect the tablet has been resolved, though we aren't completely out of the woods yet given how this current issue is presenting itself to us now.

Edit 2: Yeah after disconnecting my secondary display, the cursor movement limitations are corrected.

sssata commented 2 years ago

You don't actually need to keep HYKU_Configurator.exe running to use the tablet, you can close it after you're done changing settings.

The issue you're experiencing with multi monitors has been a real headache to resolve, unfortunately Windows doesn't handle absolute input mice very well with multiple monitors. The only real solution that I've been able to find is to use this driver that I wrote. It's a hassle to install since you need to enable driver test signing and it seems to induce some latency.

A workaround if you just want to play osu! on whichever monitor is to use the "Map absolute raw Input to the osu! window" option in osu! along with this latest release of the HYKU configurator. Activate the "osu! Absolute Map Mode" in the configurator and input the resolution of your osu! window into the Width and Height.

Jaymusta commented 2 years ago

You don't actually need to keep HYKU_Configurator.exe running to use the tablet, you can close it after you're done changing settings.

Oh wow so the settings are stored into the onboard memory of the tablet after uploading them? If that's the case, then that's actually really nice given how I usually see devices needing to have their configuration software running in the background in the taskbar tray or as a service that can take up system resources (which can have noticeable effects when playing latency sensitive games like osu! especially on lower spec PC's)

The issue you're experiencing with multi monitors has been a real headache to resolve, unfortunately Windows doesn't handle absolute input mice very well with multiple monitors. The only real solution that I've been able to find is to use this driver that I wrote. It's a hassle to install since you need to enable driver test signing and it seems to induce some latency.

That does sound like a huge pain to deal with given how it seems to be due to how Windows handles mouse inputs from a device like this. Kind of makes sense that it wouldn't be so optimized for various situations given how uncommon this mouse input style seems to be. At least compared to other more common input device styles. It is unfortunate that the current real solution is the way it is with that setup and added input latency (which would subtract from the overall input latency reduction that the 600hz polling rate allows for).

A workaround if you just want to play osu! on whichever monitor is to use the "Map absolute raw Input to the osu! window" option in osu! along with this latest release of the HYKU configurator. Activate the "osu! Absolute Map Mode" in the configurator and input the resolution of your osu! window into the Width and Height.

The workaround in that release of the Hyku configurator does seem to take care of the issue for now, though I do wonder if it has any drawbacks like that alternate driver you wrote up.

Either way, I really do appreciate what you've been doing here. I remember getting really excited when I saw that reddit post last year given how many times I've regularly searched for ways to improve tablet input lag over the past few years. The increased polling rate for this form factor of cursor input has very much been an area lacking any progress given the progress other forms of input have been making over the years.

I really do see a lot of potential for this becoming a significant alternative, or even a desirable replacement for drawing tablets as a cursor input implementation for osu! Possibly even in the near future once a lot of the rougher edges are buffed out.

I really am 100% all for this becoming a thing.

But yeah other than that, thanks again for continuing to be active in working on this. Both through replying to my updates on the issue I had, and continuing to push out new incremental releases for the configurator.

Unrelated (sort of):

I have been keeping notes of some other things I've noticed/experienced in playing osu! with this tablet so far. Though they're more related to the player experience with the physical aspects of the tablet, rather than the software/driver side of the experience.

I'm definitely very much still on the fence on whether I want to make a video about this tablet yet or not, partially due to life circumstances making it be a bit hard to resume content creation on YouTube at the moment. But it is definitely something I want to do to help increase exposure for this project.

But at least for now, I am open to providing feedback somewhere else like discord or something (unless you're fine with me creating a separate issue dedicated to that kind of stuff here on GitHub).

sssata commented 2 years ago
  1. Yes, the configurator settings are stored on the tablet specifically so you don't have to run some annoying program in the background.

  2. The osu map raw input workaround shouldn't have any latency side effects as far as I'm aware.

That being said, thanks so much for all your support on this project, it really helps keep me motivated to work on this. It would be super cool if you do made a video, I'm all for it.

I'd be glad to listen to your feedback here on this git issue.

Jaymusta commented 2 years ago

Ayy love to see it.

That being said, thanks so much for all your support on this project, it really helps keep me motivated to work on this. It would be super cool if you do made a video, I'm all for it.

Man it's crazy how contagious good vibes from things like this can be. This might have just helped me start bringing the momentum back on my end of things.

I'd be glad to listen to your feedback here on this git issue.

Ah alright, here we go:

Feedback

Suggestions

I believe that's pretty much all I have for now, though I'll be sure to add anything else that comes to mind as I keep using the tablet.