Loading android/pandora/mmi2grpc/mmi2grpc/pan.py +31 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ from mmi2grpc._proxy import ProfileProxy from pandora.host_grpc import Host from pandora_experimental.pan_grpc import PAN from pandora_experimental._android_grpc import Android # IP address of PTS TSPX_PTS_IP_ADDRESS = "192.168.168.100" class PANProxy(ProfileProxy): Loading @@ -28,6 +32,7 @@ class PANProxy(ProfileProxy): super().__init__(channel) self.host = Host(channel) self.pan = PAN(channel) self._android = Android(channel) def TSC_BNEP_mmi_iut_accept_transport(self, pts_addr: bytes, **kwargs): """ Loading Loading @@ -226,3 +231,29 @@ class PANProxy(ProfileProxy): """ return "OK" @assert_description def TSC_PAN_mmi_iut_icmp_echo_request(self, **kwargs): """ Take action to send ICMP echo request """ self._android.SendPing(ip_address=TSPX_PTS_IP_ADDRESS) return "OK" @assert_description def TSC_PAN_mmi_iut_receive_icmp_echo_reply(self, **kwargs): """ Has the IUT received the ICMP echo reply from PTS? """ return "OK" @assert_description def TSC_PAN_mmi_iut_send_dns_request(self, **kwargs): """ Take action to send DNS request """ return "OK" android/pandora/server/configs/pts_bot_tests_config.json +6 −0 Original line number Diff line number Diff line Loading @@ -551,8 +551,10 @@ "PAN/GN/MISC/UUID/BV-01-C", "PAN/GN/MISC/UUID/BV-02-C", "PAN/NAP/SDP/BV-01-C", "PAN/PANU/IP/APP/BV-03-I", "PAN/PANU/IP/APP/BV-05-I", "PAN/PANU/IP/DHCP/BV-03-I", "PAN/PANU/IP/DNS/BV-01-I", "PBAP/PSE/GOEP/BC/BV-03-I", "PBAP/PSE/GOEP/CON/BV-02-C", "PBAP/PSE/GOEP/ROB/BV-01-C", Loading Loading @@ -1855,7 +1857,11 @@ "TSPC_PAN_2_18": true, "TSPC_PAN_4_1": true, "TSPC_PAN_4_2": true, "TSPC_PAN_4_3": true, "TSPC_PAN_4_4": true, "TSPC_PAN_4_5": true, "TSPC_PAN_4_9": true, "TSPC_PAN_4_10": true, "TSPC_PBAP_1_2": true, "TSPC_PBAP_9_1": true, "TSPC_PBAP_9_2": true, Loading android/pandora/server/src/com/android/pandora/AndroidInternal.kt +11 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,17 @@ class AndroidInternal(val context: Context) : AndroidImplBase(), Closeable { } } override fun sendPing( request: SendPingRequest, responseObserver: StreamObserver<Empty> ) { grpcUnary<Empty>(scope, responseObserver) { val pingStatus = Runtime.getRuntime().exec("ping -I bt-pan -c 1 ${request.ipAddress}").waitFor() Empty.getDefaultInstance() } } suspend private fun waitAndSelectBluetoothDevice() { var selectJob = scope.async { Loading pandora/interfaces/pandora_experimental/_android.proto +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ service Android { rpc AcceptIncomingFile(google.protobuf.Empty) returns (google.protobuf.Empty); // Send file rpc SendFile(google.protobuf.Empty) returns (google.protobuf.Empty); // Send ping rpc SendPing(SendPingRequest) returns (google.protobuf.Empty); } message LogRequest { Loading Loading @@ -49,3 +51,8 @@ message InternalConnectionRef { bytes address = 1; int32 transport = 2; } // Request for the `SendPing` rpc. message SendPingRequest { string ip_address = 1; } No newline at end of file Loading
android/pandora/mmi2grpc/mmi2grpc/pan.py +31 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ from mmi2grpc._proxy import ProfileProxy from pandora.host_grpc import Host from pandora_experimental.pan_grpc import PAN from pandora_experimental._android_grpc import Android # IP address of PTS TSPX_PTS_IP_ADDRESS = "192.168.168.100" class PANProxy(ProfileProxy): Loading @@ -28,6 +32,7 @@ class PANProxy(ProfileProxy): super().__init__(channel) self.host = Host(channel) self.pan = PAN(channel) self._android = Android(channel) def TSC_BNEP_mmi_iut_accept_transport(self, pts_addr: bytes, **kwargs): """ Loading Loading @@ -226,3 +231,29 @@ class PANProxy(ProfileProxy): """ return "OK" @assert_description def TSC_PAN_mmi_iut_icmp_echo_request(self, **kwargs): """ Take action to send ICMP echo request """ self._android.SendPing(ip_address=TSPX_PTS_IP_ADDRESS) return "OK" @assert_description def TSC_PAN_mmi_iut_receive_icmp_echo_reply(self, **kwargs): """ Has the IUT received the ICMP echo reply from PTS? """ return "OK" @assert_description def TSC_PAN_mmi_iut_send_dns_request(self, **kwargs): """ Take action to send DNS request """ return "OK"
android/pandora/server/configs/pts_bot_tests_config.json +6 −0 Original line number Diff line number Diff line Loading @@ -551,8 +551,10 @@ "PAN/GN/MISC/UUID/BV-01-C", "PAN/GN/MISC/UUID/BV-02-C", "PAN/NAP/SDP/BV-01-C", "PAN/PANU/IP/APP/BV-03-I", "PAN/PANU/IP/APP/BV-05-I", "PAN/PANU/IP/DHCP/BV-03-I", "PAN/PANU/IP/DNS/BV-01-I", "PBAP/PSE/GOEP/BC/BV-03-I", "PBAP/PSE/GOEP/CON/BV-02-C", "PBAP/PSE/GOEP/ROB/BV-01-C", Loading Loading @@ -1855,7 +1857,11 @@ "TSPC_PAN_2_18": true, "TSPC_PAN_4_1": true, "TSPC_PAN_4_2": true, "TSPC_PAN_4_3": true, "TSPC_PAN_4_4": true, "TSPC_PAN_4_5": true, "TSPC_PAN_4_9": true, "TSPC_PAN_4_10": true, "TSPC_PBAP_1_2": true, "TSPC_PBAP_9_1": true, "TSPC_PBAP_9_2": true, Loading
android/pandora/server/src/com/android/pandora/AndroidInternal.kt +11 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,17 @@ class AndroidInternal(val context: Context) : AndroidImplBase(), Closeable { } } override fun sendPing( request: SendPingRequest, responseObserver: StreamObserver<Empty> ) { grpcUnary<Empty>(scope, responseObserver) { val pingStatus = Runtime.getRuntime().exec("ping -I bt-pan -c 1 ${request.ipAddress}").waitFor() Empty.getDefaultInstance() } } suspend private fun waitAndSelectBluetoothDevice() { var selectJob = scope.async { Loading
pandora/interfaces/pandora_experimental/_android.proto +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ service Android { rpc AcceptIncomingFile(google.protobuf.Empty) returns (google.protobuf.Empty); // Send file rpc SendFile(google.protobuf.Empty) returns (google.protobuf.Empty); // Send ping rpc SendPing(SendPingRequest) returns (google.protobuf.Empty); } message LogRequest { Loading Loading @@ -49,3 +51,8 @@ message InternalConnectionRef { bytes address = 1; int32 transport = 2; } // Request for the `SendPing` rpc. message SendPingRequest { string ip_address = 1; } No newline at end of file