JP2019067187A - Radio communication device, electronic clock, radio communication method and program - Google Patents

Radio communication device, electronic clock, radio communication method and program Download PDF

Info

Publication number
JP2019067187A
JP2019067187A JP2017192668A JP2017192668A JP2019067187A JP 2019067187 A JP2019067187 A JP 2019067187A JP 2017192668 A JP2017192668 A JP 2017192668A JP 2017192668 A JP2017192668 A JP 2017192668A JP 2019067187 A JP2019067187 A JP 2019067187A
Authority
JP
Japan
Prior art keywords
wireless communication
response
cpu
communication device
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.)
Granted
Application number
JP2017192668A
Other languages
Japanese (ja)
Other versions
JP6958201B2 (en
Inventor
和穂 姜
Kazuho Kyo
和穂 姜
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)

Abstract

To provide a radio communication device capable of maintaining communications stably.SOLUTION: An electronic clock 100 comprises a communication part 103 that communicates with another radio communication device with each other according to a communication protocol stack constituted with a plurality of hierarchies, and a CPU 110. The CPU 110 controls the communication part 103 to execute a plurality of processing including data exchange with the other radio communication device on the basis of counters corresponding respectively to the plurality of processing. Also, the CPU 110 determines a necessity/unnecessity of a response to the other radio communication device on each of the plurality of hierarchies when an event different from an expected event is generated during execution of the processing, and controls the communication part 103 to send a response when it is determined that a response is necessary. Also, the CPU 110 updates the counter to indicate processing to be executed next when the processing currently under execution is terminated.SELECTED DRAWING: Figure 2

Description

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

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

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

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

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

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

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

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

以下、本発明の実施の形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described based on 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 an example of the configuration of a wireless communication system 1 according to the embodiment. In the configuration example shown in FIG. 1, the wireless communication system 1 includes an electronic timepiece 100 and a wireless communication device 200. The electronic timepiece 100 is an electronic device having a clocking function and a wireless communication function, and performs wireless communication with the wireless communication device 200 based on a wireless communication standard such as Bluetooth (registered trademark) Low Energy (hereinafter referred to as BLE). Do. The wireless communication device 200 is, for example, 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 timepiece 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 timepiece 100 according to the present embodiment. First, the hardware configuration of the electronic timepiece 100 according to the embodiment will be described. As shown in FIG. 2, the electronic timepiece 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. , An operation receiving unit 108, and a vibrator 109.

マイクロコンピュータ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 central processing unit (CPU) 110 as a control unit, a random access memory (RAM) 111 as a storage unit, an oscillation circuit 112, a frequency dividing circuit 113, and a timing circuit 114. The RAM 111, the oscillator circuit 112, the frequency divider circuit 113, and the timing circuit 114 are not limited to the inside of the microcomputer 101, and may be provided outside the microcomputer 101. 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, and 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 processing and generally controls the overall operation of the electronic timepiece 100. The CPU 110 reads a control program from the ROM 102, loads the control program into the RAM 111, and performs various operation processing such as display of time and 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 apparatus 200, and executes a 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 a static random access memory (SRAM) or a dynamic random access memory (DRAM), provides a work memory space to the CPU 110, stores temporary data, and stores various setting data. Do.

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

分周回路113は、発振回路112から入力された周波数信号を、計時回路114やCPU110が利用する周波数の信号に分周して出力する。この出力信号の周波数は、CPU110による設定に基づいて変更されても良い。   The divider circuit 113 divides the frequency signal input from the oscillation circuit 112 into a signal of a frequency used by the timer circuit 114 and the CPU 110 and outputs the divided 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 clock circuit 114 counts the number of times of the predetermined clock signal input from the frequency divider circuit 113 and adds it to an initial value to clock the current time. The timer 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 clock circuit 114 may be any of an accumulated time from a predetermined timing, UTC (Coordinated Universal Time), a preset local time, and the like. Further, the time measured by the clock circuit 114 does not necessarily have to be held in the form of year, month, day and hour. Further, the time measured by the clock circuit 114 can be corrected by the time obtained from the outside such as Wi-Fi (registered trademark).

これら発振回路112、分周回路113及び計時回路114により計時部が構成される。   The oscillation circuit 112, the frequency divider circuit 113, and the timing circuit 114 constitute a timing unit.

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

