[go: up one dir, main page]

JP6958201B2 - Wireless communication devices, electronic clocks, wireless communication methods, and programs - Google Patents

Wireless communication devices, electronic clocks, wireless communication methods, and programs Download PDF

Info

Publication number
JP6958201B2
JP6958201B2 JP2017192668A JP2017192668A JP6958201B2 JP 6958201 B2 JP6958201 B2 JP 6958201B2 JP 2017192668 A JP2017192668 A JP 2017192668A JP 2017192668 A JP2017192668 A JP 2017192668A JP 6958201 B2 JP6958201 B2 JP 6958201B2
Authority
JP
Japan
Prior art keywords
wireless communication
response
communication device
cpu
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017192668A
Other languages
Japanese (ja)
Other versions
JP2019067187A (en
Inventor
和穂 姜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2017192668A priority Critical patent/JP6958201B2/en
Publication of JP2019067187A publication Critical patent/JP2019067187A/en
Priority to JP2021164430A priority patent/JP7363874B2/en
Application granted granted Critical
Publication of JP6958201B2 publication Critical patent/JP6958201B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Electric Clocks (AREA)
  • Programmable Controllers (AREA)
  • Mobile Radio Communication Systems (AREA)

Description

この発明は、無線通信装置、電子時計、無線通信方法、及びプログラムに関する。 The present invention relates to wireless communication devices, electronic clocks, wireless communication methods, and programs.

従来より、通信相手との接続のための設定情報の履歴を保存しておくことにより、他の通信相手との間で割り込み通信が発生した場合であっても、割り込み通信の後に、設定情報の履歴に基づいて、元の通信相手との通信を再開する技術がある(例えば、特許文献1参照)。 Conventionally, by saving the history of setting information for connection with the communication partner, even if interrupt communication occurs with another communication partner, the setting information can be stored after the interrupt communication. There is a technique for resuming communication with the original communication partner based on the history (see, for example, Patent Document 1).

特開2006−238329号公報Japanese Unexamined Patent Publication No. 2006-238329

特許文献1に開示されているような通信処理において、通信装置同士が互いに決められたシーケンスに従って通信している状況において、例えば一方の通信装置のOS(Operating System)のアップデート等により、決められたシーケンスと異なるシーケンスを要求された場合がある。このような場合に、異なるシーケンスを優先的に処理した結果、元のシーケンスに戻れずに通信装置が動作不全に陥る可能性がある。 In the communication process as disclosed in Patent Document 1, in a situation where communication devices communicate with each other according to a sequence determined by each other, it is determined by, for example, updating the OS (Operating System) of one communication device. A sequence different from the sequence may be requested. In such a case, as a result of preferentially processing different sequences, there is a possibility that the communication device may malfunction without returning to the original sequence.

この発明の目的は、安定して通信を維持することが可能な無線通信装置、電子時計、無線通信方法、及びプログラムを提供することにある。 An object of the present invention is to provide a wireless communication device, an electronic clock, a wireless communication method, and a program capable of stably maintaining communication.

本発明は、上記目的を達成するため、本発明の観点に係る無線通信装置は、
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部と、
制御部と、
を備え、
前記制御部は、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする。
In order to achieve the above object, the wireless communication device according to the viewpoint of the present invention is
A wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of multiple layers.
Control unit and
With
The control unit
By controlling the wireless communication unit, a plurality of processes including transmission / reception of data with the other wireless communication device are executed based on the counter corresponding to each of the plurality of processes.
When an event different from the expected event occurs during the execution of the process, it is determined whether or not a response to the other wireless communication device is necessary for each of the plurality of layers.
When it is determined that the response is required, the wireless communication unit is controlled to transmit the response.
When the process currently being executed ends, the counter is updated to indicate the process to be executed next.
It is characterized by that.

本発明に従うと、安定して通信を維持することができる。 According to the present invention, stable communication can be maintained.

実施形態に係る無線通信システムの構成例を示す図である。It is a figure which shows the configuration example of the wireless communication system which concerns on embodiment. 実施形態に係る電子時計の構成を示すブロック図である。It is a block diagram which shows the structure of the electronic clock which concerns on embodiment. 実施形態における電子時計と無線通信装置との間の接続中に実行される複数の処理を示す図である。It is a figure which shows the plurality of processes executed during the connection between an electronic clock and a wireless communication device in an embodiment. 実施形態における電子時計のCPUが実行する無線通信処理の動作の一例を示すフローチャートである。It is a flowchart which shows an example of the operation of the wireless communication processing executed by the CPU of the electronic timepiece in embodiment. 実施形態における電子時計のCPUが実行する各処理におけるデータ送受信処理の動作の一例を示すフローチャートである。It is a flowchart which shows an example of the operation of the data transmission / reception processing in each processing executed by the CPU of the electronic clock in embodiment. 実施形態における電子時計のCPUが実行する層判定処理の動作の一例を示すフローチャートである。It is a flowchart which shows an example of the operation of the layer determination process executed by the CPU of the electronic timepiece in embodiment. 実施形態における電子時計のCPUが実行する応答処理の動作の一例を示すフローチャートである。It is a flowchart which shows an example of the operation of the response processing executed by the CPU of the electronic timepiece in embodiment.

以下、本発明の実施の形態を図面に基づいて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、実施形態に係る無線通信システム1の構成例を示す図である。図1に示す構成例において、無線通信システム1は、電子時計100と、無線通信装置200とから構成される。電子時計100は、計時機能及び無線通信機能を備える電子機器であって、Bluetooth(登録商標) Low Energy(以下、BLEという。)等の無線通信規格に基づいて、無線通信装置200と無線通信を行う。無線通信装置200は、例えば、携帯電話、スマートフォン、PC(Personal Computer)、PDA(Personal Digital Assistant)や、スマートウォッチ等のウェアラブル端末といった、無線通信機能を備える携帯可能な電子機器である。 FIG. 1 is a diagram showing a configuration example of the wireless communication system 1 according to the embodiment. In the configuration example shown in FIG. 1, the wireless communication system 1 is composed of an electronic clock 100 and a wireless communication device 200. The electronic clock 100 is an electronic device having a timekeeping function and a wireless communication function, and communicates wirelessly with a wireless communication device 200 based on a wireless communication standard such as Bluetooth (registered trademark) Low Energy (hereinafter referred to as BLE). conduct. The wireless communication device 200 is a portable electronic device having a wireless communication function, such as a mobile phone, a smartphone, a PC (Personal Computer), a PDA (Personal Digital Assistant), or a wearable terminal such as a smart watch.

次に、実施形態に係る電子時計100の構成について説明する。 Next, the configuration of the electronic clock 100 according to the embodiment will be described.

図2は、本実施形態に係る電子時計100の構成例を示すブロック図である。まず、実施形態に係る電子時計100のハードウェア構成について説明する。図2に示すように、電子時計100は、マイクロコンピュータ101と、ROM(Read Only Memory)102と、通信部103と、アンテナ104と、電力供給部105と、表示部106と、表示ドライバ107と、操作受付部108と、振動子109と、を備える。 FIG. 2 is a block diagram showing a configuration example of the electronic clock 100 according to the present embodiment. First, the hardware configuration of the electronic clock 100 according to the embodiment will be described. As shown in FIG. 2, the electronic clock 100 includes a microcomputer 101, a ROM (Read Only Memory) 102, a communication unit 103, an antenna 104, a power supply unit 105, a display unit 106, and a display driver 107. The operation receiving unit 108 and the vibrator 109 are provided.

マイクロコンピュータ101は、制御部としてのCPU(Central Processing Unit)110と、記憶部としてのRAM(Random Access Memory)111と、発振回路112と、分周回路113と、計時回路114とを備える。なお、RAM111、発振回路112、分周回路113、及び計時回路114は、マイクロコンピュータ101の内部に限られず、マイクロコンピュータ101の外部に設けられてもよい。また、ROM102と、通信部103と、電力供給部105と、表示ドライバ107と、振動子109は、マイクロコンピュータ101の外部に限られず、マイクロコンピュータ101の内部に設けられてもよい。 The microcomputer 101 includes a CPU (Central Processing Unit) 110 as a control unit, a RAM (Random Access Memory) 111 as a storage unit, an oscillation circuit 112, a frequency dividing circuit 113, and a timing circuit 114. The RAM 111, the oscillation circuit 112, the frequency dividing circuit 113, and the time measuring circuit 114 are not limited to the inside of the microcomputer 101, but may be provided outside the microcomputer 101. Further, the ROM 102, the communication unit 103, the power supply unit 105, the display driver 107, and the vibrator 109 are not limited to the outside of the microcomputer 101, but may be provided inside the microcomputer 101.

CPU110は、各種演算処理を行い、電子時計100の全体動作を統括制御するプロセッサである。CPU110は、ROM102から制御プログラムを読み出し、RAM111にロードして時刻の表示や各種機能に係る演算制御や表示などの各種動作処理を行う。また、CPU110は、通信部103を制御して、無線通信装置200との接続を確立し、後述する無線通信処理を実行する。 The CPU 110 is a processor that performs various arithmetic processes and controls the overall operation of the electronic clock 100 in an integrated manner. The CPU 110 reads a control program from the ROM 102, loads it into the RAM 111, and performs various operation processes such as displaying the time and performing arithmetic control and display related to various functions. Further, the CPU 110 controls the communication unit 103 to establish a connection with the wireless communication device 200 and execute the wireless communication process described later.

RAM111は、SRAM(Static Random Access Memory)やDRAM(Dynamic Random Access Memory)などの揮発性のメモリであり、CPU110に作業用のメモリ空間を提供して一時データを記憶すると共に、各種設定データを記憶する。 The RAM 111 is a volatile memory such as an SRAM (Static Random Access Memory) or a DRAM (Dynamic Random Access Memory), and provides a memory space for work to the CPU 110 to store temporary data and various setting data. do.

発振回路112は、振動子109を発振さることにより所定の周波数信号(クロック信号)を生成して出力する。この発振回路112として、例えば、水晶発振器が用いられる。 The oscillation circuit 112 generates and outputs a predetermined frequency signal (clock signal) by oscillating the vibrator 109. As the oscillation circuit 112, for example, a crystal oscillator is used.

分周回路113は、発振回路112から入力された周波数信号を、計時回路114やCPU110が利用する周波数の信号に分周して出力する。この出力信号の周波数は、CPU110による設定に基づいて変更されても良い。 The frequency dividing circuit 113 divides the frequency signal input from the oscillation circuit 112 into a frequency signal used by the timekeeping circuit 114 and the CPU 110, and outputs the frequency signal. The frequency of this output signal may be changed based on the setting by the CPU 110.

計時回路114は、分周回路113から入力された所定の計時信号の入力回数を計数して初期値に加算することで現在の時刻を計時する。計時回路114は、RAM111に記憶させる値を変化させるソフトウェアにより構成されても良いし、或いは、専用のカウンタ回路により構成されても良い。計時回路114が計時する時刻は、所定のタイミングからの累積時間、UTC(Coordinated Universal Time、協定世界時)、又は予め設定された地方時などのうち何れであっても良い。また、この計時回路114が計時する時刻は、必ずしも年月日時分秒の形式で保持される必要がない。また、計時回路114が計時する時刻は、Wi−Fi(登録商標)等の外部から得られる時刻によって修正可能である。 The timekeeping circuit 114 measures the current time by counting the number of times a predetermined timekeeping signal input from the frequency dividing circuit 113 is input and adding it to the initial value. The timekeeping circuit 114 may be configured by software that changes the value stored in the RAM 111, or may be configured by a dedicated counter circuit. The time measured by the timekeeping circuit 114 may be any of cumulative time from a predetermined timing, UTC (Coordinated Universal Time), preset local time, and the like. Further, the time measured by the timekeeping circuit 114 does not necessarily have to be held in the form of year, month, day, hour, minute, and second. Further, the time measured by the time measuring circuit 114 can be corrected by a time obtained from the outside such as Wi-Fi (registered trademark).

これら発振回路112、分周回路113及び計時回路114により計時部が構成される。 The timekeeping section is composed of the oscillation circuit 112, the frequency dividing circuit 113, and the timekeeping circuit 114.

ROM102は、マスクROMや書き換え可能な不揮発性メモリなどであり、制御プログラムや初期設定データが記憶されている。制御プログラムの中には、後述する各種処理の制御に係るプログラム115が含まれる。 The ROM 102 is a mask ROM, a rewritable non-volatile memory, or the like, and stores a control program and initial setting data. The control program includes a program 115 related to the control of various processes described later.

通信部103は、例えば無線周波数(RF:Radio Frequency)回路やベースバンド(BB:Baseband)回路、メモリ回路で構成される。通信部103は、アンテナ104を介して受信した無線信号を、復調、復号等してCPU110へ送る。また、通信部103は、CPU110から送られた信号を、符号化、変調等して、アンテナ104を介して外部へ送信する。 The communication unit 103 is composed of, for example, a radio frequency (RF: Radio Frequency) circuit, a baseband (BB: Baseband) circuit, and a memory circuit. The communication unit 103 demodulates, decodes, etc. the radio signal received via the antenna 104 and sends it to the CPU 110. Further, the communication unit 103 encodes, modulates, or the like the signal sent from the CPU 110 and transmits the signal to the outside via the antenna 104.

また、通信部103は、複数の階層から構成される通信プロトコルスタックに従って無線通信装置200と互いに無線通信する。本実施形態において、通信部103は、BLEにおける通信プロトコルスタックであるBLEスタックに従って無線通信する。BLEスタックは、複数の階層として、リンク層、L2CAP(Logical Link Control and Adaption Protocol)層、SM(Security Management)層、ATT(Attribute Protocol)層等から構成される。リンク層は、自装置に近接するデバイスの発見や接続、通信に用いられるプロトコルの階層である。L2CAP層は、通信の多重化を行うプロトコルの層である。SM層は、ペアリングや暗号化、暗号鍵の配布の方法を定義するプロトコルの層である。ATT層は、BLEのサービス及びキャラクタリスティックを定義するプロトコルの層である。本実施形態では、後述するように、リンク層、L2CAP層、SM層、及びATT層の4つの層のそれぞれについて、無線通信装置200への応答の要否を判定する。 Further, the communication unit 103 wirelessly communicates with the wireless communication device 200 according to a communication protocol stack composed of a plurality of layers. In the present embodiment, the communication unit 103 wirelessly communicates according to the BLE stack, which is the communication protocol stack in BLE. The BLE stack is composed of a link layer, an L2CAP (Logical Link Control and Adaption Protocol) layer, an SM (Security Management) layer, an ATT (Attribute Protocol) layer, and the like as a plurality of layers. The link layer is a layer of protocols used for discovering, connecting, and communicating devices close to the own device. The L2CAP layer is a layer of a protocol for multiplexing communication. The SM layer is a layer of a protocol that defines a method of pairing, encryption, and distribution of an encryption key. The ATT layer is the layer of the protocol that defines the services and characteristics of BLE. In the present embodiment, as will be described later, it is determined whether or not a response to the wireless communication device 200 is necessary for each of the four layers of the link layer, the L2CAP layer, the SM layer, and the ATT layer.

電力供給部105は、バッテリを備え、電子時計100の動作に係る電力を各部にその動作電圧で供給する。電力供給部105のバッテリとしては、本実施形態では、リチウムイオン電池等の二次電池が用いられる。 The power supply unit 105 includes a battery, and supplies electric power related to the operation of the electronic clock 100 to each unit at the operating voltage. As the battery of the power supply unit 105, a secondary battery such as a lithium ion battery is used in this embodiment.

これらマイクロコンピュータ101、ROM102、通信部103、アンテナ104、電力供給部105、及び振動子109により無線通信装置10が構成される。 The wireless communication device 10 is composed of the microcomputer 101, the ROM 102, the communication unit 103, the antenna 104, the power supply unit 105, and the oscillator 109.

表示部106は、例えば、液晶ディスプレイ(LCD:Liquid Crystal Display)や有機EL(Electro Luminescence)ディスプレイなどの表示画面を備える。表示ドライバ107は、表示画面の種別に応じた駆動信号をCPU110からの制御信号に基づいて表示部106に出力して、表示画面上への表示を行う。 The display unit 106 includes a display screen such as a liquid crystal display (LCD) or an organic EL (Electro Luminescence) display, for example. The display driver 107 outputs a drive signal according to the type of the display screen to the display unit 106 based on the control signal from the CPU 110, and displays the drive signal on the display screen.

操作受付部108は、例えばキーやボタンを備え、ユーザからの入力操作を受け付けて、当該入力操作に応じた電気信号を入力信号としてCPU110に出力する。また、例えば、操作受付部108としてタッチセンサが表示部106の表示画面に重ねて設けられ、表示画面とともにタッチパネルを構成してもよい。この場合、タッチセンサは、当該タッチセンサへのユーザの接触動作に係る接触位置や接触態様を検出し、検出された接触位置や接触態様に応じた操作信号をCPU110に出力する。 The operation receiving unit 108 is provided with, for example, a key or a button, receives an input operation from the user, and outputs an electric signal corresponding to the input operation to the CPU 110 as an input signal. Further, for example, a touch sensor may be provided as the operation receiving unit 108 so as to be superimposed on the display screen of the display unit 106, and a touch panel may be configured together with the display screen. In this case, the touch sensor detects the contact position and contact mode related to the user's contact operation with the touch sensor, and outputs an operation signal corresponding to the detected contact position and contact mode to the CPU 110.

次に、実施形態に係る電子時計100のCPU110の機能構成について説明する。図2に示すように、CPU110は、通常処理部121、応答要否判定部122、応答部123として機能する。これら通常処理部121、応答要否判定部122、応答部123の機能は、単一のCPUにより実現されても良いし、各々別個のCPUにより実現されても良い。また、それらの機能は、通信部103のCPU等、マイクロコンピュータ101以外のプロセッサにより実現されても良い。 Next, the functional configuration of the CPU 110 of the electronic clock 100 according to the embodiment will be described. As shown in FIG. 2, the CPU 110 functions as a normal processing unit 121, a response necessity determination unit 122, and a response unit 123. The functions of the normal processing unit 121, the response necessity determination unit 122, and the response unit 123 may be realized by a single CPU or may be realized by separate CPUs. Further, those functions may be realized by a processor other than the microcomputer 101, such as the CPU of the communication unit 103.

通常処理部121としてのCPU110は、通信部103を制御して、無線通信装置200とのデータの送受信を含む複数の処理を、複数の処理それぞれに対応するカウンタに基づいて実行する。複数の処理は、電子時計100と無線通信装置200との間で予め設定された所定の順序で実行される処理である。本実施形態では、図3に示すように、電子時計100は、無線通信装置200との接続確立後に無線通信をすることにより、サービス発見処理(Service Discovery)、プロファイル構成処理(Profile Config)、接続更新処理(Connection Update)、接続継続処理(Connect Continue)、終了処理(Terminate)を、この順序で実行する例について説明する。サービス発見処理は、電子時計100が行う、無線通信装置200が持つサービスを確定するための処理である。プロファイル構成処理は、データ読出し・書込みを行い、電子時計100の設定、アプリの設定等を行うための処理である。接続更新処理は、接続におけるデータ送受信間隔の変更や、接続に関するパラメータを更新するための処理である。接続継続処理は、接続を維持してユーザが無線通信装置200を操作すること等により、電子時計100の状態を変更することや、無線通信装置200からの通知を受け取るための処理である。終了処理は、タイムアウトや、電子時計100等の操作により接続を切断するための処理である。これらの処理を上記の順で実行するため、本実施形態では、各処理に1〜5までの値を割り当て、RAM111に各処理に対応するカウンタctが設定される。例えば、サービス発見処理に「1」、プロファイル構成処理に「2」、接続更新処理に「3」、接続継続処理に「4」、終了処理に「5」が割り当てられ、カウンタct=1の場合、サービス発見処理が実行される。通常処理部121は、上記5つの処理のうちいずれかを終了するとき、カウンタctを次の値に更新し、次の処理を実行する。なお、カウンタctは、当該処理の実行中において、当該実行中の処理も示している。 The CPU 110 as the normal processing unit 121 controls the communication unit 103 to execute a plurality of processes including transmission / reception of data with the wireless communication device 200 based on the counters corresponding to the plurality of processes. The plurality of processes are processes executed between the electronic clock 100 and the wireless communication device 200 in a predetermined order set in advance. In the present embodiment, as shown in FIG. 3, the electronic clock 100 performs a service discovery process (Service Discovery), a profile configuration process (Profile Config), and a connection by performing wireless communication after establishing a connection with the wireless communication device 200. An example in which update processing (Connection Update), connection continuation processing (Connect Continue), and termination processing (Terminate) are executed in this order will be described. The service discovery process is a process performed by the electronic clock 100 for determining the service of the wireless communication device 200. The profile configuration process is a process for reading / writing data, setting the electronic clock 100, setting an application, and the like. The connection update process is a process for changing the data transmission / reception interval in the connection and updating the parameters related to the connection. The connection continuation process is a process for changing the state of the electronic clock 100 or receiving a notification from the wireless communication device 200 by the user operating the wireless communication device 200 while maintaining the connection. The termination process is a process for disconnecting the connection by a timeout or an operation of the electronic clock 100 or the like. In order to execute these processes in the above order, in the present embodiment, values 1 to 5 are assigned to each process, and a counter ct corresponding to each process is set in the RAM 111. For example, when "1" is assigned to the service discovery process, "2" is assigned to the profile configuration process, "3" is assigned to the connection update process, "4" is assigned to the connection continuation process, and "5" is assigned to the end process, and the counter ct = 1. , The service discovery process is executed. When any one of the above five processes is completed, the normal processing unit 121 updates the counter ct to the next value and executes the next process. The counter ct also indicates the process being executed during the execution of the process.

また、通常処理部121としてのCPU110は、各処理の実行中に、無線通信装置200とのデータの送受信を行う。具体的には、CPU110は、実行中の処理が無線通信装置200からのデータの受信が必要な処理である場合、通信部103を制御して、無線通信装置200からデータを受信する。そして、CPU110は、受信したデータが、実行中の処理において期待されているイベントである場合、カウンタを次の値に更新する。また、CPU110は、実行中の処理が無線通信装置200へのデータの送信が必要な処理である場合、通信部103を制御して、無線通信装置200へデータを送信する。そして、CPU110は、無線通信装置200からデータを受信しなかった場合、カウンタを次の値に更新する。 Further, the CPU 110 as the normal processing unit 121 transmits / receives data to / from the wireless communication device 200 during the execution of each process. Specifically, the CPU 110 controls the communication unit 103 to receive data from the wireless communication device 200 when the processing being executed is a process that requires reception of data from the wireless communication device 200. Then, when the received data is an event expected in the processing being executed, the CPU 110 updates the counter to the next value. Further, when the processing being executed is a process requiring transmission of data to the wireless communication device 200, the CPU 110 controls the communication unit 103 to transmit the data to the wireless communication device 200. Then, when the CPU 110 does not receive the data from the wireless communication device 200, the CPU 110 updates the counter to the next value.

応答要否判定部122としてのCPU110は、通信プロトコルスタックを構成する複数の階層のそれぞれについて、無線通信装置200への応答の要否を判定する。本実施形態において、CPU110は、リンク層、L2CAP層、SM層、及びATT層の4つの層のそれぞれについて、無線通信装置200への応答の要否を判定する。具体的には、CPU110は、サービス発見処理、プロファイル構成処理、接続更新処理、接続継続処理、終了処理のいずれかを処理中に、受信したデータが、実行中の処理において期待されているイベントでない場合や、送信が必要な処理であるのに無線通信装置200からデータを受信した場合には、通常の処理とは異なる処理が発生していると判定し、BLEスタックを構成する4つの階層のそれぞれについて、無線通信装置200への応答の要否を判定するデータチェック処理を実行する。具体的には、CPU110は、受信したイベントがリンク層イベントであると判定した場合、リンク層データチェック処理を実行する。また、CPU110は、受信したイベントがATT層イベントであって、後述するATT層応答フラグがONであると判定した場合、ATT層データチェック処理を実行する。また、CPU110は、受信したイベントがSM層イベントであって、後述するSM層応答フラグがONであると判定した場合、SM層データチェック処理を実行する。また、CPU110は、受信したイベントがL2CAP層イベントであって、後述するL2CAP層応答フラグがONであると判定した場合、L2CAP層データチェック処理を実行する。 The CPU 110 as the response necessity determination unit 122 determines the necessity of a response to the wireless communication device 200 for each of the plurality of layers constituting the communication protocol stack. In the present embodiment, the CPU 110 determines the necessity of responding to the wireless communication device 200 for each of the four layers of the link layer, the L2CAP layer, the SM layer, and the ATT layer. Specifically, the CPU 110 receives data during any of service discovery processing, profile configuration processing, connection update processing, connection continuation processing, and termination processing, and is not an event expected in the processing being executed. In some cases, or when data is received from the wireless communication device 200 even though it is a process that requires transmission, it is determined that a process different from the normal process is occurring, and the four layers that make up the BLE stack. For each, a data check process for determining the necessity of responding to the wireless communication device 200 is executed. Specifically, when the CPU 110 determines that the received event is a link layer event, the CPU 110 executes a link layer data check process. Further, when the received event is an ATT layer event and the CPU 110 determines that the ATT layer response flag described later is ON, the CPU 110 executes the ATT layer data check process. Further, when the received event is an SM layer event and the CPU 110 determines that the SM layer response flag described later is ON, the CPU 110 executes the SM layer data check process. Further, when the received event is an L2CAP layer event and the CPU 110 determines that the L2CAP layer response flag described later is ON, the CPU 110 executes the L2CAP layer data check process.

また、CPU110は、リンク層データチェック処理、ATT層データチェック処理、SM層データチェック処理、L2CAP層データチェック処理といったデータチェック処理において、対応する層で受信する可能性があるコマンド毎に応答の要否を判定する。そして、CPU110は、応答が必要であると判定した場合に、RAM111に設定された各層の応答フラグをONにする。例えば、ATT層データチェック処理においては、"Write Request"、"Write Response"、"Write Command"、"Handle Value Indication"、"Handle Value Notification"といったコマンドを受信する可能性がある。CPU110は、これらのコマンドのうち、無線通信装置200への応答が必要なコマンド、例えば"Write Response"や"Handle Value Indication"を受信したと判定した場合、RAM111に設定されたATT層応答フラグをONにし、応答すべきデータの準備をする。CPU110は、リンク層データチェック処理、SM層データチェック処理、L2CAP層データチェック処理においても同様に応答の要否を判定し、応答が必要であると判定した場合に、RAM111に設定されたリンク層応答フラグ、L2CAP層応答フラグ、SM層応答フラグをONにする。 Further, in the data check processing such as the link layer data check processing, the ATT layer data check processing, the SM layer data check processing, and the L2CAP layer data check processing, the CPU 110 requires a response for each command that may be received by the corresponding layer. Judge whether or not. Then, when the CPU 110 determines that a response is required, the CPU 110 turns on the response flag of each layer set in the RAM 111. For example, in the ATT layer data check process, there is a possibility of receiving commands such as "Write Request", "Write Response", "Write Command", "Handle Value Indication", and "Handle Value Notification". When the CPU 110 determines that it has received a command that requires a response to the wireless communication device 200, for example, "Write Response" or "Handle Value Indication", it sets the ATT layer response flag set in the RAM 111. Turn it on and prepare the data to respond. The CPU 110 also determines the necessity of a response in the link layer data check process, the SM layer data check process, and the L2CAP layer data check process, and when it is determined that a response is required, the link layer set in the RAM 111 is set. Turn on the response flag, L2CAP layer response flag, and SM layer response flag.

応答部123としてのCPU110は、無線通信装置200への応答が必要であると判定された場合に、無線通信装置200に応答を送信する。本実施形態において、CPU110は、RAM111に設定されたリンク層応答フラグ、L2CAP層応答フラグ、SM層応答フラグ、ATT層応答フラグを参照し、フラグがONである場合に、応答すべきデータを無線通信装置200に送信する。 The CPU 110 as the response unit 123 transmits a response to the wireless communication device 200 when it is determined that a response to the wireless communication device 200 is necessary. In the present embodiment, the CPU 110 refers to the link layer response flag, the L2CAP layer response flag, the SM layer response flag, and the ATT layer response flag set in the RAM 111, and when the flags are ON, wirelessly transmits the data to be responded to. It is transmitted to the communication device 200.

図4は、本実施形態における電子時計100のCPU110が実行する無線通信処理の動作の一例を示すフローチャートである。電子時計100のCPU110は、例えば無線通信装置200との接続が確立すると、図4に示す無線通信処理を開始する。 FIG. 4 is a flowchart showing an example of the operation of the wireless communication process executed by the CPU 110 of the electronic clock 100 in the present embodiment. The CPU 110 of the electronic clock 100 starts the wireless communication process shown in FIG. 4, for example, when the connection with the wireless communication device 200 is established.

まず、CPU110は、RAM111に設定されたリンク層応答フラグがONか否かを判定する(ステップS101)。リンク層応答フラグがONでないと判定した場合(ステップS101;No)、CPU110は、RAM111に設定されたL2CAP層応答フラグがONか否かを判定する(ステップS102)。L2CAP層応答フラグがONでないと判定した場合(ステップS102;No)、CPU110は、RAM111に設定されたSM層応答フラグがONか否かを判定する(ステップS103)。SM層応答フラグがONでないと判定した場合(ステップS103;No)、CPU110は、RAM111に設定されたATT層応答フラグがONか否かを判定する(ステップS104)。 First, the CPU 110 determines whether or not the link layer response flag set in the RAM 111 is ON (step S101). When it is determined that the link layer response flag is not ON (step S101; No), the CPU 110 determines whether or not the L2CAP layer response flag set in the RAM 111 is ON (step S102). When it is determined that the L2CAP layer response flag is not ON (step S102; No), the CPU 110 determines whether or not the SM layer response flag set in the RAM 111 is ON (step S103). When it is determined that the SM layer response flag is not ON (step S103; No), the CPU 110 determines whether or not the ATT layer response flag set in the RAM 111 is ON (step S104).

リンク層応答フラグがONであると判定した場合(ステップS101;Yes)、L2CAP層応答フラグがONであると判定した場合(ステップS102;Yes)、SM層応答フラグがONであると判定した場合(ステップS103;Yes)、またはATT層応答フラグがONであると判定した場合(ステップS104;Yes)、CPU110は、後述する応答処理を実行する(ステップS105)。 When it is determined that the link layer response flag is ON (step S101; Yes), when it is determined that the L2CAP layer response flag is ON (step S102; Yes), and when it is determined that the SM layer response flag is ON. (Step S103; Yes), or when it is determined that the ATT layer response flag is ON (step S104; Yes), the CPU 110 executes a response process described later (step S105).

CPU110は、RAM111に設定されたATT層応答フラグがONでないと判定した場合(ステップS104;No)、RAM111に設定されたカウンタctが「1」か否かを判定する(ステップS106)。カウンタctが「1」であるとした場合(ステップS106;Yes)、CPU110はサービス発見処理を実行し(ステップS107)、ステップS101に戻る。 When the CPU 110 determines that the ATT layer response flag set in the RAM 111 is not ON (step S104; No), the CPU 110 determines whether or not the counter ct set in the RAM 111 is "1" (step S106). If the counter ct is "1" (step S106; Yes), the CPU 110 executes the service discovery process (step S107), and returns to step S101.

カウンタctが「1」でないとした場合(ステップS106;No)、CPU110は
カウンタctが「2」か否かを判定する(ステップS108)。カウンタctが「2」であるとした場合(ステップS108;Yes)、CPU110はプロファイル構成処理を実行し(ステップS109)、ステップS101に戻る。
If the counter ct is not "1" (step S106; No), the CPU 110 determines whether or not the counter ct is "2" (step S108). When the counter ct is "2" (step S108; Yes), the CPU 110 executes the profile configuration process (step S109) and returns to step S101.

カウンタctが「2」でないとした場合(ステップS108;No)、CPU110は
カウンタctが「3」か否かを判定する(ステップS110)。カウンタctが「3」であるとした場合(ステップS110;Yes)、CPU110は接続更新処理を実行し(ステップS111)、ステップS101に戻る。
If the counter ct is not "2" (step S108; No), the CPU 110 determines whether or not the counter ct is "3" (step S110). When the counter ct is "3" (step S110; Yes), the CPU 110 executes the connection update process (step S111) and returns to step S101.

カウンタctが「3」でないとした場合(ステップS110;No)、CPU110は
カウンタctが「4」か否かを判定する(ステップS112)。カウンタctが「4」であるとした場合(ステップS112;Yes)、CPU110は接続継続処理を実行し(ステップS113)、ステップS101に戻る。
If the counter ct is not "3" (step S110; No), the CPU 110 determines whether or not the counter ct is "4" (step S112). When the counter ct is "4" (step S112; Yes), the CPU 110 executes the connection continuation process (step S113) and returns to step S101.

カウンタctが「4」でないとした場合(ステップS112;No)、CPU110は
カウンタctが「5」か否かを判定する(ステップS114)。カウンタctが「5」であるとした場合(ステップS114;Yes)、終了処理を実行し(ステップS115)、無線通信処理を終了する。カウンタctが「5」でないとした場合(ステップS114;No)、例えばカウンタctの値を「1」としてステップS101に戻る。
If the counter ct is not "4" (step S112; No), the CPU 110 determines whether or not the counter ct is "5" (step S114). When the counter ct is "5" (step S114; Yes), the termination process is executed (step S115), and the wireless communication process is terminated. When the counter ct is not "5" (step S114; No), for example, the value of the counter ct is set to "1" and the process returns to step S101.

図5に本実施形態における電子時計100のCPU110がサービス発見処理(図4のステップS107)、プロファイル構成処理(図4のステップS109)、接続更新処理(図4のステップS111)、接続継続処理(図4のステップS113)、及び終了処理(図4のステップS115)において共通して実行される、無線通信装置200とのデータの送受信処理(データ送受信処理)の動作の一例を示すフローチャートを示す。 In FIG. 5, the CPU 110 of the electronic clock 100 in the present embodiment shows a service discovery process (step S107 in FIG. 4), a profile configuration process (step S109 in FIG. 4), a connection update process (step S111 in FIG. 4), and a connection continuation process (step S111 in FIG. 4). A flowchart showing an example of an operation of data transmission / reception processing (data transmission / reception processing) with the wireless communication device 200, which is commonly executed in step S113) of FIG. 4 and termination processing (step S115 of FIG. 4), is shown.

