NDS-controller is a combined NDS/Android app that allows a (3)DS to connect to an Android device over Wi-Fi and to function as an input device / gamepad. The main use case is controlling emulators: most emulated real-time games tends to be a pain to play on a touch screen and greatly benefit from being played on a gamepad.
NDS/3DS client: https://github.com/Louisvh/NDS-controller
The NDS/DSL/DSi versions of the client require a unprotected Wi-Fi connection, as their hardware is too old to support WPA2. The 3DS client has full WPA2 capabilities and will run on any 2.4GHz connection. For detailed instructions on how to use the clients, refer to the Github page linked above.