通信部103は、例えば無線周波数(RF:Radio Frequency)回路やベースバンド(BB:Baseband)回路、メモリ回路で構成される。通信部103は、アンテナ104を介して受信した無線信号を、復調、復号等してCPU110へ送る。また、通信部103は、CPU110から送られた信号を、符号化、変調等して、アンテナ104を介して外部へ送信する。   The communication unit 103 includes, 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, and the like the signal sent from the CPU 110 and transmits the signal to the outside through 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への応答の要否を判定する。   Also, the communication unit 103 wirelessly communicates with the wireless communication apparatus 200 according to a communication protocol stack composed of a plurality of layers. In the present embodiment, the communication unit 103 performs wireless communication in accordance with the BLE stack which is a communication protocol stack in BLE. The BLE stack includes, as a plurality of layers, a link layer, a logical link control and adaptation protocol (L2CAP) layer, a security management (SM) layer, an attribute protocol (ATT) layer, and the like. The link layer is a hierarchy of protocols used for discovery, connection, and communication of devices close to the own device. The L2CAP layer is a layer of protocol that performs communication multiplexing. The SM layer is a protocol layer that defines a method of pairing, encryption, and distribution of encryption keys. The ATT layer is a layer of protocol that defines services and characteristics of BLE. In the present embodiment, as described later, the necessity of a response to the wireless communication apparatus 200 is determined 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 the power related to the operation of the electronic timepiece 100 to each unit at the operation voltage. In the present embodiment, a secondary battery such as a lithium ion battery is used as the battery of the power supply unit 105.

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

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

操作受付部108は、例えばキーやボタンを備え、ユーザからの入力操作を受け付けて、当該入力操作に応じた電気信号を入力信号としてCPU110に出力する。また、例えば、操作受付部108としてタッチセンサが表示部106の表示画面に重ねて設けられ、表示画面とともにタッチパネルを構成してもよい。この場合、タッチセンサは、当該タッチセンサへのユーザの接触動作に係る接触位置や接触態様を検出し、検出された接触位置や接触態様に応じた操作信号をCPU110に出力する。   The operation accepting unit 108 includes, for example, keys and buttons, accepts 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 overlap 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 a touch position and a touch mode related to the touch operation of the user on the touch sensor, and outputs an operation signal according to the detected touch position and the touch 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 timepiece 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. In addition, those functions may be realized by a processor other than the microcomputer 101, such as a 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 and reception of data with the wireless communication apparatus 200 based on counters corresponding to the plurality of processes. The plurality of processes are processes executed in a predetermined order set in advance between the electronic timepiece 100 and the wireless communication device 200. In the present embodiment, as shown in FIG. 3, the electronic timepiece 100 performs wireless communication after establishing a connection with the wireless communication device 200 to thereby perform service discovery processing (Service Discovery), profile configuration processing (Profile Config), and connection. 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 timepiece 100 for determining the service possessed by the wireless communication device 200. The profile configuration process is a process for performing data reading and writing, setting of the electronic timepiece 100, setting of an application, and the like. The connection update process is a process for changing a data transmission / reception interval in connection and updating parameters related to connection. The connection continuation process is a process for changing the state of the electronic timepiece 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 due to a timeout or an operation of the electronic timepiece 100 or the like. In order to execute these processes in the above order, in the present embodiment, values from 1 to 5 are assigned to each process, and a counter ct corresponding to each process is set in the RAM 111. For example, in the case where “1” is assigned for service discovery processing, “2” for profile configuration processing, “3” for connection update processing, “4” for connection continuation processing, “5” for termination processing, and counter ct = 1 , Service discovery processing is performed. The normal processing unit 121 updates the counter ct to the next value when executing any of the above five processes, and executes the next process. The counter ct also indicates the processing being executed during the execution of the processing.