まずCPU110は、現在実行中の処理において、無線通信装置200からのデータの受信を待っている状態か否かを判定する(ステップS201)。無線通信装置200からのデータの受信を待っている状態であると判定した場合(ステップS201;Yes)、CPU110は、通信部103を制御して、無線通信装置200からデータを受信するデータ受信処理を実行する(ステップS202)。 First, the CPU 110 determines in the process currently being executed whether or not it is in a state of waiting for the reception of data from the wireless communication device 200 (step S201). When it is determined that the state is waiting for the reception of data from the wireless communication device 200 (step S201; Yes), the CPU 110 controls the communication unit 103 to receive data from the wireless communication device 200. Is executed (step S202).

そして、CPU110は、ステップS202において受信したデータが実行中の処理において受信を期待していたイベントであるか否かを判定する(ステップS203)。受信したデータが受信を期待していたイベントであると判定した場合(ステップS203;Yes)、CPU110は、現在のカウンタctを1増加させることによりカウンタctを更新する(ステップS204)。また、受信したデータが受信を期待していたイベントでないと判定した場合(ステップS203;No)、CPU110は、層判定処理を実行する(ステップS205)。 Then, the CPU 110 determines whether or not the data received in step S202 is an event that was expected to be received in the processing being executed (step S203). When it is determined that the received data is an event expected to be received (step S203; Yes), the CPU 110 updates the counter ct by increasing the current counter ct by 1 (step S204). If it is determined that the received data is not an event expected to be received (step S203; No), the CPU 110 executes the layer determination process (step S205).

