changed order of device class setting

This commit is contained in:
Robert Martin
2020-04-12 03:21:01 +09:00
parent cee19451db
commit adfb907919
+3 -2
View File
@@ -75,9 +75,8 @@ async def create_hid_server(protocol_factory, ctl_psm=17, itr_psm=19, device_id=
itr_sock.listen(1) itr_sock.listen(1)
hid.powered(True) 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_name(protocol.controller.device_name())
await hid.set_class()
logger.info('Advertising the Bluetooth SDP record...') logger.info('Advertising the Bluetooth SDP record...')
try: 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) # Already registered (If multiple controllers are being emulated and this method is called consecutive times)
logger.debug(dbus_err) logger.debug(dbus_err)
await hid.set_class()
# start advertising # start advertising
hid.discoverable() hid.discoverable()