From c2f4ed9ee5646aefa68fb44fa14eda0460f02e66 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 30 Jan 2013 20:35:42 +0000 Subject: [PATCH] Force disconnect of sixaxis (big hack, but works for now) --- sixad/sixad-sixaxis.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sixad/sixad-sixaxis.cpp b/sixad/sixad-sixaxis.cpp index 3fc4b65..0add71d 100644 --- a/sixad/sixad-sixaxis.cpp +++ b/sixad/sixad-sixaxis.cpp @@ -360,6 +360,15 @@ int main(int argc, char *argv[]) delete ufd; + // hack for force disconnect + char cmd[32] = { 0 }; + strcpy(cmd, "hcitool dc "); + strcat(cmd, mac); + + usleep(10*1000); + syslog(LOG_INFO, "Force disconnect of \"%s\"", mac); + system(cmd); + if (debug) syslog(LOG_INFO, "Done"); return 0;