また、CPU110は、無線通信装置200からのデータの受信を待っていない状態であると判定した場合(ステップS201;No)、すなわち無線通信装置200へデータを送信すべきであると判定した場合、無線通信装置200に送信するデータをセットする(ステップS206)。そして、CPU110は、通信部103を制御して、無線通信装置200との間でデータ送受信処理を実行する(ステップS207)。 Further, when it is determined that the CPU 110 is not waiting for the reception of data from the wireless communication device 200 (step S201; No), that is, when it is determined that the data should be transmitted to the wireless communication device 200, the CPU 110 determines that the data should be transmitted to the wireless communication device 200. Data to be transmitted to the wireless communication device 200 is set (step S206). Then, the CPU 110 controls the communication unit 103 to execute data transmission / reception processing with the wireless communication device 200 (step S207).

そして、CPU110は、ステップS207において無線通信装置200から受信したデータがあるか否かを判定する(ステップS208)。無線通信装置200から受信したデータがないと判定した場合(ステップS208;No)、CPU110は、現在のカウンタctを1増加させることによりカウンタctを更新する(ステップS209)。また、無線通信装置200から受信したデータがあると判定した場合(ステップS208;Yes)、CPU110は、層判定処理を実行する(ステップS205)。 Then, the CPU 110 determines whether or not there is data received from the wireless communication device 200 in step S207 (step S208). When it is determined that there is no data received from the wireless communication device 200 (step S208; No), the CPU 110 updates the counter ct by increasing the current counter ct by 1 (step S209). Further, when it is determined that there is data received from the wireless communication device 200 (step S208; Yes), the CPU 110 executes the layer determination process (step S205).

