CN108563594B - Data transmission method and device and USB adapter - Google Patents
Data transmission method and device and USB adapter Download PDFInfo
- Publication number
- CN108563594B CN108563594B CN201810253921.7A CN201810253921A CN108563594B CN 108563594 B CN108563594 B CN 108563594B CN 201810253921 A CN201810253921 A CN 201810253921A CN 108563594 B CN108563594 B CN 108563594B
- Authority
- CN
- China
- Prior art keywords
- usb
- data transmission
- signal
- data
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/38—Universal adapter
- G06F2213/3814—Wireless link with a computer system port
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/38—Universal adapter
- G06F2213/3852—Converter between protocols
Abstract
The invention discloses a data transmission method, which is applied to first equipment and comprises the following steps: detecting a device type of a second device connected with the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a Universal Serial Bus (USB) state; wherein the first signal is used for representing a data transmission direction; and determining whether the first device is a data sender or a data receiver according to the first signal, and informing a Central Processing Unit (CPU) of the first device of a determination result so that the CPU performs data transmission according to the determination result. Meanwhile, the invention also discloses a data transmission device and a USB adapter. By adopting the technical scheme of the invention, the rapid data transmission between the electronic devices can be realized, and the use experience of a user is improved.
Description
Technical Field
The invention relates to the technical field of computer processing, in particular to a data transmission method, a data transmission device and a USB adapter.
Background
At present, there are several ways to transfer and backup a file in an electronic device to another electronic device:
transfer through a cloud disk, however, this mode of transport is slow;
due to the fact that the storage capacity of the USB flash disk is small, files in one electronic device can be transmitted to another electronic device only by repeatedly copying the files for many times;
the transfer is done by a mobile hard disk, which requires extra cost to purchase, although in most cases it is only possible to copy once.
Therefore, how to transfer a file in one electronic device to another electronic device conveniently and quickly becomes a technical problem to be solved urgently.
Disclosure of Invention
In view of this, the present invention provides a data transmission method, a data transmission device and a USB adapter, which can achieve fast data transmission between electronic devices and improve user experience.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data transmission method, which is applied to a first device, and the method includes:
detecting a device type of a second device connected with the first device;
when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a Universal Serial Bus (USB) state; wherein the first signal is used for representing a data transmission direction;
determining whether the first device is a data sender or a data receiver according to the first signal, and notifying a Central Processing Unit (CPU) of the first device of a determination result, so that the CPU performs data transmission according to the determination result.
In the foregoing scheme, optionally, the method further includes:
if the determination result is that the first device is a data sender, the CPU transmits a file designated by a user to the second device through a USB data transmission channel;
if the determination result is that the first device is a data receiver, the CPU receives the file transmitted by the second device through the USB data transmission channel;
and establishing a USB data transmission channel between the first device and the second device.
In the foregoing solution, optionally, the establishing a USB data transmission channel between the first device and the second device includes:
the first equipment and the second equipment establish a USB data transmission channel in a wired mode; or
And the first equipment and the second equipment establish a USB data transmission channel in a wireless mode.
In the foregoing solution, optionally, the acquiring a first signal for characterizing a USB state includes:
receiving a first operation input by a user through an interactive interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
and generating a first signal for representing the USB state according to the first operation.
In a second aspect, an embodiment of the present invention provides a data transmission apparatus, which is applied to a first device, and the apparatus includes:
the user interaction module is used for providing an interaction interface and receiving a first operation input by a user through the interaction interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
the USB adapter is used for detecting the device type of a second device connected with the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; wherein the first signal is used for representing the data transmission direction; determining whether the first device is a data sender or a data receiver according to the first signal
And informing the CPU of the first equipment of the determination result so that the CPU carries out data transmission according to the determination result.
In the foregoing solution, optionally, the user interaction module is further configured to:
calling and displaying files which can be transmitted in the first equipment;
and determining the file to be transmitted according to the selection operation of the user.
In the foregoing solution, optionally, the USB adapter is further configured to:
establishing a USB data transmission channel between the first device and the second device;
if the first equipment is determined to be a data sender, the USB data transmission channel is used as a channel for the CPU to transmit a file designated by a user to the second equipment;
and if the first equipment is determined to be a data receiver, the USB data transmission channel is used as a channel for the CPU to receive the file transmitted by the second equipment.
In a third aspect, an embodiment of the present invention provides a USB adapter, where the USB adapter includes:
a USB socket for connecting with a first device;
a Control code set (CC) controller for detecting a device type of a second device connected to the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a Universal Serial Bus (USB) state; wherein the first signal is used for representing a data transmission direction; determining whether the first device is a data sender or a data receiver according to the first signal, and informing a Central Processing Unit (CPU) of the first device of a determination result so that the CPU performs data transmission according to the determination result;
and the external connector is connected with the CC controller through two pin wires and is used for being connected with second equipment.
In the foregoing solution, optionally, the CC controller is further configured to be connected to the CPU of the first device through a pin line.
In the foregoing solution, optionally, the external connector includes:
and the wired communication module is used for establishing a USB data transmission channel with the second equipment in a wired mode.
In the foregoing solution, optionally, the external connector further includes:
and the wireless communication module is used for establishing a USB data transmission channel with the second equipment in a wireless mode.
According to the technical scheme provided by the embodiment of the invention, the equipment type of second equipment connected with the first equipment is detected; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; wherein the first signal is used for representing a data transmission direction; the first device is determined to be a data sending party or a data receiving party according to the first signal, the determination result is notified to a CPU of the first device, and data transmission is carried out by the CPU according to the determination result.
Drawings
Fig. 1 is a schematic flow chart illustrating an implementation of a data transmission method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data transmission device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a USB adapter according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a connection relationship between the CC controller and the CPU and the external connector according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a USB adapter according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating data transmission between a first device and a second device according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
An embodiment of the present invention provides a data transmission method, which is applied to a first device, and as shown in fig. 1, the method mainly includes:
Wherein the device type includes: a device that can share data with the first device, a device that cannot share data with the first device.
Here, the first device may be a notebook, a tablet, a desktop, or the like.
For example, the device capable of sharing data with the first device may be a notebook, a tablet, a desktop, or the like; the device that cannot share data with the first device may be a power supply device, a display, or the like.
In some optional embodiments, the second device is a device that can be connected to the first device through a USB adapter, for example, a device that supports USB data communication, such as a notebook, a tablet computer, and a desktop, a device that supplies power through a USB interface, such as a power supply device, or a device that charges through a USB interface, such as a display.
102, when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; wherein the first signal is used for indicating a data transmission direction.
In some optional embodiments, the obtaining a first signal for characterizing a USB state includes:
receiving a first operation input by a user through an interactive interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
and generating a first signal for representing the USB state according to the first operation.
Here, the interactive Interface may be a User Interface (UI).
Specifically, an APP for human-computer interaction is installed on a first device, and a user can specify whether the first device is a sender or a receiver through an interactive interface provided by the APP.
Wherein the first operation includes, but is not limited to, a manual input operation, a voice operation.
The CC controller is connected with the CPU through a pin wire; the CC controller is connected with the external connector through two pin wires. The out-to-out connector of the first device is connected with the out-to-out connector of the second device.
When the first device is connected with the second device in a wireless mode, the following is also displayed on the interactive interface: the identity of the recipient device, e.g., when multiple devices are present that can act as second devices, selects one or more of the receiving devices. In this scenario, it is possible to implement a first device to transfer a file to a plurality of second devices simultaneously.
In practical application, a first Type-C connector on a first USB adapter connected with a first device can be connected with a second Type-C connector on a second USB adapter connected with a second device. The CC controller (such as CC Logic) on the first USB adapter is connected with the first Type-C connector through two pins CC1 and CC 2; since at least 4 sets of signals can be generated through two pins of CC1 and CC2, when one set of signals, such as CC1 and CC2, are both 0, it indicates that the second device connected to the first device is a device capable of sharing data with the first device. Here, the function of the Type-C connector is to connect with a connector of a second device.
Thus, the CC controller can determine what device the first device is connected to, such as a PC, a USB device, a power device, or a display, through the two pins CC1 and CC 2.
It should be noted that, if the acquired signal is not the first signal, the determination of whether the first device is the data sending side or the data receiving side is not performed. That is, when it is detected that the external device is a power source or a display, the determination of the receiver or the sender is not performed.
In some optional embodiments, a CC controller (e.g., CC Logic) on a first USB adapter connected to a first device is connected to a CPU (e.g., SOC) in the first device through a pin, and a first signal is transmitted to the CPU through the pin, where the first signal is used to indicate an identifier of USB _ ID, such as USB _ ID ═ 0, indicating that the first device is a transmitting end (transmitting end), and USB _ ID ═ 1, indicating that the first device is a receiving end (receiving end); the CPU determines whether the first device is specifically a sender or a receiver according to the received first signal.
In this way, by giving the first signal representing the USB state, the problem that data transmission is not supported because the identification of the USB _ ID is not specified is solved.
In some optional embodiments, further optionally, the method further comprises:
if the determination result is that the first device is a data sender, the CPU transmits a file designated by a user to the second device through a USB data transmission channel;
if the determination result is that the first device is a data receiver, the CPU receives the file transmitted by the second device through the USB data transmission channel;
and establishing a USB data transmission channel between the first device and the second device.
That is, the CPU of the transmitting side transmits data designated by the user of the transmitting side to the receiving side. Here, the data may be data representing text, or data representing pictures, or data representing audio, or data representing video, and so on.
In some optional embodiments, optionally, the transmitting, by the CPU, the file designated by the user to the second device through the USB data transmission channel includes:
calling and displaying files which can be transmitted in the first equipment;
and determining the file to be transmitted according to the selection operation of the user.
In some optional embodiments, optionally, the transmitting, by the CPU, the file designated by the user to the second device through the USB data transmission channel includes:
outputting prompt information to remind a user of selecting a file to be transmitted;
and compressing the file selected by the user, and sending the compressed file to the second equipment.
In some optional embodiments, establishing a USB data transmission channel between the first device and the second device includes:
and the first equipment and the second equipment establish a USB data transmission channel in a wired mode.
For example, the first device implements a wireless communication function with the second device through a wireless USB.
In some optional embodiments, establishing a USB data transmission channel between the first device and the second device includes:
and the first equipment and the second equipment establish a USB data transmission channel in a wireless mode.
For example, the first device and the second device establish a USB data transmission channel through a cable.
The embodiment of the invention does not limit the establishing mode of the USB data transmission channel.
According to the technical scheme provided by the embodiment of the invention, the equipment type of second equipment connected with the first equipment is detected; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; wherein the first signal is used for representing a data transmission direction; the first device is determined to be a data sending party or a data receiving party according to the first signal, the determination result is notified to a CPU of the first device, and data transmission is carried out by the CPU according to the determination result.
An embodiment of the present invention provides a data transmission apparatus, which is applied to a first device, and as shown in fig. 2, the apparatus includes:
the user interaction module 10 is used for providing an interaction interface and receiving a first operation input by a user through the interaction interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
a USB adapter 20 for detecting a device type of a second device connected to the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; wherein the first signal is used for representing the data transmission direction; and determining whether the first equipment is a data sender or a data receiver according to the first signal, and informing a CPU of the first equipment of a determination result so that the CPU performs data transmission according to the determination result.
In some optional embodiments, the user interaction module 10 is further configured to:
calling and displaying files which can be transmitted in the first equipment;
and determining the file to be transmitted according to the selection operation of the user.
In some optional embodiments, the USB adapter 20 is further configured to:
establishing a USB data transmission channel between the first device and the second device;
if the first equipment is determined to be a data sender, the USB data transmission channel is used as a channel for the CPU to transmit a file designated by a user to the second equipment;
and if the first equipment is determined to be a data receiver, the USB data transmission channel is used as a channel for the CPU to receive the file transmitted by the second equipment.
In some optional embodiments, the first device and the second device establish a USB data transmission channel by a wired manner.
In some optional embodiments, the first device and the second device establish a USB data transmission channel in a wireless manner.
In practical applications, the user interaction module 10 may be implemented by a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Programmable Gate Array (FPGA), or the like in the data transmission device or the first device to which the data transmission device belongs.
The data transmission device provided by the embodiment of the invention can quickly distinguish whether the first equipment is used as a data receiver or a data sender, thereby being beneficial to realizing quick data transmission between electronic equipment and improving the use experience of a user.
An embodiment of the present invention provides a USB adapter, which is applied to a first device, as shown in fig. 3, where the USB adapter 20 includes:
a USB socket 201 for connecting with a first device;
a control code set (CC) controller 202 for detecting a device type of a second device connected to the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a Universal Serial Bus (USB) state; wherein the first signal is used for representing a data transmission direction; determining whether the first device is a data sender or a data receiver according to the first signal, and informing a Central Processing Unit (CPU) of the first device of a determination result so that the CPU performs data transmission according to the determination result;
the external connector 203 is connected to the CC controller 202 via two pin lines, and is used for connection to a second device.
In some optional embodiments, the CC controller 202 is further configured to connect to the CPU of the first device through a pin line.
In practical applications, the USB socket 201 may be a USB plug (USB plug); the pair of external connectors 203 may be Type-C connectors that can be connected to connectors of a second device.
In some alternative embodiments, the pair of external connectors 203 includes:
the wired communication module 2031 is configured to establish a USB data transmission channel with the second device in a wired manner.
Here, the wired communication module 2031 may be a wired USB.
In some alternative embodiments, the pair of external connectors 203 further comprises:
a wireless communication module 2032, configured to establish a USB data transmission channel with the second device in a wireless manner.
Here, the wireless communication module 2032 may be a WUSB (wireless USB) for implementing a wireless communication function with the second device.
Here, the USB adapter can be connected to the USB interface provided by the first device, for example, the USB adapter is plugged into the USB interface provided by the first device.
The USB adapter provided by the embodiment of the invention is connected with the first equipment, so that whether the first equipment is used as a data receiver or a data sender can be quickly distinguished, and therefore, the quick data transmission between the electronic equipment is facilitated, and the use experience of a user is improved.
Fig. 4 is a schematic diagram of connection relationships between the CC controller and the CPU and the external connector according to an embodiment of the present invention, and as shown in fig. 4, the CC controller 202 (such as CC Logic) on the USB adapter is connected to the external connector 203 (such as Type-C connector) through two pins CC1 and CC 2; since at least 4 sets of signals can be generated through two pins of CC1 and CC2, when one set of signals, such as CC1 and CC2, are both 0, it indicates that the second device connected to the first device is a device capable of sharing data with the first device. Thus, the CC controller can determine what device is currently connected to the PC via the two pins CC1 and CC2, such as a PC, a USB device, a power device, or a display.
As shown in fig. 4, the CC controller 202 (e.g., CC Logic) on the USB adapter is connected to a CPU (e.g., SOC) in the first device through a pin, and transmits a first signal to the CPU through the pin, where the first signal is used to indicate an identifier of USB _ ID, such as USB _ ID being 0, indicating that the first device is a transmitting end (sender), and USB _ ID being 1, indicating that the first device is a receiving end (receiver); the CPU determines whether the first device is specifically a sender or a receiver according to the received first signal.
It should be noted that, if the CPU in the first device acquires the first signal, the determination of whether the first device is the data sender or the data receiver is not performed. That is, when it is detected that the external device is a power source or a display, the determination of the receiver or the sender is not performed.
Fig. 5 shows a schematic diagram of a USB adapter, which, as shown in fig. 5, comprises: USB plug (USB plug), USB Dute (such as CC controller), WUSB, Antenna (Antenna). The USB plug is responsible for being connected with the first equipment; the USB dual is responsible for judging whether the first device connected currently is used as a sender or a receiver; a WUSB responsible for implementing a wireless communication function with a second device; an antenna, an antenna required for wireless transmission.
Here, the second device may be a tablet, a television, a printer, a game machine, a DVD player, or the like.
The USB adapter described in this embodiment integrates the functions of the USB duet and the WUSB, and can support a high speed, such as a transmission speed of 5Gb/S or higher, in a wireless state.
Fig. 6 is a schematic diagram of data transmission performed by a first device and a second device according to an embodiment of the present invention, and as shown in fig. 6, both the first device and the second device can insert a USB adapter (i.e., a USB Dongle) into their respective USB interfaces, and both the first device and the second device are installed with an APP, where the APP can provide a UI interface for a user to select whether a currently controlled device is a sender or a receiver. For example, a PC is provided with a selection dialog box in which two keys are displayed, one being a sender and one being a receiver; if the user triggers the sender, the PC serves as the sender and sends data to another device; naturally, the other PC acts as the receiver. Certainly, due to the wireless transmission, the first device and the second device need to be paired and connected first, and after the connection is successful, according to the selection operation of the user on the UI interface, it is determined who the first device and the second device are used as the sender and who the first device and the second device are used as the receiver. This can support high transmission speeds, e.g., above 5Gb/S, in the wireless state.
It should also be understood that the various alternative embodiments set forth herein are merely exemplary for helping those skilled in the art better understand the technical solutions of the embodiments of the present invention, and should not be construed as limiting the embodiments of the present invention, and that those skilled in the art may make various changes and substitutions on the basis of the various alternative embodiments described herein, which should also be understood as a part of the embodiments of the present invention.
In addition, the description of the technical solutions herein focuses on emphasizing the differences among the various embodiments, and the same or similar parts may be referred to one another, and are not repeated for brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. A data transmission method is applied to a first device, and comprises the following steps:
detecting a device type of a second device connected with the first device;
when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing the USB state of a universal serial bus; the first signal is sent to a Central Processing Unit (CPU) of the first device through a pin according to a CC controller on a USB adapter connected with the first device; the first signal is used for representing the data transmission direction;
determining whether the first device is a data sender or a data receiver according to the first signal, and informing a Central Processing Unit (CPU) of the first device of a determination result so that the CPU performs data transmission according to the determination result; wherein the first signal is used for representing the identification of the USB _ ID.
2. The method of claim 1, further comprising:
if the determination result is that the first device is a data sender, the CPU transmits a file designated by a user to the second device through a USB data transmission channel;
if the determination result is that the first device is a data receiver, the CPU receives the file transmitted by the second device through the USB data transmission channel;
and establishing a USB data transmission channel between the first device and the second device.
3. The method of claim 2, wherein establishing a USB data transmission channel between the first device and the second device comprises:
the first equipment and the second equipment establish a USB data transmission channel in a wired mode; or
And the first equipment and the second equipment establish a USB data transmission channel in a wireless mode.
4. The method of claim 1, wherein obtaining the first signal characterizing the USB state comprises:
receiving a first operation input by a user through an interactive interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
and generating a first signal for representing the USB state according to the first operation.
5. A data transmission apparatus applied to a first device, the apparatus comprising:
the user interaction module is used for providing an interaction interface and receiving a first operation input by a user through the interaction interface; wherein the first operation is used for characterizing whether a user indicates the first device as a data sender or a data receiver;
the USB adapter is used for detecting the device type of a second device connected with the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing a USB state; the first signal is sent to a Central Processing Unit (CPU) of the first device through a pin according to a CC controller on a USB adapter connected with the first device; the first signal is used for representing the data transmission direction; determining whether the first device is a data sender or a data receiver according to the first signal, and informing a CPU of the first device of a determination result so that the CPU performs data transmission according to the determination result; wherein the first signal is used for representing the identification of the USB _ ID.
6. The apparatus of claim 5, wherein the user interaction module is further configured to:
calling and displaying files which can be transmitted in the first equipment;
and determining the file to be transmitted according to the selection operation of the user.
7. The apparatus of claim 5, wherein the USB adapter is further configured to:
establishing a USB data transmission channel between the first device and the second device;
if the first equipment is determined to be a data sender, the USB data transmission channel is used as a channel for the CPU to transmit a file designated by a user to the second equipment;
and if the first equipment is determined to be a data receiver, the USB data transmission channel is used as a channel for the CPU to receive the file transmitted by the second equipment.
8. A USB adapter, the USB adapter comprising:
a USB socket for connecting with a first device;
a control code set CC controller for detecting a device type of a second device connected to the first device; when the second device is determined to be a device capable of sharing data with the first device according to the device type, acquiring a first signal for representing the USB state of a universal serial bus; the first signal is sent to a Central Processing Unit (CPU) of the first device through a pin according to a CC controller on a USB adapter connected with the first device; the first signal is used for representing the data transmission direction; determining whether the first device is a data sender or a data receiver according to the first signal, and informing a Central Processing Unit (CPU) of the first device of a determination result so that the CPU performs data transmission according to the determination result; wherein the first signal is used for representing the identification of USB _ ID;
and the external connector is connected with the CC controller through two pin wires and is used for being connected with second equipment.
9. The USB adapter of claim 8, wherein the external-to-external connector comprises:
and the wired communication module is used for establishing a USB data transmission channel with the second equipment in a wired mode.
10. The USB adapter of claim 9, wherein the external-to-external connector further comprises:
and the wireless communication module is used for establishing a USB data transmission channel with the second equipment in a wireless mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810253921.7A CN108563594B (en) | 2018-03-26 | 2018-03-26 | Data transmission method and device and USB adapter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810253921.7A CN108563594B (en) | 2018-03-26 | 2018-03-26 | Data transmission method and device and USB adapter |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108563594A CN108563594A (en) | 2018-09-21 |
CN108563594B true CN108563594B (en) | 2022-03-25 |
Family
ID=63533245
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810253921.7A Active CN108563594B (en) | 2018-03-26 | 2018-03-26 | Data transmission method and device and USB adapter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108563594B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111062224B (en) * | 2019-10-30 | 2023-02-10 | 华为终端有限公司 | Content transmission method and terminal equipment |
CN113157233A (en) * | 2021-05-19 | 2021-07-23 | 高创(苏州)电子有限公司 | Display device |
CN114489548A (en) * | 2022-01-30 | 2022-05-13 | 深圳创维-Rgb电子有限公司 | Information sharing method and device, screen projector and computer readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105068958A (en) * | 2015-08-13 | 2015-11-18 | 小米科技有限责任公司 | Switching control method and device |
CN105183309A (en) * | 2015-08-13 | 2015-12-23 | 小米科技有限责任公司 | Switching control method and device |
CN204946001U (en) * | 2015-08-05 | 2016-01-06 | 庄忆芳 | USB Type-C modular converter |
CN105677600A (en) * | 2015-12-28 | 2016-06-15 | 联想(北京)有限公司 | Switching device and switching method |
CN105744075A (en) * | 2016-03-31 | 2016-07-06 | 大连楼兰科技股份有限公司 | Mobile phone interconnection method based on OTG technique |
CN105824771A (en) * | 2015-10-28 | 2016-08-03 | 维沃移动通信有限公司 | Electronic device and master-slave switching method and apparatus thereof |
CN106445858A (en) * | 2015-08-13 | 2017-02-22 | 联想(北京)有限公司 | Information processing method, information processing module and electronic device |
CN106897239A (en) * | 2015-12-21 | 2017-06-27 | 小米科技有限责任公司 | state switching method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201216068A (en) * | 2010-10-07 | 2012-04-16 | Hon Hai Prec Ind Co Ltd | System and method for accessing data of a USB storage with two interfaces |
CN106385304B (en) * | 2016-08-31 | 2019-10-25 | 华为技术有限公司 | Data transmission method, equipment and system |
-
2018
- 2018-03-26 CN CN201810253921.7A patent/CN108563594B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN204946001U (en) * | 2015-08-05 | 2016-01-06 | 庄忆芳 | USB Type-C modular converter |
CN105068958A (en) * | 2015-08-13 | 2015-11-18 | 小米科技有限责任公司 | Switching control method and device |
CN105183309A (en) * | 2015-08-13 | 2015-12-23 | 小米科技有限责任公司 | Switching control method and device |
CN106445858A (en) * | 2015-08-13 | 2017-02-22 | 联想(北京)有限公司 | Information processing method, information processing module and electronic device |
CN105824771A (en) * | 2015-10-28 | 2016-08-03 | 维沃移动通信有限公司 | Electronic device and master-slave switching method and apparatus thereof |
CN106897239A (en) * | 2015-12-21 | 2017-06-27 | 小米科技有限责任公司 | state switching method and device |
CN105677600A (en) * | 2015-12-28 | 2016-06-15 | 联想(北京)有限公司 | Switching device and switching method |
CN105744075A (en) * | 2016-03-31 | 2016-07-06 | 大连楼兰科技股份有限公司 | Mobile phone interconnection method based on OTG technique |
Also Published As
Publication number | Publication date |
---|---|
CN108563594A (en) | 2018-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108200170B (en) | Message processing method and device and readable storage medium | |
CN108563594B (en) | Data transmission method and device and USB adapter | |
US9323697B2 (en) | Computer system audio device switching | |
TWI628972B (en) | Method and apparatus for matching a wireless device | |
CN107329717B (en) | Processing method, display method and display system of screen display information | |
US11243595B2 (en) | Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker | |
US9990328B2 (en) | Increased data flow in universal serial bus (USB) cables | |
KR20120112410A (en) | Configurable connector for system-level communication | |
US20160195897A1 (en) | Multi-device docking station | |
CN107360633B (en) | Pairing connection method and device of virtual reality system and virtual reality system | |
KR20140006584A (en) | Method and system for transferring data between portable terminal and external device | |
CN109739787B (en) | Mainboard, display card, electronic equipment and data transmission method | |
US10200789B2 (en) | Method for configuring an audio rendering and/or acquiring device, and corresponding audio rendering and/or acquiring device, system, computer readable program product and computer readable storage medium | |
CN107209378B (en) | Head-mounted display device and head-mounted display system | |
CN103888907A (en) | Cross-terminal file transmission method, terminal equipment, and system | |
CN110018978B (en) | Data transmission method and system | |
CN218825507U (en) | Dual-interface device and projection equipment | |
KR101988030B1 (en) | Keyboard system | |
KR20180024881A (en) | Content providing device and power source controlling method thereof | |
EP3179361A1 (en) | External display system and external display method therefor | |
US10602273B2 (en) | Audio playing apparatus and audio transmission circuit | |
CN107360634B (en) | Data transmission method and device and mobile terminal | |
CN107306000B (en) | A kind of method and apparatus of interface configuration | |
CN111176605A (en) | Audio output method and electronic equipment | |
CN112558900A (en) | Screen projection method, content source device and content receiving device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |