def test_s_frame_transmissions_exceed_max_transmit(self): """ L2CAP/ERM/BV-11-C [S-Frame Transmissions Exceed MaxTransmit] Verify the IUT will close the channel when the Monitor Timer expires. """ asserts.skip("Need to configure DUT to have a shorter timer") self._setup_link_from_cert() self.cert_l2cap.turn_on_ertm() (dut_channel, cert_channel) = self._open_channel(scid=0x41, psm=0x33, use_ertm=True) dut_channel.send(b'abc') # Retransmission timer = 2, 20 * monitor timer = 360, so total timeout is 362 time.sleep(362) assertThat(self.cert_l2cap.get_control_channel()).emits( L2capMatchers.DisconnectionRequest())
def test_i_frame_transmissions_exceed_max_transmit(self): """ L2CAP/ERM/BV-12-C [I-Frame Transmissions Exceed MaxTransmit] Verify the IUT will close the channel when it receives an S-frame [RR] with the final bit set that does not acknowledge the previous I-frame sent by the IUT. """ self._setup_link_from_cert() self.cert_l2cap.turn_on_ertm() (dut_channel, cert_channel) = self._open_channel(scid=0x41, psm=0x33, use_ertm=True) dut_channel.send(b'abc') assertThat(cert_channel).emits(L2capMatchers.IFrame(tx_seq=0)) cert_channel.send_s_frame(req_seq=0, f=Final.POLL_RESPONSE) assertThat(self.cert_l2cap.get_control_channel()).emits( L2capMatchers.DisconnectionRequest())
def verify_disconnect_request(self): assertThat(self._control_channel).emits( L2capMatchers.DisconnectionRequest(self._dcid, self._scid))