図6に本実施形態における電子時計100のCPU110が実行する層判定処理の動作の一例を示すフローチャートを示す。まずCPU110は、図4に示すステップS202またはステップS208において受信したイベントがリンク層イベントか否かを判定する(ステップS301)。受信したイベントがリンク層イベントであると判定した場合(ステップS301;Yes)、CPU110は、リンク層データチェック処理を実行し(ステップS302)、応答が必要であると判定した場合に、リンク層応答フラグをONにして本処理を終了する。 FIG. 6 shows a flowchart showing an example of the operation of the layer determination process executed by the CPU 110 of the electronic clock 100 in the present embodiment. First, the CPU 110 determines whether or not the event received in step S202 or step S208 shown in FIG. 4 is a link layer event (step S301). When it is determined that the received event is a link layer event (step S301; Yes), the CPU 110 executes the link layer data check process (step S302), and when it is determined that a response is required, the link layer response. Turn on the flag to end this process.

そしてCPU110は、受信したイベントがリンク層イベントでないと判定した場合(ステップS301;No)、受信したイベントがATT層イベントか否かを判定する(ステップS303)。受信したイベントがATT層イベントであると判定した場合(ステップS303;Yes)、CPU110は、RAM111に設定されているATT層応答フラグがONか否かを判定する(ステップS304)。CPU110は、ATT層応答フラグがONでないと判定した場合(ステップS304;No)、ATT層データチェック処理を実行し(ステップS305)、応答が必要であると判定した場合に、ATT層応答フラグをONにして本処理を終了する。ATT層応答フラグがONであると判定した場合(ステップS304;Yes)、CPU110は、本処理を終了する。 Then, when the CPU 110 determines that the received event is not a link layer event (step S301; No), the CPU 110 determines whether or not the received event is an ATT layer event (step S303). When it is determined that the received event is an ATT layer event (step S303; Yes), the CPU 110 determines whether or not the ATT layer response flag set in the RAM 111 is ON (step S304). When the CPU 110 determines that the ATT layer response flag is not ON (step S304; No), the ATT layer data check process is executed (step S305), and when it is determined that a response is required, the CPU 110 sets the ATT layer response flag. Turn it on to end this process. When it is determined that the ATT layer response flag is ON (step S304; Yes), the CPU 110 ends this process.

