add new api to protect access and operation to conn and dev Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>