Expose Bluetooth LE HID emulation to Autotest

This patch adds the necessary framework to allow a Bluetooth LE kit to
be used in place of a Bluetooth BR/EDR kit, attempting to follow the
work done when adding a Bluetooth BR/EDR flow as closely as possible.

Note that Chameleon boards may only have one of the current kits
attached at a time, as we have not yet resolved the detection issue.

Also fix existing typo: gaamepad -> gamepad

BUG=chromium:752719
TEST=First, locate the source for chameleond on a Chameleon board, cd
there, and run the self-test with only a Bluefruit LE kit attached:
$ IFS="^^^";export PS1=`echo $PS1|sed s/w/W/`;unset IFS
$ cd \
/usr/lib/python2.7/site-packages/chameleond-0.0.2-py2.7.egg/chameleond/
$ python utils/bluetooth_bluefruitle.py
Check that it doesn't crash, prints sensible results.

Second, test that current functionality is not broken:
Run this code on the Chameleon board, with only RN-42 attached:
$ make && make remote-install CHAMELEON_HOST=$CHAMELEON_IP
Execute the non-flaky non-stress tests that use this code,
see that the tests pass:
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.mouse \
bluetooth_AdapterPairing.mouse.pairing_twice \
bluetooth_AdapterHIDReports.mouse

Third, test that this actually WAI with future patches:
Apply CL:602900 and CL:639850 to your chroot.
Execute the non-flaky non-stress tests that use this code,
see that things work as much as possible without Autotest adjustments.
Note that only the Bluefruit LE Friend should be attached.
$ test_that --board ${BOARD} --args "chameleon_host=${CHAMELEON_IP}" \
${DUT_IP} bluetooth_AdapterPairing.le.mouse \
bluetooth_AdapterPairing.le.mouse.pairing_twice \
bluetooth_AdapterHIDReports.le.mouse

Change-Id: I885c63caf8bb80f9b04f88a736ead8ee8ebf1329
Reviewed-on: https://chromium-review.googlesource.com/611780
Commit-Ready: Alexander Lent <alent@google.com>
Tested-by: Alexander Lent <alent@google.com>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
3 files changed