そしてCPU110は、受信したイベントがATT層イベントでないと判定した場合(ステップS303;No)、受信したイベントがSM層イベントか否かを判定する(ステップS306)。受信したイベントがSM層イベントであると判定した場合(ステップS306;Yes)、CPU110は、RAM111に設定されているSM層応答フラグがONか否かを判定する(ステップS307)。CPU110は、SM層応答フラグがONでないと判定した場合(ステップS307;No)、SM層データチェック処理を実行し(ステップS308)、応答が必要であると判定した場合に、SM層応答フラグをONにして本処理を終了する。SM層応答フラグがONであると判定した場合(ステップS307;Yes)、CPU110は、本処理を終了する。 Then, when the CPU 110 determines that the received event is not an ATT layer event (step S303; No), the CPU 110 determines whether or not the received event is an SM layer event (step S306). When it is determined that the received event is an SM layer event (step S306; Yes), the CPU 110 determines whether or not the SM layer response flag set in the RAM 111 is ON (step S307). When the CPU 110 determines that the SM layer response flag is not ON (step S307; No), the SM layer data check process is executed (step S308), and when it is determined that a response is required, the SM layer response flag is set. Turn it on to end this process. When it is determined that the SM layer response flag is ON (step S307; Yes), the CPU 110 ends this process.

