Python3 Migration: utils/bluetooth_socket: convert buffer to memoryview

The buffer function was deprecated in Python3. Use memoryview instead.
Some bytes vs strings issues in utils/bluetooth_socket.py were also
fixed in this patch.

BUG=b:169724328
TEST=Follow the steps to make and install with python 3
(cr) make PY_VERSION=python3
(cr) make remote-install "${CHAMELEON_HOST}" PY_VERSION=python3
(cr) Run bluetooth_AdapterQuickHealth.AVL.
     All tests should pass.

Change-Id: I07b575b32f0e56600b1307882c8c995e2e8c7146
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/chameleon/+/2573719
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
1 file changed