Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10137b24 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "avatar: Add support for le pairing" am: 2e9b1e91 am: 0d187fb4 am: 4ca45f79

parents 0de2a722 4ca45f79
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ class GAPProxy(ProfileProxy):
            if self.counter == 0:
            if self.counter == 0:
                self.counter += 1
                self.counter += 1
                self.security_storage.DeleteBond(public=pts_addr)
                self.security_storage.DeleteBond(public=pts_addr)
                self.connection = self.host.ConnectLE(public=pts_addr).connection
                self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=pts_addr).connection
                self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)
                self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)
                return "OK"
                return "OK"


@@ -158,7 +158,7 @@ class GAPProxy(ProfileProxy):
                    scans.cancel()
                    scans.cancel()
                    break
                    break


        self.connection = self.host.ConnectLE(public=address).connection
        self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=address).connection
        if test in {"GAP/BOND/BON/BV-04-C"}:
        if test in {"GAP/BOND/BON/BV-04-C"}:
            self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)
            self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)


+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ class GATTProxy(ProfileProxy):
        PTS.
        PTS.
        """
        """


        self.connection = self.host.ConnectLE(public=pts_addr).connection
        self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=pts_addr).connection
        if test in NEEDS_CACHE_CLEARED:
        if test in NEEDS_CACHE_CLEARED:
            self.gatt.ClearCache(connection=self.connection)
            self.gatt.ClearCache(connection=self.connection)
        return "OK"
        return "OK"
+2 −1
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ from mmi2grpc._helpers import assert_description, match_description
from mmi2grpc._proxy import ProfileProxy
from mmi2grpc._proxy import ProfileProxy


from pandora_experimental.host_grpc import Host
from pandora_experimental.host_grpc import Host
from pandora_experimental.host_pb2 import OwnAddressType
from pandora_experimental.security_grpc import Security
from pandora_experimental.security_grpc import Security
from pandora_experimental.security_pb2 import LESecurityLevel
from pandora_experimental.security_pb2 import LESecurityLevel
from pandora_experimental.gatt_grpc import GATT
from pandora_experimental.gatt_grpc import GATT
@@ -39,7 +40,7 @@ class HOGPProxy(ProfileProxy):
        to the PTS.
        to the PTS.
        """
        """


        self.connection = self.host.ConnectLE(public=pts_addr).connection
        self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=pts_addr).connection
        self.pairing_stream = self.security.OnPairing()
        self.pairing_stream = self.security.OnPairing()
        def secure():
        def secure():
            self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)
            self.security.Secure(connection=self.connection, le=LESecurityLevel.LE_LEVEL3)
+1 −1
Original line number Original line Diff line number Diff line
@@ -359,7 +359,7 @@ class L2CAPProxy(ProfileProxy):
        """
        """
        Initiate or create LE ACL connection to the PTS.
        Initiate or create LE ACL connection to the PTS.
        """
        """
        self.connection = self.host.ConnectLE(public=pts_addr).connection
        self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=pts_addr).connection
        return "OK"
        return "OK"


    @assert_description
    @assert_description
+1 −1
Original line number Original line Diff line number Diff line
@@ -47,7 +47,7 @@ class SMProxy(ProfileProxy):
        """
        """
        Initiate an connection from the IUT to the PTS.
        Initiate an connection from the IUT to the PTS.
        """
        """
        self.connection = self.host.ConnectLE(public=pts_addr).connection
        self.connection = self.host.ConnectLE(own_address_type=OwnAddressType.RANDOM, public=pts_addr).connection
        return "OK"
        return "OK"


    @assert_description
    @assert_description
Loading