Connector and communication system
By using multiple controllers, ports, and selection circuits in the connector design, and automatically setting the port role type using enable signals, the problem of frequent plugging and unplugging of communication devices is solved, enabling convenient data transmission between devices and extending connector life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-09
AI Technical Summary
When there are a large number of communication devices, frequent plugging and unplugging of connectors is inconvenient.
The connector design employs multiple controllers, multiple ports, and at least one selection circuit. The selection circuit is controlled by an enable signal to connect to the corresponding controller, and the port role type is automatically set to achieve communication connection between devices.
Data transmission can be switched between multiple devices without frequent plugging and unplugging of connectors, improving operational convenience and connector lifespan.
Smart Images

Figure CN122178156A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to connectors and communication systems. Background Technology
[0002] In the field of communication technology, communication devices need to be connected via connectors to transmit data. However, when there are a large number of communication devices, the frequent plugging and unplugging of connectors is inconvenient. Summary of the Invention
[0003] This application provides connectors, communication systems, communication methods, storage media, and program products to solve the problem of the inconvenience of frequent connector plugging and unplugging operations.
[0004] This application provides a connector including multiple controllers, multiple ports, and at least one selection circuit. The number of multiple controllers and multiple ports are the same and they are connected in a one-to-one correspondence. The selection circuit is connected to each of the multiple controllers. Multiple ports, all used to connect communication devices; The selection circuit is used to connect the first controller and the second controller among multiple controllers according to the state of the enable signal after detecting the state of the enable signal, so as to establish a communication connection between the first communication device and the second communication device. The first communication device is connected to the first port among multiple ports, and the second communication device is connected to the second port among multiple ports. The first port is the port connected to the first controller, and the second port is the port connected to the second controller. A first controller is configured to acquire configuration information from a first communication device and set the role type of a first port based on the configuration information; and a second controller is configured to acquire the role type of the first port from the first controller and set the role type of the second port based on the device type of the first port, so that the first communication device and the second communication device can perform communication operations according to the role type of the port connected to them.
[0005] This application also provides a communication system, including: Connector; Multiple communication devices; The connector is connected to multiple communication devices to enable communication between any two of the communication devices.
[0006] This application also provides a communication method applied to a connector, the connector including multiple controllers, multiple ports, and at least one selection circuit, the number of multiple controllers and multiple ports being the same and connected in a one-to-one correspondence, and the selection circuit being connected to each of the multiple controllers respectively; Multiple ports are connected to communication devices; After detecting the state of the enable signal, the selection circuit connects the first controller and the second controller among multiple controllers according to the state of the enable signal, so that the first communication device and the second communication device establish a communication connection. The first communication device is connected to the first port among multiple ports, and the second communication device is connected to the second port among multiple ports. The first port is the port connected to the first controller, and the second port is the port connected to the second controller. The first controller obtains configuration information from the first communication device and sets the role type of the first port according to the configuration information; Furthermore, the second controller obtains the role type of the first port from the first controller, and sets the role type of the second port according to the device type of the first port, so that the first communication device and the second communication device can perform communication operations according to the role type of the port to which they are connected.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a linker, implements the steps of any of the above-described communication methods.
[0008] This application also provides a computer program product, including a computer program that, when executed by a linker, implements the steps of any of the above-described communication methods.
[0009] According to this application, the connector includes multiple controllers, multiple ports, and at least one selection circuit. The number of controllers and ports is the same, and they are connected one-to-one. The selection circuit is connected to each of the controllers. Each port is used to connect to a communication device. The selection circuit can connect two corresponding communication devices based on the state of an enable signal. The controllers can set the role type of the ports, so that the first and second communication devices can perform communication operations according to the role type of the port they are connected to. This eliminates the need for repeated plugging and unplugging when switching between multiple devices for data transmission; instead, the corresponding communication link can be connected by setting the state of the enable signal, which is more convenient. Furthermore, it can improve the lifespan of the connector. Attached Figure Description
[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic diagram of the architecture of a connector provided in an embodiment of this application; Figure 2A schematic diagram of another connector architecture provided for an embodiment of this application; Figure 3 A schematic diagram of a communication system provided in an embodiment of this application; Figure 4 A flowchart illustrating a communication method provided in an embodiment of this application; Figure 5 This is a schematic diagram of another communication system provided in an embodiment of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0013] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] This application provides a connector, such as Figure 1 As shown, the connector may include multiple controllers, multiple ports, and at least one selection circuit.
[0016] The connector can be a Type-C connector, and the controller can be a Universal Serial Bus (USB) controller, supporting a Downstream Facing Port (DFP) and an Upstream Facing Port (UFP), which can have built-in pull-down resistors (Rd) and pull-up resistors (Rp), a configurable General-Purpose Input / Output (GPIO) interface, an Inter-Integrated Circuit (I2C) interface, etc.
[0017] Any port can be used as an uplink or downlink port to communicate with other ports.
[0018] The number of controllers and ports are the same, and they are connected one-to-one. The selection circuit is connected to each of the controllers.
[0019] Multiple ports, all of which can be used to connect communication devices; The selection circuit can be used to connect the first controller and the second controller among multiple controllers according to the state of the enable signal after detecting the state of the enable signal, so as to establish a communication connection between the first communication device and the second communication device. The first communication device is connected to the first port among multiple ports, and the second communication device is connected to the second port among multiple ports. The first port is the port connected to the first controller, and the second port is the port connected to the second controller. A first controller is used to obtain configuration information from a first communication device and set the role type of a first port according to the configuration information. A second controller is used to obtain the role type of the first port from the first controller and set the role type of the second port according to the device type of the first port, so that the first communication device and the second communication device can perform communication operations according to the role type of the port connected to them.
[0020] Specifically, multiple ports can be connected to different communication devices. The selection circuit can receive an enable signal, and the state of the enable signal can be mapped to the communication link that needs to be connected. Therefore, the selection circuit can connect the two controllers in the connector corresponding to the state of the enable signal based on the state of the enable signal. After connecting the two controllers, the communication link between the communication devices connected to these two controllers is also established.
[0021] In addition, to ensure correct data transmission between the two communication devices, the role types of the communication devices and ports can be configured. Specifically, the first and second communication devices can be pre-configured as dual role ports (DRP), or either the first or second communication device can be pre-set by software to be a downstream or upstream port. For the former, the first or second communication device will periodically switch between DFP and UFP after power-on until it is fixed in one role. For the latter, technicians can pre-configure the first or second communication device to set it as either a DFP or UFP.
[0022] Assuming the first communication device is accessed as a DFP and the first port is a UFP, the second controller can read the status of the first port as a UFP from the first controller. Then, the second controller can force the second port to be a DFP and the second communication device to be a UFP. In this way, the role type setting operation can be completed.
[0023] The role type can be UFP or DFP. During the role type setting process, the first controller can determine the role type of the first port through negotiation with the first communication device, or directly obtain its role type from the first communication device, and then set the first port to the opposite role type. After the first controller determines the role type of the first port, the second controller can read the role type of the first port from the first controller and forcibly set the role type of the second port it manages to be the opposite of the role type of the first port. Correspondingly, the second communication device can set its own role type to the opposite of the role type of the second port.
[0024] After completing the character type settings, the first communication device can communicate with the second communication device to transmit relevant data.
[0025] The connector in this application includes multiple controllers, multiple ports, and at least one selection circuit. The number of controllers and ports is the same, and they are connected one-to-one. The selection circuit is connected to each of the controllers. Each port is used to connect to a communication device. The selection circuit can connect two corresponding communication devices based on the state of an enable signal. The controllers can set the role type of the ports, so that the first and second communication devices can perform communication operations according to the role type of the port they are connected to. This eliminates the need for repeated plugging and unplugging when switching between multiple devices for data transmission; instead, the corresponding communication link can be connected by setting the state of the enable signal, which is more convenient and improves the user experience. Furthermore, it can extend the lifespan of the connector.
[0026] In some alternative implementations, the connector described above may also include at least one switch, which can be used to adjust the enable signal.
[0027] Specifically, technicians can control the state of each switch based on the ports connected to the two communication devices that need to be connected, thereby enabling the state of the enable signal to be controlled by the switch state. For example, when the switch is closed, the enable signal is in the first state; when the switch is open, the enable signal is in the second state.
[0028] In this way, technicians can easily switch communication links with a simple switch. In scenarios where frequent switching of communication devices is required, there is no need to plug and unplug repeatedly, which is more convenient and can reduce damage to the connectors and extend their lifespan.
[0029] In some alternative implementations, the selection circuit may be specifically used for: Based on the state of the enable signal, the target communication link corresponding to the state of the enable signal is determined from among the multiple communication links included within the system. The target communication link is then connected to connect the first controller and the second controller.
[0030] Specifically, the selection circuit may include multiple communication links. Correspondingly, the selection circuit can determine the target communication link corresponding to the state of the enable signal among the multiple communication links, and then connect the target communication link. Since the first controller and the second controller are respectively connected to ports on both sides of the target communication link, after the target communication link is connected, the first controller and the second controller can communicate. Accordingly, the first communication device connected to the first port can communicate with the second communication device connected to the second port.
[0031] In some alternative implementations, when there are multiple selection circuits, the multiple controllers may include a third controller, a fourth controller, and a fifth controller, and the selection circuits may include a first selection circuit and a second selection circuit.
[0032] The first selection circuit may include a first enable pin, a first sub-port, a second sub-port, and a third sub-port. The second selection circuit may include a second enable pin, a fourth sub-port, a fifth sub-port, and a sixth sub-port. The first sub-port is connected to the third controller, the second and fourth sub-ports are respectively connected to the fourth controller, and the third and sixth sub-ports are respectively connected to the fifth controller.
[0033] In this connection method, the first selection circuit can be specifically used for: After detecting that the first enable signal of the first enable pin is in the first state, the first sub-port and the second sub-port are connected to connect the third controller and the fourth controller. Alternatively, after detecting that the first enable signal of the first enable pin is in the second state, the first sub-port and the third sub-port are connected to connect the third controller and the fifth controller.
[0034] The second selection circuit can be specifically used for: After detecting that the second enable signal of the second enable pin is in the second state, the fourth sub-port and the sixth sub-port are connected to connect the fourth controller and the fifth controller.
[0035] The first state can be a high-level state, and the second state can be a low-level state.
[0036] Specifically, since the first sub-port is connected to the third controller and the second sub-port is connected to the fourth controller, and both the first and second sub-ports belong to the first selection circuit, when the first selection circuit detects that the state of the first enable signal connected to the first enable pin is the first state, it determines the communication link corresponding to the first state as the first communication link. The first communication link is the communication link between the first and second sub-ports. Then, the first selection circuit can connect the first and second sub-ports, so that the third controller and the fourth controller can be connected, and further connect the communication device connected to the third controller and the communication device connected to the fourth controller to perform data transmission operation.
[0037] Similarly, since the first sub-port is connected to the third controller and the third sub-port is connected to the fifth controller, and both the first and third sub-ports belong to the first selection circuit, when the first selection circuit detects that the state of the first enable signal connected to the first enable pin is the second state, it determines the communication link corresponding to the second state as the second communication link. The second communication link is the communication link between the first and third sub-ports. Therefore, the first selection circuit can connect the first and third sub-ports, so that the third controller and the fifth controller can be connected, and further connect the communication device connected to the third controller and the communication device connected to the fifth controller to perform data transmission operations.
[0038] Since the fourth sub-port is connected to the fourth controller and the sixth sub-port is connected to the fifth controller, and both the fourth and sixth sub-ports belong to the second selection circuit, when the second selection circuit detects that the state of the second enable signal connected to the second enable pin is the second state, it determines that the communication link corresponding to the second state is the third communication link. The second communication link is the communication link between the fourth and sixth sub-ports. Therefore, the second selection circuit can connect the fourth and sixth sub-ports, so that the fourth controller and the fifth controller can be connected, and further connect the communication device connected to the fourth controller and the communication device connected to the sixth controller to perform data transmission operations.
[0039] The first controller can be any one of the third, fourth, or fifth controllers, and the second controller is any other controller in the connector besides the first controller.
[0040] In this way, each selection circuit is responsible for connecting only a few ports, with clear control logic (e.g., enabling signal A connects X and Y), and the logic is simple and direct. The first and second selection circuits can work independently and simultaneously, establishing connections quickly without the bottleneck of centralized control. A failure in one selection circuit typically only affects the connections between the controllers it is responsible for, without causing a complete system interconnection failure. In other words, the connectors in this solution have high reliability and fault isolation. Furthermore, each selection circuit is small in size with few ports, making wiring and management relatively easy.
[0041] In some alternative implementations, in order to clearly indicate the current data transmission path, the connector may also include a first indicator light and a second indicator light, and at least one switch may include a first switch and a second switch.
[0042] Both the first and second indicator lights can be light-emitting diodes (LEDs). The first terminal of the first switch is connected to the first indicator light, the first indicator light is connected to the first enable pin, and the second terminal of the first switch is grounded. The first terminal of the second switch is connected to the second indicator light, the second indicator light is connected to the second enable pin, and the second terminal of the second switch is grounded.
[0043] Specifically, for the first switch, the first terminal of the first switch is connected to the first indicator light, and the second terminal is grounded. As long as the first switch is in the open state, the first indicator light remains off. Furthermore, the first indicator light is connected to the first enable pin. Since the first indicator light is not grounded, the first enable signal transmitted by the first enable pin is in a high-level state. When the first switch is in the closed state, the first indicator light can be grounded and will light up after power is applied. Moreover, after the first indicator light is grounded, the first enable pin can also be grounded, causing the first enable signal on the first enable pin to be in a second state.
[0044] For the second switch, connect the first terminal of the second switch to the second indicator light, and ground the second terminal. As long as the second switch is in the open state, the second indicator light will remain off. Furthermore, the second indicator light is connected to the second enable pin. Since the second indicator light is not grounded, the second enable signal transmitted by the second enable pin is in a high-level state. When the second switch is in the closed state, the second indicator light can be grounded and will light up after power is applied. Moreover, after the second indicator light is grounded, the second enable pin can also be grounded, causing the second enable signal on the second enable pin to be in the second state.
[0045] In the above structure, when both the first and second switches are in the "up" state, neither the first nor the second indicator light is illuminated, indicating that the communication link between the third and fourth controllers is active. When the first switch is in the "closed" state and both second switches are in the "up" state, the first indicator light is illuminated, and the second indicator light is off, indicating that the communication link between the third and fifth controllers is active. When both the first and second switches are in the "closed" state, both the first and second indicator lights are illuminated, indicating that the communication link between the fourth and fifth controllers is active.
[0046] In this way, users can instantly and accurately determine the currently active data transmission path simply by observing the combination of two LEDs on and off, without needing any testing instruments or reading software logs. Furthermore, this solution prevents users from transmitting data or debugging under incorrect routing conditions, improving operational accuracy and security. Additionally, switching data paths is achieved through a physical switch, avoiding issues caused by software crashes, driver failures, or misconfigurations.
[0047] In some alternative implementations, at least one switch may further include a third switch, the first end of which is connected to a port connected to a third controller, and the second end of which is connected to a first enable pin.
[0048] In some alternative implementations, the connector may further include a first level converter and a second level converter, the first level converter being connected to a port connected to a third controller and to a first enable pin, and the second level converter being connected to a port connected to a fourth controller and to a second enable pin.
[0049] In some alternative implementations, when there is only one selection circuit, the selection circuit includes at least one control port, multiple controlled ports, and multiple enable pins, and the total number of control ports and controlled ports is the same as the number of controllers. Total number, where n is the number of enable pins included in the selection circuit.
[0050] In this way, a large number of communication links can be switched through a single selection circuit, which is quite simple.
[0051] In some alternative implementations, the selection circuit may be specifically used to determine the target code based on the state of the enable signals of its multiple enable pins, determine the target communication link corresponding to the target code based on the target code, and connect the target communication link, which is the communication link between the target control port and the target controlled port.
[0052] This approach offers high flexibility. By encoding the enable signal, the connection between almost any control port and a controlled port can be dynamically configured, supporting a wider variety of reconfigurable communication link combinations. In one-to-many or many-to-many data transmission scenarios, switching communication links can be achieved simply by adjusting the state of the enable signal, eliminating the need for repeated plugging and unplugging, which is quite convenient.
[0053] The structure and working principle of the connector described above will be explained in detail below with specific examples.
[0054] like Figure 2 As shown, the connector may include 3 Type-C ports, 3 USB controllers, 2 selection circuits, 2 level shifters, 3 switches (SW), 2 indicator lights, and 2 resistors.
[0055] The three Type-C ports are port A, port B, and port C.
[0056] The three USB controllers are USB controller 1 (third controller), USB controller 2 (fourth controller), and USB controller 3 (fifth controller).
[0057] The two selection circuits include selection circuit 1 (first selection circuit) and selection circuit 2 (corresponding to the second selection circuit). Each selection circuit includes 3 ports and 1 enable pin (Enable, EN). Specifically, selection circuit 1 includes port 1 (first sub-port), port 2 (second sub-port), port 3 (third sub-port), and enable pin 1 (first enable pin). Selection circuit 2 includes port 4 (fourth sub-port), port 5 (fifth sub-port), port 6 (sixth sub-port), and enable pin 2 (second enable pin).
[0058] The two level shifters include level shifter 1 (first level shifter) and level shifter 2 (second level shifter). Each level shifter includes an input pin and an output pin. Specifically, level shifter 1 includes input pin 1 and output pin 1, and level shifter 2 includes input pin 2 and output pin 2.
[0059] The three switches are switch 1 (first switch), switch 2 (second switch), and switch 3 (third switch).
[0060] The two indicator lights are D1 (first indicator light) and D2 (second indicator light).
[0061] The two resistors are R1 and R2.
[0062] The channels between each port of the connector and the corresponding USB controller include a configuration channel (CC) and a data channel. The configuration channel is used for role negotiation, and the data channel is used for transmitting USB data. Specifically, the configuration channels include CC1, CC2, and CC3.
[0063] The channel between the various ports of the connector and the input pins of the level converter is the voltage bus (VBUS), which is used to supply power to the level converter from the communication device connected to the port. Specifically, the voltage bus includes VBUSA and VBUSB.
[0064] The connection channel between the USB controller and the selection circuitry is used to transmit USB data and I2C data.
[0065] Figure 2 VDD1 and VDD2 are ground voltages, VCC1 is the operating voltage of selection circuit 1, and VCC2 is the operating voltage of selection circuit 2.
[0066] USB controller 1 connects to port A and port 1 of selection circuit 1. Port 2 of selection circuit 1 connects to USB controller 2. Port 3 of selection circuit 1 connects to USB controller 3. USB controller 2 connects to cascade port B and port 4 of selection circuit 2. USB controller 3 connects to port C and port 6 of selection circuit 2.
[0067] The power supply VBUSA of port A is connected to the input pin 1 of level converter 1 via push-button switch SW3. The output pin of level converter 1 supplies power to VDD1. The power supply VBUSB of port B is connected to the input pin 1 of level converter 2. The output pin 2 of level converter 2 supplies power to VDD2.
[0068] Under the above connection relationship, the mapping relationship between the status of the indicator lights and the connected communication links is shown in Table 1.
[0069] Table 1
[0070] like Figure 3 As shown, port A of the connector is inserted into communication device A, port B is inserted into communication device B, and port C is inserted into communication device C. By default, push-button switches SW1, SW2, and SW3 are raised and not pressed.
[0071] Example 1: If you want communication device A to perform USB data transfer with communication device B, after communication device A is connected to the connector, press button SW3. The BVBUSA voltage is input to level converter 1 through SW3, and VDD1 will have voltage. Since button switch SW1 is in the released state, the negative terminal of D1 is not connected to ground, and D1 is not lit. The enable pin 1 of selection circuit 1 detects that the first enable signal is in a high level state. R1 here plays a step-down role, and the communication link between port 1 and port 2 is turned on.
[0072] The mapping relationship between the state of the first enable signal of the selection circuit 1 and the connected communication link can be shown in Table 2.
[0073] Table 2
[0074] When communication device B is connected to the connector, VBUSB will input voltage to level converter 2, and VDD2 will have voltage. Since the push button switch SW2 is in the lifted state, the negative terminal of D2 is not connected to ground, and D2 is not lit. The enable pin 2 of selection circuit 2 detects that the second enable signal is in a high level state. Here, R2 plays a step-down role, and the communication link between port 4 and port 5 is turned on.
[0075] The mapping relationship between the state of the second enable signal of the selection circuit 1 and the connected communication link can be shown in Table 3.
[0076] Table 3
[0077] As can be seen from the above, due to the functions of selection circuit 1 and selection circuit 2, the communication link between communication device A and communication device B is established, while the communication link between communication device B and communication device C is disconnected, and the communication link between communication device A and communication device C is also disconnected. Specifically, the communication link between communication device A and communication device B is as follows: communication device A to port A to USB controller 1 to selection circuit 1 to USB controller 2 to port B to communication device B.
[0078] For cascading functionality, two identical devices are cascaded via a connector. Communication device A and communication device B can both be pre-configured as DRP (Distributed Provider Role), or their roles can be pre-set as DFP (Distributed Provider Role) or UFP (Unified Provider Role) via software. If configured as DRP, the communication device will periodically toggle between DFP and UFP via CC (Toggle Switching) after power-on, with intervals of up to 50ms. After role type settings are complete, assuming communication device A is a DFP, it will act as the USB host connected to communication device B, communicating at USB speeds.
[0079] Assuming communication device A is connected as a DFP, then port A is a UFP. When USB controller 2 negotiates the role with port B, it will obtain the determination results from USB controller 1 and communication device A. If port A is a UFP, USB controller 2 reads the status of USB controller 1 as UFP via I2C, and then USB controller 2 will force port B to be a DFP, thus making communication device B a UFP.
[0080] Assuming communication device A is connected as a UFP, then port A is a DFP. When USB controller 2 negotiates roles with port B, it will obtain the determination results from USB controller 1 and communication device A. If port A is a DFP, USB controller 2 reads the status of USB controller 1 as DFP via I2C, and then USB controller 2 will force port B to be a UFP, thus making communication device B a DFP.
[0081] Communication device A and communication device B exchange USB data via the positive data signal line (Data Plus, D+) and the negative data signal line (Data Minus, D-).
[0082] Example 2: If you want communication device A to perform USB data transfer with communication device C, after communication device A is connected to the connector, press button SW3. The BVBUSA voltage is input to level converter 1 through SW3, and VDD1 will have voltage. Press button switch SW1, the negative terminal of D1 is connected to ground, D1 lights up, and the enable pin 1 of selection circuit 1 detects that the first enable signal is in a low level state. Here, R1 plays a step-down role, and the communication link between port 1 and port 3 is turned on. Refer to Table 2.
[0083] When communication device B is connected to the connector, VBUSB will input voltage to level converter 2, and VDD2 will have voltage. Since the push button switch SW2 is in the lifted state, the negative terminal of D2 is not connected to ground, and D2 does not light up. The enable pin 2 of the selection circuit 2 detects that the second enable signal is in a high level state. Here, R2 plays a step-down role, and the communication link between port 4 and port 5 is connected, as shown in Table 3.
[0084] As can be seen from the above, due to the functions of selection circuit 1 and selection circuit 2, the communication link between communication device A and communication device C is established, the communication link between communication device A and communication device B is disconnected, and the communication link between communication device B and communication device C is also disconnected. Specifically, the communication link between communication device A and communication device C is as follows: communication device A to port A to USB controller 1 to selection circuit 1 to USB controller 3 to port C to communication device C.
[0085] For cascading functionality, two identical devices are cascaded via a connector. Communication device A and communication device B can both be pre-configured as DRP (Distributed Resource Provider) roles, or their roles can be pre-set as DFP (Distributed Provider Image) or UFP (Unified Provider Image). If configured as DRP, the communication device will periodically switch between DFP and UFP via CC (Converter Interface) after power-on, with an interval of 50ms. After the role type is set, assuming communication device A is a DFP, it will act as the USB host connected to communication device C, communicating at USB speeds.
[0086] Assuming communication device A is connected as a DFP, then port A is a UFP. When negotiating the role with port C, USB controller 3 will obtain the determination results from USB controller 1 and communication device A. If port A is a UFP, USB controller 3 will read the status of USB controller 1 as UFP via I2C, and then USB controller 3 will force port C to be a DFP, thus making communication device C a UFP.
[0087] Assuming communication device A is connected as a UFP, then port A is a DFP. When USB controller 3 negotiates roles with port C, it obtains the determination results from USB controller 1 and communication device A. If port A is a DFP, USB controller 3 reads the status of USB controller 1 as DFP via I2C, and then USB controller 3 forces port C to be a UFP, thus making communication device C a DFP.
[0088] Communication device A and communication device C exchange USB data via the positive data signal line and the negative data signal line.
[0089] Example 3: If you want communication device B to transmit data via USB with communication device C, when communication device A is connected to the connector, since the button switch SW3 is lifted by default, there is no voltage input to level converter 1, VDD1 has no voltage, D1 is not lit, selection circuit 1 does not work, and the communication link between port 1 and port 2 is not connected. See Table 2.
[0090] When communication device B is connected to the connector, VBUSB will input voltage to level converter 2, and VDD2 will have voltage. At this time, when the button switch SW2 is pressed, the negative terminal of D2 is connected to ground, D2 lights up, and the enable pin 2 of selection circuit 2 detects that the second enable signal is in a low level state. Here, R2 plays a step-down role, and the communication link between port 4 and port 6 is turned on, as shown in Table 3.
[0091] As can be seen from the above, due to the function of selection circuit 1 and selection circuit 2, the communication link between communication device B and communication device C is connected, the communication link between communication device A and communication device B is disconnected, and the communication link between communication device A and communication device C is disconnected.
[0092] The communication link between communication device B and communication device C is as follows: communication device B to port B to USB controller 2 to selection circuit 2 to USB controller 3 to port C to communication device C.
[0093] For cascading functionality, two identical devices are cascaded via a connector. Communication device A and communication device B can both be pre-configured as DRP (Distributed Resource Provider) roles, or their roles can be pre-set as DFP (Distributed Provider Image) or UFP (Unified Provider Image) via software. If configured as DRP, the communication device will periodically switch between DFP and UFP via CC (Converter Interface) after power-on, with an interval of 50ms. After the role type is set, assuming communication device B is a DFP, it will act as a USB host connected to communication device C, communicating at USB speeds.
[0094] Assuming communication device B is connected as a DFP, then port B is a UFP. When negotiating the role with port C, USB controller 3 will obtain the determination results from USB controller 2 and communication device B. If port B is a UFP, USB controller 3 will read the status of USB controller 2 as UFP via I2C, and then USB controller 3 will force port C to be a DFP, thus making communication device C a UFP.
[0095] Assuming communication device B is connected as a UFP, then port B is a DFP. When USB controller 3 negotiates roles with port C, it will obtain the determination results from USB controller 2 and communication device B. If port B is a DFP, USB controller 3 will read the status of USB controller 2 as DFP via I2C, and then USB controller 3 will force port C to be a UFP, thus making communication device C a DFP.
[0096] Communication device A and communication device C exchange USB data via the positive data signal line and the negative data signal line.
[0097] Embodiments of this application provide a communication method that can be executed by the aforementioned connector, such as... Figure 4 As shown, the specific processing steps of the communication method may include: In step S401, after detecting the state of the enable signal, the selection circuit connects the first controller and the second controller among the multiple controllers according to the state of the enable signal.
[0098] The first communication device is connected to the first port among multiple ports, and the second communication device is connected to the second port among multiple ports. The first port is the port connected to the first controller, and the second port is the port connected to the second controller.
[0099] In step S402, the first controller obtains configuration information from the first communication device and sets the role type of the first port according to the configuration information.
[0100] And, in step S403, the second controller obtains the role type of the first port from the first controller, and sets the role type of the second port according to the device type of the first port.
[0101] The communication method of this application, upon detecting the state of an enable signal, allows the selection circuit to connect two corresponding controllers based on the state of the enable signal, thereby establishing a communication connection between the first and second communication devices. The controllers can be used to set the role type of a port, allowing the first and second communication devices to perform communication operations according to the role type of the port they are connected to. This eliminates the need for repeated plugging and unplugging when switching between multiple devices for data transmission; instead, the corresponding communication link can be connected by setting the state of the enable signal, making the process more convenient. Furthermore, it can improve the lifespan of connectors.
[0102] Embodiments of this application also provide a communication system, such as Figure 5 As shown, the communication system includes the aforementioned connector and multiple communication devices. The connector connects to each of the multiple communication devices to enable communication between any two of them.
[0103] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described communication method embodiments when it is run.
[0104] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0105] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a linker, implements the steps in any of the above-described communication method embodiments.
[0106] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a linker, implements the steps in any of the above-described communication method embodiments.
[0107] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0108] The connector, communication system, communication method, storage medium, and program product provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A connector, characterized in that, The connector includes multiple controllers, multiple ports, and at least one selection circuit. The number of multiple controllers and multiple ports are the same and they are connected in a one-to-one correspondence. The selection circuit is connected to each of the multiple controllers. All of the aforementioned ports are used to connect communication devices; The selection circuit is used to connect a first controller and a second controller among a plurality of controllers according to the state of the enable signal after detecting the state of the enable signal, so as to establish a communication connection between the first communication device and the second communication device. The first communication device is connected to a first port among a plurality of ports, and the second communication device is connected to a second port among a plurality of ports. The first port is a port connected to the first controller, and the second port is a port connected to the second controller. The first controller is configured to obtain configuration information from the first communication device and set the role type of the first port according to the configuration information; and the second controller is configured to obtain the role type of the first port from the first controller and set the role type of the second port according to the device type of the first port, so that the first communication device and the second communication device perform communication operations according to the role type of the port connected to them.
2. The connector according to claim 1, characterized in that, The connector also includes at least one switch; At least one of the switches is used to adjust the state of the enable signal.
3. The connector according to claim 1 or 2, characterized in that, The selection circuit is specifically used for: Based on the state of the enable signal, determine the target communication link corresponding to the state of the enable signal among the multiple communication links included in itself; Connect the target communication link to connect the first controller and the second controller.
4. The connector according to claim 2, characterized in that, The plurality of controllers includes a third controller, a fourth controller, and a fifth controller; The selection circuit includes a first selection circuit and a second selection circuit. The first selection circuit includes a first enable pin, a first sub-port, a second sub-port, and a third sub-port. The second selection circuit includes a second enable pin, a fourth sub-port, a fifth sub-port, and a sixth sub-port. The first sub-port is connected to the third controller, the second sub-port and the fourth sub-port are respectively connected to the fourth controller, and the third sub-port and the sixth sub-port are respectively connected to the fifth controller.
5. The connector according to claim 4, characterized in that, The first selection circuit is specifically used for: After detecting that the state of the first enable signal of the first enable pin is the first state, the first sub-port and the second sub-port are connected to connect the third controller and the fourth controller.
6. The connector according to claim 4, characterized in that, The first selection circuit is also used for: After detecting that the state of the first enable signal of the first enable pin is the second state, the first sub-port and the third sub-port are connected to connect the third controller and the fifth controller.
7. The connector according to claim 6, characterized in that, The second selection circuit is specifically used for: After detecting that the state of the second enable signal of the second enable pin is the second state, the fourth sub-port and the sixth sub-port are connected to connect the fourth controller and the fifth controller.
8. The connector according to claim 4, characterized in that, The connector further includes a first indicator light and a second indicator light, and at least one of the switches includes a first switch and a second switch; Wherein, the first terminal of the first switch is connected to the first indicator light, the first indicator light is connected to the first enable pin, and the second terminal of the first switch is grounded; The first terminal of the second switch is connected to the second indicator light, the second indicator light is connected to the second enable pin, and the second terminal of the second switch is grounded.
9. The connector according to claim 1, characterized in that, The selection circuit is of one type, and it includes at least one control port, multiple controlled ports, and multiple enable pins. The total number of control ports and controlled ports is the same as the number of controllers. The total number, where n is the number of enable pins included in the selection circuit.
10. A communication system, characterized in that, include: The connector as claimed in any one of claims 1 to 9; Multiple communication devices; The connector is connected to the plurality of communication devices respectively, so that communication can be carried out between any two of the plurality of communication devices.