Exemple #1
0
def hdl_wid_136(desc):
    btp.core_reg_svc_gatt()
    btp.gatts_add_svc(0, UUID.VND16_1)
    btp.gatts_add_char(0, Prop.read | Prop.auth_swrite,
                       Perm.read | Perm.write_authn, UUID.VND16_2)
    btp.gatts_set_val(0, '01')
    btp.gatts_start_server()
    return True
Exemple #2
0
def handle_wid_136_sec_csign_bi_04():
    """
    project_name: GAP
    wid: 136
    description: Please prepare a characteristic that is sign writable which
                 requires also requires authentication.
                 (Security mode 2 level 2) Press OK to continue.
    style: MMI_Style_Ok_Cancel1 0x11041
    response: 8238800 <type 'int'> 93825543207024
    response_size: 2048
    response_is_present: 0 <type 'int'>
    """
    btp.core_reg_svc_gatt()
    btp.gatts_add_svc(0, UUID.VND16_1)
    btp.gatts_add_char(0, Prop.read | Prop.auth_swrite,
                       Perm.read | Perm.write_authn, UUID.VND16_2)
    btp.gatts_set_val(0, '01')
    btp.gatts_start_server()

    return True
Exemple #3
0
def preconditions(iutctl):
    btp.core_reg_svc_gap(iutctl)
    btp.core_reg_svc_gatt(iutctl)
    iutctl.stack.gap_init()
    iutctl.stack.gatt_init()
    btp.gap_read_ctrl_info(iutctl)