Beispiel #1
0
def handle_wid_11(description):
    """
    project_name: GAP
    wid: 11
    style: MMI_Style_Ok_Cancel1 0x11041
    response: 14660912 <type 'int'> 93846430818344
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """
    return btp.check_discov_results(discovered=False)
Beispiel #2
0
def handle_wid_4(description):
    """
    project_name: GAP
    wid: 4
    style: MMI_Style_Ok_Cancel1 0x11041
    response: 19904912 <type 'int'> 94923915180128
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """
    return btp.check_discov_results()
Beispiel #3
0
def handle_wid_14(description):
    """
    project_name: GAP
    wid: 14
    style: MMI_Style_Ok_Cancel1 0x11041
    response: 14660912 <type 'int'> 94227700930624
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """
    return btp.check_discov_results()
Beispiel #4
0
def handle_wid_138(description):
    """
    project_name: GAP
    wid: 138
    description: Please confirm that IUT has received an Advertising Event and
                 the address was resolved successfully.
    style: MMI_Style_Yes_No1 0x11044
    response: 19904912 <type 'int'> 94824255738144
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """

    return btp.check_discov_results()
Beispiel #5
0
def handle_wid_157(description):
    """
    project_name: GAP
    wid: 157
    description: Please confirm that IUT has received an Advertising data of
                 "XYZW" And scan response data of "ABCD" Click Yes if IUT
                 receive advertising data and scan response data accordingly,
                 otherwise click No.
    style: MMI_Style_Yes_No1 0x11044
    response: 19904912 <type 'int'> 94535594534032
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """
    match = re.findall(r'\"([A-F0-9]+)\"', description)

    ad = match[0]
    sd = match[1]

    return btp.check_discov_results(eir=ad + sd)
Beispiel #6
0
def hdl_wid_14(desc):
    btp.gap_stop_discov()
    return btp.check_discov_results(discovered=True)
Beispiel #7
0
def hdl_wid_204(desc):
    btp.gap_start_discov(type='passive', mode='observe')
    sleep(10)
    btp.gap_stop_discov()
    return btp.check_discov_results()
Beispiel #8
0
def hdl_wid_157(desc):
    btp.gap_start_discov(transport='le', type='active', mode='observe')
    sleep(10)  # Give some time to discover devices
    btp.gap_stop_discov()
    return btp.check_discov_results()
Beispiel #9
0
def hdl_wid_11(desc):
    btp.gap_stop_discov()
    return btp.check_discov_results(discovered=False)
Beispiel #10
0
def hdl_wid_4(desc):
    sleep(10)  # Give some time to discover devices
    btp.gap_stop_discov()
    return btp.check_discov_results()
Beispiel #11
0
def hdl_wid_14(_: WIDParams):
    btp.gap_stop_discov()
    return btp.check_discov_results(discovered=True)