そしてCPU110は、受信したイベントがSM層イベントでないと判定した場合(ステップS306;No)、受信したイベントがL2CAP層イベントか否かを判定する(ステップS309)。受信したイベントがL2CAP層イベントであると判定した場合(ステップS309;Yes)、CPU110は、RAM111に設定されているL2CAP層応答フラグがONか否かを判定する(ステップS310)。CPU110は、L2CAP層応答フラグがONでないと判定した場合(ステップS310;No)、L2CAP層データチェック処理を実行し(ステップS311)、応答が必要であると判定した場合に、L2CAP層応答フラグをONにして本処理を終了する。L2CAP層応答フラグがONであると判定した場合(ステップS310;Yes)、CPU110は、本処理を終了する。 Then, when the CPU 110 determines that the received event is not an SM layer event (step S306; No), the CPU 110 determines whether or not the received event is an L2CAP layer event (step S309). When it is determined that the received event is an L2CAP layer event (step S309; Yes), the CPU 110 determines whether or not the L2CAP layer response flag set in the RAM 111 is ON (step S310). When the CPU 110 determines that the L2CAP layer response flag is not ON (step S310; No), the L2CAP layer data check process is executed (step S311), and when it is determined that a response is required, the CPU 110 sets the L2CAP layer response flag. Turn it on to end this process. When it is determined that the L2CAP layer response flag is ON (step S310; Yes), the CPU 110 ends this process.

そしてCPU110は、受信したイベントがL2CAP層イベントでないと判定した場合(ステップS309;No)、エラーを通知し(ステップS312)、本処理を終了する。 Then, when the CPU 110 determines that the received event is not an L2CAP layer event (step S309; No), it notifies an error (step S312) and ends this process.

図7に本実施形態における電子時計100のCPU110が実行する応答処理の動作の一例を示すフローチャートを示す。まずCPU110は、無線通信装置200に送信すべき送信データをセットする(ステップS401)。そして、CPU110は、通信部103を制御して、無線通信装置200との間でデータ送受信処理を実行する(ステップS402)。そして、CPU110は、本処理の契機となった応答フラグをクリアする(ステップS403)。 FIG. 7 shows a flowchart showing an example of the operation of the response processing executed by the CPU 110 of the electronic clock 100 in the present embodiment. First, the CPU 110 sets transmission data to be transmitted to the wireless communication device 200 (step S401). Then, the CPU 110 controls the communication unit 103 to execute data transmission / reception processing with the wireless communication device 200 (step S402). Then, the CPU 110 clears the response flag that triggered this process (step S403).

そして、CPU110は、ステップS402において無線通信装置200から受信したデータがあるか否かを判定する(ステップS404)。無線通信装置200から受信したデータがないと判定した場合(ステップS404;No)、CPU110は、現在のカウンタctを1増加させることによりカウンタctを更新する(ステップS405)。また、無線通信装置200から受信したデータがあると判定した場合(ステップS405;Yes)、CPU110は、図6に示す層判定処理を実行する(ステップS406)。そして、CPU110は、図4のステップS101に戻る。 Then, the CPU 110 determines whether or not there is data received from the wireless communication device 200 in step S402 (step S404). When it is determined that there is no data received from the wireless communication device 200 (step S404; No), the CPU 110 updates the counter ct by increasing the current counter ct by 1 (step S405). Further, when it is determined that there is data received from the wireless communication device 200 (step S405; Yes), the CPU 110 executes the layer determination process shown in FIG. 6 (step S406). Then, the CPU 110 returns to step S101 of FIG.

以上説明したように、本実施形態に係る電子時計100のCPU110は、複数の通常処理を複数の処理それぞれに対応するカウンタに基づいて所定の順序で実行する。またその際に、通信プロトコルスタックを構成する複数の階層のそれぞれについて、無線通信装置200への応答の要否を判定し、応答を要すると判定した場合に、無線通信部を制御して、応答を送信する。またCPU110は、現在実行中の処理を終了するとき、カウンタを次に実行すべき処理を表すように更新する。従って、CPU110は、応答を要する通常と異なる処理が要求されても、応答を送信しつつ、カウンタに基づいて通常処理を実行するため、安定して通信を維持することができる。なお、カウンタは必ずしも1ずつカウントアップされる必要はなく、例えば、サービス発見処理等の各処理中に、特定の数値にカウンタが変更されてもよい。よって、サービス発見処理を行った次の処理が、接続更新処理や、終了処理となるように、複数の通常処理をカウンタに基づいて実行することで、順序が入れ替わってもよい。このようにカウンタの制御は、適宜変更可能である。 As described above, the CPU 110 of the electronic clock 100 according to the present embodiment executes a plurality of normal processes in a predetermined order based on counters corresponding to the plurality of processes. At that time, it is determined whether or not a response to the wireless communication device 200 is necessary for each of the plurality of layers constituting the communication protocol stack, and when it is determined that a response is required, the wireless communication unit is controlled to respond. To send. Further, when the CPU 110 ends the process currently being executed, the CPU 110 updates the counter so as to indicate the process to be executed next. Therefore, even if an unusual process requiring a response is requested, the CPU 110 executes the normal process based on the counter while transmitting the response, so that stable communication can be maintained. The counter does not necessarily have to be counted up by one, and for example, the counter may be changed to a specific numerical value during each process such as a service discovery process. Therefore, the order may be changed by executing a plurality of normal processes based on the counter so that the next process after the service discovery process becomes the connection update process or the end process. In this way, the control of the counter can be changed as appropriate.

また、本実施形態に係る電子時計100のCPU110は、複数の階層のそれぞれについて、当該階層で無線通信装置200から受信する可能性があるコマンド毎に、応答の要否を判定する。従って、CPU110は、応答を要するコマンドを受信した場合に、そのコマンドに対応する応答を無線通信装置200に送信することができる。 Further, the CPU 110 of the electronic clock 100 according to the present embodiment determines the necessity of a response for each of the plurality of layers for each command that may be received from the wireless communication device 200 in the layer. Therefore, when the CPU 110 receives a command that requires a response, the CPU 110 can transmit a response corresponding to the command to the wireless communication device 200.

