def gen_hcitool_cmd(ogf: int, ocf: int, params: str, iface='hci0') ->str:
    """构造执行任意 HCI command 的 hcitool 命令。"""
    cmd_args = ['hcitool', '-i', iface, 'cmd', hex(ogf), hex(ocf), params]
    cmd = ' '.join(cmd_args)
    return cmd
