add more method to connect to device

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>