Relay device, control method of relay device, and computer-readable storage medium
Patent Information
- Application Number
- CN202111458516.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-04
- Filing Date
- 2021-12-02
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2041-12-02
AI Technical Summary
因此,日本特开2011-97169没有描述用于在具有符合USB标准的接口(或连接部)的装置和具有不符合USB标准的接口(或连接部)的装置之间执行USB通信的结构和方法
Smart Images

Figure CN114595184B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to a relay device for relaying USB communication and a method for controlling the relay device. Background Technology
[0002] Japanese Patent Application Publication No. 2011-97169 states that, in the event of a detected impact on a vehicle, the vehicle's charger notifies a mobile phone connected to the charger of the impact received by the vehicle.
[0003] Japanese Patent Application Laid-Open No. 2011-97169 does not include any description of the USB (Universal Serial Bus) standard. Therefore, Japanese Patent Application Laid-Open No. 2011-97169 does not describe the structure and method for performing USB communication between a device having an interface (or connector) that conforms to the USB standard and a device having an interface (or connector) that does not conform to the USB standard. Summary of the Invention
[0004] According to various embodiments, USB communication can be performed between a device having a USB standard compliant interface (or connector) and a device having a non-USB standard compliant interface (or connector).
[0005] According to various embodiments, a relay device is provided, comprising: a first connection unit for connecting to a first interface of a first device, the first interface not conforming to the USB standard (Universal Serial Bus standard); a second connection unit for connecting to a second interface of a second device, the second interface conforming to the USB standard; a first notification unit for notifying the second device that the relay device is a USB device; a second notification unit for notifying the first device that the second device has been connected to the second connection unit; and a communication unit for relaying communication performed between the second device and the first device.
[0006] According to various embodiments, a control method for a relay device is provided. The relay device includes a first connection unit for connecting to a first interface of a first device and a second connection unit for connecting to a second interface of a second device. The first interface does not conform to the USB standard (Universal Serial Bus standard), and the second interface conforms to the USB standard. The method includes: notifying the second device that the relay device is a USB device; notifying the first device that the second device has been connected to the second connection unit; and relaying communication performed between the second device and the first device.
[0007] A computer-readable storage medium storing a program that causes a computer to execute a control method for a relay device, the relay device including a first connection unit for connecting to a first interface of a first device and a second connection unit for connecting to a second interface of a second device, the first interface not conforming to the USB standard (Universal Serial Bus standard) and the second interface conforming to the USB standard, the control method including the steps of: notifying the second device that the relay device is a USB device; notifying the first device that the second device has been connected to the second connection unit; and relaying communication performed between the second device and the first device.
[0008] Other aspects of this disclosure will become apparent from the following description of exemplary embodiments. Attached Figure Description
[0009] Figure 1 This is a diagram showing the components of the communication system 1 according to the first embodiment.
[0010] Figure 2 This is a diagram showing the components of the first device 100 according to the first embodiment.
[0011] Figure 3 This is a flowchart illustrating the USB communication process according to the first embodiment.
[0012] Figure 4 This is a diagram showing the components of the communication system 4 according to the second embodiment.
[0013] Figure 5 This is a diagram showing the components of the first device 400 according to the second embodiment.
[0014] Figure 6 This is a flowchart illustrating the USB communication process according to the second embodiment. Detailed Implementation
[0015] Typical embodiments, features, and aspects of this disclosure will now be described with reference to the figures. However, aspects of this disclosure are not limited to the following embodiments.
[0016] [First Embodiment]
[0017] Figure 1 This diagram illustrates the components of a communication system 1 according to a first embodiment. The communication system 1 includes a first device 100, a relay device 110, and a second device 120. According to the first embodiment, the first device 100 is configured to operate as a USB (Universal Serial Bus) device, and the second device 120 is configured to operate as a USB host. The relay device 110 has the function of informing the second device 120 that the relay device 110 is a USB device but does not operate as a USB device.
[0018] According to the first embodiment, the relay device 110 is connected to the ACC connector 103 of the first device 100, which operates as a USB device, and to the USB connector 122 of the second device 120, which operates as a USB host. When the relay device 110 is connected to the USB connector 122 of the second device 120, the relay device 110 notifies the second device 120 that it is a USB device. After notifying the second device 120 that it is a USB device, the relay device 110 notifies the first device 100 that the second device 120 has been connected to it. After the relay device 110 notifies the first device 100 that the second device 120 has been connected, the first device 100 operates as a USB device. Thus, an indirect connection between a USB host and a USB device is established between the second device 120 and the first device 100. Then, the relay device 110 relays USB-compliant communication (USB communication) between the first device 100 and the second device 120. This allows the first device 100 and the second device 120 to communicate via USB through the relay device 110.
[0019] The first device 100 includes a CPU 101, a power supply circuit 102, an ACC connector 103, and a USB connector 109. The first device 100 also includes a camera unit comprising a CMOS sensor or a CCD sensor, a lens unit, and other components. The first device 100 is an electronic device capable of being used as a camera, such as a digital camera.
[0020] CPU 101 is a control unit that includes a microcomputer. CPU 101 is able to control all components of the first device 100 by executing programs stored in its memory.
[0021] CPU 101 controls the input and output of connection detection signal 104, communication request signal 105, control signal 108, and power control signal 106. Connection detection signal 104 is used by the first device 100 to detect the connection between the second device 120 and the relay device 110. Communication request signal 105 is an interrupt signal from the relay device 110. Power control signal 106 is used by CPU 101 to control the power circuit 102. Control signal 108 is used by CPU 101 to control the relay device 110.
[0022] CPU 101 has USB port A and USB port B for USB communication. USB port A is connected to the second device 120 (CPU 121) via relay device 110 through communication with USB data signal 125. USB port B is connected to USB connector 109 through communication with external USB data signal 126.
[0023] The power supply circuit 102 generates power 107 and supplies the generated power 107 to the communication request unit 113 and the device identification unit 114. The power supply circuit 102 includes a DC / DC converter and / or an LDO (Low Dropout) regulator.
[0024] The ACC connector (accessory connector) 103 is a dedicated connector for connecting to the repeater device 110 (ACC connector 116). The ACC connector 103 is an interface (or connector) that does not conform to the USB standard or the USB Type-C standard. The ACC connector 103 serves as an accessory socket for connecting devices such as flash units and viewfinder units to the first device 100.
[0025] The USB connector 109 is used to connect to the external device 200. The USB connector 109 is an interface (or connector) that conforms to the USB standard.
[0026] It should be noted that, according to the first embodiment, although the first device 100 includes a USB connector 109 for illustrative purposes, the first device 100 does not necessarily need to include a USB connector 109. In this case, the CPU 101 does not need to have a USB port B.
[0027] The relay device 110 includes a USB notification unit 111, a connection notification unit 112, a communication request unit 113, a device identification unit 114, a USB connector 115, an ACC connector 116, and a communication unit 117. The relay device 110 can operate as one of the accessory devices that can be connected to the first device 100.
[0028] USB notification unit 111 notifies the second device 120 via CC signal 123 that relay device 110 is a USB device.
[0029] The connection notification unit 112 switches the voltage level (potential) of the connection detection signal 104 by applying the VBUS signal 124. The connection notification unit 112 has, for example, a transistor.
[0030] The communication request unit 113 changes the voltage level (potential) of the communication request signal 105 after a certain period of time following the supply of power 107 from the first device 100 (power supply circuit 102). The communication request unit 113 has, for example, a reset IC.
[0031] The device identification unit 114 is a memory unit with an EEPROM (Electrically Erasable Memory) for storing various parameters and unique numbers.
[0032] USB connector 115 is an interface (or connector) compliant with the USB standard and the USB Type-C standard. ACC connector 116 is a dedicated connector for connection to the first device 100 (ACC connector 103). ACC connector 116 is an interface (or connector) that does not conform to the USB standard or the USB Type-C standard.
[0033] Communication unit 117 relays USB communication, which is USB-compliant communication between the first device 100 and the second device 120. Communication unit 117 also relays and sends USB data signals 125 from the first device 100 to the second device 120 to negotiate USB communication between the first device 100 and the second device 120.
[0034] The second device 120 has a USB connector and a CPU 121 including a microcomputer. The second device 120 is an electronic device that can be used, for example, as an information processing device such as a smartphone or a PC (personal computer).
[0035] After establishing a connection between the USB host and the USB device via CC signal 123 and VBUS signal 124, CPU 121 performs preparation processing for negotiating USB communication. Once USB communication negotiation is complete, CPU 121 can perform USB communication with CPU 101 via relay device 101. In this way, various types of data (USB data signal 125) can be sent or received between CPU 121 and CPU 101.
[0036] USB connector 122 is an interface (or connector) that conforms to the USB standard and the USB Type-C standard. USB connector 122 and USB connector 115 can be physically or electrically connected via a USB cable.
[0037] Now, refer to Figure 2 The structure of the first device 100 will be described in detail below. Figure 2 The components of the first device 100 are shown in more detail. The ACC connector 103 has a VDD (drain voltage) pin 210, an SCL (serial clock line) pin 211, an SDA (serial data line) pin 212, a WAKE pin 213, a DET pin 214, a D- pin 215, and a D+ pin 216.
[0038] The VDD pin 210 is used to draw power 107 from the power supply circuit 102 and output power 107 to the repeater 110. The SCL pin 211 and SDA pin 212 are used to input or output control signals 108. The WAKE pin 213 is used to input or output communication request signals 105. The D- pin 215 and D+ pin 216 are used to input or output USB data signals 125. The DET pin 214 is used to input or output connection detection signals 104.
[0039] USB connector 109 has D- pin 201, D+ pin 202, CC pin 203 and VBUS pin 204.
[0040] The D- pin 201 and D+ pin 202 are used to input or output external USB data signals 126. The CC pin 203 is used to input or output external CC signals 207 for negotiating USB communication with external devices 200. The VBUS pin 204 is used to input or output external VBUS signals 208.
[0041] like Figure 2 The structures of the individual connectors shown represent the minimum required for connector operation. Therefore, the connectors can be configured to input or output various other signals.
[0042] Next, we will refer to Figure 3 The operation of the relay device 110 and the first device 100 according to the first embodiment is described in the flowchart below. When the first device 100 is turned on by the user operating the switch group of the first device 100, the CPU 101 starts. Then the user connects the ACC connector 116 of the relay device 110 to the ACC connector 103 of the first device 100. The user also connects the USB connector 122 of the second device 120 to the USB connector 115 of the relay device 110. Thus, the second device 120 and the first device 100 are electrically connected. With these connections made by the user, the operation begins as follows: Figure 3 The process is shown in the flowchart.
[0043] In such Figure 3 In the flowchart shown, it is assumed that the first device 100 is connected to the relay device 110, which acts as a relay for USB communication between the first device 100 and the second device 120. On the other hand, relay devices that do not relay USB communication between the first device 100 and the second device 120 (such as externally mounted flashes or viewfinders) can also be connected to the first device 100. Relay devices that do not relay USB communication between the first device 100 and the second device 120 can also perform the processes described below, including steps S301 to S303 and step S306.
[0044] In step S301, the USB notification unit 111 detects the connection between the second device 120 and the USB connector 115. Then, the USB notification unit 111 notifies the CPU 121 of the second device 120 that the relay device 110 is a USB device via the CC signal 123. For example, since the USB connector 115 is a USB Type-C compliant interface (or connector), the USB notification unit 111 pulls down the CC signal 123 (fixing the signal to an L level).
[0045] In step S302, the connection notification unit 112 determines whether the VBUS signal 124 has been supplied from the second device 120. If the VBUS signal 124 has been supplied from the second device 120, the process proceeds to step S303; otherwise, if the VBUS signal 124 has not been supplied from the second device 120, the process in step S302 is repeated.
[0046] In step S303, the connection notification unit 112 changes the voltage level (potential) of the connection detection signal 104 based on the VBUS signal 124. By changing the voltage level of the connection detection signal 104, the connection notification unit 112 notifies the first device 100 that the second device 120 has been connected to the relay device 110.
[0047] In step S304, the CPU 101 detects that the potential of the DET pin 214 of the ACC connector 103 (connection detection signal 104) has changed to a predetermined potential, and detects (identifies) the connection of the second device 120 (with the relay device 110).
[0048] In step S305, the CPU 101 controls the power circuit 102 via the power control signal 106 to supply power 107 to the communication request unit 113 and the device identification unit 114. With the power 107, the communication request unit 113 and the device identification unit 114 become operable.
[0049] In step S306, after a pre-specified standby period has elapsed following the supply of power 107, the communication request unit 113 changes the voltage level (potential) of the communication request signal 105. By changing the voltage level (potential) of the communication request signal 105, the communication request unit 113 requests the first device 100 to determine (identify) whether the device connected to the first device 100 is a relay device 110. The standby period is, for example, the time period from the supply of power 107 to the device identification unit 114 until communication using the control signal 108 is possible.
[0050] In step S307, when the potential level of the communication request signal 105 is detected to change to a predetermined potential, the CPU 101 reads the unique number (identification information) of the relay device 110 stored in the device identification unit 114 using the control signal 108. The CPU 101 determines (identifies) whether the device connected to the ACC connector 103 is the relay device 110 based on the unique number of the relay device 110.
[0051] According to the first embodiment, a relay device 110, which serves as a relay device for USB communication, is connected to the first device 100. Therefore, the unique designation of the relay device 110 indicates that the device is a relay device for USB communication, and in step S307, the CPU 101 determines that the relay device 110 is a relay device for USB communication. In this case, the process proceeds to S308.
[0052] Here, if a device that is not relay device 110 is connected to the first device 100, the CPU 101 determines that the device connected to the first device 100 is not relay device 110 for USB communication. In this case, as shown in the flowchart, the CPU 101 terminates the process. Then, although the CPU 101 does not perform negotiation using the USB data signal 125, it uses control methods such as I2C (internal integrated circuit) to perform necessary control on each connected relay device.
[0053] In step S308, CPU 101 notifies CPU 121 via communication unit 117 that USB communication is now possible. According to the first embodiment, CPU 101 controls USB data signal 125 to negotiate with CPU 121 to execute USB communication. As a result, USB communication begins between the second device 120 and the first device 100.
[0054] In step S309, CPU 101 initiates USB communication. For example, CPU 101 sends data (USB data signal 125), such as image data captured by the camera unit, to the second device 120 via USB communication through the communication unit 117 of the relay device 110.
[0055] According to the first embodiment, the relay device 110 sends a connection detection signal 104 to the first device 100 based on the potential (VBUS potential) of the VBUS signal supplied by the second device 120. In this way, the first device 100 can identify the connection established between the relay device 110 and the second device 120. Then, the first device 100 can perform USB communication with the second device 120 through the relay device 110. According to the first embodiment, even if the second device does not have a microcontroller for establishing a connection between the USB host and the USB device, USB communication can still be performed between the first device 100 and the second device 120, allowing the communication system 1 to have a simplified structure.
[0056] [Second Embodiment]
[0057] According to the first embodiment, since the CPU 101 has both USB port A and USB port B, the first device 100 can communicate via USB with both the second device 120 and the external device 200. On the other hand, in some cases, the CPU 101 may have only one USB port and be able to communicate via USB with either the second device 120 or the external device 200. Therefore, the control of USB communication in this case in the communication system 4 according to the second embodiment will be described.
[0058] Figure 4 This is a diagram illustrating the components of a communication system 4 according to a second embodiment. The communication system 4 includes a first device 400, a relay device 110, and a second device 120. Here, since the second device 120 and the relay device 110 have the same structure as those according to the first embodiment, their structures will not be described. In addition to the components of the first device 100 according to the first embodiment, the first device 400 also includes a switching circuit 402.
[0059] The switching circuit 402 switches the signal to be input to or output from the USB port of CPU 101 between external USB data signal 126 and USB data signal 125. For example... Figure 5 As shown, according to the second embodiment, the switching circuit 402 switches between signals to be input to or output from the USB port of the CPU 101 in response to a USB switching signal 506 input from the CPU 101. In this case, when the external USB data signal 126 is input to or output from the USB port, USB communication can be performed between the first device 100 and the external device 200. When the USB data signal 125 is input to or output from the USB port, USB communication can be performed between the first device 100 and the second device 120.
[0060] Here, CPU 101 determines whether to communicate via USB with the second device 120 or with the external device 200, generating a USB switching signal 506. CPU 101 then outputs the USB switching signal 506, which indicates the device to be used for USB communication. Switching circuit 402 then switches the signal to be input to or output from the USB port of CPU 101, enabling USB communication with the device indicated by the USB switching signal 506.
[0061] The following describes four typical methods (determination methods) that allow CPU 101 to determine whether to communicate with the second device 120 or the external device 200 via USB.
[0062] According to the first determination method (first-in-first-out method), the CPU 101 determines the device (capable of USB communication) that is first connected (electrically connected) to the first device 100 between the second device 120 and the external device 200 as the device to be used for USB communication. According to the determination method, the CPU 101 performs USB communication with the device that is first connected to the first device 100 between the second device 120 and the external device 200, and then does not switch the device used for USB communication even if another device is subsequently connected to the first device 100.
[0063] According to the second determination method (last-in-first method), the CPU 101 determines the device that is subsequently connected to the first device 100 between the second device 120 and the external device 200 as the device to be used for USB communication. According to the determination method, the CPU 101 performs USB communication with the device that is first connected to the first device 100 between the second device 120 and the external device 200, and then switches to USB communication with the other device if another device is connected to the first device 100.
[0064] According to the third determination method (subject priority method), when both the second device 120 and the external device 200 are connected to the first device 100, the CPU 101 always determines to perform USB communication with the external device 200. It should be noted that the CPU 101 determines to perform USB communication with the second device 120 when it is not connected to the external device 200.
[0065] According to the fourth determination method (accessory priority method), when both the second device 120 and the external device 200 are connected to the first device 100, the CPU 101 is always determined to communicate via USB with the second device 120. It should be noted that the CPU 101 is determined to communicate via USB with the external device 200 when it is not connected to the second device 120.
[0066] It should be noted that, according to any determining method, if one of the two devices, the second device 120 and the external device 200, is disconnected while both are connected to the first device 100, the CPU 101 can determine to perform USB communication with the other device. This eliminates the dead time in USB communication caused by the disconnection of one of the devices.
[0067] Next, we will refer to Figure 6 The operation of the relay device 110 and the first device 100 according to the second embodiment is described in the flowchart below. Here, in the following description, the "first-in-first-out method" is used as a method for the CPU 101 to determine whether to perform USB communication with the second device 120 or with the external device 200.
[0068] First, when the user operates the switch group of the first device 100 and thereby turns on the first device 100, the CPU 101 starts. Then, the user connects the ACC connector 116 of the relay device 110 to the ACC connector 103 of the first device 100. The user also connects the USB connector 122 of the second device 120 to the USB connector 115 of the relay device 110. With these connections made by the user, the process begins as follows: Figure 6 The process is shown in the flowchart. Because steps S301 to S309 are related to the reference... Figure 3 The steps described in the flowchart in the first embodiment are the same, and therefore will not be described thereafter.
[0069] In step S601, CPU 101 determines whether the first device 100 and the external device 200 are in USB communication. If the first device 100 and the external device 200 are not in USB communication, the process proceeds to step S602. If the first device 100 and the external device 200 are in USB communication, the USB communication continues, and the process ends as shown in the flowchart.
[0070] In step S602, the CPU 101 outputs a USB switching signal 506 to the switching circuit 402, indicating that the device used for USB communication is the second device 120. Then, the switching circuit 402 performs control to input the USB data signal 125 to or output the USB data signal 125 from the USB port of the CPU 101.
[0071] As described above, according to the second embodiment, even if the CPU has only one USB port system and the camera has a USB connector separate from the accessory-specific connector, exclusive USB communication with either connector is allowed by switching between USB data signals.
[0072] [Third Embodiment]
[0073] The various functions, processes, or methods related to the above embodiments can also be implemented as programs executed by a personal computer, microcomputer, CPU (central processing unit), or microprocessor. Hereinafter, according to the third embodiment, the personal computer, microcomputer, CPU, or microprocessor will be referred to as "computer X". According to the third embodiment, the program for controlling computer X and implementing the various functions, processes, or methods described in conjunction with the above embodiments will be referred to as "program Y".
[0074] The various functions, processes, or methods described in conjunction with the above embodiments are implemented by executing program Y on computer X. In this case, program Y is supplied to computer X via a computer-readable storage medium. The computer-readable storage medium according to the third embodiment may include at least one of a hard disk device, a magnetic storage device, an optical storage device, a magneto-optical storage device, a memory card, volatile memory, and non-volatile memory. The computer-readable storage medium according to the third embodiment is a non-transitory storage medium.
[0075] While aspects of this disclosure have been described with reference to exemplary embodiments, it should be understood that these aspects are not limited to the exemplary embodiments. The scope of the appended claims is to be given the broadest interpretation to cover all such modifications and equivalent structures.
Claims
1. A relay device, comprising: The first connection unit is used to connect to the first interface of the first device, wherein the first interface does not conform to the USB standard, i.e., the Universal Serial Bus standard. The second connection unit is used to connect to the second interface of the second device, the second interface conforming to the USB standard; The first notification unit is used to notify the second device that the relay device is a USB device. The second notification unit is used to notify the first device that the second device has been connected to the second connection unit; as well as A communication unit for relaying USB communication performed between the second device, which acts as a USB host, and the first device, which acts as a USB device.
2. The relay device according to claim 1, wherein, When a VBUS signal is supplied from the second device, a notification is sent to the first device that the second device has been connected to the second connection unit.
3. The relay device according to claim 1 further includes a storage unit, the storage unit storing identification information of the relay device, the identification information indicating that the relay device can relay communication conforming to the USB standard.
4. The relay device according to claim 3, wherein, The storage unit operates using power supplied from the first device via the first connection unit.
5. The relay device according to claim 1, wherein, The first connection unit is connected to the accessory socket of the first device.
6. The relay device according to claim 1, wherein, The first device can be used as a digital camera.
7. The relay device according to claim 1, wherein, The second device can be used as a smartphone.
8. A control method for a relay device, the relay device comprising a first connection unit for connecting to a first interface of a first device and a second connection unit for connecting to a second interface of a second device, wherein the first interface does not conform to the USB standard (Universal Serial Bus standard), and the second interface conforms to the USB standard, the control method comprising the following steps: The second device is notified that the relay device is a USB device; The first device is notified that the second device has been connected to the second connection unit; as well as Relaying USB communication performed between the second device, which acts as a USB host, and the first device, which acts as a USB device.
9. The control method according to claim 8, wherein, When a VBUS signal is supplied from the second device, a notification is sent to the first device that the second device has been connected to the second connection unit.
10. The control method according to claim 8, wherein, The relay device also includes a storage unit that stores identification information of the relay device, the identification information indicating that the relay device can relay communication compliant with the USB standard.
11. The control method according to claim 10, wherein, The storage unit operates using power supplied from the first device via the first connection unit.
12. The control method according to claim 8, wherein, The first connection unit is connected to the accessory socket of the first device.
13. The control method according to claim 8, wherein, The first device can be used as a digital camera.
14. The control method according to claim 8, wherein, The second device can be used as a smartphone.
15. A computer-readable storage medium storing a program for causing a computer to perform a control method for a relay device, the relay device comprising a first connection unit for connection to a first interface of a first device and a second connection unit for connection to a second interface of a second device, the first interface not conforming to the USB standard (Universal Serial Bus standard) and the second interface conforming to the USB standard, the control method comprising the following steps: The second device is notified that the relay device is a USB device; The first device is notified that the second device has been connected to the second connection unit; as well as The relay acts as a USB host for USB communication performed between the second device and the first device, which acts as a USB device.
16. A computer program product comprising a program for causing a computer to execute a control method for a relay device, the relay device comprising a first connection unit for connecting to a first interface of a first device and a second connection unit for connecting to a second interface of a second device, the first interface not conforming to the USB standard (Universal Serial Bus standard) and the second interface conforming to the USB standard, the control method comprising the following steps: The second device is notified that the relay device is a USB device; The first device is notified that the second device has been connected to the second connection unit; as well as The relay acts as a USB host for USB communication performed between the second device and the first device, which acts as a USB device.
Citation Information
Patent Citations
Ambient information recording system, and ambient information recording method
JP2011097169A
Linkage device, photographing system, photographing method
CN108259717A