Now retries to bind to socket until it succeeds, instead of giving up. Added a small sleep after bringing down bluetooth to ensure that the socket is ready to be bound. Added a --no-disable-bluetoothd option, as it is possible to configure bluetoothd to coexist with ps3joy. Added a --redirect-output option to make it easier to log the output from ps3joy. Now checks that hci0 is in PSCAN mode every 5 seconds. Replaced use of select with use of settimeout when listening on the L2CAP sockets. Removed an erroneous double close of one of the sockets in certain error cases.
Now retries to bind to socket until it succeeds, instead of giving up. Added a small sleep after bringing down bluetooth to ensure that the socket is ready to be bound. Added a --no-disable-bluetoothd option, as it is possible to configure bluetoothd to coexist with ps3joy. Added a --redirect-output option to make it easier to log the output from ps3joy. Now checks that hci0 is in PSCAN mode every 5 seconds. Replaced use of select with use of settimeout when listening on the L2CAP sockets. Removed an erroneous double close of one of the sockets in certain error cases.

git-svn-id: 44897fafd6af4a85facfb7629a436b21eeef0670@29339 eb33c2ac-9c88-4c90-87e0-44a10359b0c3

ccc395/Robotics,ccc395/Robotics,ccc395/Robotics