また、本実施形態に係る電子時計100のCPU110は、複数の処理のそれぞれについて、期待されるイベントと異なるイベントが発生した場合に、複数の階層それぞれについて受信する可能性があるコマンド毎に、応答の要否を判定する。従って、CPU110は、通常処理のイベントと異なるイベントが発生した場合に、そのイベントに応じた応答を無線通信装置200に送信するこができる。 Further, the CPU 110 of the electronic clock 100 according to the present embodiment responds to each command that may be received for each of the plurality of layers when an event different from the expected event occurs for each of the plurality of processes. Judge the necessity of. Therefore, when an event different from the event of the normal processing occurs, the CPU 110 can transmit a response corresponding to the event to the wireless communication device 200.

また、上記の実施形態では、電子時計100及び無線通信装置200が、Bluetooth(登録商標)で通信する例を説明した。しかし、電子時計100及び無線通信装置200は、その他の通信方法、例えば、無線LAN(Local Area Network)やWi−Fi(登録商標)で通信しても良い。 Further, in the above embodiment, an example in which the electronic clock 100 and the wireless communication device 200 communicate with each other by Bluetooth (registered trademark) has been described. However, the electronic clock 100 and the wireless communication device 200 may communicate by other communication methods, for example, a wireless LAN (Local Area Network) or Wi-Fi (registered trademark).

また、上記の実施形態では、電子時計100を例に挙げて説明したが、本発明はこれに限られず、無線通信可能な電子機器に適用可能である。本発明は、特に、電子時計100にように、比較的小さな容量を有するバッテリを搭載する携帯可能な電子機器に好適である。 Further, in the above embodiment, the electronic clock 100 has been described as an example, but the present invention is not limited to this, and is applicable to electronic devices capable of wireless communication. The present invention is particularly suitable for portable electronic devices such as the electronic clock 100, which are equipped with a battery having a relatively small capacity.

また、上記の実施形態では、CPU110が、制御動作を行う例を説明した。しかし、制御動作は、CPUによるソフトウェア制御に限られるものではない。制御動作の一部又は全部が専用の論理回路などのハードウェア構成を用いてなされても良い。 Further, in the above embodiment, an example in which the CPU 110 performs a control operation has been described. However, the control operation is not limited to software control by the CPU. Part or all of the control operation may be performed using a hardware configuration such as a dedicated logic circuit.

また、以上の説明では、本発明のデータ通信処理に係るプログラム、アドバタイズ処理に係るプログラムを記憶するコンピュータ読み取り可能な媒体としてフラッシュメモリなどの不揮発性メモリからなるROM102を例に挙げて説明した。しかし、コンピュータ読み取り可能な媒体は、これらに限定されず、HDD(Hard Disk Drive)、CD−ROM(Compact Disc Read Only Memory)やDVD(Digital Versatile Disc)などの可搬型記録媒体を適用してもよい。また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウェーブ(搬送波)も本発明に適用される。 Further, in the above description, the ROM 102 made of a non-volatile memory such as a flash memory has been described as an example as a computer-readable medium for storing the program related to the data communication processing and the program related to the advertising processing of the present invention. However, the computer-readable medium is not limited to these, and even if a portable recording medium such as an HDD (Hard Disk Drive), a CD-ROM (Compact Disc Read Only Memory) or a DVD (Digital Versatile Disc) is applied. good. A carrier wave is also applied to the present invention as a medium for providing data of a program according to the present invention via a communication line.

その他、上記実施の形態で示した構成、制御手順や表示例などの具体的な細部は、本発明の趣旨を逸脱しない範囲において適宜変更可能である。 In addition, specific details such as the configuration, control procedure, and display example shown in the above embodiment can be appropriately changed without departing from the spirit of the present invention.

本発明のいくつかの実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記の番号は、この出願の願書に最初に添付した特許請求の範囲の通りである。 Although some embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and the equivalent scope thereof. The inventions described in the claims originally attached to the application of this application are added below. The additional numbers are as specified in the claims originally attached to the application for this application.

(付記1)
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部と、
制御部と、
を備え、
前記制御部は、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信装置。
(Appendix 1)
A wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of multiple layers.
Control unit and
With
The control unit
By controlling the wireless communication unit, a plurality of processes including transmission / reception of data with the other wireless communication device are executed based on the counter corresponding to each of the plurality of processes.
When an event different from the expected event occurs during the execution of the process, it is determined whether or not a response to the other wireless communication device is necessary for each of the plurality of layers.
When it is determined that the response is required, the wireless communication unit is controlled to transmit the response.
When the process currently being executed ends, the counter is updated to indicate the process to be executed next.
A wireless communication device characterized by that.

(付記2)
前記制御部は、前記複数の階層のそれぞれについて、当該階層で前記他の無線通信装置から受信する可能性があるコマンド毎に、前記応答の要否を判定する、
ことを特徴とする付記1に記載の無線通信装置。
(Appendix 2)
For each of the plurality of layers, the control unit determines the necessity of the response for each command that may be received from the other wireless communication device in the layer.
The wireless communication device according to Appendix 1, wherein the wireless communication device is characterized by the above.

(付記3)
前記制御部は、
前記複数の処理それぞれの実行中に、期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれで受信する可能性があるコマンド毎に、前記応答の要否を判定する、
ことを特徴とする付記2に記載の無線通信装置。
(Appendix 3)
The control unit
When an event different from the expected event occurs during the execution of each of the plurality of processes, the necessity of the response is determined for each command that may be received in each of the plurality of layers.
The wireless communication device according to Appendix 2, wherein the wireless communication device is characterized by the above.

(付記4)
付記1乃至3のいずれか1つに記載の無線通信装置と、
現在時刻を計時する計時部と、
前記計時部により計時された現在時刻を表示する表示部と、
を備えることを特徴とする電子時計。
(Appendix 4)
The wireless communication device according to any one of Supplementary note 1 to 3 and
The timekeeping section that measures the current time and
A display unit that displays the current time measured by the timekeeping unit, and a display unit that displays the current time.
An electronic clock characterized by being equipped with.

(付記5)
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備える無線通信装置が実行する無線通信方法であって、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信方法。
(Appendix 5)
A wireless communication method executed by a wireless communication device including a wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of a plurality of layers.
By controlling the wireless communication unit, a plurality of processes including transmission / reception of data with the other wireless communication device are executed based on the counter corresponding to each of the plurality of processes.
When an event different from the expected event occurs during the execution of the process, it is determined whether or not a response to the other wireless communication device is necessary for each of the plurality of layers.
When it is determined that the response is required, the wireless communication unit is controlled to transmit the response.
When the process currently being executed ends, the counter is updated to indicate the process to be executed next.
A wireless communication method characterized by that.

(付記6)
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備えるコンピュータを、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行する処理手段、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定する応答要否判定手段、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信する応答手段、
として機能させ、
前記処理手段は、現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とするプログラム。
(Appendix 6)
A computer equipped with a wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of a plurality of layers.
A processing means that controls the wireless communication unit and executes a plurality of processes including transmission / reception of data with the other wireless communication device based on a counter corresponding to each of the plurality of processes.
A response necessity determining means for determining the necessity of responding to the other wireless communication device for each of the plurality of layers when an event different from the expected event occurs during the execution of the process.
A response means that controls the wireless communication unit and transmits the response when it is determined that the response is required.
To function as
When the processing means ends the processing currently being executed, the processing means updates the counter to indicate the processing to be executed next.
A program characterized by that.