また、通常処理部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 and receives data to and from the wireless communication device 200 while each process is being performed. Specifically, when the process being executed is a process that requires reception of data from the wireless communication apparatus 200, the CPU 110 controls the communication unit 103 to receive data from the wireless communication apparatus 200. Then, when the received data is an event expected in the process being executed, the CPU 110 updates the counter to the next value. In addition, when the processing being executed is processing that requires transmission of data to the wireless communication device 200, the CPU 110 controls the communication unit 103 to transmit data to the wireless communication device 200. Then, when the CPU 110 does not receive 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 the response to the wireless communication apparatus 200 for each of the plurality of layers constituting the communication protocol stack. In the present embodiment, the CPU 110 determines 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. Specifically, while the CPU 110 is processing any of service discovery processing, profile configuration processing, connection update processing, connection continuation processing, and end processing, the received data is not an expected event in the processing being executed. In the case where data is received from the wireless communication apparatus 200 in the case where it is a process that requires transmission, it is determined that a process different from the normal process is occurring, and the four layers constituting the BLE stack are included. For each of them, data check processing is performed to determine whether a response to the wireless communication apparatus 200 is necessary. Specifically, when it is determined that the received event is a link layer event, the CPU 110 executes link layer data check processing. When the CPU 110 determines that the received event is an ATT layer event and an ATT layer response flag described later is ON, the CPU 110 executes ATT layer data check processing. When the CPU 110 determines that the received event is an SM layer event and an SM layer response flag described later is ON, it executes an SM layer data check process. When the CPU 110 determines that the received event is an L2CAP layer event and an L2CAP layer response flag described later is ON, the CPU 110 executes an 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にする。   Also, in data check processing such as link layer data check processing, ATT layer data check processing, SM layer data check processing, L2CAP layer data check processing, the CPU 110 needs a response for each command that may be received by the corresponding layer. Decide no. Then, when it is determined that the response is necessary, 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, commands such as "Write Request", "Write Response", "Write Command", "Handle Value Indication", and "Handle Value Notification" may be received. If the CPU 110 determines that a command requiring a response to the wireless communication apparatus 200, for example, “Write Response” or “Handle Value Indication” is received among these commands, the ATT layer response flag set in the RAM 111 is Turn on and prepare the data to respond. Similarly, in the link layer data check process, the SM layer data check process, and the L2CAP layer data check process, the CPU 110 determines whether a response is necessary and determines that a response is necessary, the link layer set in the RAM 111 The response flag, the L2CAP layer response flag, and the SM layer response flag are turned ON.

応答部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 this 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 wirelessly transmits data to be responded when the flag is ON. It transmits 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 timepiece 100 in the present embodiment. For example, when the connection with the wireless communication device 200 is established, the CPU 110 of the electronic timepiece 100 starts the wireless communication process shown in FIG.

