@@ -470,6 +470,21 @@ public void establishPaseConnection(long deviceId, String address, int port, lon
470
470
establishPaseConnectionByAddress (deviceControllerPtr , deviceId , address , port , setupPincode );
471
471
}
472
472
473
+ /**
474
+ * Establish a secure PASE connection using the scanned QR code or manual entry code.
475
+ *
476
+ * @param deviceId the ID of the node to connect to
477
+ * @param setupCode the scanned QR code or manual entry code
478
+ * @param useOnlyOnNetworkDiscovery the flag to indicate the commissionable device is available on
479
+ * the network
480
+ */
481
+ public void establishPaseConnection (
482
+ long deviceId , String setupCode , boolean useOnlyOnNetworkDiscovery ) {
483
+ Log .d (TAG , "Establishing PASE connection using Code: " + setupCode );
484
+ establishPaseConnectionByCode (
485
+ deviceControllerPtr , deviceId , setupCode , useOnlyOnNetworkDiscovery );
486
+ }
487
+
473
488
/**
474
489
* Initiates the automatic commissioning flow using the specified network credentials. It is
475
490
* expected that a secure session has already been established via {@link
@@ -1624,6 +1639,9 @@ private native void establishPaseConnection(
1624
1639
private native void establishPaseConnectionByAddress (
1625
1640
long deviceControllerPtr , long deviceId , String address , int port , long setupPincode );
1626
1641
1642
+ private native void establishPaseConnectionByCode (
1643
+ long deviceControllerPtr , long deviceId , String setupCode , boolean useOnlyOnNetworkDiscovery );
1644
+
1627
1645
private native void commissionDevice (
1628
1646
long deviceControllerPtr ,
1629
1647
long deviceId ,
0 commit comments