diff --git a/android/pandora/mmi2grpc/mmi2grpc/l2cap.py b/android/pandora/mmi2grpc/mmi2grpc/l2cap.py index 561c60097fb6d549f42f2fc6804e16fba2a3f584..b6db4829231094a15f91fac527e55b339afaf370 100644 --- a/android/pandora/mmi2grpc/mmi2grpc/l2cap.py +++ b/android/pandora/mmi2grpc/mmi2grpc/l2cap.py @@ -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): @@ -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", @@ -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. @@ -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 @@ -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" diff --git a/android/pandora/server/configs/PtsBotTest.xml b/android/pandora/server/configs/PtsBotTest.xml index ddc364f303d54c017af17b46b06527bf2c5929a4..e748a2e0efe613f4ab0b709dbfccc5bb03cad94d 100644 --- a/android/pandora/server/configs/PtsBotTest.xml +++ b/android/pandora/server/configs/PtsBotTest.xml @@ -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" /> diff --git a/android/pandora/server/configs/PtsBotTestMts.xml b/android/pandora/server/configs/PtsBotTestMts.xml index 3cba92e4f0ec07c164b85af964a1878479e25edc..127cb4fe19fa48333131b1e8dc14586f25181383 100644 --- a/android/pandora/server/configs/PtsBotTestMts.xml +++ b/android/pandora/server/configs/PtsBotTestMts.xml @@ -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" /> diff --git a/android/pandora/server/configs/pts_bot_tests_config.json b/android/pandora/server/configs/pts_bot_tests_config.json index 5fa3f63adb8985f297dca734442a08ff99a4072f..ee46909ec612e45724f291af900be6ccf8f81fd6 100644 --- a/android/pandora/server/configs/pts_bot_tests_config.json +++ b/android/pandora/server/configs/pts_bot_tests_config.json @@ -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", @@ -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", @@ -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",