Welcome! Log In Create A New Profile Wiibrew Wiki HackMii Blog

Advanced

How to stop LEDS from blinking after pairing a Wiimote.

Posted by ags000 
How to stop LEDS from blinking after pairing a Wiimote.
June 24, 2013 03:41AM
I'm working on a project intending to use the wiimote as a user input device controlling a small embedded controller. I have a basic stack that is able to connect.

I have two modes that I'd like to support:

First, a pairing mode: press the sync button under the wiimote battery cover, then command my local controller to inquire, connect, and finally pair with the wiimote. This seems to work. I think it is actually establishing a bond because after this process, and disconnecting the wiimote, a single button press on the wiimote causes a Connection Request event on my local controller. I presume that indicates that the Pin/BD_ADDR has been stored in the wiimote - indicating a successful pairing.

However, after the (ostensible) pairing, the LEDs on the wiimote continue to blink. Is that because the pairing is not complete, or because I am required to send an output report to the wiimote after connecting to stop the LEDs from flashing?

Second, a reconnect mode: after successfully pairing the wiimote once, I'd like to be able to have it initiate a connection with my local controller using a single button press. This also seems to be working, but the LEDs on the wiimote continue to blink after the connection is established.

Is there some additional configuration/handshake required to complete the pairing and single-button reconnect modes? Or, is it expected that the LEDs will continue to blink until some report is sent?

Thanks.



Edited 3 time(s). Last edit at 07/15/2013 03:26PM by ags000.
Re: How to pair a Wiimote? (LEDs continue to blink)
June 24, 2013 11:10AM
The LEDs blink until you send a report telling them to do something else.
Re: How to pair a Wiimote? (LEDs continue to blink)
June 24, 2013 01:02PM
I thought that might be true. I looked at the documentation and didn't see anyway to make the LEDs blink - only turn them on or off. I concluded that since I'm not sending any output report to the wiimote to make the LEDs blink, it must be doing it on its own. Is there an output report to send to make them blink, or is it a mode that only the wiimote can put itself in (and can only be stopped, but not started, by a remote device)?

Is there anything I need to do with the link key I receive in the Link Key Notification Event?

Thanks.
Re: How to pair a Wiimote? (LEDs continue to blink)
June 24, 2013 10:08PM
Blinking is done internally by the wiimote, if you want to do it yourself you have to send reports alternating the LEDs on and off.
You only need to store the link key if you plan on always enabling authentication, to avoid sending a link_key_request_negative_reply and then responding to the PIN request (which will cause a new link key to be generated every time). For a non-wii host device there are no advantages to using authentication after the initial pairing has been performed.
Unexpected LED initialization behavior
July 13, 2013 04:45PM
Moved to a separate post ("Is a delay/wait required to stop LEDS from blinking after connecting a Wiimote?")



Edited 4 time(s). Last edit at 07/15/2013 11:27PM by ags000.
Sorry, only registered users may post in this forum.

Click here to login