Example #1
0
 def test_L2CAP_COS_CED_BV_04_C(self):
     """
     L2CAP/COS/CED/BV-04-C [Disconnect]
     Verify that the IUT is able to disconnect the data channel.
     """
     with self._dut_connection_stream() as dut_connection_stream, \
         self._dut_connection_close_stream() as dut_connection_close_stream:
         psm = 1
         retransmission_mode = l2cap_facade_pb2.RetransmissionFlowControlMode.BASIC
         self.device_under_test.l2cap.SetDynamicChannel(
             l2cap_facade_pb2.SetEnableDynamicChannelRequest(psm=psm, retransmission_mode=retransmission_mode))
         self._assert_connection_complete(dut_connection_stream)
         time.sleep(2)
         self.device_under_test.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=psm))
         self._assert_connection_close(dut_connection_close_stream)
Example #2
0
    def test_L2CAP_COS_CFD_BV_08_C(self):
        """
        L2CAP/COS/CFD/BV-08-C [Non-blocking Config Response]
        Verify that the IUT does not block transmitting L2CAP_ConfigRsp while waiting for L2CAP_ConfigRsp
        from the Lower Tester.
        """
        with self._dut_connection_stream() as dut_connection_stream, \
            self._dut_connection_close_stream() as dut_connection_close_stream:
            psm = 1

            self.device_under_test.l2cap.OpenChannel(
                l2cap_facade_pb2.OpenChannelRequest(remote=self.pts_address, psm=psm))
            self._assert_connection_complete(dut_connection_stream)
            self.device_under_test.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=psm))
            self._assert_connection_close(dut_connection_close_stream)
Example #3
0
    def test_L2CAP_COS_CED_BV_01_C(self):
        """
        L2CAP/COS/CED/BV-01-C [Request Connection]
        Verify that the IUT is able to request the connection establishment for an L2CAP data channel and
        initiate the configuration procedure.
        """
        with self._dut_connection_stream() as dut_connection_stream, \
            self._dut_connection_close_stream() as dut_connection_close_stream:
            psm = 1
            self.device_under_test.l2cap.OpenChannel(
                l2cap_facade_pb2.OpenChannelRequest(remote=self.pts_address, psm=psm))
            self._assert_connection_complete(dut_connection_stream)

            self.device_under_test.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=psm))
            self._assert_connection_close(dut_connection_close_stream)
Example #4
0
 def close_channel(self):
     self._device.l2cap.CloseChannel(
         l2cap_facade_pb2.CloseChannelRequest(psm=self._psm))