Method for establishing connection to external device via USB interface, and electronic device therefor

    公开(公告)号:US11068427B2

    公开(公告)日:2021-07-20

    申请号:US16636764

    申请日:2018-08-22

    IPC分类号: G06F13/38 G06F13/42

    摘要: An electronic device according to an embodiment of the present invention comprises: a universal serial bus (USB) interface; a processor electrically connected to the USB interface; and a memory electrically connected to the processor, wherein the memory may store instructions configured to, when executed, cause the processor to: enter a security mode; in the security mode, receive, from an external device connected to the electronic device via the USB interface, a USB class code corresponding to the external device; determine whether the USB class code is included in a white list of connectable devices allowed to be connected to the electronic device in the security mode; and control a communication connection between the external device and the electronic device according to whether the USB class code is included in the white list. Other embodiments are also possible.