def hdl_wid_5(desc): stack = get_stack() btp.gap_set_nonconn() btp.gap_set_nondiscov() btp.gap_adv_ind_on(ad=stack.gap.ad, sd=stack.gap.sd) return True
def hdl_wid_72(desc): stack = get_stack() btp.gap_set_nondiscov() btp.gap_adv_ind_on(ad=stack.gap.ad) return True
def hdl_wid_72(_: WIDParams): stack = get_stack() btp.gap_set_conn() btp.gap_set_nondiscov() btp.gap_adv_ind_on(ad=stack.gap.ad) return True
def hdl_wid_72(desc): stack = get_stack() ad = [] btp.gap_set_nondiscov() if stack.gap.name: ad.append((AdType.name_short, hexlify(stack.gap.name))) btp.gap_adv_ind_on(ad=ad) return True
def hdl_wid_80(desc): stack = get_stack() btp.gap_adv_off() btp.gap_set_nonconn() btp.gap_set_nondiscov() # Name cannot be used for AD Data in BlueZ because BlueZ alwasy use Name # for SD Data. So, override the AD data here. stack.gap.ad = {} stack.gap.ad[AdType.manufacturer_data] = 'FFFFABCD' btp.gap_adv_ind_on(ad=stack.gap.ad) return True
def hdl_wid_5(desc): stack = get_stack() ad = [] sd = [] btp.gap_set_nonconn() btp.gap_set_nondiscov() if stack.gap.name: ad.append((AdType.name_short, hexlify(stack.gap.name))) if stack.gap.manufacturer_data: sd.append((AdType.manufacturer_data, stack.gap.manufacturer_data)) btp.gap_adv_ind_on(ad=ad, sd=sd) return True