Example #1
0
def hdl_wid_14(_: WIDParams):
    """
    Implements: TSC_MMI_iut_disable_connection
    description: Initiate an L2CAP disconnection from the IUT to the PTS.
    """
    btp.l2cap_disconn(0)

    return True
Example #2
0
def hdl_wid_101(_: WIDParams):
    l2cap = get_stack().l2cap
    for channel in l2cap.channels:
        try:
            btp.l2cap_disconn(channel.id)
        except BTPError:
            logging.debug("Ignoring expected error on L2CAP disconnect")
    return True
Example #3
0
def hdl_wid_14(desc):
    """
    Implements: TSC_MMI_iut_disable_connection
    :param desc: Initiate an L2CAP disconnection from the IUT to the PTS.
    :return:
    """
    btp.l2cap_disconn(0)

    return True
Example #4
0
def hdl_wid_268(_: WIDParams):
    # PTS ask to disconnect channel with specified SCID and DCID, but we can just
    # disconnect last connected channel (1) to be conforming with TS

    btp.l2cap_disconn(1)

    # Wait for disconnected event before replying to PTS to avoid sending next
    # connect too soon
    get_stack().l2cap.wait_for_disconnection(1, 30)
    return True
Example #5
0
def hdl_wid_101(desc):
    l2cap = get_stack().l2cap
    for channel in l2cap.channels:
        btp.l2cap_disconn(channel.id)
    return True
Example #6
0
def hdl_wid_101(desc):
    btp.l2cap_disconn(0)
    return True