Loading android/pandora/mmi2grpc/mmi2grpc/l2cap.py +33 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ from typing import Optional class L2CAPProxy(ProfileProxy): test_status_map = {} # record test status and pass them between MMI LE_DATA_PACKET_LARGE = "data: LE_DATA_PACKET_LARGE" LE_DATA_PACKET1 = "data: LE_PACKET1" connection: Optional[Connection] = None def __init__(self, channel): Loading Loading @@ -101,6 +102,10 @@ class L2CAPProxy(ProfileProxy): ) # not strictly necessary, but can save time on waiting connection tests_to_open_bluetooth_server_socket = [ "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/LE/CFC/BV-03-C", "L2CAP/LE/CFC/BV-05-C", "L2CAP/LE/CFC/BV-06-C", Loading Loading @@ -138,7 +143,7 @@ class L2CAPProxy(ProfileProxy): return "OK" @match_description def MMI_UPPER_TESTER_CONFIRM_LE_DATA(self, sent_data: str, **kwargs): def MMI_UPPER_TESTER_CONFIRM_LE_DATA(self, sent_data: str, test: str, **kwargs): """ Did the Upper Tester send the data (?P<sent_data>[0-9A-F]*) to to the PTS\? Click Yes if it matched, otherwise click No. Loading @@ -146,10 +151,13 @@ class L2CAPProxy(ProfileProxy): Description: The Implementation Under Test \(IUT\) send data is receive correctly in the PTS. """ hex_LE_DATA_PACKET_LARGE = self.LE_DATA_PACKET_LARGE.encode("utf-8").hex().upper() if sent_data != hex_LE_DATA_PACKET_LARGE: print(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET_LARGE}", file=sys.stderr) raise Exception(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET_LARGE}") if test == 'L2CAP/COS/CFC/BV-02-C': hex_LE_DATA_PACKET = self.LE_DATA_PACKET1.encode("utf-8").hex().upper() else: hex_LE_DATA_PACKET = self.LE_DATA_PACKET_LARGE.encode("utf-8").hex().upper() if sent_data != hex_LE_DATA_PACKET: print(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET}", file=sys.stderr) raise Exception(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET}") return "OK" @assert_description Loading Loading @@ -424,3 +432,23 @@ class L2CAPProxy(ProfileProxy): """ return "OK" @assert_description def MMI_UPPER_TESTER_SEND_LE_DATA_PACKET1(self, **kwargs): """ Upper Tester command IUT to send a non-segmented LE data packet to the PTS with any values. Description : The Implementation Under Test(IUT) should send none segmantation LE frame of LE data to the PTS. """ self.l2cap.SendData(connection=self.connection, data=bytes(self.LE_DATA_PACKET1, "utf-8")) return "OK" @assert_description def MMI_IUT_SEND_L2CAP_DATA(self, **kwargs): """ Using the Implementation Under Test(IUT), send L2CAP_Data over the assigned channel with correct DCID to the PTS. """ return "OK" android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/EXF" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="OPP" /> Loading android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/EXF" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="OPP" /> Loading android/pandora/server/configs/pts_bot_tests_config.json +11 −6 Original line number Diff line number Diff line Loading @@ -316,15 +316,26 @@ "HOGP/RH/HGRF/BV-10-I", "HOGP/RH/HGRF/BV-12-I", "L2CAP/COS/CED/BI-01-C", "L2CAP/COS/CED/BV-03-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/CFC/BV-01-C", "L2CAP/COS/CFC/BV-02-C", "L2CAP/COS/CFC/BV-03-C", "L2CAP/COS/CFC/BV-04-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/COS/ECH/BV-01-C", "L2CAP/COS/IEX/BV-02-C", "L2CAP/EXF/BV-01-C", "L2CAP/EXF/BV-02-C", "L2CAP/EXF/BV-03-C", "L2CAP/EXF/BV-05-C", "L2CAP/LE/CFC/BI-01-C", "L2CAP/LE/CFC/BV-01-C", "L2CAP/LE/CFC/BV-02-C", Loading Loading @@ -755,7 +766,6 @@ "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", Loading @@ -766,14 +776,9 @@ "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 +33 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ from typing import Optional class L2CAPProxy(ProfileProxy): test_status_map = {} # record test status and pass them between MMI LE_DATA_PACKET_LARGE = "data: LE_DATA_PACKET_LARGE" LE_DATA_PACKET1 = "data: LE_PACKET1" connection: Optional[Connection] = None def __init__(self, channel): Loading Loading @@ -101,6 +102,10 @@ class L2CAPProxy(ProfileProxy): ) # not strictly necessary, but can save time on waiting connection tests_to_open_bluetooth_server_socket = [ "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/LE/CFC/BV-03-C", "L2CAP/LE/CFC/BV-05-C", "L2CAP/LE/CFC/BV-06-C", Loading Loading @@ -138,7 +143,7 @@ class L2CAPProxy(ProfileProxy): return "OK" @match_description def MMI_UPPER_TESTER_CONFIRM_LE_DATA(self, sent_data: str, **kwargs): def MMI_UPPER_TESTER_CONFIRM_LE_DATA(self, sent_data: str, test: str, **kwargs): """ Did the Upper Tester send the data (?P<sent_data>[0-9A-F]*) to to the PTS\? Click Yes if it matched, otherwise click No. Loading @@ -146,10 +151,13 @@ class L2CAPProxy(ProfileProxy): Description: The Implementation Under Test \(IUT\) send data is receive correctly in the PTS. """ hex_LE_DATA_PACKET_LARGE = self.LE_DATA_PACKET_LARGE.encode("utf-8").hex().upper() if sent_data != hex_LE_DATA_PACKET_LARGE: print(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET_LARGE}", file=sys.stderr) raise Exception(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET_LARGE}") if test == 'L2CAP/COS/CFC/BV-02-C': hex_LE_DATA_PACKET = self.LE_DATA_PACKET1.encode("utf-8").hex().upper() else: hex_LE_DATA_PACKET = self.LE_DATA_PACKET_LARGE.encode("utf-8").hex().upper() if sent_data != hex_LE_DATA_PACKET: print(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET}", file=sys.stderr) raise Exception(f"data not match, sent_data:{sent_data} and {hex_LE_DATA_PACKET}") return "OK" @assert_description Loading Loading @@ -424,3 +432,23 @@ class L2CAPProxy(ProfileProxy): """ return "OK" @assert_description def MMI_UPPER_TESTER_SEND_LE_DATA_PACKET1(self, **kwargs): """ Upper Tester command IUT to send a non-segmented LE data packet to the PTS with any values. Description : The Implementation Under Test(IUT) should send none segmantation LE frame of LE data to the PTS. """ self.l2cap.SendData(connection=self.connection, data=bytes(self.LE_DATA_PACKET1, "utf-8")) return "OK" @assert_description def MMI_IUT_SEND_L2CAP_DATA(self, **kwargs): """ Using the Implementation Under Test(IUT), send L2CAP_Data over the assigned channel with correct DCID to the PTS. """ return "OK"
android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/EXF" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="OPP" /> Loading
android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <option name="profile" value="HID/HOS" /> <option name="profile" value="HOGP" /> <option name="profile" value="L2CAP/COS" /> <option name="profile" value="L2CAP/EXF" /> <option name="profile" value="L2CAP/LE" /> <option name="profile" value="MAP" /> <option name="profile" value="OPP" /> Loading
android/pandora/server/configs/pts_bot_tests_config.json +11 −6 Original line number Diff line number Diff line Loading @@ -316,15 +316,26 @@ "HOGP/RH/HGRF/BV-10-I", "HOGP/RH/HGRF/BV-12-I", "L2CAP/COS/CED/BI-01-C", "L2CAP/COS/CED/BV-03-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/CFC/BV-01-C", "L2CAP/COS/CFC/BV-02-C", "L2CAP/COS/CFC/BV-03-C", "L2CAP/COS/CFC/BV-04-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/COS/ECH/BV-01-C", "L2CAP/COS/IEX/BV-02-C", "L2CAP/EXF/BV-01-C", "L2CAP/EXF/BV-02-C", "L2CAP/EXF/BV-03-C", "L2CAP/EXF/BV-05-C", "L2CAP/LE/CFC/BI-01-C", "L2CAP/LE/CFC/BV-01-C", "L2CAP/LE/CFC/BV-02-C", Loading Loading @@ -755,7 +766,6 @@ "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", Loading @@ -766,14 +776,9 @@ "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