raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.62k stars 779 forks source link

hog_mouse_demo: picow can be connected to the computer but cannot move the mouse. #402

Closed K1rin7 closed 1 year ago

K1rin7 commented 1 year ago

I tried both "pico_w/bt/hid_mouse_demo" and "pico_w/bt/hog_mouse_demo", the former works well, but the latter does not.

hid_mouse_demo:

I can use UART0 to control my mouse. (I enabled btstack debug)

hog_mouse_demo:

When I use UART0 to control the mouse, nothing happens (no mouse movement).

I am using Clion and pico-sdk 1.5.1 to run the demo and I don't know how to solve this problem yet.

peterharperuk commented 1 year ago

What system are you testing it with? I just tried it with a rpi4 running Linux and it works. There may be a problem with Windows.

K1rin7 commented 1 year ago

@peterharperuk I'm using windows 11, I also tested it with WSL(Ubuntu22.04), but the mouse didn't move either. I‘m now trying to test it with linux.

K1rin7 commented 1 year ago

I can connect to picow and move the mouse using linux now. And it worked well with ipad.

mringwal commented 1 year ago

@K1rin7 does it now work with Windows 11 for you? Or only with Linux and iPad?

K1rin7 commented 1 year ago

@mringwal Only with Linux and iPad.

mringwal commented 11 months ago

@K1rin7 please update BTstack to the latest version on the master branch or just copy the hog_mouse_demo.c from the master branch into the Pico SDK submodule into the examples folder and let me know if the mouse starts working on Windows for you, too.

K1rin7 commented 11 months ago

Hi, @mringwal Just now, I updated BTstack to the latest version (master and develop branch), but got the same result:

mringwal commented 11 months ago

I forgot to push the change to master. Please try again and make sure that the "HID Mouse" was re-paired and/or try on a different Windows installation. I've tried earlier with Windows 10 in a VM and at least the buttons worked as expected (controlling mouse pointer is tricky as the mouse is controlled by the host environment)

K1rin7 commented 11 months ago

Hi, @mringwal I tried "hog_mouse_demo" and "hog_keyboard_demo" on picow and now they both work well with Windows (both W10 and W11). Thanks!

mringwal commented 11 months ago

Thanks for the confirmation.