Ticket #53 (closed defect: fixed)
Need some way to discover and connect to remotes with shorter timeouts, or asynchronously
| Reported by: | josh | Owned by: | dsmith |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | libcwiid | Version: | 0.6.00 |
| Keywords: | Cc: |
Description
wiimote_open takes a long time to find and connect to a new Wiimote, which involves some very long delays (particularly when using 1+2 rather than the sync button). However, I want to connect several Wiimotes without knowing the number of Wiimotes or their bluetooth addresses in advance; I will use something like "Press A on any remote to stop looking for more remotes". I don't see any way with the current cwiid interfaces to do this elegantly.
First, even if I had the bluetooth addresses (such as from the cwiid bluetooth discovery functions), cwiid_open still takes a long time to connect. While connecting, I cannot watch for the A button on other remotes and abort. I also cannot discover and connect to new wiimotes in parallel, so the long timeouts run sequentially rather than concurrently.
Second, the bluetooth discovery functions themselves appear to have some long timeouts.
(If I have missed some other way to do this, my apologies; please let me know.)
