wiipair | Pair multiple wiimotes permanently with a PC | Frontend Framework library
kandi X-RAY | wiipair Summary
kandi X-RAY | wiipair Summary
Pair multiple wiimotes permanently with a PC
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wiipair
wiipair Key Features
wiipair Examples and Code Snippets
Community Discussions
Trending Discussions on wiipair
QUESTION
I'm trying to write a program that makes management of Wiimotes paired with Windows a lot simpler and automated. The program uses WiimoteLib (which uses hidsdi.h and setupapi.h) to connect to Wiimote devices, and 32feet (uses Windows Bluetooth API) to automatically pair/unpair devices. The code for the pairer/unpairer is based off of Wiipair. At the moment, the process is a little bumpy and slow, but it works. (But only for one Wiimote)
The problem is that my module to pair/unpair Bluetooth devices has no information on how to identify if the HID device (used by the Wiimote class) is the same device. I want to be able to alert the Wiimote class if the Bluetooth device has been forcefully shutdown or unpaired so that it can gracefully disconnect itself. And vice-versa, I'd like the Wiimote to alert the pairer/unpairer when the HID device is disconnected so that the Bluetooth device can optionally be unpaired (assuming you plan on shutting down the Wiimote).
If I only wanted access to one Wiimote then this wouldn't be much of a problem, but I'd like to be able to access multiple Wiimotes and be able to differentiate them by using their HID info and Bluetooth Info. I'm already using plenty of my own P/Invoke to cover for areas that 32feet lacks in so using any more isn't a problem.
Here's the main code for my pairer. (Although I'm not sure if it's really necessary):
(Note: IsDiscoverable()
, ToPin()
, and ToMacAddress()
are all extension methods.)
ANSWER
Answered 2018-Jun-28 at 21:41You do not need to pair with your Wiimote. Pairing with Wiimote does only one thing: Wiimote remembers MAC of paired device and then can trun it ON and connect to it (too Wii or other device). However it doe snot work with Windows so pairing is not required. If you need pairing then use legacy PIN pairing. PIN is wiimote MAC in reversed bytes order.
Use BluetoothSetServiceState to add your wiimote as HID device into the system.
Here is code shows how to find Wiimote HID by its MAC (the code is taken from our Wireless Communication Library that includes support for Wiimote).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wiipair
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page