Example #1
0
def hdl_wid_77(_: WIDParams):
    try:
        btp.gap_wait_for_connection(5)
        btp.gap_disconn()
    except types.BTPError:
        logging.debug("Ignoring expected error on disconnect")
    return True
Example #2
0
def hdl_wid_22(desc):
    """
    Implements: TSC_MMI_iut_disable_acl_connection
    :param desc: Initiate an ACL disconnection from the IUT to the PTS.
    :return:
    """
    btp.gap_disconn()

    return True
Example #3
0
def hdl_wid_22(_: WIDParams):
    """
    Implements: TSC_MMI_iut_disable_acl_connection
    description: Initiate an ACL disconnection from the IUT to the PTS.
    """
    btp.gap_wait_for_connection()
    btp.gap_disconn()

    return True
Example #4
0
def disconnection_procedure(testcase, central, peripheral):
    periph_addr = peripheral.stack.gap.iut_addr_get()

    def verify_central(args):
        return verify_address(args, periph_addr)

    future_central = btp.gap_disconnected_ev(central, verify_central)
    future_peripheral = btp.gap_disconnected_ev(peripheral)

    btp.gap_disconn(central, peripheral.stack.gap.iut_addr_get())

    wait_futures([future_central, future_peripheral], timeout=EV_TIMEOUT)

    testcase.assertFalse(peripheral.stack.gap.is_connected())
    testcase.assertFalse(central.stack.gap.is_connected())
Example #5
0
    def test_ATT_Client_Discover_Primary_Services(self, iut, valid):
        btp.gap_conn(iut, self.config.tester_addr)
        btp.gap_wait_for_connection(iut)

        btp.gattc_disc_prim_svcs(iut, self.config.tester_addr)
        tuple_hdr, tuple_data = iut.btp_worker.read()
        try:
            btp.btp_hdr_check(tuple_hdr, defs.BTP_SERVICE_ID_GATT,
                              defs.GATT_DISC_PRIM_SVCS)
        except BTPErrorInvalidStatus:
            pass

        try:
            # In some test cases Defensics won't disconnect
            # so we have to try to disconnect ourselves
            btp.gap_disconn(iut, self.config.tester_addr)
        except BTPErrorInvalidStatus:
            pass
Example #6
0
    def test_ATT_Client_Read_Long_Attribute_Value(self, iut, valid):
        btp.gap_conn(iut, self.config.tester_addr)
        btp.gap_wait_for_connection(iut)

        btp.gattc_read_long(iut, self.config.tester_addr,
                            self.config.tester_read_hdl, 0)
        tuple_hdr, tuple_data = iut.btp_worker.read()
        try:
            btp.btp_hdr_check(tuple_hdr, defs.BTP_SERVICE_ID_GATT,
                              defs.GATT_READ_LONG)
        except BTPErrorInvalidStatus:
            pass

        try:
            # In some test cases Defensics won't disconnect
            # so we have to try to disconnect ourselves
            btp.gap_disconn(iut, self.config.tester_addr)
        except BTPErrorInvalidStatus:
            pass
Example #7
0
def hdl_wid_77(desc):
    btp.gap_disconn()
    return True
Example #8
0
def hdl_wid_3(desc):
    btp.gap_disconn(btp.pts_addr_get(), btp.pts_addr_type_get())
    return True
Example #9
0
def hdl_wid_77(desc):
    time.sleep(2)
    btp.gap_disconn()
    return True
def hdl_wid_3(desc):
    time.sleep(2)
    btp.gap_disconn(btp.pts_addr_get(), btp.pts_addr_type_get())
    return True
Example #11
0
def hdl_wid_3(_: WIDParams):
    btp.gap_disconn(btp.pts_addr_get(), btp.pts_addr_type_get())
    return True
Example #12
0
def hdl_wid_20115(_: WIDParams):
    btp.gap_disconn()
    return True
Example #13
0
def hdl_wid_102(desc):
    sleep(2)
    btp.gap_disconn()
    return True
Example #14
0
def hdl_wid_102(_: WIDParams):
    btp.gap_disconn()
    return get_stack().gap.wait_for_disconnection(30)
Example #15
0
def hdl_wid_85(desc):
    stack = get_stack()
    btp.gap_disconn()

    return True
Example #16
0
def hdl_wid_102(desc):
    btp.gap_disconn()
    return get_stack().gap.wait_for_disconnection(30)
Example #17
0
def hdl_wid_20115(desc):
    btp.gap_disconn()
    return True