Skip to content

Commit

Permalink
Fix python controller BLE connection (#6744)
Browse files Browse the repository at this point in the history
Code was previously changed to use a different version of the setup
payload parser, but this path was missed.
  • Loading branch information
cecille authored and pull[bot] committed Sep 3, 2021
1 parent 1229d73 commit f8d5990
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controller/python/chip-device-ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,15 @@ def ConnectFromSetupPayload(self, setupPayload, nodeid):
return 0
else:
print("Unable to connect")
return 1
else:
print("Unable to locate device on network")

if int(setupPayload.attributes["RendezvousInformation"]) & ble:
print("Attempting to connect via BLE")
if self.devCtrl.ConnectBLE(setupPayload.discriminator, setupPayload.setUpPINCode, nodeid):
longDiscriminator = ctypes.c_uint16(int(setupPayload.attributes['Discriminator']))
pincode = ctypes.c_uint32(int(setupPayload.attributes['SetUpPINCode']))
if self.devCtrl.ConnectBLE(longDiscriminator, pincode, nodeid):
print("Connected")
return 0
else:
Expand Down

0 comments on commit f8d5990

Please sign in to comment.