1…無線通信システム、10…無線通信装置、100…電子時計、101…マイクロコンピュータ、102…ROM、103…通信部、104…アンテナ、105…電力供給部、106…表示部、107…表示ドライバ、108…操作受付部、109…振動子、110…CPU、111…RAM、112…発振回路、113…分周回路、114…計時回路、115…プログラム、121…通常処理部、122…応答要否判定部、123…応答部、200…無線通信装置 1 ... wireless communication system, 10 ... wireless communication device, 100 ... electronic clock, 101 ... microcomputer, 102 ... ROM, 103 ... communication unit, 104 ... antenna, 105 ... power supply unit, 106 ... display unit, 107 ... display driver , 108 ... operation reception unit, 109 ... oscillator, 110 ... CPU, 111 ... RAM, 112 ... oscillation circuit, 113 ... frequency dividing circuit, 114 ... timing circuit, 115 ... program, 121 ... normal processing unit, 122 ... response required Negative judgment unit, 123 ... Response unit, 200 ... Wireless communication device

Claims (6)

複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部と、
制御部と、
を備え、
前記制御部は、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信装置。
A wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of multiple layers.
Control unit and
With
The control unit
By controlling the wireless communication unit, a plurality of processes including transmission / reception of data with the other wireless communication device are executed based on the counter corresponding to each of the plurality of processes.
When an event different from the expected event occurs during the execution of the process, it is determined whether or not a response to the other wireless communication device is necessary for each of the plurality of layers.
When it is determined that the response is required, the wireless communication unit is controlled to transmit the response.
When the process currently being executed ends, the counter is updated to indicate the process to be executed next.
A wireless communication device characterized by that.
前記制御部は、前記複数の階層のそれぞれについて、当該階層で前記他の無線通信装置から受信する可能性があるコマンド毎に、前記応答の要否を判定する、
ことを特徴とする請求項1に記載の無線通信装置。
For each of the plurality of layers, the control unit determines the necessity of the response for each command that may be received from the other wireless communication device in the layer.
The wireless communication device according to claim 1.
前記制御部は、
前記複数の処理それぞれの実行中に、期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれで受信する可能性があるコマンド毎に、前記応答の要否を判定する、
ことを特徴とする請求項2に記載の無線通信装置。
The control unit
When an event different from the expected event occurs during the execution of each of the plurality of processes, the necessity of the response is determined for each command that may be received in each of the plurality of layers.
The wireless communication device according to claim 2.
請求項1乃至3のいずれか1項に記載の無線通信装置と、
現在時刻を計時する計時部と、
前記計時部により計時された現在時刻を表示する表示部と、
を備えることを特徴とする電子時計。
The wireless communication device according to any one of claims 1 to 3 and
The timekeeping section that measures the current time and
A display unit that displays the current time measured by the timekeeping unit, and a display unit that displays the current time.
An electronic clock characterized by being equipped with.
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備える無線通信装置が実行する無線通信方法であって、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信方法。
A wireless communication method executed by a wireless communication device including a wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of a plurality of layers.
By controlling the wireless communication unit, a plurality of processes including transmission / reception of data with the other wireless communication device are executed based on the counter corresponding to each of the plurality of processes.
When an event different from the expected event occurs during the execution of the process, it is determined whether or not a response to the other wireless communication device is necessary for each of the plurality of layers.
When it is determined that the response is required, the wireless communication unit is controlled to transmit the response.
When the process currently being executed ends, the counter is updated to indicate the process to be executed next.
A wireless communication method characterized by that.
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備えるコンピュータを、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行する処理手段、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定する応答要否判定手段、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信する応答手段、
として機能させ、
前記処理手段は、現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とするプログラム。
A computer equipped with a wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of a plurality of layers.
A processing means that controls the wireless communication unit and executes a plurality of processes including transmission / reception of data with the other wireless communication device based on a counter corresponding to each of the plurality of processes.
A response necessity determining means for determining the necessity of responding to the other wireless communication device for each of the plurality of layers when an event different from the expected event occurs during the execution of the process.
A response means that controls the wireless communication unit and transmits the response when it is determined that the response is required.
To function as
When the processing means ends the processing currently being executed, the processing means updates the counter to indicate the processing to be executed next.
A program characterized by that.
JP2017192668A 2017-10-02 2017-10-02 Wireless communication devices, electronic clocks, wireless communication methods, and programs Active JP6958201B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017192668A JP6958201B2 (en) 2017-10-02 2017-10-02 Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP2021164430A JP7363874B2 (en) 2017-10-02 2021-10-06 Wireless communication device, electronic clock, wireless communication method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017192668A JP6958201B2 (en) 2017-10-02 2017-10-02 Wireless communication devices, electronic clocks, wireless communication methods, and programs

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2021164430A Division JP7363874B2 (en) 2017-10-02 2021-10-06 Wireless communication device, electronic clock, wireless communication method, and program

Publications (2)

Publication Number Publication Date
JP2019067187A JP2019067187A (en) 2019-04-25
JP6958201B2 true JP6958201B2 (en) 2021-11-02

Family

ID=66338417

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2017192668A Active JP6958201B2 (en) 2017-10-02 2017-10-02 Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP2021164430A Active JP7363874B2 (en) 2017-10-02 2021-10-06 Wireless communication device, electronic clock, wireless communication method, and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2021164430A Active JP7363874B2 (en) 2017-10-02 2021-10-06 Wireless communication device, electronic clock, wireless communication method, and program

Country Status (1)

Country Link
JP (2) JP6958201B2 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2605044B2 (en) * 1987-06-19 1997-04-30 株式会社ゼクセル Data communication controller for fuel injection controller
JPH02114302A (en) * 1988-10-24 1990-04-26 Fanuc Ltd Numerical control device
JP2970248B2 (en) * 1992-09-10 1999-11-02 松下電器産業株式会社 Communication control device
JP2929980B2 (en) * 1995-10-06 1999-08-03 株式会社デンソー Information processing device
WO2004086737A1 (en) * 2003-03-24 2004-10-07 Seiko Instruments Inc. Portable radio communication apparatus
JP4172458B2 (en) * 2005-02-28 2008-10-29 ソニー株式会社 Connection control apparatus, communication system, and connection control method
US7898995B2 (en) * 2007-02-21 2011-03-01 Qualcomm, Incorporated Dynamic adjustment of inactivity timer threshold for call control transactions
JP5635522B2 (en) * 2009-10-09 2014-12-03 パナソニック株式会社 In-vehicle device

Also Published As

Publication number Publication date
JP2019067187A (en) 2019-04-25
JP2022008875A (en) 2022-01-14
JP7363874B2 (en) 2023-10-18

Similar Documents

Publication Publication Date Title
JP6132037B1 (en) Wireless communication method and program
CN106550320B (en) Wireless communication device, electronic timepiece, and wireless communication method
CN110996383B (en) Wireless communication device, electronic watch, transmission power control method, storage medium
JP6690592B2 (en) Wireless communication method and program
JP7006102B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP6958201B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP7136149B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONNECTION CONTROL METHOD AND PROGRAM
JP2018044931A (en) Wireless communication apparatus, electronic timepiece, time changing method, time information providing method, and program
JP2023160667A (en) Wireless communication device, wireless communication method, and computer program
JP6834283B2 (en) Wireless communication device, electronic clock, wireless communication method, time change method, and program
JP6919305B2 (en) Communication device, electronic clock, time change method, notification signal generation method, and program
JP2021150696A (en) Radio communication device, terminal device, radio communication system, communication connection control method, and program
JP7087314B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
CN113329120B (en) Electronic timepiece, smart phone, communication method, and storage medium
JP6841106B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
CN116009380B (en) Electronic device, time correction method, electronic watch, and computer readable medium
JP6855723B2 (en) Communication device, electronic clock, time change method, connection request generation method, and program
JP6711133B2 (en) Wireless communication device, electronic clock, wireless communication method and program
JP2018101954A (en) Wireless communication device, wireless communication method, and program
JP2018157341A (en) Wireless communication method, wireless communication device, electronic timepiece, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200918

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210827

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210907

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210920

R150 Certificate of patent or registration of utility model

Ref document number: 6958201

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150