A method for establishing a connection between two terminal devices having Universal Serial Bus, USB, Type-C interfaces, wherein the method comprises: determining (S210), by a first terminal device, that a USB cable is connected to a USB Type-C interface of the first terminal device, wherein a first USB plug of the USB cable is inserted into the USB Type-C interface of the first terminal device, and a second USB plug of the USB cable is inserted into a USB Type-C interface of a second terminal device; determining (S220), by the first terminal device, a role configuration type supported by the second terminal device, wherein the role configuration type is one of the following: a dual role port, DRP, device, a downstreaming facing port, DFP, device, or an upstreaming facing port, UFP, device; establishing (S230), by the first terminal device, a first USB connection to the second terminal device; displaying (S240), by the first terminal device, role information that is of the first terminal device and the second terminal device during establishment of the first USB connection and role configuration types supported by the first terminal device and the second terminal device; receiving (S250), by the first terminal device, role configuration information of a user of the first terminal device, wherein the role configuration information instructs the user of the first terminal device to choose to change the role information that is of the first terminal device and the second terminal device during establishment of the first USB connection; and establishing (S260), by the first terminal device, a second USB connection to the second terminal device by using changed role information. determining (S210), by a first terminal device, that a USB cable is connected to a USB Type-C interface of the first terminal device, wherein a first USB plug of the USB cable is inserted into the USB Type-C interface of the first terminal device, and a second USB plug of the USB cable is inserted into a USB Type-C interface of a second terminal device; determining (S220), by the first terminal device, a role configuration type supported by the second terminal device, wherein the role configuration type is one of the following: a dual role port, DRP, device, a downstreaming facing port, DFP, device, or an upstreaming facing port, UFP, device; establishing (S230), by the first terminal device, a first USB connection to the second terminal device; displaying (S240), by the first terminal device, role information that is of the first terminal device and the second terminal device during establishment of the first USB connection and role configuration types supported by the first terminal device and the second terminal device; receiving (S250), by the first terminal device, role configuration information of a user of the first terminal device, wherein the role configuration information instructs the user of the first terminal device to choose to change the role information that is of the first terminal device and the second terminal device during establishment of the first USB connection; and establishing (S260), by the first terminal device, a second USB connection to the second terminal device by using changed role information. <EOS>