まず、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 the link layer response flag set in the RAM 111 is ON (step S101). If it is determined that the link layer response flag is not ON (step S101; No), the CPU 110 determines whether 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 the SM layer response flag set in the RAM 111 is ON (step S103). If it is determined that the SM layer response flag is not ON (step S103; No), the CPU 110 determines whether 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)。   If it is determined that the link layer response flag is ON (step S101; Yes), if it is determined that the L2CAP layer response flag is ON (step S102; Yes), if 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 response processing 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 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 service discovery processing (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 the counter ct is "2" (step S108). If the counter ct is "2" (step S108; Yes), the CPU 110 executes profile configuration processing (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 the counter ct is "3" (step S110). If the counter ct is "3" (step S110; Yes), the CPU 110 executes connection update processing (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 the counter ct is "4" (step S112). If 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 the counter ct is "5" (step S114). If the counter ct is "5" (step S114; Yes), the end process is executed (step S115), and the wireless communication process is ended. If 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とのデータの送受信処理(データ送受信処理)の動作の一例を示すフローチャートを示す。   FIG. 5 shows the service discovery process (step S107 in FIG. 4), the profile configuration process (step S109 in FIG. 4), the connection update process (step S111 in FIG. 4), and the connection continuation process (step S111 in FIG. 4). The flowchart which shows an example of operation | movement of the transmission / reception process (data transmission / reception process) of the data with the radio | wireless communication apparatus 200 performed commonly in step S113 of FIG. 4 and completion | finish process (step S115 of FIG. 4) is shown.

まずCPU110は、現在実行中の処理において、無線通信装置200からのデータの受信を待っている状態か否かを判定する(ステップS201)。無線通信装置200からのデータの受信を待っている状態であると判定した場合(ステップS201;Yes)、CPU110は、通信部103を制御して、無線通信装置200からデータを受信するデータ受信処理を実行する(ステップS202)。   First, the CPU 110 determines whether it is in a state of waiting for reception of data from the wireless communication device 200 in the process currently being executed (step S201). When it is determined that the reception of data from the wireless communication device 200 is awaited (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 the data received in step S202 is an event expected to be received in the process 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 incrementing the current counter ct by 1 (step S204). When it is determined that the received data is not an event expected to be received (step S203; No), the CPU 110 executes a layer determination process (step S205).

また、CPU110は、無線通信装置200からのデータの受信を待っていない状態であると判定した場合(ステップS201;No)、すなわち無線通信装置200へデータを送信すべきであると判定した場合、無線通信装置200に送信するデータをセットする(ステップS206)。そして、CPU110は、通信部103を制御して、無線通信装置200との間でデータ送受信処理を実行する(ステップS207)。   If the CPU 110 determines that it is not waiting to receive data from the wireless communication device 200 (step S201; No), that is, if it determines that data should be transmitted to the wireless communication device 200, Data to be transmitted is set to the wireless communication device 200 (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, CPU 110 determines whether or not there is data received from wireless communication apparatus 200 in step S207 (step S208). If 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 incrementing the current counter ct by 1 (step S209). When it is determined that there is data received from the wireless communication device 200 (step S208; Yes), the CPU 110 executes a layer determination process (step S205).

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

そして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は、本処理を終了する。   When the CPU 110 determines that the received event is not a link layer event (step S301; No), the CPU 110 determines whether the received event is an ATT layer event (step S303). If it is determined that the received event is an ATT layer event (step S303; Yes), the CPU 110 determines whether the ATT layer response flag set in the RAM 111 is ON (step S304). If 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 if it is determined that a response is necessary, the ATT layer response flag Set this to ON to complete this process. If it is determined that the ATT layer response flag is ON (step S304; Yes), the CPU 110 ends the present 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は、本処理を終了する。   When the CPU 110 determines that the received event is not an ATT layer event (step S303; No), the CPU 110 determines whether the received event is an SM layer event (step S306). If it is determined that the received event is an SM layer event (step S306; Yes), the CPU 110 determines whether the SM layer response flag set in the RAM 111 is ON (step S307). If 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 if it is determined that a response is necessary, the SM layer response flag Set this to ON to complete this process. If it is determined that the SM layer response flag is ON (step S307; Yes), the CPU 110 ends the present 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は、本処理を終了する。   When the CPU 110 determines that the received event is not the SM layer event (Step S306; No), the CPU 110 determines whether the received event is the L2CAP layer event (Step S309). If it is determined that the received event is an L2CAP layer event (step S309; Yes), the CPU 110 determines whether the L2CAP layer response flag set in the RAM 111 is ON (step S310). If 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 if it is determined that a response is necessary, the L2CAP layer response flag is Set this to ON to complete this process. When it is determined that the L2CAP layer response flag is ON (step S310; Yes), the CPU 110 ends the present process.

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

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

そして、CPU110は、ステップS402において無線通信装置200から受信したデータがあるか否かを判定する(ステップS404)。無線通信装置200から受信したデータがないと判定した場合(ステップS404;No)、CPU110は、現在のカウンタctを1増加させることによりカウンタctを更新する(ステップS405)。また、無線通信装置200から受信したデータがあると判定した場合(ステップS405;Yes)、CPU110は、図6に示す層判定処理を実行する(ステップS406)。そして、CPU110は、図4のステップS101に戻る。   Then, CPU 110 determines whether or not there is data received from wireless communication apparatus 200 in step S402 (step S404). If 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 incrementing the current counter ct by 1 (step S405). 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 timepiece 100 according to the present embodiment executes the plurality of normal processes in a predetermined order based on the counter corresponding to each of the plurality of processes. Further, at that time, for each of the plurality of layers constituting the communication protocol stack, it is determined whether or not a response to the wireless communication apparatus 200 is necessary, and when it is determined that a response is required, the wireless communication unit is controlled to respond Send Further, when the CPU 110 ends the process currently being executed, the CPU 110 updates the counter so as to represent the process to be executed next. Therefore, even if a process different from the normal process requiring a response is requested, the CPU 110 can stably maintain communication because the normal process is performed based on the counter while transmitting the response. Note that the counter does not necessarily have to be incremented by one. For example, the counter may be changed to a specific numerical value during each process such as the service discovery process. Therefore, the order may be switched by executing a plurality of normal processes based on the counter so that the process following the service discovery process is the connection update process or the termination process. Thus, the control of the counter can be changed as appropriate.

また、本実施形態に係る電子時計100のCPU110は、複数の階層のそれぞれについて、当該階層で無線通信装置200から受信する可能性があるコマンド毎に、応答の要否を判定する。従って、CPU110は、応答を要するコマンドを受信した場合に、そのコマンドに対応する応答を無線通信装置200に送信することができる。   In addition, the CPU 110 of the electronic timepiece 100 according to the present embodiment determines, for each of a plurality of layers, whether or not a response is necessary for each command that may be received from the wireless communication device 200 in the layer. Therefore, when receiving a command requiring 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 timepiece 100 according to the present embodiment responds, for each command that may be received for each of a plurality of layers, when an event different from an expected event occurs for each of a plurality of processes. Determine 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 apparatus 200.

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

また、上記の実施形態では、電子時計100を例に挙げて説明したが、本発明はこれに限られず、無線通信可能な電子機器に適用可能である。本発明は、特に、電子時計100にように、比較的小さな容量を有するバッテリを搭載する携帯可能な電子機器に好適である。   Further, in the above embodiment, the electronic timepiece 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 equipped with a battery having a relatively small capacity, such as the electronic timepiece 100.

また、上記の実施形態では、CPU110が、制御動作を行う例を説明した。しかし、制御動作は、CPUによるソフトウェア制御に限られるものではない。制御動作の一部又は全部が専用の論理回路などのハードウェア構成を用いてなされても良い。   Further, in the above embodiment, the example in which the CPU 110 performs the control operation has been described. However, the control operation is not limited to software control by the CPU. Some or all of the control operations 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)などの可搬型記録媒体を適用してもよい。また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウェーブ(搬送波)も本発明に適用される。   In the above description, the ROM 102 including a non-volatile memory such as a flash memory has been described as an example of a computer-readable medium storing a program related to the data communication process of the present invention and a program related to the advertisement process. However, the computer readable medium is not limited to these, and portable recording media such as HDD (Hard Disk Drive), CD-ROM (Compact Disc Read Only Memory) and DVD (Digital Versatile Disc) may be applied. Good. Also, as a medium for providing data of the program according to the present invention via a communication line, carrier wave (carrier wave) is also applied to the present invention.

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

本発明のいくつかの実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記の番号は、この出願の願書に最初に添付した特許請求の範囲の通りである。   Although several 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 equivalents thereof. In the following, the invention described in the claims initially attached to the request for this application is appended. The numbering of the appendices is as in the claims initially attached to the application for this application.

(付記1)
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部と、
制御部と、
を備え、
前記制御部は、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信装置。
(Supplementary Note 1)
A wireless communication unit configured to wirelessly communicate with another wireless communication device according to a communication protocol stack composed of a plurality of layers;
A control unit,
Equipped with
The control unit
Controlling the wireless communication unit to execute a plurality of processes including transmission and reception of data with the other wireless communication apparatus based on counters corresponding to the plurality of processes,
When an event different from an expected event occurs during execution of the process, it is determined whether or not a response to the other wireless communication apparatus 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 currently executing process is finished, the counter is updated to represent the next process to be executed,
A wireless communication device characterized in that.

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

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

(付記4)
付記1乃至3のいずれか1つに記載の無線通信装置と、
現在時刻を計時する計時部と、
前記計時部により計時された現在時刻を表示する表示部と、
を備えることを特徴とする電子時計。
(Supplementary Note 4)
The wireless communication device according to any one of appendices 1 to 3;
The clock unit that clocks the current time,
A display unit for displaying the current time clocked by the clock unit;
An electronic watch comprising:

(付記5)
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備える無線通信装置が実行する無線通信方法であって、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信方法。
(Supplementary Note 5)
A wireless communication method executed by a wireless communication apparatus including a wireless communication unit configured to wirelessly communicate with another wireless communication apparatus according to a communication protocol stack including a plurality of layers,
Controlling the wireless communication unit to execute a plurality of processes including transmission and reception of data with the other wireless communication apparatus based on counters corresponding to the plurality of processes,
When an event different from an expected event occurs during execution of the process, it is determined whether or not a response to the other wireless communication apparatus 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 currently executing process is finished, the counter is updated to represent the next process to be executed,
Wireless communication method characterized in that

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

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…無線通信装置 DESCRIPTION OF SYMBOLS 1 ... Wireless communication system, 10 ... Wireless communication apparatus, 100 ... Electronic clock, 101 ... Micro computer, 102 ... ROM, 103 ... Communications part, 104 ... Antenna, 105 ... Power supply part, 106 ... Display part, 107 ... Display driver , 108: operation receiving unit, 109: vibrator, 110: CPU, 111: RAM, 112: oscillating circuit, 113: dividing circuit, 114: clocking circuit, 115: program, 121: normal processing unit, 122: response required No-judgment unit, 123: Response unit, 200: Wireless communication device

Claims (6)

複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部と、
制御部と、
を備え、
前記制御部は、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信装置。
A wireless communication unit configured to wirelessly communicate with another wireless communication device according to a communication protocol stack composed of a plurality of layers;
A control unit,
Equipped with
The control unit
Controlling the wireless communication unit to execute a plurality of processes including transmission and reception of data with the other wireless communication apparatus based on counters corresponding to the plurality of processes,
When an event different from an expected event occurs during execution of the process, it is determined whether or not a response to the other wireless communication apparatus 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 currently executing process is finished, the counter is updated to represent the next process to be executed,
A wireless communication device characterized in that.
前記制御部は、前記複数の階層のそれぞれについて、当該階層で前記他の無線通信装置から受信する可能性があるコマンド毎に、前記応答の要否を判定する、
ことを特徴とする請求項1に記載の無線通信装置。
The control unit determines, for each of the plurality of layers, whether or not the response is necessary 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
If an event different from an expected event occurs during execution of each of the plurality of processes, whether or not the response is necessary is determined for each command that may be received in each of the plurality of layers.
The wireless communication device according to claim 2, characterized in that:
請求項1乃至3のいずれか1項に記載の無線通信装置と、
現在時刻を計時する計時部と、
前記計時部により計時された現在時刻を表示する表示部と、
を備えることを特徴とする電子時計。
The wireless communication device according to any one of claims 1 to 3.
The clock unit that clocks the current time,
A display unit for displaying the current time clocked by the clock unit;
An electronic watch comprising:
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備える無線通信装置が実行する無線通信方法であって、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行し、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定し、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信し、
現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とする無線通信方法。
A wireless communication method executed by a wireless communication apparatus including a wireless communication unit configured to wirelessly communicate with another wireless communication apparatus according to a communication protocol stack including a plurality of layers,
Controlling the wireless communication unit to execute a plurality of processes including transmission and reception of data with the other wireless communication apparatus based on counters corresponding to the plurality of processes,
When an event different from an expected event occurs during execution of the process, it is determined whether or not a response to the other wireless communication apparatus 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 currently executing process is finished, the counter is updated to represent the next process to be executed,
Wireless communication method characterized in that
複数の階層から構成される通信プロトコルスタックに従って他の無線通信装置と互いに無線通信する無線通信部を備えるコンピュータを、
前記無線通信部を制御して、前記他の無線通信装置とのデータの送受信を含む複数の処理を、前記複数の処理それぞれに対応するカウンタに基づいて実行する処理手段、
前記処理の実行中に期待されるイベントと異なるイベントが発生した場合に、前記複数の階層のそれぞれについて、前記他の無線通信装置への応答の要否を判定する応答要否判定手段、
前記応答を要すると判定した場合に、前記無線通信部を制御して、前記応答を送信する応答手段、
として機能させ、
前記処理手段は、現在実行中の処理を終了するとき、前記カウンタを次に実行すべき処理を表すように更新する、
ことを特徴とするプログラム。
A computer comprising a wireless communication unit that wirelessly communicates with other wireless communication devices according to a communication protocol stack composed of a plurality of layers;
Processing means for controlling the wireless communication unit to execute a plurality of processes including transmission and reception of data with the other wireless communication apparatus based on counters corresponding to the plurality of processes,
A response necessity determination unit that determines the necessity of a response to the other wireless communication device for each of the plurality of layers when an event different from the event expected during the execution of the processing occurs;
A response unit configured to control the wireless communication unit and transmit the response when it is determined that the response is required;
To act as
The processing means updates the counter to represent the next process to be executed when the currently executing process is finished.
A program characterized by
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 true JP2019067187A (en) 2019-04-25
JP6958201B2 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)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63316962A (en) * 1987-06-19 1988-12-26 Diesel Kiki Co Ltd Data communication optical equipment
JPH09101891A (en) * 1995-10-06 1997-04-15 Denso Corp Information processor and exception processing sequencer
WO2004086737A1 (en) * 2003-03-24 2004-10-07 Seiko Instruments Inc. Portable radio communication apparatus
JP2006238329A (en) * 2005-02-28 2006-09-07 Sony Corp Connection control device, communication system, and connection control method
US20080198871A1 (en) * 2007-02-21 2008-08-21 Reza Shahidi Dynamic adjustment of inactivity timer threshold for call control transactions
JP2016021752A (en) * 2009-10-09 2016-02-04 パナソニックIpマネジメント株式会社 On-vehicle device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02114302A (en) * 1988-10-24 1990-04-26 Fanuc Ltd Numerical control device
JP2970248B2 (en) * 1992-09-10 1999-11-02 松下電器産業株式会社 Communication control device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63316962A (en) * 1987-06-19 1988-12-26 Diesel Kiki Co Ltd Data communication optical equipment
JPH09101891A (en) * 1995-10-06 1997-04-15 Denso Corp Information processor and exception processing sequencer
WO2004086737A1 (en) * 2003-03-24 2004-10-07 Seiko Instruments Inc. Portable radio communication apparatus
JP2006238329A (en) * 2005-02-28 2006-09-07 Sony Corp Connection control device, communication system, and connection control method
US20080198871A1 (en) * 2007-02-21 2008-08-21 Reza Shahidi Dynamic adjustment of inactivity timer threshold for call control transactions
CN101617519A (en) * 2007-02-21 2009-12-30 高通股份有限公司 Dynamically adjust the inactivity timer threshold that is used for call control transactions
JP2016021752A (en) * 2009-10-09 2016-02-04 パナソニックIpマネジメント株式会社 On-vehicle device

Also Published As

Publication number Publication date
JP7363874B2 (en) 2023-10-18
JP2022008875A (en) 2022-01-14
JP6958201B2 (en) 2021-11-02

Similar Documents

Publication Publication Date Title
JP6132037B1 (en) Wireless communication method and program
CN106550320B (en) Wireless communication device, electronic timepiece, and wireless communication method
JP6451666B2 (en) Communication device, electronic timepiece, communication method, and program
JP6690592B2 (en) Wireless communication method and program
US11550269B2 (en) Electronic timepiece, information update control method and storage medium
EP3634047B1 (en) Wireless communication apparatus, electronic timepiece, transmission power control method, and program
JP7006102B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP7363874B2 (en) Wireless communication device, electronic clock, wireless communication method, and program
JP7136149B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONNECTION CONTROL METHOD AND PROGRAM
JP6834283B2 (en) Wireless communication device, electronic clock, wireless communication method, time change method, and program
US11553326B2 (en) Communication device and communication method for transmitting notifications to communicate with first and second softwares and to cause second software to be on standby and to cancel being on standby
JP6711133B2 (en) Wireless communication device, electronic clock, wireless communication method and program
JP2020010288A (en) Device, system and method for radio communication, and program
JP2018185148A (en) Communication device, electronic timepiece, method for changing time, method for generating notification signal, and program
CN108632447B (en) Wireless communication device, electronic timepiece, wireless communication method, and recording medium
JP2018157341A (en) Radio communication method, radio communication device, electronic watch, and program
JP6855723B2 (en) Communication device, electronic clock, time change method, connection request generation method, and program
JP2018048829A (en) Radio communication device, electronic watch, time correction method, transmission information generation method, and program
JP7087314B2 (en) Wireless communication devices, electronic clocks, wireless communication methods, and programs
JP2018101954A (en) Wireless communication device, wireless communication method, and program
JP2018044931A (en) Radio communication device, electronic timepiece, time change method, time information providing method, and program
JP2023160667A (en) Wireless communication device, wireless communication method, and computer 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