From adfb907919e9e6ff16508f7a1c7b845ef5580f19 Mon Sep 17 00:00:00 2001 From: Robert Martin Date: Sun, 12 Apr 2020 03:21:01 +0900 Subject: [PATCH] changed order of device class setting --- joycontrol/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/joycontrol/server.py b/joycontrol/server.py index e4d9faef..9642183e 100644 --- a/joycontrol/server.py +++ b/joycontrol/server.py @@ -75,9 +75,8 @@ async def create_hid_server(protocol_factory, ctl_psm=17, itr_psm=19, device_id= itr_sock.listen(1) hid.powered(True) - # setting bluetooth adapter name and class to the device we wish to emulate + # setting bluetooth adapter name to the device we wish to emulate await hid.set_name(protocol.controller.device_name()) - await hid.set_class() logger.info('Advertising the Bluetooth SDP record...') try: @@ -86,6 +85,8 @@ async def create_hid_server(protocol_factory, ctl_psm=17, itr_psm=19, device_id= # Already registered (If multiple controllers are being emulated and this method is called consecutive times) logger.debug(dbus_err) + await hid.set_class() + # start advertising hid.discoverable()