Loading android/pandora/mmi2grpc/mmi2grpc/l2cap.py +66 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ from mmi2grpc._proxy import ProfileProxy from pandora_experimental.host_grpc import Host from pandora_experimental.host_pb2 import Connection, OwnAddressType from pandora_experimental.security_grpc import Security from pandora_experimental.l2cap_grpc import L2CAP from typing import Optional Loading @@ -21,6 +22,10 @@ class L2CAPProxy(ProfileProxy): super().__init__(channel) self.l2cap = L2CAP(channel) self.host = Host(channel) self.security = Security(channel) self.connection = None self.pairing_events = None @assert_description def MMI_IUT_SEND_LE_CREDIT_BASED_CONNECTION_REQUEST(self, test: str, pts_addr: bytes, **kwargs): Loading Loading @@ -350,7 +355,7 @@ class L2CAPProxy(ProfileProxy): return "OK" @assert_description def MMI_IUT_SEND_ACL_DISCONNECTION(self, **kwargs): def MMI_IUT_SEND_ACL_DISCONNECTION(self, test: str, **kwargs): """ Initiate an ACL disconnection from the IUT to the PTS. Description : Loading @@ -359,3 +364,63 @@ class L2CAPProxy(ProfileProxy): """ self.host.Disconnect(connection=self.connection) return "OK" def MMI_TESTER_ENABLE_CONNECTION(self, **kwargs): """ Action: Place the IUT in connectable mode. Description: PTS requires that the IUT be in connectable mode. The PTS will attempt to establish an ACL connection. """ return "OK" @assert_description def MMI_IUT_INITIATE_ACL_CONNECTION(self, pts_addr: bytes, **kwargs): """ Using the Implementation Under Test(IUT), initiate ACL Create Connection Request to the PTS. Description : The Implementation Under Test(IUT) should create ACL connection request to PTS. """ self.pairing_events = self.security.OnPairing() self.connection = self.host.Connect(address=pts_addr, manually_confirm=True).connection return "OK" @assert_description def _mmi_2001(self, **kwargs): """ Please verify the passKey is correct: 000000 """ passkey = "000000" for event in self.pairing_events: if event.numeric_comparison == int(passkey): self.pairing_events.send(event=event, confirm=True) return "OK" assert False, "The passkey does not match" assert False, "Unexpected pairing event" @assert_description def MMI_IUT_SEND_CONFIG_REQ(self, **kwargs): """ Please send Configure Request. """ return "OK" @assert_description def MMI_IUT_SEND_CONFIG_RSP(self, **kwargs): """ Please send Configure Response. """ return "OK" @assert_description def MMI_IUT_SEND_DISCONNECT_RSP(self, **kwargs): """ Please send L2CAP Disconnection Response to PTS. """ return "OK" android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ <option name="profile" value="MAP" /> <option name="profile" value="PBAP/PSE" /> <option name="profile" value="RFCOMM" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="SDP" /> <option name="profile" value="SM" /> </test> Loading android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <option name="profile" value="GATT" /> <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="PBAP/PSE" /> Loading android/pandora/server/configs/pts_bot_tests_config.json +31 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,16 @@ "HOGP/RH/HGRF/BV-08-I", "HOGP/RH/HGRF/BV-10-I", "HOGP/RH/HGRF/BV-12-I", "L2CAP/COS/CED/BI-01-C", "L2CAP/COS/CED/BV-05-C", "L2CAP/COS/CED/BV-07-C", "L2CAP/COS/CED/BV-08-C", "L2CAP/COS/CED/BV-11-C", "L2CAP/COS/CFD/BV-02-C", "L2CAP/COS/CFD/BV-03-C", "L2CAP/COS/CFD/BV-11-C", "L2CAP/COS/CFD/BV-12-C", "L2CAP/COS/CFD/BV-14-C", "L2CAP/LE/CFC/BI-01-C", "L2CAP/LE/CFC/BV-01-C", "L2CAP/LE/CFC/BV-02-C", Loading Loading @@ -703,6 +713,27 @@ "HFP/AG/OCN/BV-01-I", "HFP/AG/SLC/BV-04-C", "HID/HOS/HCR/BV-01-I", "L2CAP/COS/CED/BI-02-C", "L2CAP/COS/CED/BV-01-C", "L2CAP/COS/CED/BV-03-C", "L2CAP/COS/CED/BV-04-C", "L2CAP/COS/CED/BV-09-C", "L2CAP/COS/CED/BV-10-C", "L2CAP/COS/CED/BV-12-C", "L2CAP/COS/CED/BV-13-C", "L2CAP/COS/CFD/BV-01-C", "L2CAP/COS/CFD/BV-09-C", "L2CAP/COS/CFD/BV-08-C", "L2CAP/COS/CFD/BV-10-C", "L2CAP/COS/CFD/BV-13-C", "L2CAP/COS/CFC/BV-01-C", "L2CAP/COS/CFC/BV-02-C", "L2CAP/COS/CFC/BV-03-C", "L2CAP/COS/CFC/BV-04-C", "L2CAP/COS/CFC/BV-05-C", "L2CAP/COS/ECH/BV-02-C", "L2CAP/COS/IEX/BV-01-C", "L2CAP/COS/IEX/BV-02-C", "L2CAP/LE/CFC/BV-07-C", "L2CAP/LE/CFC/BV-11-C", "L2CAP/LE/CFC/BV-13-C", Loading Loading
android/pandora/mmi2grpc/mmi2grpc/l2cap.py +66 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ from mmi2grpc._proxy import ProfileProxy from pandora_experimental.host_grpc import Host from pandora_experimental.host_pb2 import Connection, OwnAddressType from pandora_experimental.security_grpc import Security from pandora_experimental.l2cap_grpc import L2CAP from typing import Optional Loading @@ -21,6 +22,10 @@ class L2CAPProxy(ProfileProxy): super().__init__(channel) self.l2cap = L2CAP(channel) self.host = Host(channel) self.security = Security(channel) self.connection = None self.pairing_events = None @assert_description def MMI_IUT_SEND_LE_CREDIT_BASED_CONNECTION_REQUEST(self, test: str, pts_addr: bytes, **kwargs): Loading Loading @@ -350,7 +355,7 @@ class L2CAPProxy(ProfileProxy): return "OK" @assert_description def MMI_IUT_SEND_ACL_DISCONNECTION(self, **kwargs): def MMI_IUT_SEND_ACL_DISCONNECTION(self, test: str, **kwargs): """ Initiate an ACL disconnection from the IUT to the PTS. Description : Loading @@ -359,3 +364,63 @@ class L2CAPProxy(ProfileProxy): """ self.host.Disconnect(connection=self.connection) return "OK" def MMI_TESTER_ENABLE_CONNECTION(self, **kwargs): """ Action: Place the IUT in connectable mode. Description: PTS requires that the IUT be in connectable mode. The PTS will attempt to establish an ACL connection. """ return "OK" @assert_description def MMI_IUT_INITIATE_ACL_CONNECTION(self, pts_addr: bytes, **kwargs): """ Using the Implementation Under Test(IUT), initiate ACL Create Connection Request to the PTS. Description : The Implementation Under Test(IUT) should create ACL connection request to PTS. """ self.pairing_events = self.security.OnPairing() self.connection = self.host.Connect(address=pts_addr, manually_confirm=True).connection return "OK" @assert_description def _mmi_2001(self, **kwargs): """ Please verify the passKey is correct: 000000 """ passkey = "000000" for event in self.pairing_events: if event.numeric_comparison == int(passkey): self.pairing_events.send(event=event, confirm=True) return "OK" assert False, "The passkey does not match" assert False, "Unexpected pairing event" @assert_description def MMI_IUT_SEND_CONFIG_REQ(self, **kwargs): """ Please send Configure Request. """ return "OK" @assert_description def MMI_IUT_SEND_CONFIG_RSP(self, **kwargs): """ Please send Configure Response. """ return "OK" @assert_description def MMI_IUT_SEND_DISCONNECT_RSP(self, **kwargs): """ Please send L2CAP Disconnection Response to PTS. """ return "OK"
android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ <option name="profile" value="MAP" /> <option name="profile" value="PBAP/PSE" /> <option name="profile" value="RFCOMM" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="SDP" /> <option name="profile" value="SM" /> </test> Loading
android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <option name="profile" value="GATT" /> <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="PBAP/PSE" /> Loading
android/pandora/server/configs/pts_bot_tests_config.json +31 −0 Original line number Diff line number Diff line Loading @@ -308,6 +308,16 @@ "HOGP/RH/HGRF/BV-08-I", "HOGP/RH/HGRF/BV-10-I", "HOGP/RH/HGRF/BV-12-I", "L2CAP/COS/CED/BI-01-C", "L2CAP/COS/CED/BV-05-C", "L2CAP/COS/CED/BV-07-C", "L2CAP/COS/CED/BV-08-C", "L2CAP/COS/CED/BV-11-C", "L2CAP/COS/CFD/BV-02-C", "L2CAP/COS/CFD/BV-03-C", "L2CAP/COS/CFD/BV-11-C", "L2CAP/COS/CFD/BV-12-C", "L2CAP/COS/CFD/BV-14-C", "L2CAP/LE/CFC/BI-01-C", "L2CAP/LE/CFC/BV-01-C", "L2CAP/LE/CFC/BV-02-C", Loading Loading @@ -703,6 +713,27 @@ "HFP/AG/OCN/BV-01-I", "HFP/AG/SLC/BV-04-C", "HID/HOS/HCR/BV-01-I", "L2CAP/COS/CED/BI-02-C", "L2CAP/COS/CED/BV-01-C", "L2CAP/COS/CED/BV-03-C", "L2CAP/COS/CED/BV-04-C", "L2CAP/COS/CED/BV-09-C", "L2CAP/COS/CED/BV-10-C", "L2CAP/COS/CED/BV-12-C", "L2CAP/COS/CED/BV-13-C", "L2CAP/COS/CFD/BV-01-C", "L2CAP/COS/CFD/BV-09-C", "L2CAP/COS/CFD/BV-08-C", "L2CAP/COS/CFD/BV-10-C", "L2CAP/COS/CFD/BV-13-C", "L2CAP/COS/CFC/BV-01-C", "L2CAP/COS/CFC/BV-02-C", "L2CAP/COS/CFC/BV-03-C", "L2CAP/COS/CFC/BV-04-C", "L2CAP/COS/CFC/BV-05-C", "L2CAP/COS/ECH/BV-02-C", "L2CAP/COS/IEX/BV-01-C", "L2CAP/COS/IEX/BV-02-C", "L2CAP/LE/CFC/BV-07-C", "L2CAP/LE/CFC/BV-11-C", "L2CAP/LE/CFC/BV-13-C", Loading