Communication device, method for controlling communication device, and program
Patent Information
- Application Number
- JP2022079249
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2025-05-07
AI Technical Summary
Time synchronization errors occur between communication devices in networks with multiple PTP slaves due to complex configurations involving transparent or boundary clocks, especially in synchronized imaging scenarios.
A communication device determines its role as a master or slave based on the Priority1 value in Announce messages, setting it to 0 for masters and 255 for slaves to suppress synchronization errors without complicating the network configuration.
This approach effectively reduces time synchronization errors without adding complexity to the device configuration, ensuring accurate time synchronization among multiple devices.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a communication device, a control method for a communication device, and a program.
Background Art
[0002] As a protocol for establishing time synchronization between devices connected to a network, PTP (Precision Time Protocol) is known. PTP is defined by the IEEE (Institute of Electrical and Electronics Engineers) 1588 standard. In PTP, a master device (PTP master) and a slave device (PTP slave) periodically exchange time synchronization messages (packets) to establish time synchronization between the two devices and correct the time of the PTP slave.
[0003] Also, in this standard, as an algorithm for automatically determining an optimal PTP master (grand master) from among a plurality of PTP master candidates when there are a plurality of PTP master candidates, BMCA (Best Master Clock Algorithm) is also defined. In BMCA, a plurality of PTP master candidates periodically exchange Announce messages, and a PTP master is determined according to the content included in the messages (Patent Document 1).
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0005] Consider a communication network consisting of one master and multiple slaves, where the aforementioned BMCA is applied and one slave becomes the PTP master. In this case, communication between the PTP master slave and other slaves (PTP slaves) becomes communication via multiple nodes, such as slave ←→ master ←→ other slaves, which can increase the time synchronization error between the slave and the other slaves. Such time synchronization errors become particularly problematic when performing synchronized shooting with multiple nodes, for example.
[0006] To suppress time synchronization errors, a technique is known in which a transparent clock (TC) or boundary clock (BC) is used in an intermediate node of a communication network consisting of multiple nodes including a PTP master and multiple PTP slaves (Patent Document 2). However, including additional functions such as a transparent clock or boundary clock presents the challenge of complicating the device configuration.
[0007] This invention has been made in view of the above problems, and aims to suppress the increase in time synchronization error without complicating the configuration of the device. [Means for solving the problem]
[0008] As one means to achieve the above objective, the communication device of the present invention has the following configuration: namely, a determination means for determining whether the communication device operates as a master device for communication or as a slave device for communication; and a setting means for setting the communication device, in accordance with the determination, to become a time master device that provides a reference clock for time synchronization with one or more other communication devices, or a time slave device that adjusts its time according to the said reference clock. [Effects of the Invention]
[0009] According to the present invention, it is possible to suppress the increase in time synchronization errors without complicating the node configuration. [Brief explanation of the drawing]
[0010] [Figure 1] Figure 1 shows an example of a communication network configuration. [Figure 2] Figure 2 shows an example of the hardware configuration of a communication device. [Figure 3] Figure 3 shows an example of the functional configuration of a communication device. [Figure 4] Figure 4 is a flowchart of the process performed by the communication device according to the first embodiment. [Figure 5] Figure 5 shows an example of an Announce message format. [Figure 6] Figure 6 is a flowchart of the process performed by the communication device according to the second embodiment. [Figure 7] Figure 7 is a flowchart of the process for sending priority setting commands executed by a communication device acting as the master unit. [Figure 8] Figure 8 shows an example of the format of a Management message. [Modes for carrying out the invention]
[0011] Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the attached drawings. The embodiments described below are merely examples of means for realizing the present invention, and should be modified or changed as appropriate depending on the configuration of the apparatus to which the present invention is applied and various conditions. The present invention is not limited to these embodiments. Furthermore, not all combinations of features described in these embodiments are essential to the solutions of the present invention.
[0012] <First Embodiment> (Network configuration) Figure 1 shows an example of the configuration of a communication network according to this embodiment. The communication network 1 according to this embodiment consists of three communication devices. Communication device 10 functions (operates) as a master unit for wireless communication, and communication devices 20 and 21 function as slave units for wireless communication. Communication devices 20 and 21 (slaves) can communicate via communication device 10 (master unit). For example, communication device 10 operates as a wireless LAN (Local Area Network) access point, and communication devices 20 and 21 operate as wireless LAN stations. In other words, in the case of a wireless LAN, communication devices 10, 20 and 21 operate in infrastructure mode.
[0013] In this embodiment, the communication devices 10, 20, and 21 are assumed to be devices with a shooting function (e.g., cameras), but are not limited to this. In this embodiment, the communication devices 10, 20, and 21 are configured to operate in multiple operating modes. In this embodiment, the communication devices 10, 20, and 21 are configured to operate in at least two operating modes: a synchronous operation mode in which predetermined processing or operations (e.g., shooting processing) are performed in a synchronized state among multiple communication devices, and a time synchronization mode in which time synchronization is performed among multiple devices. Time synchronization is performed according to PTP, for example, based on GPS (Global Positioning System).
[0014] Note that the configuration in Figure 1 is just one example, and for example, the communication network 1 may be configured to include other communication devices having a similar configuration to communication devices 10, 20, and 21. Furthermore, the communication method used is not limited to wireless LAN; the communication network 1 may be configured to use other communication methods as long as it consists of a wireless communication base station and slave devices.
[0015] (Configuration of communication equipment) Figure 2 shows an example of the hardware configuration of the communication device according to this embodiment. Here, the communication device 10 will be described as an example, but the communication devices 20 and 21 may also have the same hardware configuration as the communication device 10. As an example of its hardware configuration, the communication device 10 includes a control unit 201, a storage unit 202, a wireless communication unit 203, a display unit 204, and an input unit 205.
[0016] The control unit 201 controls the entire communication device 10 by executing a control program (computer program) stored in the storage unit 202. The storage unit 202 stores a control program executed by the control unit 201 and various types of information such as communication parameters, photographed image data, and authentication information. Each of the various operations described later can be performed by the control unit 201 executing the control program stored in the storage unit 202. The wireless communication unit 203 performs control for wireless communication. For example, the wireless communication unit 203 controls an antenna (not shown) to transmit and receive signals. The display unit 204 has a function of outputting visual information. For example, the display unit 204 is composed of an LCD (Liquid Crystal Display) or an LED (Light Emitting Diode). Also, the display unit 204 may be configured to output audio information. The input unit 205 is used for a user to perform various inputs or to acquire sensor information. Note that the display unit 204 and the input unit 205 may be configured as a common module and function as a GUI (Graphic User Interface).
[0017] Figure 3 shows the functional configuration (software function) of the communication device according to this embodiment. Here, the communication device 10 will be described as an example, but the communication devices 20 and 21 may also have the same functional configuration as the communication device 10. As an example of its functional configuration, the communication device 10 includes a transmission unit 301, a reception unit 302, a storage control unit 303, a display control unit 304, a master / slave determination unit 305, a synchronization processing unit 306, a unit number confirmation unit 308, and an operation mode detection unit 309. The synchronization processing unit 306 includes a setting unit 307.
[0018] The transmitting unit 301 performs signal transmission processing to other communication devices via the wireless communication unit 203. The receiving unit 302 performs signal reception processing from other communication devices via the wireless communication unit 203. For example, the transmitting unit 301 and the receiving unit 302 perform signal transmission or reception processing of a wireless LAN compliant with the IEEE802.11a / b / g / n / ac / ax standard with other communication devices. The memory control unit 303 controls the memory unit 202. The display control unit 304 performs display control (for example, control processing of the screen displayed on the display unit 204) for the display unit 204.
[0019] The master / slave determination unit 305 determines whether the communication device 10 itself is currently operating as a master device or a slave device of the wireless communication. The master / slave determination unit 305 can determine, for example, based on the signals transmitted and received via the transmitting unit 301 and the receiving unit 302 for communication establishment, that the communication device 10 is operating as a master device or a slave device.
[0020] The synchronization processing unit 306 performs time synchronization processing according to PTP (Precision Time Protocol) via the transmission unit 301 and the reception unit 302. The synchronization processing unit 306 also determines the PTP master (time master) that provides the reference clock for time synchronization with other communication devices, according to the BMCA (Best Master Clock Algorithm). The determination of the PTP master is performed by an Announce message (Announce packet) exchanged between communication devices. Figure 5 shows an example of the format of an Announce message. In the Announce message shown in Figure 5, the value of the Priority1 field (hereinafter referred to as the Priority1 value), which indicates priority, can be set by the user, and a value from 0 to 255 can be set. The synchronization processing unit 306 can determine the communication device with the smallest Priority1 value among multiple PTP master candidate communication devices as the first priority PTP master. Specifically, the synchronization processing unit 306 sends an Announce message (its own Announce message) containing the set Priority1 value to the communication device 10 over the network. Then, if the synchronization processing unit 306 receives another Announce message containing a Priority1 value smaller than the Priority1 value in question, it stops sending its own Announce message. Ultimately, the communication device that continues to send Announce messages may be determined to be the PTP master.
[0021] The synchronization processing unit 306 includes a setting unit 307 for configuring the communication device 10 to become a PTP master (time master) or a PTP slave (time slave) that adjusts its time according to a reference clock provided by the PTP master. In this embodiment, the setting unit 307 is configured to set (adjust) the Priory1 value of the Announce message shown in Figure 5. This setting can be performed by user operation via the input unit 205.
[0022] The unit counting unit 308 confirms the number of communication devices currently constituting the communication network 1. In the case of the communication network 1 shown in Figure 1, the unit counting unit 308 confirms that the number of communication devices is 3. The unit counting unit 308 is also configured to confirm whether a new communication device operating as a slave has been connected to the communication network 1.
[0023] The operation mode detection unit 309 detects the operation mode of the communication device 10. As described above, in this embodiment, the communication device 10 is configured to operate in at least two operation modes: a synchronous operation mode in which predetermined processing is performed in a synchronized state among multiple communication devices, and a time synchronization mode in which time synchronization is performed among multiple devices. The operation mode of the communication device 10 can be set by instructions from another device via the receiving unit 302. Alternatively, the operation mode may be set by the user via the input unit 205 on the setting screen of the display unit 204 displayed by the display control unit 304.
[0024] (Process flow) Next, with reference to Figure 4, the PTP master determination process according to this embodiment will be described. Figure 4 is a flowchart of the process performed by the communication devices (communication devices 10, 20, and 21 in the network configuration of Figure 1) according to this embodiment. This process may be started by the control unit 201 when a communication device establishes or joins the communication network 1. It may also be started by the control units 201 of existing and new communication devices when it is detected that a new communication device has joined the communication network 1. Furthermore, this process may be performed by the control unit 201 executing a computer program stored in the storage unit 202, which has been read by the storage control unit 303.
[0025] First, the communication device's operating mode detection unit 309 detects the operating mode of the communication device (S401) and confirms whether the operating mode is synchronous operation mode or not (S402). If the operating mode is synchronous operation mode (Yes in S402), the process proceeds to S404; otherwise (No in S402), the process proceeds to S403. In S403, the operating mode detection unit 309 confirms whether the communication device's operating mode is time synchronization mode. If the operating mode is time synchronization mode (Yes in S403), the process proceeds to S410; otherwise (No in S403), the control unit 201 determines that time synchronization by PTP is unnecessary and terminates the process. In S410, the synchronization processing unit 306 determines the optimal PTP master according to BMCA. Thus, if the operating mode is time synchronization mode, the synchronization processing unit 306 operates according to the normal BMCA and determines the optimal PTP master.
[0026] In S404, the unit count confirmation unit 308 checks the number of communication devices constituting the communication network 1 and determines whether that number is 3 or more (S405). If the number is less than 3 (No in S405), the synchronization processing unit 306 determines the optimal PTP master according to BMCA (S410). Thus, if the number of communication devices constituting the communication network 1 is less than 3, the optimal PTP master is determined according to the normal BMCA.
[0027] If the number of communication devices constituting the communication network 1 is three or more (Yes in S405), the master / slave device determination unit 305 checks whether the communication device itself operates as a master device or as a slave device (S406). If the master / slave device determination unit 305 determines that the communication device operates as a master device (Yes in S407), the process proceeds to S408; if it determines that it operates as a slave device (No in S407), the process proceeds to S409.
[0028] In S408, the setting unit 307 sets the Priority1 value in the Announce message sent to the communication device by the transmission unit 301 to 0. Then, in S409, the setting unit 307 sets the Priority1 value to 255. In the following S410, the synchronization processing unit 306 determines the PTP master according to BMCA. As a result, the communication device operating as the master unit is determined as the PTP master, while the communication device operating as the slave unit is not determined as the PTP master.
[0029] In Figure 4, the process proceeds to S406 if there are three or more communication devices constituting the network (Yes in S405), but it may also be configured to proceed to S406 if there are two or more such devices. Furthermore, in Figure 4, the operation mode (synchronous operation mode (S402) or time synchronization mode (S403)) may not be determined, and the process may be configured to proceed to S404 regardless of the operation mode.
[0030] Thus, the communication device according to this embodiment sets the Priority1 value in the Announce message it transmits to 0 so that it is determined to be a PTP master when it operates as a master unit. This makes it possible to set the communication device operating as a master unit to become a PTP master, even if each of the multiple communication devices does not have a complex configuration, thereby suppressing the increase in time synchronization errors within the communication network.
[0031] <Second Embodiment> In the second embodiment, the master unit in wireless communication sets the Priority1 value in the Announce message transmitted by the slave unit. The configuration of the communication network and communication device in this embodiment is as shown in Figures 1 to 3 described in the first embodiment. The differences from the first embodiment will be described below.
[0032] (Process flow) Referring to Figure 6, the PTP master determination process according to this embodiment will be explained. Figure 6 is a flowchart of the process executed by the communication devices according to this embodiment (communication devices 10, 20, and 21 in the network configuration of Figure 1). After the start of the process in Figure 6, the master / slave determination unit 305 of the communication device checks whether the communication device itself will operate as a master or as a slave (S601). If the master / slave determination unit 305 determines that the communication device will operate as a master (Yes in S602), the process proceeds to S603. If it determines that it will operate as a slave (No in S602), the process proceeds to S605. Also, if the communication device is determined to operate as a master (Yes in S602), the communication device simultaneously performs the process of sending a priority setting command (S607).
[0033] The process in S607 will be explained with reference to Figure 7. Figure 7 is a flowchart of the process of sending a priority setting command executed by a communication device acting as a master unit. In S701, the unit count confirmation unit 308 checks whether a new slave unit (a communication device acting as a slave unit) has been connected. If a new slave unit has been connected (Yes in S701), the synchronization processing unit 306 sends a setting command to that slave unit to set the Priority1 value to 255 (S702). This setting command may be sent, for example, using the Reserved field of an Announce message (Figure 5). Alternatively, this setting command may be sent using the Reserved field of a Management message (Management packet) in PTP. Figure 8 shows an example of the format of a Management message. Alternatively, this setting command may be sent using a different communication protocol.
[0034] Returning to the explanation of Figure 6, in S603, the setting unit 307 sets the Priority1 value in the Announce message transmitted by the transmission unit 301 to 0. Meanwhile, in S605, the receiving unit 302 waits until it receives a priority setting command from the master unit in the wireless communication (S605). When the priority setting command is received (Yes in S605), the setting unit 307 sets the Priority1 value in the Announce message transmitted by the transmission unit 301 according to the received command. In this way, when the communication device operates as a slave unit, the Priority1 value is set according to the command (value) instructed by the master unit. In S604, following S603 or S605, the synchronization processing unit 306 determines the PTP master according to BMCA.
[0035] Thus, when the communication device according to this embodiment operates as a slave device, it sets the Priority1 value in the Announce message it transmits based on control from the master device. As a result, even if each of the multiple communication devices does not have a complex configuration, the communication device operating as a slave device will not become a PTP master, and it is possible to suppress the increase in time synchronization errors within the communication network.
[0036] In this embodiment, the communication device sets (adjusts) the Priority1 value as a setting to become a PTP master or PTP slave depending on whether the communication device operates as a master or slave device. However, it may be configured to perform other settings instead. For example, the setting unit 307 may set (adjust) the Priority2 value in the Announce message (Figure 5) (0 is the highest priority, the default value is 128). Alternatively, the setting unit 307 may change the MAC address of the communication device (smaller is higher priority).
[0037] Furthermore, although the above embodiment configures multiple communication devices to perform time synchronization processing according to PTP, they may also be configured to perform time synchronization processing according to NTP (Network Time Protocol). That is, the communication devices may be configured to be either the device that provides time or the device that receives time in NTP, depending on whether the communication device operates as a master or slave device.
[0038] <Other Embodiments> Furthermore, the present invention can also be realized by supplying a program that implements one or more of the functions of the above-described embodiments to a system or device via a network or storage medium, and by having one or more processors in the computer of that system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that implements one or more functions.
[0039] This embodiment includes the following configurations and methods.
[0040] (Configuration 1) A communication device comprising: determination means for determining whether the communication device operates as a master device for communication or as a slave device for communication; and setting means for setting the communication device to become a time master device that provides a reference clock for time synchronization with one or more other communication devices, or a time slave device that adjusts the time according to the reference clock, in accordance with the determination.
[0041] (Configuration 2) The communication device and the one or more other communication devices are configured to perform time synchronization processing in accordance with PTP (Precision Time Protocol), and when the determination means determines that the communication device is to operate as the master device, the setting means sets the Priority1 value in the Announce message to be transmitted to the highest priority value so that the communication device becomes the time master device, as described in Configuration 1.
[0042] (Configuration 3) The communication device according to Configuration 2, characterized in that the highest priority value is 0.
[0043] (Configuration 4) The communication device according to Configuration 2 or 32, characterized in that, when the determination means determines that the communication device is to operate as the slave device, the setting means sets the Priority1 value to the lowest priority value so that the communication device becomes the time slave device.
[0044] (Configuration 5) The communication device according to Configuration 4, characterized in that the lowest priority value is 255.
[0045] (Configuration 6) The communication device according to Configuration 2, characterized in that, when the determination means determines that the communication device is to operate as the master unit, it sends a command to one or more other communication devices to set the Priority1 value to the lowest priority value.
[0046] (Configuration 7) The communication device according to Configuration 6, characterized in that, when the determination means determines that the communication device is operating as the slave device, the setting means sets the Priority1 value to the lowest priority value upon receiving the command.
[0047] (Configuration 8) A communication device according to any one of Configurations 1 to 7, further comprising detection means for detecting whether the communication device and the one or more other communication devices are operating in an operating mode that performs a predetermined process in a synchronized state, wherein the setting means performs the setting when the detection means detects that the synchronized process is being performed.
[0048] (Configuration 9) The communication device according to Configuration 8, characterized in that the predetermined process is an imaging process.
[0049] (Configuration 10) The communication device according to any one of Configurations 1 to 9, characterized in that the setting means performs the setting when the network including the communication device and the one or more other communication devices is composed of three or more communication devices.
[0050] (Configuration 11) The communication device according to any one of Configurations 1 to 10, characterized in that the setting means performs the setting when a network is constructed including the communication device and one or more other communication devices.
[0051] (Configuration 12) The communication device according to any one of Configurations 1 to 11, characterized in that the setting means performs the setting when a new other communication device joins the network which includes the communication device and the one or more other communication devices.
[0052] (Configuration 13) A control method for a communication device, comprising: a determination step of determining whether the communication device operates as a master device for communication or as a slave device for communication; and a setting step of setting the communication device, in accordance with the determination, to become a time master device that provides a reference clock for time synchronization with one or more other communication devices, or a time slave device that adjusts the time according to the reference clock. [Explanation of symbols]
[0053] 10;20;21: Communication device, 201: Control unit, 202: Memory unit, 203: Wireless communication unit, 204: Display unit, 205: Input unit, 301: Transmitter, 302: Receiver, 303: Memory control unit, 304: Display control unit, 305: Master / slave unit determination unit, 306: Synchronization processing unit, 307: Setting unit, 308: Unit count confirmation unit, 309: Operation mode detection unit
Claims
1. 1. A communication device, comprising: a determination means for determining whether the communication device operates as a parent device for communication or as a child device for communication; a setting means for setting the communication device to be a time master device that provides a reference clock for time synchronization with one or more other communication devices, or a time slave device that adjusts time according to the reference clock, based on the determination; A communication device comprising:
2. the communication device and the one or more other communication devices are configured to perform a time synchronization process according to a Precision Time Protocol (PTP); When the determination means determines that the communication device operates as the parent device, 2. The communication device according to claim 1, wherein the setting means sets a Priority1 value in an Announcement message to a value with the highest priority so that the communication device becomes the time master device.
3. 3. The communication device according to claim 2, wherein the highest priority value is zero.
4. When the determination means determines that the communication device operates as the child device, 3. The communication device according to claim 2, wherein the setting means sets the Priority1 value to a lowest priority value so that the communication device becomes the time slave device.
5. 5. The communication device according to claim 4, wherein the lowest priority value is 255.
6. The communication device according to claim 2, characterized in that when the determination means determines that the communication device is to operate as the parent device, a command for setting the Priority 1 value to the lowest priority value is transmitted to the one or more other communication devices.
7. The communication device according to claim 6, characterized in that when the determination means determines that the communication device will operate as the child device, upon receipt of the command, the setting means sets the Priority1 value to the lowest priority value.
8. a detection unit for detecting whether the communication device and the one or more other communication devices are operating in an operation mode in which the communication device and the one or more other communication devices perform a predetermined process in a synchronized state; 2. The communication device according to claim 1, wherein the setting means performs the setting when the detection means detects that the communication device is operating in the operation mode.
9. 9. The communication device according to claim 8, wherein the predetermined process is a photographing process.
10. 2. The communication device according to claim 1, wherein the setting unit performs the setting when a network including the communication device and the one or more other communication devices is configured with three or more communication devices.
11. 2. The communication device according to claim 1, wherein the setting means performs the setting when a network including the communication device and the one or more other communication devices is constructed.
12. 12. The communication device according to claim 1, wherein the setting means performs the setting when a new other communication device joins a network including the communication device and the one or more other communication devices.
13. A method for controlling a communication device, comprising: a determination step of determining whether the communication device operates as a parent device for communication or as a child device for communication; a setting step of setting the communication device to be a time master device that provides a reference clock for time synchronization with one or more other communication devices, or a time slave device that adjusts time according to the reference clock, in response to the determination; A control method comprising the steps of:
14. A program for causing a computer to function as each of the means of the communication device according to any one of claims 1 to 11.