Relay device, control method and program
The relay device and control method facilitate USB communication between devices with and without USB standard compliance, enhancing system connectivity and functionality.
Patent Information
- Application Number
- JP2020202273
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2024-12-09
- Estimated Expiration
- 2040-12-04
AI Technical Summary
Existing technologies do not provide a method for enabling USB communication between devices with interfaces that comply with the USB standard and those that do not comply with the USB standard.
A relay device acts as a USB host and includes connection means to interface with both types of devices, relaying USB communication between them, and a control method and program to facilitate this communication.
Enables USB communication between devices with different USB standard compliance, simplifying the communication system configuration and allowing devices to function as intended.
Smart Images

Figure 0007596131000001 
Figure 0007596131000002 
Figure 0007596131000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a relay device, a control method, and a program. [Background technology]
[0002] Patent Document 1 describes a technique in which, when a charger installed in a vehicle detects an impact to the vehicle, it notifies a mobile phone connected to the charger that the vehicle has been impacted. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2011-97169 A Summary of the Invention [Problem to be solved by the invention]
[0004] Patent Document 1 does not describe the USB (Universal Serial Bus) standard. Therefore, Patent Document 1 does not describe a configuration or method for performing USB communication between a device having an interface (or connection part) that complies with the USB standard and a device having an interface (or connection part) that does not comply with the USB standard.
[0005] Therefore, an object of the present invention is to enable USB communication between a device having an interface (or connection part) that complies with the USB standard and a device having an interface (or connection part) that does not comply with the USB standard. [Means for solving the problem]
[0006] The relay device according to the present invention comprises: Works as a USB device The first device and Acts as a USB hostA relay device to which a second device is connected has a first connection means for connecting to an interface of the first device that does not comply with the USB standard, a second connection means for connecting to an interface of the second device that complies with the USB standard, a first notification means for notifying the second device that the relay device is a USB device, a second notification means for notifying the first device that the second device has been connected to the second connection means, and a communication means for relaying USB communication between the second device and the first device that complies with the USB standard. The control method according to the present invention comprises the steps of: Works as a USB device The first device and Acts as a USB host A relay device to which a second device is connected, the relay device being configured to support a USB standard for the first device. and a second connection means for connecting to an interface of the second device that complies with the USB standard. The computer runs The control method includes a first notification step of notifying the second device that the relay device is a USB device, a second notification step of notifying the first device that the second device has been connected to the second connection means, and a communication step of relaying a data signal from the second device and transmitting it to the first device, thereby negotiating USB communication, which is communication between the second device and the first device in accordance with the USB standard. The program according to the present invention comprises: Works as a USB device The first device and Acts as a USB hostThe computer of a relay device to which a second device is connected, the relay device having a first connection means for connecting to an interface of the first device that does not comply with the USB standard and a second connection means for connecting to an interface of the second device that complies with the USB standard, is caused to execute a first notification step of notifying the second device that the relay device is a USB device, a second notification step of notifying the first device that the second device has been connected to the second connection means, and a communication step of relaying a data signal from the second device and transmitting it to the first device, thereby negotiating USB communication, which is communication between the second device and the first device in accordance with the USB standard. Effect of the Invention
[0007] According to the present invention, USB communication can be performed between a device having an interface (or connection part) that complies with the USB standard and a device having an interface (or connection part) that does not comply with the USB standard. [Brief description of the drawings]
[0008] [Figure 1] 1 is a diagram for explaining components of a communication system 1 in embodiment 1. FIG. [Diagram 2] FIG. 2 is a diagram for explaining components of a first device 100 in the first embodiment. [Diagram 3] 4 is a flowchart for explaining a USB communication process in the first embodiment. [Figure 4] FIG. 11 is a diagram for explaining components of a communication system 4 in a second embodiment. [Diagram 5] FIG. 11 is a diagram for explaining components of a first device 400 in the second embodiment. [Figure 6] 10 is a flowchart illustrating a USB communication process in the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings, however, the present invention is not limited to the following embodiment.
[0010] [Embodiment 1] 1 is a diagram for explaining components of a communication system 1 in the first embodiment. The communication system 1 includes a first device 100, a relay device 110, and a second device 120. In the first embodiment, the first device 100 operates as a Universal Serial Bus (USB) device, and the second device 120 operates as a USB host. The relay device 110 has a function of notifying the second device 120 that the relay device 110 is a USB device, but does not operate as a USB device.
[0011] In the first embodiment, the relay device 110 is connected to the ACC connector 103 of the first device 100 operating as a USB device, and is connected to the USB connector 122 of the second device 120 operating 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 the relay device 110 is a USB device. After the relay device 110 notifies the second device 120 that the relay device 110 is a USB device, the relay device 110 notifies the first device 100 that the second device 120 is connected to the relay device 110. When the relay device 110 notifies the first device 100 that the second device 120 is connected to the relay device 110, the first device 100 operates as a USB device. This indirectly establishes a connection relationship between the USB host and the USB device between the second device 120 and the first device 100. Then, relay device 110 relays communication (USB communication) conforming to the USB standard between first device 100 and second device 120. This allows first device 100 and second device 120 to perform USB communication via relay device 110.
[0012] The first device 100 has a CPU 101, a power supply circuit 102, an ACC connector 103, and a USB connector 109. The first device 100 has an imaging unit configured with a CMOS sensor or a CCD sensor, a lens unit, etc. The first device 100 is, for example, an electronic device capable of operating as an imaging device such as a digital camera.
[0013] The CPU 101 is a control unit including a microcomputer. The CPU 101 can control all the components of the first device 100 by executing a program stored in a memory.
[0014] CPU 101 controls 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 a signal for first device 100 to detect that second device 120 has been connected to relay device 110. Communication request signal 105 is an interrupt signal from relay device 110. Power control signal 106 is a signal for CPU 101 to control power circuit 102. Control signal 108 is a signal for CPU 101 to control relay device 110.
[0015] The CPU 101 has a USB port A and a USB port B for performing USB communication. The USB port A is connected to a second device 120 (CPU 121) via a relay device 110 by communication using a USB data signal 125. The USB port B is connected to a USB connector 109 by communication using an external USB data signal 126.
[0016] 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.
[0017] The ACC connector 103 (accessory connector) is a dedicated connector for connecting to the relay device 110 (ACC connector 116). The ACC connector 103 is an interface (or connection section) that does not comply with the USB standard and the USB Type-C standard. The ACC connector 103 functions as an accessory shoe for connecting, for example, a flash device, a finder device, or the like to the first device 100.
[0018] The USB connector 109 is a connector for connecting to the external device 200. The USB connector 109 is an interface (or a connection section) that complies with the USB standard.
[0019] In the first embodiment, an example will be described in which the first device 100 includes the USB connector 109, but the first device 100 does not have to include the USB connector 109. In this case, the CPU 101 does not need to have the USB port B.
[0020] Relay device 110 has 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. Relay device 110 operates as one of a plurality of accessory devices connectable to first device 100, for example.
[0021] The USB notification unit 111 notifies the second device 120 by a CC signal 123 that the relay device 110 is a USB device.
[0022] The connection notification unit 112 switches the voltage level (potential) of the connection detection signal 104 in response to the application of the VBUS signal 124. The connection notification unit 112 includes a transistor and the like.
[0023] The communication request unit 113 changes the voltage level (electric potential) of the communication request signal 105 after a certain period of time has elapsed since the first device 100 (power supply circuit 102) supplied power 107. The communication request unit 113 includes a reset IC and the like.
[0024] The device identification unit 114 includes an EEPROM for storing various parameters and a unique number. (electrically erasable and writable memory) and the like.
[0025] The USB connector 115 is an interface (or connection part) that complies with the USB standard and the USB Type-C standard. The ACC connector 116 is a dedicated connector for connecting to the first device 100 (ACC connector 103). The ACC connector 116 is an interface (or connection part) that does not comply with the USB standard and the USB Type-C standard.
[0026] The communication unit 117 relays USB communication, which is communication conforming to the USB standard, between the first device 100 and the second device 120. The communication unit 117 can further relay a USB data signal 125 from the first device 100 and transmit it to the second device 120, thereby negotiating the USB communication between the first device 100 and the second device 120.
[0027] The second device 120 has a CPU 121 including a microcomputer, and a USB connector 122. Note that the second device 120 is an electronic device capable of operating as an information processing device, such as a smartphone or a PC (personal computer).
[0028] After the connection between the USB host and the USB device is established by the CC signal 123 and the VBUS signal 124, the CPU 121 performs a preparation process for negotiation of USB communication. When the negotiation of USB communication is completed, the CPU 121 can perform USB communication with the CPU 101 via the relay device 110. As a result, various data (USB data signal 125) is transmitted and received between the CPU 121 and the CPU 101.
[0029] The USB connector 122 is an interface (or connection portion) that complies with the USB standard and the USB Type-C standard. The USB connector 122 and the USB connector 115 can be physically and electrically connected to each other via a USB cable.
[0030] Next, the configuration of the first device 100 will be described in detail with reference to Fig. 2. Fig. 2 is a diagram illustrating more detailed components of the first device 100. The ACC connector 103 has a VDD (Voltage Drain) 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.
[0031] The VDD pin 210 is a pin for obtaining the power 107 from the power supply circuit 102, and is a pin for outputting the power 107 to the relay device 110. The SCL pin 211 and the SDA pin 212 are pins for inputting or outputting the control signal 108. The WAKE pin 213 is a pin for inputting or outputting the communication request signal 105. The D- pin 215 and the D+ pin 216 are pins for inputting or outputting the USB data signal 125. The DET pin 214 is a pin for inputting or outputting the connection detection signal 104.
[0032] The USB connector 109 has a D− pin 201 , a D+ pin 202 , a CC pin 203 , and a VBUS pin 204 .
[0033] The D- pin 201 and the D+ pin 202 are pins for inputting or outputting an external USB data signal 126. The CC pin 203 is a pin for inputting or outputting an external CC signal 207 for negotiating USB communication with the external device 200. The VBUS pin 204 is a pin for inputting or outputting an external VBUS signal 208.
[0034] 2 is the minimum configuration required for the operation of each connector. Therefore, each connector may be configured to be capable of inputting or outputting various other signals.
[0035] Next, the operation of relay device 110 and first device 100 in embodiment 1 will be described with reference to the flowchart of FIG. 3. When first device 100 is turned on by a user operating the switches of first device 100, CPU 101 starts up. Next, ACC connector 116 of relay device 110 and ACC connector 103 of first device 100 are connected by the user. Furthermore, USB connector 122 of second device 120 and USB connector 115 of relay device 110 are connected by the user. As a result, second device 120 and first device 100 are electrically connected. When the user makes these connections, the process of the flowchart of FIG. 3 starts.
[0036] 3, it is assumed that relay device 110, which is a relay device that relays USB communication between first device 100 and second device 120, is connected to first device 100. On the other hand, relay devices (e.g., external flash or viewfinder) that do not relay USB communication between first device 100 and second device 120 can also be connected to first device 100. Relay devices that do not relay USB communication between first device 100 and second device 120 may also be able to execute the processes of steps S301 to S303 and S306 described below.
[0037] In step S301, the USB notification unit 111 detects the connection of the second device 120 to 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 by the CC signal 123. For example, since the USB connector 115 is an interface (or connection unit) that complies with the USB Type-C standard, the USB notification unit 111 pulls down the CC signal 123 (fixes it to an L level).
[0038] In step S302, the connection notification unit 112 determines whether or not 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, and if the VBUS signal 124 has not been supplied from the second device 120, the process of step S302 is repeated.
[0039] In step S303, connection notification unit 112 changes (varies) the voltage level (electric potential) of connection detection signal 104 based on VBUS signal 124. Connection notification unit 112 changes the voltage level of connection detection signal 104 to notify first device 100 that second device 120 has been connected to relay device 110.
[0040] In step S304, CPU 101 detects that the potential of DET pin 214 (connection detection signal 104) of ACC connector 103 has changed to a predetermined potential, and detects (recognizes) that second device 120 (and relay device 110) has been connected.
[0041] In step S305, the CPU 101 controls the power supply circuit 102 by the power supply control signal 106 to supply power 107 to the communication request unit 113 and the device identification unit 114. The communication request unit 113 and the device identification unit 114 become operable by the power 107.
[0042] In step S306, communication request unit 113 changes (varies) the voltage level (potential) of communication request signal 105 after a pre-specified waiting period has elapsed since power 107 was supplied. By changing the voltage level (potential) of communication request signal 105, communication request unit 113 determines whether the device connected to first device 100 is relay device 110 or not. The standby period is, for example, a period from when power 107 is supplied to the device identification unit 114 until communication by control signal 108 becomes possible.
[0043] In step S307, when CPU 101 detects that communication request signal 105 has changed to a predetermined potential, CPU 101 uses control signal 108 to read out the unique number (identification information) of relay device 110 stored in device identification unit 114. CPU 101 determines (recognizes) whether the device connected to ACC connector 103 is relay device 110 based on the unique number of relay device 110.
[0044] In the first embodiment, relay device 110, which is a relay device that relays USB communication, is connected to first device 100. Therefore, the unique number of relay device 110 indicates that it is a relay device that relays USB communication, and in step S307, CPU 101 determines that relay device 110 detected in step S307 is a relay device that relays USB communication. In this case, the process proceeds to S308.
[0045] Here, unlike the first embodiment, if a device other than relay device 110 is connected to first device 100, CPU 101 determines that the device connected to first device 100 is not relay device 110 performing USB communication. In this case, CPU 101 ends this flowchart. Then, CPU 101 does not perform negotiation using USB data signal 125, but performs necessary control for each connected relay device using a control method such as I2C (Inter-Integrated Circuit).
[0046] In step S308, CPU 101 notifies CPU 121 via communication unit 117 that USB communication is now possible. In the first embodiment, CPU 101 controls USB data signal 125 to negotiate with CPU 121 to execute USB communication. As a result, USB communication between second device 120 and first device 100 starts.
[0047] In step S309, the CPU 101 starts USB communication. For example, the CPU 101 transmits data (USB data signal 125) such as image data captured by the imaging unit to the second device 120 via the communication unit 117 of the relay device 110 by USB communication.
[0048] According to the first embodiment, the relay device 110 notifies the first device 100 of the connection detection signal 104 based on the potential (VBUS potential) of the VBUS signal supplied from the second device 120. This allows the first device 100 to recognize that the relay device 110 and the second device 120 are connected. Then, the first device 100 can perform USB communication with the second device 120 via the relay device 110. According to the first embodiment, even if the second device 120 does not have a microcontroller for establishing a connection relationship between a USB host and a USB device, USB communication is possible between the first device 100 and the second device 120, so that the configuration of the communication system 1 can be simplified.
[0049] [Embodiment 2] In the first embodiment, since the CPU 101 has the USB port A and the USB port B, the first device 100 can perform USB communication with both the second device 120 and the external device 200. On the other hand, there are cases where the CPU 101 has only one USB port and can perform USB communication with either the second device 120 or the external device 200. Therefore, in the second embodiment, the control of USB communication by the communication system 4 in such a case will be described.
[0050] 4 is a diagram for explaining components of a communication system 4 in the second embodiment. The communication system 4 includes a first device 400, a relay device 110, and a second device 120. Here, the configurations of the second device 120 and the relay device 110 are similar to those in the first embodiment, and therefore the explanations thereof will be omitted. The first device 400 further includes a switching circuit 402 in addition to the components of the first device 100 in the first embodiment.
[0051] The switching circuit 402 switches the signal to be input or output to the USB port of the CPU 101 between the external USB data signal 126 and the USB data signal 125. In the second embodiment, the switching circuit 402 switches the signal to be input or output to the USB port of the CPU 101 based on the USB switching signal 506 input from the CPU 101, as shown in Fig. 5. In this case, if the external USB data signal 126 is input or output to the USB port, USB communication is possible between the first device 100 and the external device 200. If the USB data signal 125 is input or output to the USB port, USB communication is possible between the first device 100 and the second device 120.
[0052] Here, CPU 101 determines whether to perform USB communication with second device 120 or external device 200 in order to generate USB switching signal 506. After that, CPU 101 outputs USB switching signal 506 indicating the device with which it has determined to perform USB communication. Then, switching circuit 402 switches the signal to be input or output to the USB port of CPU 101 so that USB communication with the device indicated by USB switching signal 506 can be performed.
[0053] In the following, four methods (determination methods) for the CPU 101 to determine whether to perform USB communication with the second device 120 or the external device 200 will be described as examples.
[0054] In the first determination method (first-insertion priority method), CPU 101 determines which of second device 120 and external device 200 is connected (electrically connected) to first device 100 first (which becomes available for USB communication) as the device to perform USB communication. In this determination method, CPU 101 performs USB communication with whichever of second device 120 and external device 200 is connected to first device 100 first, and does not switch the device to perform USB communication even if the other device is connected to first device 100 thereafter.
[0055] In the second determination method (last-insertion priority method), CPU 101 determines which of second device 120 and external device 200 is connected to first device 100 later as the device to perform USB communication. In this determination method, CPU 101 performs USB communication with whichever of second device 120 and external device 200 is connected to first device 100 first, and then, when the other device is connected to first device 100, switches to perform USB communication with the other device.
[0056] In the third determination method (main unit priority method), CPU 101 always determines to perform USB communication with external device 200 when both secondary device 120 and external device 200 are connected to primary device 100. Note that CPU 101 determines to perform USB communication with secondary device 120 when external device 200 is not connected.
[0057] In the fourth determination method (accessory priority method), CPU 101 always determines to perform USB communication with second device 120 when both second device 120 and external device 200 are connected to first device 100. Note that CPU 101 determines to perform USB communication with external device 200 when not connected to first device 100.
[0058] Regardless of the method of determination, the CPU 101 may determine that when the second device 120 and the external device 200 are both connected to the first device 100 and one of the devices is disconnected, the CPU 101 will perform USB communication with the other device. This can prevent blank periods in USB communication caused by disconnecting the device.
[0059] Next, the operations of relay device 110 and first device 100 in the second embodiment will be described with reference to the flowchart in Fig. 6. Here, a case will be described in which CPU 101 uses a "first-insert priority method" as a method for determining whether to perform USB communication with second device 120 or external device 200.
[0060] First, when the user operates the switches of first device 100 to turn on the power of first device 100, CPU 101 starts up. Next, the user connects ACC connector 116 of relay device 110 to ACC connector 103 of first device 100. Furthermore, the user connects USB connector 122 of second device 120 to USB connector 115 of relay device 110. When the user makes these connections, the process of the flowchart in Fig. 6 starts. Steps S301 to S311 are the same as the steps of embodiment 1 described using the flowchart in Fig. 3, and therefore description thereof will be omitted.
[0061] In step S601, CPU 101 determines whether or not first device 100 and external device 200 are performing USB communication. If first device 100 and external device 200 are not performing USB communication, the process proceeds to step S602. If first device 100 and external device 200 are performing USB communication, this USB communication continues, and the process ends.
[0062] In step S602, the CPU 101 outputs a USB switching signal 506 indicating that the device performing USB communication is the second device 120 to the switching circuit 402. Then, the switching circuit 402 controls the USB port of the CPU 101 so that the USB data signal 125 is input or output.
[0063] As described above, in the second embodiment, even if the CPU has only one USB port and the camera has a USB connector other than the accessory-specific connector, it is possible to perform USB communication exclusively with both connectors by switching the USB data signal.
[0064] [Embodiment 3] The various functions, processes, or methods described in the above embodiments can also be realized by a personal computer, a microcomputer, a CPU (Central Processing Unit), or a microprocessor executing a program. Hereinafter, in the third embodiment, the personal computer, the microcomputer, the CPU, or the microprocessor is referred to as "computer X." In the third embodiment, a program for controlling computer X and for realizing the various functions, processes, or methods described in the above embodiments is referred to as "program Y."
[0065] Various functions, processes, or methods described in the above embodiments are realized by computer X executing program Y. In this case, program Y is supplied to computer X via a computer-readable storage medium. The computer-readable storage medium in embodiment 3 includes at least one of a hard disk device, a magnetic storage device, an optical storage device, a magneto-optical storage device, a memory card, a volatile memory, a non-volatile memory, and the like. The computer-readable storage medium in embodiment 3 is a non-transitory storage medium. [Explanation of symbols]
[0066] 1: communication system, 100: first device, 110: relay device, 120: second device, 111: USB notification section, 112: connection notification section, 115: USB connector, 116: ACC connector, 117: Communication unit
Claims
1. A relay device to which a first device operating as a USB device and a second device operating as a USB host are connected, comprising: a first connection means for connecting to an interface of the first device that does not comply with the USB standard; a second connection means for connecting to an interface of the second device conforming to the USB standard; a first notification means for notifying the second device that the relay device is a USB device; a second notification means for notifying the first device that the second device has been connected to the second connection means; a communication means for relaying USB communication between the second device and the first device in accordance with the USB standard; A relay device comprising:
2. The relay device according to claim 1, characterized in that the second notification means notifies the first device that the second device is connected to the second connection means when it detects a change in the voltage level of a VBUS signal input from the second device to the second connection means.
3. a requesting means for requesting the first device to identify the relay device; a storage means for storing identification information of the relay device so as to be readable by the first device; 3. The relay device according to claim 1, further comprising:
4. 4. The relay device according to claim 3, wherein the request means and the storage means are operated by power supplied from the first device via the first connection means.
5. 5. The relay device according to claim 1, wherein the first device is an electronic device.
6. 6. The relay device according to claim 5, wherein the first connection means is connected to an accessory shoe of the electronic device.
7. The relay device according to claim 1 , wherein the second device is a smartphone.
8. A control method executed by a computer of a relay device to which a first device operating as a USB device and a second device operating as a USB host are connected, the relay device having a first connection means for connecting to an interface of the first device that does not comply with the USB standard and a second connection means for connecting to an interface of the second device that complies with the USB standard, comprising: a first notification step of notifying the second device that the relay device is a USB device; a second notification step of notifying the first device that the second device has been connected to the second connection means; a communication step of relaying a data signal from the second device and transmitting it to the first device, thereby negotiating USB communication between the second device and the first device in accordance with the USB standard; A control method comprising the steps of:
9. A relay device to which a first device operating as a USB device and a second device operating as a USB host are connected, the relay device having a first connection means for connecting to an interface of the first device that does not comply with the USB standard, and a second connection means for connecting to an interface of the second device that complies with the USB standard, the relay device comprising: a first notification step of notifying the second device that the relay device is a USB device; a second notification step of notifying the first device that the second device has been connected to the second connection means; a communication step of relaying a data signal from the second device and transmitting it to the first device, thereby negotiating USB communication between the second device and the first device in accordance with the USB standard; A program for executing the above.
Citation Information
Patent Citations
Ambient information recording system, and ambient information recording method
JP2011097169A
Adapter device, electronic apparatus, and communication method
JP2017228226A
Electronic apparatus, control method of electronic apparatus, and program
JP2018005619A
Cooperation device, imaging system, imaging method, and program
JP2018169601A
Electronic equipment, control method thereof, and communication system
JP2018200345A
