Patent Description:
Electronic devices (e.g., mobile terminals, smartphones, or wearable devices) may provide various functions. Smartphones may provide not only a basic voice call function but also a Wi-Fi function, a Near Field Communication (NFC) function, a mobile communication (<NUM>rd-Generation (<NUM>), <NUM>th-Generation (<NUM>), or <NUM>th-Generation (<NUM>)) function, a music or video reproduction function, a photographing function, or a navigation function.

Further, the electronic devices may support a function of short-range wireless communication (using, e.g., Bluetooth Low Energy (BLE)) with an external electronic device. In similar regards, publication <CIT> relates to methods for operating an electronic device in communication with an external electronic device, wherein the communication is prompted by an execution of an application on the electronic device and the detachment of the external electronic device from the electronic device, publication <CIT> relates to methods for pairing a computing device and a stylus by transmitting, via a wireless protocol, identification information, and publication <CIT> relates to methods for managing pairing information between peer-to-peer devices, including deleting pairing information to enhance memory utilization.

External electronic devices (e.g., electronic pens) supporting short-range wireless communication (e.g., BLE) with an electronic device may transmit an advertising signal and may connect for wireless communication with the electronic device receiving the advertising signal. However, when there are a plurality of electronic devices within the range of the advertising signal, the external electronic device may establish the communication connection with another electronic device rather than the target electronic device to which the external electronic device should be connected (e.g., the electronic device to which the external electronic device is inserted).

Similarly, when there is a plurality of external electronic devices in the vicinity of the electronic device and the plurality of external electronic devices transmits an advertising signal, the electronic device may connect for short-range wireless communication with another external electronic device rather than the target external electronic device (e.g., an electronic pen inserted into the electronic device).

Aspects of the disclosure are to address at least the above-mentioned problems and/or disadvantages as defined by the independent claims.

The terms and words used in the following description and claims are not limited to the bibliographical meanings, but are merely used by the inventor to enable a clear and consistent understanding of the disclosure. Accordingly, it should be apparent to those skilled in the art that the following description of various embodiments of the disclosure is provided for illustration purposes only and not for the purpose of limiting the disclosure as defined by the appended claims and their equivalents.

Various embodiments of the disclosure may include an electronic device and an external electronic device capable of performing short-range wireless communication (e.g., BLE). The electronic device may be various electronic devices that may provide charging power to the external electronic device. For example, the electronic device may be a smartphone, a tablet Personal Computer (PC), or a notebook PC. The electronic device may operate as a scanner and a charging-power-providing device.

The external electronic device may be any of various electronic devices that may receive charging power from the electronic device and transmit an advertising signal for a connection to short-range wireless communication. For example, the external electronic device may include a battery and an accessory device, such as an electronic pen or a protective case, which is inserted into a recess formed in one side of the electronic device, and may receive charging power from the electronic device. The external electronic device may operate as an advertiser.

The electronic device may be a vehicle supporting wireless charging and communication connection of the external electronic device (e.g., a smartphone). For example, when the smartphone is positioned at a predetermined location (e.g., a location at which a wireless charging pad is installed), the vehicle may provide charging power to the smartphone and establish a short-range wireless communication connection with the smartphone.

The electronic device may be an inspection device for checking whether the external electronic device (e.g., the smartphone) has an error. For example, when the smartphone is positioned at the predetermined location, the inspection device may provide charging power to the smartphone, establish the short-range wireless communication connection with the smartphone, and check whether the smartphone has an error.

Hereinafter, the case in which the external electronic device is an electronic pen will be described by way of example for convenience of description.

<FIG> illustrates an electronic device and an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, an electronic pen (or a stylus pen) <NUM> according to an embodiment of the disclosure may be disposed inside a housing <NUM> of an electronic device <NUM>, and may be stored in a recess <NUM> so as to be capable of being removed therefrom. The electronic pen <NUM> may support wireless communication (e.g., wireless communication based on a Bluetooth protocol) and may include a rechargeable battery (not shown). The wireless communication may be Bluetooth Low Energy (BLE) communication.

When the electronic pen <NUM> is inserted into the electronic device <NUM>, the electronic pen <NUM> may receive power from the electronic device <NUM> and charge the battery with the received power. The electronic pen <NUM> may output (e.g., broadcast) an advertising signal during charging. For example, the electronic pen <NUM> may output the advertising signal for a predetermined time (e.g., <NUM> seconds) at predetermined intervals (e.g., <NUM>). When the power of the battery is equal to or less than a predetermined level (e.g., <NUM>%), the electronic pen <NUM> may first perform charging up to a predetermined level (e.g., <NUM>%) and then output the advertising signal. When the electronic pen <NUM> is removed from the electronic device <NUM>, the electronic pen <NUM> may output the advertising signal. For example, communication of the electronic pen <NUM> may be disconnected due to an unknown error in the state in which the electronic pen <NUM> is inserted into the electronic device <NUM>. When the electronic pen <NUM> is removed from the electronic device <NUM> in the state in which the communication connection with the electronic device <NUM> is disconnected, the electronic pen <NUM> (e.g., a second wireless communication circuit <NUM> of <FIG>) may attempt the communication connection with the electronic device <NUM> by outputting the advertising signal. To this end, the electronic pen <NUM> may further include a means (e.g., a sensor) for detecting whether the electronic pen <NUM> is removed from the electronic device <NUM>. When removal of the electronic pen <NUM> from the electronic device <NUM> is detected, the electronic device <NUM> may activate (perform) a scan operation for a predetermined time (e.g., <NUM> seconds).

When a predetermined button is input (e.g., pressed) for a predetermined time (e.g., <NUM> seconds), the electronic pen <NUM> may output the advertising signal. For example, when removal of the electronic pen <NUM> is detected and the electronic pen <NUM> is not connected for communication for a predetermined time (e.g., <NUM> seconds), the electronic device <NUM> may output a popup message indicating that the electronic pen <NUM> is not connected for communication and indicating a connection method through the display. When detecting the removal or after outputting the popup message, the electronic device <NUM> may activate (perform) the scan operation for a predetermined time (e.g., <NUM> seconds). The user may attempt to establish the communication connection between the electronic device <NUM> and the electronic pen <NUM> by pressing a predetermined button of the electronic pen <NUM> for a predetermined time or longer and making the electronic pen <NUM> output the advertising signal.

The electronic device <NUM> according to an embodiment of the disclosure may be a smartphone or a tablet Personal Computer (PC) into which the electronic pen <NUM> can be inserted (attached or connected). The electronic device <NUM> may support wireless communication (e.g., wireless communication based on a Bluetooth protocol) with the electronic pen <NUM>. The wireless communication may be BLE communication.

When insertion of the electronic pen <NUM> is detected, the electronic device <NUM> may provide charging power to the electronic pen <NUM>. For example, the electronic device <NUM> may detect insertion of the electronic pen <NUM> through various methods and charge a battery (not shown) positioned inside the electronic pen <NUM> by applying charging power to the electronic pen <NUM>. The method of detecting insertion of the electronic pen <NUM> will be described below with reference to <FIG>.

The electronic device <NUM> may identify whether the inserted electronic pen <NUM> is an electronic pen having a previous communication connection history (e.g., pairing). The electronic device <NUM> may compare reference inherent (or unique) information (e.g., a device address) stored in memory (not shown) with inherent information received from the electronic pen connected for communication and identify whether the inserted electronic device <NUM> is an electronic pen having a previous communication connection history (e.g., pairing).

When the inserted electronic pen <NUM> is the electronic pen having the previous communication connection history, the electronic device <NUM> may maintain the communication connection. When the electronic pen <NUM> is inserted in the state in which the electronic pen <NUM> is connected for communication, the electronic device <NUM> may maintain the communication connection.

According to another embodiment of the disclosure, when the inserted electronic pen <NUM> is not an electronic pen having a previous communication connection history, the electronic device <NUM> may initialize (e.g., reboot) the inserted pen <NUM> or delete (or format) pairing-related data and establish the communication connection with the inserted electronic pen <NUM>. When the electronic pen <NUM> is inserted in the state in which a communication connection with another electronic pen (not shown) has been established, the electronic device <NUM> may terminate the communication connection with the other electronic pen and then establish the communication connection with the inserted electronic pen <NUM> (or establish the communication connection after initialization).

When the number of electronic pens capable of establishing a communication connection is plural, the electronic device <NUM> may identify the electronic pen inserted into the electronic device <NUM> among the plurality of electronic pens. For example, the electronic device <NUM> may identify the electronic pen inserted into the electronic device <NUM> among the plurality of electronic pens on the basis of the advertising signal or charging-related information. A detailed description thereof will be given below with reference to <FIG>.

Referring to <FIG>, the electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>) in the network environment <NUM> may communicate with an electronic device <NUM> via a first network <NUM> (e.g., a short-range wireless communication network), or an electronic device <NUM> or a server <NUM> via a second network <NUM> (e.g., a long-range wireless communication network). The electronic device <NUM> may communicate with the electronic device <NUM> via the server <NUM>. The electronic device <NUM> may include a processor <NUM>, memory <NUM>, an input device <NUM>, a sound output device <NUM>, a display device <NUM>, an audio module <NUM>, a sensor module <NUM>, an interface <NUM>, a haptic module <NUM>, a camera module <NUM>, a power management module <NUM>, a battery <NUM>, a communication module <NUM>, a subscriber identification module (SIM) <NUM>, or an antenna module <NUM>. At least one (e.g., the display device <NUM> or the camera module <NUM>) of the components may be omitted from the electronic device <NUM>, or one or more other components may be added in the electronic device <NUM>. Some of the components may be implemented as single integrated circuitry.

The processor <NUM> may execute software (e.g., a program <NUM>) to control at least one other component (e.g., a hardware or software component) of the electronic device <NUM> coupled with the processor <NUM>, and may perform various data processing or computation.

The input device <NUM> may include a microphone, a mouse, a keyboard, or a digital pen (e.g., a stylus pen).

The sound output device <NUM> may include a speaker or a receiver. The receiver may be implemented as separate from, or as part of the speaker.

The display device <NUM> may include a display, a hologram device, or a projector and control circuitry to control a corresponding one of the display, hologram device, and projector.

The sensor module <NUM> may include a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

The interface <NUM> may include a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

The connecting terminal <NUM> may include a HDMI connector, a USB connector, a SD card connector, or an audio connector (e.g., a headphone connector).

The camera module <NUM> may capture a image or moving images.

The power management module <NUM> may be implemented as at least part of a power management integrated circuit (PMIC).

The communication module <NUM> may include a wireless communication module <NUM> (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module <NUM> (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate with the external electronic device via the first network <NUM> (e.g., a short-range communication network, such as Bluetooth™, Wi-Fi direct, or infrared data association (IrDA)) or the second network <NUM> (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., LAN or wide area network (WAN)).

The antenna module <NUM> may include an antenna including a radiating element composed of a conductive material or a conductive pattern formed in or on a substrate (e.g., printed circuit board (PCB)). The antenna module <NUM> may include a plurality of antennas. In such a case, at least one antenna appropriate for a communication scheme used in the communication network, such as the first network <NUM> or the second network <NUM>, may be selected by the communication module <NUM> (e.g., the wireless communication module <NUM>) from the plurality of antennas. Another component (e.g., a radio frequency integrated circuit (RFIC)) other than the radiating element may be additionally formed as part of the antenna module <NUM>.

<FIG> is a block diagram of an electronic device according to an embodiment of the disclosure.

Referring to <FIG>, an electronic device <NUM> (e.g., the electronic device <NUM> of <FIG> or the electronic device <NUM> of <FIG>) according to an embodiment of the disclosure may include a processor <NUM>, a memory <NUM>, a touch-screen display <NUM> (e.g., a display device <NUM> of <FIG>), a first wireless charging circuit <NUM>, and a first wireless communication circuit <NUM> (e.g., the wireless communication module <NUM> of <FIG>).

The processor <NUM> may control the overall operation of the electronic device <NUM>. For example, the processor <NUM> may be positioned inside a housing (not shown) of the electronic device <NUM>, and may be operatively (or electrically) connected to the memory <NUM>, the touch-screen display <NUM>, the first wireless charging circuit <NUM>, and the first wireless communication circuit <NUM> so as to control each element of the electronic device <NUM>.

The processor <NUM> may include a digitization controller <NUM>. The digitization controller <NUM> may transmit a position detection signal through a digitization panel <NUM> and receive a response signal from a resonant circuit of the electronic pen (e.g., the electronic pen <NUM> of <FIG>). The digitization controller <NUM> may determine position information of the electronic pen by analyzing the received response signal. Alternatively, the digitization controller <NUM> may transmit a detection signal through a coil included in the first wireless charging circuit <NUM> and receive a signal from the electronic pen so as to identify whether the electronic pen is physically or electrically connected. Alternatively, the digitization controller <NUM> may charge a battery (or a super capacitor) of the electronic pen by applying a charging signal of a higher voltage compared to the detection signal to the coil of the first wireless charging circuit <NUM>.

The digitization controller <NUM> may be a separate element. In this case, the processor <NUM> may perform control to receive insertion information of the electronic pen (e.g., the electronic pen <NUM> of <FIG>) from the digitization controller <NUM>, transmit a wireless communication connection command to the first wireless communication circuit <NUM> on the basis of the received insertion information, and transmit a charging signal and a control signal to the digitization controller <NUM> on the basis of data received from the first wireless communication circuit <NUM>. A detailed description of the processor <NUM> will be made below with reference to <FIG> and <FIG>, <FIG>, <FIG> and <FIG>, <FIG>.

The memory <NUM> may be operatively (or electrically) connected to the processor <NUM>. The memory <NUM> may include an Encrypting File System (EFS) area for storage of reference inherent information of the previous connected electronic pen and/or pairing-related data (e.g., bonding data) in the EFS area. The reference inherent information may include a Bluetooth address of the previously connected electronic pen, and the pairing-related data is data generated when pairing is performed, and may include one or more shared secret keys used for a security connection.

The touch-screen display <NUM> may be exposed through a portion of the housing and may provide an input function and an output function. For example, the touch-screen display <NUM> may include a display panel <NUM>, a touch panel <NUM>, and a digitization panel <NUM>. The display panel <NUM> may be embodied as, for example, a Liquid Crystal Display (LCD), a Light-Emitting Diode (LED) display, an Organic Light-Emitting Diode (OLED) display, a Micro Electro Mechanical System (MEMS) display, or an electronic paper display. The touch panel <NUM> may detect (or recognize) a change in physical characteristics (capacitance or frequency) through various touch input (e.g., tap, double tap, touch, touch movement, or multi-touch) using an input tool (e.g., a finger) and transmit the same to the processor <NUM>. The digitization panel <NUM> may detect an electromagnetic change in response to input by the electronic pen and transmit the same to the digitization controller <NUM> of the processor <NUM>. The touch-screen display <NUM> may further include a pressure detection panel (not shown) for detecting pressure.

The first wireless charging circuit <NUM> according to an embodiment of the disclosure may be disposed adjacent to a recess (e.g., the recess <NUM> of <FIG>) formed inside the housing of the electronic device <NUM>. The first wireless charging circuit <NUM> may supply power for charging the battery of the electronic pen inserted into the recess. The first wireless charging circuit <NUM> may be turned on for a first predetermined time (e.g., <NUM> seconds) and turned off for a second predetermined time (e.g., <NUM> second) under the control of the processor <NUM>. For example, the processor <NUM> may perform control to turn on or off the first wireless charging circuit <NUM> before the battery of the electronic pen is fully charged.

In order to identify (or verify) whether the pen currently connected for communication is the inserted pen, the first wireless charging circuit <NUM> according to an embodiment of the disclosure may be turned on or off in a predetermined pattern under the control of the processor <NUM> or the digitization controller <NUM>.

The electronic device <NUM> may charge the electronic pen through the first wireless charging circuit <NUM>, but the method of charging the electronic pen is not limited to the wireless charging method. For example, the electronic device <NUM> may charge the electronic pen through an electrically connected charging circuit (e.g., a wired charging circuit).

The first wireless communication circuit <NUM> may be disposed inside the housing of the electronic device <NUM>, and may connect a wireless communication channel with an external electronic device (e.g., the electronic pen <NUM> of <FIG>). The first wireless communication circuit <NUM> may receive inherent information from the electronic pen through the antenna <NUM> during or after charging of the electronic pen.

The first wireless communication circuit <NUM> may support a Bluetooth protocol. For example, the first wireless communication circuit <NUM> may be a BLE communication circuit. The first wireless communication circuit <NUM> according to an embodiment of the disclosure may scan for a connectable electronic pen when insertion of the electronic pen is detected or a charging signal is applied. The first wireless communication circuit <NUM> may receive an advertising signal of the electronic pen. The advertising signal may include charging-related information.

The first wireless charging circuit <NUM> may be a separate element separated from the electronic device <NUM>. The first wireless charging circuit <NUM> may establish the communication connection with the electronic device <NUM> through a server and transmit and receive various data (e.g., charging-related information and/or communication connection state information).

<FIG> is a block diagram of an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, an electronic pen <NUM> (e.g., the electronic pen <NUM> of <FIG>) according to an embodiment of the disclosure may include a coil <NUM>, a trimmer capacitor <NUM>, a button switch <NUM>, a rectification circuit unit <NUM>, a first voltage comparator <NUM>, a charging switch <NUM>, a second voltage comparator <NUM>, a second wireless communication circuit <NUM>, an antenna <NUM>, a booting switch <NUM>, a battery <NUM>, and an OR gate <NUM>. The rectification circuit unit <NUM> may be called a first voltage comparator <NUM>, and the charging switch <NUM> may be called a second wireless charging circuit <NUM>.

The coil <NUM> may be a resonant circuit that may detect an electromagnetic field signal applied by an external device (e.g., the first wireless charging circuit <NUM> of the electronic device <NUM>, <NUM>, or <NUM>) and transmit a signal of a specific frequency. For example, the coil <NUM> may be an Electromagnetic Resonance (EMR) coil. The trimmer capacitor <NUM> may store an induced current applied to the coil <NUM>. The button switch <NUM> may detect an input (pressing) of a button positioned at one side of the housing of the electronic pen <NUM>. When the button switch <NUM> is turned on, the resonant frequency of the coil <NUM> may be changed. The electronic device may detect a button input through the change in the resonant frequency.

The rectification circuit unit <NUM> according to an embodiment of the disclosure may convert the alternating current (AC) power applied to the coil <NUM> into direct current (DC) power and transmit the converted DC power to the first voltage comparator <NUM> and the charging switch <NUM>.

The first voltage comparator <NUM> may identify whether the DC power is a position detection signal or a charging signal on the basis of the voltage of the DC power provided from the rectification circuit unit <NUM>. For example, the charging signal may have a value larger than the position detection signal. The first voltage comparator <NUM> may determine that the DC power is the position detection signal when the DC power is smaller than a reference voltage (e.g., <NUM> V) and determine that the DC power is the charging signal when the DC power is larger than or equal to the reference voltage. When the DC power provided from the rectification circuit unit <NUM> is the charging signal, the first voltage comparator <NUM> may provide the second wireless communication circuit <NUM> with a signal indicting that the electronic pen <NUM> is inserted into the electronic device. Further, the first voltage comparator <NUM> may turn on the charging switch <NUM> when the DC power is the charging signal, and may turn off the charging switch <NUM> when the DC power is the position detection signal.

The charging switch <NUM> may control on/off of charging of the battery <NUM>. For example, the charging switch <NUM> may provide or block the DC power provided from the rectification circuit unit <NUM> to the battery <NUM> on the basis of the output from the first voltage comparator <NUM>.

The electronic pen <NUM> may charge the battery <NUM> through the second wireless charging circuit <NUM>, but the method of charging the battery <NUM> is not limited to the wireless charging method. For example, the electronic pen <NUM> may charge the battery <NUM> through a charging circuit (e.g., a wired charging circuit) electrically connected to an external device (e.g., the electronic device).

When the voltage of the battery <NUM> is larger than or equal to a predetermined voltage, the second voltage comparator <NUM> according to an embodiment of the disclosure may turn on (boot) the second wireless communication circuit <NUM>.

The second wireless communication circuit 409may be disposed inside the housing of the electronic pen <NUM>, and may perform wireless communication with the first wireless communication circuit <NUM> of the external device (e.g., the electronic device <NUM>, <NUM>, or <NUM>). The second wireless communication circuit <NUM> may support a Bluetooth protocol. For example, the second wireless communication circuit <NUM> may be a BLE communication circuit.

The second wireless communication unit <NUM> may transmit state information of the electronic pen <NUM> (e.g., inherent information or charging-related information) and/or data based on a button input to the first wireless communication circuit through the antenna <NUM>. The antenna <NUM> may be electrically connected to the second wireless communication circuit <NUM> and may transmit and receive a wireless signal.

The booting switch <NUM> may control on/off of the second wireless communication circuit <NUM>. For example, the booting switch <NUM> may supply or block power of the battery <NUM> to the second wireless communication circuit <NUM> on the basis of the output of the second voltage comparator <NUM>.

The battery <NUM> is a rechargeable secondary cell, may be charged with DC power from the rectification circuit unit <NUM>, and may supply power to the second wireless communication circuit <NUM>. For example, the battery <NUM> may be a super capacitor.

The OR gate <NUM> may provide a signal according to OR of the output of the first voltage comparator <NUM> and the button input to the second wireless communication circuit <NUM>.

According to various embodiments of the disclosure, an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may include a housing (e.g., the housing <NUM> of <FIG>), a touch-screen display (e.g., the display device <NUM> of <FIG> or the touch-screen display <NUM> of <FIG>) exposed through a portion of the housing, a first wireless communication circuit (e.g., the wireless communication circuit <NUM> of <FIG> or the first wireless communication circuit <NUM> of <FIG>) disposed inside the housing, a recess (e.g., the recess <NUM> of <FIG>) disposed inside the housing, a first wireless charging circuit (e.g., the first wireless charging circuit <NUM>) disposed inside the housing so as to be adjacent to the recess, an electronic pen (e.g., the electronic pen <NUM> of <FIG> or the electronic pen <NUM> of <FIG>) including a second wireless communication circuit (e.g., the wireless communication module <NUM> of <FIG> or the second wireless communication circuit <NUM> of <FIG>) inserted to be removable from the recess and capable of performing wireless communication with the first wireless communication circuit and a second wireless charging circuit (e.g., the second wireless charging circuit <NUM> of <FIG>) electrically coupled to the first wireless charging circuit, a processor (e.g., the processor <NUM> of <FIG> or <FIG>) located inside the housing and operatively coupled to the display, the first wireless communication circuit, and the first wireless charging circuit, and a memory (e.g., the memory <NUM> of <FIG> or <FIG>) operatively coupled to the processor. The memory may store instructions causing the processor to, when executed, detect whether the electronic pen is inserted into the recess, charge the electronic pen through the first wireless charging circuit based on the detection, receive inherent information of the electronic pen through the first wireless communication circuit during or after charging, and maintain or re-establish a communication connection with the electronic pen based on at least a portion of the received inherent information.

The first wireless communication circuit may support a Bluetooth protocol.

The inherent information may be a Bluetooth address of the electronic pen.

The instructions may cause the processor to store reference inherent information in the memory, compare the received inherent information with the reference inherent information, and maintain or re-establish the communication connection according to a result of the comparison.

The re-establishing of the communication connection may comprise at least one of rebooting of at least one of the first wireless communication circuit and the second wireless communication circuit and deletion of pairing-related data.

The inherent information may be included in an advertising signal of the electronic pen, and the instructions may cause the processor to randomly turn on or off the first wireless charging circuit in response to reception of a plurality of advertising signals from a plurality of electronic pens and maintain or re-establish the communication connection based on whether the advertising signal is synchronized with an on or off pattern of the first wireless charging circuit of the plurality of electronic pens.

The inherent information may be included in an advertising signal of the electronic pen, and the instructions may cause the processor to randomly turn on or off the first wireless charging circuit in response to reception of a plurality of advertising signals from a plurality of electronic pens and maintain or re-establish the communication connection based on whether charging-related information included in the advertising signal is synchronized with an on or off pattern of the first wireless charging circuit of the plurality of electronic pens.

The inherent information may be included in an advertising signal of the electronic pen, and the instructions may cause the processor to make a request for reducing an intensity of the advertising signal of the electronic pen connected for communication to a preset size or smaller in response to reception of a plurality of advertising signals from a plurality of electronic pens, maintain the communication connection with the electronic pen in response to continuous reception of the advertising signal having the reduced signal intensity, and re-establish the communication connection with the electronic pen in response to non-reception of the advertising signal having the reduced signal intensity.

The instructions may cause the processor to provide notification that the electronic pen inserted into the recess has an error when the inherent information is not received.

The instructions may cause the processor to apply charging power to the electronic pen by periodically repeating on and off of the first wireless charging circuit.

The electronic pen may be configured to transmit the advertising signal including the inherent information in an on period of the first wireless charging circuit, not to transmit the advertising signal in an off period of the first wireless charging circuit, to transmit the advertising signal in an on period of the first wireless charging circuit, and stop transmission of the advertising signal after maintaining the transmission of the advertising signal for a predetermined time after turning off of the first wireless charging circuit.

According to various embodiments of the disclosure, an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may comprise a housing (e.g., the housing <NUM> of <FIG>); a touch-screen display (e.g., the display device <NUM> of <FIG> or the touch-screen display <NUM> of <FIG>) exposed through a portion of the housing; a first wireless communication circuit (e.g., the wireless communication circuit <NUM> of <FIG> or the first wireless communication circuit <NUM> of <FIG>) disposed inside the housing; a recess (e.g., the recess <NUM> of <FIG>) disposed inside the housing; a first wireless charging circuit (e.g., the first wireless charging circuit <NUM>) disposed inside the housing to be adjacent to the recess; a processor (e.g., the processor <NUM> of <FIG> or <FIG>) located inside the housing and operatively coupled to the display, the first wireless communication circuit, and the first wireless charging circuit; and a memory (e.g., the memory <NUM> of <FIG> or <FIG>) operatively coupled to the processor. The memory stores instructions causing the processor to, when executed, detect whether an electronic pen is inserted into the recess, charge the electronic pen through the first wireless charging circuit based on the detection, perform a scan through the first wireless communication circuit in order to identify information on the electronic pen, turn on or off the first wireless charging circuit in a predetermined pattern in response to discovery of a plurality of electronic pens through the scan, identify the electronic pen inserted into the recess among the plurality of electronic pens based on charging-related information included in advertising signals received from the plurality of found electronic pens, and establish a communication connection with the identified electronic pen.

<FIG> is a flowchart illustrating a method by which an electronic device controls a communication connection with an electronic pen according to an embodiment of the disclosure, and <FIG> illustrates an example of a method by which an electronic device controls a communication connection with an electronic pen according to an embodiment of the disclosure.

Referring to <FIG> and <FIG>, a processor (e.g., the processor <NUM> of <FIG> or the processor <NUM> of <FIG>) of an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may detect insertion of an electronic pen (e.g., the electronic pen <NUM> of <FIG> or the electronic <NUM> of <FIG>) in operation <NUM>. For example, the processor may detect whether the electronic pen is inserted into a recess (e.g., the recess <NUM> of <FIG>) formed inside the housing of the electronic device. The insertion of the electronic pen may be detected through various methods. For example, the processor or the digitization controller <NUM> may transmit a signal through a detection coil at a predetermined period and identify whether a response signal is received from the electronic pen so as to identify whether the electronic pen is inserted into the electronic device. According to some embodiments, the processor may transmit a signal for calculating the position of the electronic pen at a preset period through a digitization panel (e.g., the digitization panel <NUM> of <FIG>) and receive a response signal from the electronic pen. The processor may determine whether the electronic pen is inserted into the electronic device on the basis of position information of the electronic pen recognized through the response. The electronic device may include a separate sensor, an electric switch, or a physical switch for detecting the insertion or removal of the electronic pen.

The processor may apply charging power to the electronic pen in operation <NUM>. For example, the processor may apply charging power to the electronic pen through a first wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>) disposed adjacent to the recess inside the housing. The processor may apply charging power to the electronic pen according to a predetermined time or period. A detailed description thereof will be made below with reference to <FIG>.

The processor receives inherent information of the electronic pen in operation <NUM>. For example, the processor receives inherent information of the electronic pen through a first wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>) during or after charging of the electronic pen. The inherent information may be a device address included in an AdvA field of a payload of the advertising signal, for example, a Bluetooth address.

The processor maintains and re-establishes the communication connection with the electronic pen on the basis of at least a portion of the received inherent information in operation <NUM>. For example, the processor compares the received inherent information with reference inherent information (e.g., a device address of the electronic pen to which the electronic device performed the communication connection) stored in an Encrypting File System (EFS) area of a memory (e.g., the memory <NUM> of <FIG> or <FIG>), and when the received inherent information matches the reference inherent information, maintain the communication connection with the electronic pen. For example, when a previously paired electronic pen <NUM> is inserted into an electronic device <NUM>, as indicated by reference numeral <NUM> of <FIG>, the processor maintains the communication connection with the electronic pen <NUM>.

On the other hand, when the inherent information received from the electronic pen does not match the reference inherent information stored in the EFS area of the memory, the processor re-establishes the communication connection with the inserted electronic pen. For example, when another electronic pen <NUM>, not the electronic pen <NUM> that previously performed the communication connection, is inserted into the electronic device <NUM>, as indicated by reference numeral <NUM> of <FIG>, the processor may disconnect the communication connection with the electronic pen <NUM> and re-establish the communication connection with the inserted electronic pen <NUM>. Re-establishing the communication connection includes at least one of rebooting at least one of a first wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>) of the electronic device <NUM> or a second wireless communication circuit (e.g., the second wireless communication circuit <NUM> of <FIG>) of the electronic pen <NUM>, or deletion of pairing-related data.

<FIG> is a flowchart illustrating a method by which an electronic device controls the communication connection with an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, a processor (e.g., the processor <NUM> of <FIG> or <FIG>) of an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may identify whether insertion (e.g., connection) of an electronic pen (e.g., the electronic pen <NUM> of <FIG> or the electronic pen <NUM> of <FIG>) is detected. For example, the processor may identify whether the electronic pen is inserted into a recess (e.g., the recess <NUM> of <FIG>) formed inside the electronic device through any of various methods.

When it is determined that the electronic device is not inserted on the basis of the result of the identification in operation <NUM>, the processor may continue to perform operation <NUM>. When it is determined that the electronic pen is inserted on the basis of the result of the identification in operation <NUM>, the processor may perform control so that a wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>) applies charging power to the electronic pen in operation <NUM>. The processor may perform control so that the wireless charging circuit applies charging power to the electronic pen on the basis of a predetermined time period. The method of applying the charging power will be described below with reference to <FIG>.

When the charging power is applied, the electronic pen may transmit (e.g., broadcast) an advertising signal.

The processor may identify whether there is an electronic pen connected for communication in operation <NUM>. For example, the processor may identify whether there is an electronic pen currently connected for communication with the electronic device on the basis of connection state information of an external device stored in a memory (e.g., the memory <NUM> of <FIG> or <FIG>). When the connection state information of the external device that can be connected to the electronic device is stored in a server (e.g., the server <NUM> of <FIG>), the processor may identify the electronic pen through the server. Operation <NUM> is not limited to being performed after charging power is applied to the electronic pen, but may be performed when insertion of the electronic pen is detected or at a predetermined time.

When it is determined that there is no electronic pen connected for communication on the basis of the result of the identification in operation <NUM>, the processor control to activate a scan operation of a wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>) in operation <NUM>. The scan operation may be a filter scan, but the embodiments of the disclosure are not limited thereto. The processor may search for (or discover) the electronic pen, which can be connected, by activating the scan operation. The scan operation may be an operation for receiving an advertising signal transmitted by the electronic pen. For example, the processor may receive the advertising signal transmitted by the electronic pen through the scan operation.

The processor may activate the scan operation when insertion of the electronic pen is detected.

When an electronic pen connected for communication is discovered on the basis of the result of the identification in operation <NUM>, the processor may identify (verify) whether the electronic pen connected for communication is the same as the electronic pen (inserted pen) that is being charged in operation <NUM>. For example, the processor may identify (verify) whether the electronic pen connected for communication is the same as the electronic pen that is inserted into the electronic device and is being charged on the basis of attribute information indicating the charging state of the electronic pen. A description thereof will be made below with reference to <FIG> and <FIG>.

Whether the electronic pen connected for communication is the same as the electronic pen being charged may be identified by reducing the intensity of the advertising signal of the electronic pen being charged or controlling the intensity of the advertising signal in a predetermined pattern. A detailed description thereof will be made below with reference to <FIG>.

Whether the electronic pen connected for communication is the same as the electronic pen being charged may be identified by controlling the time at which charging power is applied in an embodiment of the disclosure. This will be described below with reference to <FIG>.

The electronic device may use a combination of one or more of the various verification methods described above (or described below with reference to <FIG>).

When the electronic pen connected for communication is determined to be the same as the electronic pen being charged on the basis of the result of the identification in operation <NUM>, the processor may maintain the communication connection and the charging state in operation <NUM>.

When the electronic pen connected for communication is determined not to be the same as the electronic pen being charged on the basis of the result of the identification in operation <NUM>, for example, when communication with an electronic pen located outside the electronic device is connected, the processor may disconnect the communication connection with the electronic pen connected for communication in operation <NUM> and proceed to operation <NUM>.

Before performing operation <NUM> (the scan operation), the processor may initialize the inserted electronic pen. The initialization may include rebooting of a wireless communication circuit (e.g., the second wireless communication circuit <NUM> of <FIG>) within the electronic pen, deletion of pairing-related data, or disconnection. The initialization may be performed using a charging signal. For example, the processor may apply a charging signal to the inserted electronic pen for a predetermined time or longer for initialization of the electronic pen. The electronic pen receiving the charging signal for the predetermined time or longer from the electronic device may perform the initialization operation. After the initialization is completed, the electronic pen may transmit the advertising signal and the electronic device may perform a scan.

The processor may control so that the wireless communication circuit connects for communication with the inserted electronic pen in operation <NUM>. For example, when the inserted electronic pen is found through the scan operation of the wireless communication circuit, the processor may establish the communication connection with the inserted electronic pen through the wireless communication circuit. At this time, the inserted electronic pen may be in a charging state through charging power applied in operation <NUM>. When a plurality of advertising signals is received through the scan operation, the processor may perform a verification procedure by combining one or more of the various verification methods described above (or described below with reference to <FIG>) in order to identify (select) the electronic pen currently inserted into the electronic device. Alternatively, when no electronic pen is found after the scan is completed, the processor may again perform the scan operation a predetermined number of times (e.g., three times). The processor may output a screen inquiring about whether to again perform the scan on a display (e.g., the display device <NUM> of <FIG>) and again perform the scan or cancel the scan operation according to the user's selection. When no electronic pen is found after the scan is completed or the rescan is performed a predetermined number of times, the processor may notify the user of an error of the electronic device or the electronic pen.

<FIG> illustrates the application of charging power and a transmission period of an advertising signal of an electronic pen according to an embodiment of the disclosure, and <FIG> illustrates the application of charging power and a transmission period of an advertising signal of an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, when insertion of an electronic pen <NUM> (e.g., the electronic pen <NUM> of <FIG> or the electronic pen <NUM> of <FIG>) is detected, a processor (e.g., the processor <NUM> of <FIG> or <FIG>) of an electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may apply charging power to the electronic pen <NUM> by controlling a wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>). For example, when the electronic pen <NUM> is inserted into the electronic device <NUM>, as illustrated in <FIG>, the processor may repeat an operation for controlling the wireless charging circuit to apply charging power to turn on charging for a first predetermined time (e.g., <NUM> seconds) and controlling the wireless charging circuit not to apply charging power (to turn off charging) for a second predetermined time (e.g., <NUM> second). Meanwhile, as illustrated in <FIG>, the electronic pen <NUM> may transmit the advertising signal while charging is performed (while charging is on), and when charging ends (charging is off), may stop transmission of the advertising signal. For example, the electronic pen <NUM> may be configured to transmit the advertising signal during an on period of the wireless charging circuit and not to transmit the advertising signal during an off period of the wireless charging circuit.

The processor may add an electronic pen scanned for (found) at the on period of the wireless charging circuit to a candidate list. On the other hand, the processor may add an electronic pen scanned for (found) at the off period of the wireless charging circuit to a blacklist. The electronic pen added to the blacklist may be removed from the candidate list of the inserted electronic pen. This operation may be repeated until only one electronic pen is left in the candidate list.

In order to prevent misrecognition of the charging state of the electronic pen during the charging off period, in which charging power is not applied even though charging has not actually ended, the electronic pen may transmit the advertising signal while charging is performed, maintain transmission of the advertising signal for a third predetermined time (e.g., <NUM> second) after charging ends, and stop transmission of the advertising signal after the third predetermined time passes, as illustrated in <FIG>. The third predetermined time may be set as a value larger than or equal to the second predetermined time. When the third predetermined time is configured to be longer than or equal to the second predetermined time, as described above, charging is turned on after the second predetermined time, so that the advertising signal may be transmitted at the charging on period and the charging off period.

When charging power is applied from the electronic device after the electronic pen is inserted, the electronic pen may charge the battery and identify the power (e.g., a voltage) of the battery, and when the power (voltage) of the battery satisfies a preset condition (e.g., higher than or equal to <NUM>% of full power), transmit the advertising signal. The electronic pen may transmit the advertising signal including state information indicating that the electronic pen is being charged. The electronic pen may change the state information included in the advertising signal so as to indicate that charging is off after the third predetermined time passes. Even though the electronic pen is actually in the charging off state between the charging off and the third predetermined time, the electronic pen may transmit the advertising signal including state information indicating a charging on state.

<FIG> illustrates a method of verifying whether the electronic pen connected for communication is the same as the electronic pen being charged according to an embodiment of the disclosure.

Referring to <FIG>, an electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) according to an embodiment of the disclosure may verify (identify) whether the electronic pen <NUM> (e.g., the electronic pen <NUM> of <FIG> or the electronic pen <NUM> of <FIG>) connected for communication is the same as the electronic pen which is inserted and being charged. For example, the electronic device <NUM> may perform the verification by identifying attribute information indicating the charging state of the electronic pen through a notification. Hereinafter, the case in which the electronic pen <NUM> connected for communication is inserted into the electronic device <NUM> will be described by way of example.

When the electronic device <NUM> receives an insertion event of the electronic pen <NUM> as indicated by reference numeral <NUM>, the electronic device <NUM> may apply a charging signal to the electronic pen <NUM>, as indicated by reference numeral <NUM> and read attribute information indicating a charging state so as to check the charging state, as indicated by reference numeral <NUM>. At this time, the inserted electronic pen <NUM> may be using a high slave latency value to operate with low power and may exchange a signal with the electronic device <NUM> at a period shorter than the slave latency in case of receiving a read command of the electronic device <NUM> when the charging signal is applied.

When the electronic pen <NUM> connected for communication to the electronic device <NUM> does not respond to the read command within a predetermined time or when a response indicating that charging is being performed is received, the electronic device <NUM> may consider that the electronic pen <NUM> connected for communication is different from the electronic pen inserted into a recess (e.g., the recess <NUM> of <FIG>) of the electronic device <NUM>.

On the other hand, when a response indicating the electronic pen <NUM> connected for communication is being charged is received, the electronic device may verify whether the electronic pen <NUM> connected for communication is the same as the electronic pen being charged. This is performed because, if the determination is performed on the basis only of charging state information, when the electronic pen <NUM> connected for communication is inserted into another electronic device in the vicinity (within a communication range of the electronic device) and is being charged, the electronic pen <NUM> connected for communication is mistaken for the electronic pen inserted into the electronic device <NUM> even though the electronic pens are different from each other.

The electronic device <NUM> may register a notification in attribute information indicating the charging state of the electronic pen, as indicated by reference numeral <NUM>, turn off and then turn on the charging signal in a predetermined pattern during the charging on period, as indicated by reference numeral <NUM>, and identify whether the attribute information is synchronized and changed through the notification. When an on/off change of the charging signal is the same as the change in attribute information indicating the charging state received through the notification, or when the attribute information is synchronized, the electronic device may determine that the electronic pen <NUM> connected for communication is the same as the electronic pen that is inserted and being charged. When the changes are not the same, the electronic device may determine that the electronic pen connected for communication is different from the electronic pen that is inserted and being charged. When the verification is completed, the processor may release the registration of the notification, as indicated by reference numeral <NUM>.

According to some embodiments, when the number of electronic pens having a charging state change which is the same as the on/off pattern of the charging signal is plural, the electronic device <NUM> may change the on/off pattern of the charging signal and repeat the verification process until only one electronic pen is detected.

The electronic device may register the notification when the communication connection with the electronic pen is established.

In order to maintain a low-power state, the electronic pen may prevent a response delay of the electronic pen that may be generated due to the use of a high slave latency value. When the charging signal is applied, the electronic pen may perform communication at a predetermined period (e.g., a BLE connection interval or a separately configured interval) shorter than the slave latency for a predetermined time or a charging time regardless of the slave latency in order to rapidly share the charging state of the electronic pen. Accordingly, it is possible to prevent the delay of sharing of the charging state due to the high slave latency value in embodiments of the disclosure.

Referring to <FIG>, an electronic device <NUM> according to an embodiment of the disclosure may identify whether the electronic pen <NUM> connected for communication is the same as the electronic pen that is inserted and being charged through an indication. For example, when the electronic device <NUM> receives an insertion event of the electronic pen <NUM> connected for communication, as indicated by reference numeral <NUM>, the electronic device <NUM> may apply a charging signal to the inserted electronic pen <NUM>, as indicated by reference numeral <NUM>, and read attribute information indicating a charging state so as to check the charging state, as indicated by reference numeral <NUM>.

The electronic device <NUM> may register an indication in attribute information indicating the charging state of the electronic pen, as indicated by reference numeral <NUM>, and perform verification by turning on/off the charging signal in a predetermined pattern at a charging on period, as indicated by reference numeral <NUM>. When the predetermined off/on pattern of the charging signal is the same as the change pattern of the attribute information indicating the charging state received through the indication, the electronic device may determine that the electronic pen <NUM> connected for communication is the same as the electronic pen that is inserted and being charged. When the number of electronic pens having a charging state change the same as the predetermined off/on pattern of the charging signal is plural, the electronic device <NUM> may change the off/on pattern of the charging signal and repeat the verification process until only one electronic pen is detected. When the change patterns are not the same as each other, the electronic device may determine that the electronic pen connected for communication is different from the electronic pen that is inserted and being charged. When the verification is completed, the processor may release the registration of the indication, as indicated by reference numeral <NUM>.

When the electronic device <NUM> does not receive a response signal of a read command from the electronic pen <NUM> connected for communication within a predetermined time, or when a response indicating that charging is not being performed is received, the electronic device <NUM> may determine that the electronic pen <NUM> connected for communication is different from the electronic pen inserted into the electronic device <NUM>.

The electronic pen <NUM> may share the charging state with the electronic device using a high slave latency value for operation with low power. According to some embodiments, in order to rapidly share the charging state with the electronic device, the electronic pen <NUM> may exchange a signal with the electronic device <NUM> at a shorter period than the slave latency when the charging is applied.

Referring to <FIG>, it is possible to verify whether the electronic pen connected for communication is the same as the electronic pen being charged by reducing the intensity of the advertising signal to a predetermined magnitude according to an embodiment. For example, when the electronic pen <NUM> is inserted into an electronic device <NUM> and charging power is applied, the electronic pen <NUM> may transmit the advertising signal having an intensity within a predetermined range 11a, as illustrated in <FIG>. When the electronic pen <NUM> is inserted into the electronic device <NUM>, the predetermined range 11a may be set as the minimum range within which an antenna (e.g., the antenna <NUM> of <FIG>) of a wireless communication circuit (e.g., the first wireless communication circuit <NUM>) of the electronic device <NUM> is capable of detecting the advertising signal. Accordingly, the electronic device <NUM> may not receive an advertising signal transmitted by an electronic pen inserted into another electronic device, not the electronic pen <NUM> inserted into the electronic device <NUM> itself, or may receive the advertising signal with a very low signal intensity.

A processor (e.g., the processor <NUM> of <FIG> or <FIG>) of the electronic device <NUM> may verify whether the electronic pen connected for communication is the same as the electronic pen being charged by controlling the intensity of the advertising signal of the electronic pen <NUM>. For example, the processor may control the electronic pen connected for communication so as to transmit the advertising signal having intensity reduced to a predetermined intensity or lower when the electronic pen is inserted. When the advertising signal is continuously received after the intensity of the advertising signal is reduced, the processor may determine that the electronic pen connected for communication is the same as the electronic pen that is inserted into the electronic device and is being charged. On the other hand, when the advertising signal is not received after the intensity of the advertising signal is reduced, the processor may determine that the electronic pen connected for communication is inserted into another electronic device or is located outside the electronic device <NUM>.

When a plurality of advertising signals is received even after the signal of the advertising signal is reduced, the processor of the electronic device may perform control to reduce the intensity of the advertising signal by a predetermined amount until one advertising signal is received. In another example, the processor may recognize the advertising signal of the inserted electronic pen among the plurality of advertising signals by controlling a charging time (e.g., increasing the time to <NUM> seconds).

The processor of the electronic device may control the intensity of the advertising signal according to a predetermined pattern, identify whether the intensity of the received signal is changed in accordance with the predetermined pattern, and verify whether the electronic pen connected for communication is the same as the electronic pen being charged.

It is possible to recognize the inserted electronic pen by increasing the intensity of the advertising signal. For example, the processor of the electronic device may recognize that the electronic pen transmitting the advertising signal having an intensity higher than a predetermined advertising signal intensity is the inserted electronic pen.

Referring to <FIG>, an electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) according to an embodiment of the disclosure may verify whether the electronic pen connected for communication is the same as the electronic pen being charged by controlling an application time of charging power. For example, if an electronic pen <NUM> (e.g., the electronic pen <NUM> of <FIG> or the electronic pen <NUM> of <FIG>) is configured to transmit the advertising signal only when the electronic pen <NUM> is being charged, the electronic device <NUM> may turn on/off a charging signal in a predetermined pattern at a charging period, and when the received advertising signal corresponds to (e.g., is synchronized with) on/off of the charging signal, determine that the electronic pen <NUM> connected for communication is the same as the electronic pen being charged.

When the electronic pen <NUM> transmits the advertising signal including charging-related information, the electronic device <NUM> may turn on/off the charging signal according to a predetermined pattern, and when the charging-related information included in the received advertising signal corresponds to (is synchronized with) the predetermined pattern, determine that the electronic pen <NUM> connected for communication is the same as the electronic pen being charged. When the number of electronic pens having charging-related information that is the same as the predetermined on/off pattern of the charging signal is plural, the electronic device <NUM> may change the predetermined on/off pattern of the charging signal and repeat the verification process until only one electronic pen is detected.

When the electronic pen <NUM> is configured to transmit charging-related information to the electronic device <NUM> connected for communication, the electronic device <NUM> may turn on/off the charging signal in a predetermined pattern, and when the charging-related information included in the signal transmitted by the electronic pen <NUM> connected for communication corresponds to (is synchronized with) the predetermined pattern, determine that the electronic pen <NUM> connected for communication is the same as the electronic pen being charged.

<FIG> is a flowchart illustrating a method by which an electronic device controls a communication connection with an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, a processor (e.g., the processor <NUM> of <FIG>) of an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) according to an embodiment of the disclosure may detect insertion of an electronic pen (e.g., the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> or <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, or the electronic pen <NUM> of <FIG>) in operation <NUM>.

When insertion of the electronic pen is detected, the processor may control a wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>) to apply charging power to the inserted electronic pen in operation <NUM>. Since a method of applying the charging power has been described with reference to <FIG>, a detailed description thereof is omitted. The electronic pen to which the charging power is applied may output an advertising signal.

The processor may identify whether there is an electronic pen connected for communication in operation <NUM>.

When an electronic pen connected for communication is discovered on the basis of the result of identification in operation <NUM>, the processor may identify whether the electronic pen connected for communication is the same as the inserted electronic pen in operation <NUM>. For example, when an electronic pen is connected for communication, the processor may not activate a scan mode but may identify whether the electronic pen connected for communication is the same as the inserted electronic pen through the various methods described with reference to <FIG>. When the electronic device is capable of simultaneously establishing communication connections with each of a plurality of electronic pens, the processor may activate the scan even though an electronic pen is already connected for communication. In this case, the processor may identify whether the electronic pen connected for communication is the same as the inserted electronic pen by comparing reference inherent information of the electronic pen connected for communication with inherent information included in the advertising signal transmitted by the inserted electronic pen.

When the electronic pen connected for communication is determined to be the same as the inserted electronic pen on the basis of the result of identification in operation <NUM>, the processor may maintain the communication connection in operation <NUM>. On the other hand, when the electronic pen connected for communication is determined not to be the same as the inserted electronic pen on the basis of the result of identification in operation <NUM>, the processor may initialize the inserted electronic pen in operation <NUM>.

The processor may notify the user that another electronic pen is inserted before performing operation <NUM>. The processor may alternately notify the user that the electronic pen is changed after operation <NUM>. For example, the processor may notify the user of insertion of another electronic pen or a change of the electronic pen through a visual method (e.g., output of a popup message on the display), an auditory method (e.g., output of an audio signal through a speaker), or a tactile method (e.g., output of vibration of a predetermined pattern through a vibration motor).

The processor may display a popup message inquiring about whether to change the electronic pen on the display before operation <NUM> and perform operation <NUM> in response to reception of user input making a request for changing the electronic pen. The processor may terminate the communication connection procedure in response to reception of user input requesting that the electronic pen not be changed.

The processor may maintain the communication connection with the electronic pen connected for communication before operation <NUM> and notify the user that another electronic pen has been inserted. Maintaining the communication connection with the electronic pen means that the electronic pen connected for communication is located near the electronic device, and this is because the user can easily replace the electronic pen inserted into the electronic device with the electronic pen. When establishment of the communication connection with the electronic pen connected for communication is released before the user replaces the electronic pen, the processor may perform operation <NUM>.

When it is determined that there is no electronic pen connected for communication on the basis of the result of identification in operation <NUM>, the processor may control the wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>) to scan for the electronic pen in operation <NUM>. For example, the processor may receive an advertising signal transmitted by at least one electronic pen in the vicinity by controlling the wireless communication circuit.

The processor may identify whether a previously paired electronic pen is found in operation <NUM>. For example, the processor may identify whether a previously paired electronic pen is included in at least one currently found electronic pen by comparing reference inherent information stored in the memory with inherent information included in at least one received advertising signal.

When the previously paired electronic pen is included in at least one electronic pen found on the basis of the result of identification in operation <NUM>, the processor may connect for communication with the previously paired electronic pen in operation <NUM>. This is because the user seldom changes an electronic pen that has been used. However, the embodiments of the disclosure are not limited thereto. For example, when a new electronic pen is inserted into the electronic device and the electronic pen that the user used (e.g., the previously paired electronic pen) is inserted into another nearby electronic device, a problem may occur with the communication connection with the previously paired electronic pen. In order to prevent this problem, a verification procedure for identifying whether the inserted electronic pen is the previously paired electronic pen through the various methods described with reference to <FIG> may be performed.

On the other hand, when the previously connected electronic pen is not included in the at least one electronic pen found on the basis of the result of identification in operation <NUM>, the processor may identify whether the number of found electronic pens is one in operation <NUM>. When one electronic pen is found on the basis of the result of identification in operation <NUM>, the processor may connect for communication with the one found electronic pen in operation <NUM>. The processor may perform a verification procedure for identifying whether the one found electronic pen is the same as the inserted electronic pen through the various methods described with reference to <FIG>. This is because one electronic pen inserted into another electronic device or one electronic pen located outside the electronic device may be found when a broken electronic pen is inserted into the electronic device.

When the number of found electronic pens is determined not to be one on the basis of the result of identification in operation <NUM>, for example, when the number of found electronic pens is two or more, the processor may recognize (determine or select) the electronic pen inserted into the electronic device from among the plurality of electronic pens in operation <NUM>. For example, the processor may recognize the electronic pen actually inserted into the electronic device through the various methods described with reference to <FIG>.

The processor may connect for communication with the recognized electronic pen in operation <NUM>.

Although not illustrated, when no electronic pen is found on the basis of the result of the scan in operation <NUM>, the processor may notify the user of breakdown of the electronic pen. According to some embodiments, when no electronic pen is found, the processor may initialize the inserted electronic pen and perform the scan operation again. This is because the electronic pen inserted into the electronic device is connected for communication with another electronic device and thus may not be found when the scan is performed.

Referring to <FIG>, a processor (e.g., the processor <NUM> of <FIG> or <FIG>) of an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may detect insertion of an electronic pen in operation <NUM>. The insertion of the electronic pen may be detected through any of various methods. Since a detailed description thereof has been made above, the description will be omitted.

The processor may control a wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>) to apply charging power to the inserted electronic pen in operation <NUM>. Since a method of applying the charging power has been described with reference to <FIG>, a detailed description thereof is omitted. The electronic pen to which the charging power is applied may output an advertising signal.

The processor may scan for at least one electronic pen by controlling the wireless communication circuit (for example, the first wireless communication circuit <NUM> of <FIG>) in operation <NUM>. For example, the processor may receive an advertising signal transmitted by at least one electronic pen through the wireless communication circuit.

The processor may identify whether an electronic pen is found in operation <NUM>. When an electronic pen is found on the basis of the result of identification in operation <NUM>, the processor may identify whether the number of found electronic pens is two or more in operation <NUM>.

When the number of found electronic pens is two or more on the basis of the result of identification in operation <NUM>, the processor may recognize an inserted electronic pen among the plurality of found electronic pens in operation <NUM>. For example, the processor may recognize (determine/select) the electronic pen actually inserted into the electronic device through the various methods described with reference to <FIG>.

The processor may establish the communication connection with the recognized electronic pen in operation <NUM>.

When no electronic pen is found on the basis of the result of identification in operation <NUM>, the processor may provide notification of an error of the electronic pen in operation <NUM>. For example, the processor may output a popup message to the display, output a predetermined audio signal through a speaker, or output a vibration in a predetermined pattern through a vibration motor.

The processor may initialize the inserted electronic pen before providing notification of the error of the electronic pen and perform the scan operation again. This is because the electronic pen inserted into the electronic device is connected for communication with another electronic device and thus may not be found.

When the number of electronic pens is not plural on the basis of the result of identification in operation <NUM>, for example, when the number of found electronic pens is one, the processor may establish the communication connection with the found electronic pen in operation <NUM>. For example, the processor may determine that the one found electronic pen is the electronic pen inserted into the electronic device and establish the communication connection. The processor may perform a verification procedure for identifying whether the one found electronic pen is the inserted electronic pen through the various methods described with reference to <FIG>. This is because one electronic pen inserted into another electronic device or one electronic pen located outside the electronic device may be found while the broken electronic pen is inserted into the electronic device.

Although the above description has been made on the basis of the case in which the electronic pen is inserted, the electronic device may perform the operation for the communication connection with the electronic pen in various states requiring the communication connection with the electronic pen, for example, when an application (or an app) using the electronic pen is executed, when the application (e.g., the app) is terminated from the memory due to an error and then executed again, or when the communication connection is disconnected while the electronic pen is inserted.

In another example, the electronic device may perform the operation for the communication connection with the electronic pen when the electronic device is booted (or rebooted). For example, when the power of the electronic device is turned on, whether information related to the electronic pen exists is identified in the memory, and when there is no related information, the operation for the communication connection with the electronic pen may be performed. For example, when the power of the electronic device is turned on, charging power may be applied to the electronic pen inserted into the housing of the electronic device through the wireless charging circuit, and when information related to the electronic pen does not exist in the memory, the operation for establishing the communication connection with the electronic pen being charged may be performed.

In another example, when information on the electronic pen stored in the memory is initialized, the operation for the communication connection with the electronic pen may be performed. For example, when the user executes a setting menu and initializes information on the electronic pen even though the electronic pen is inserted into the electronic device, is being charged, and is connected for communication, the operation for the communication connection with the electronic pen may be performed.

<FIG> illustrates an operation for the communication connection between an electronic device and an electronic pen according to an embodiment of the disclosure.

Referring to <FIG>, an electronic device (e.g., the electronic device <NUM> of <FIG>) (e.g., the processor of the electronic device) may perform control to output a screen for a message making a request for inserting an electronic pen (e.g., the electronic pen <NUM> of <FIG>) on a display (e.g., the display device <NUM> of <FIG>), as indicated by reference numeral <NUM>. For example, when there is no electronic pen connected for communication and when the electronic pen is not inserted, the electronic device may perform control to display the insertion request screen on the display. Reference numeral <NUM> is only an example, and the electronic device may provide a request for inserting the electronic pen through any of various methods. For example, the electronic device may provide the request for inserting the electronic pen through a popup window, a quick panel, or a notification bar.

When the electronic pen is inserted, the electronic device may control to output a screen (hereinafter referred to as a connection attempt screen) indicating that establishment of the communication connection with the inserted electronic pen is attempted through a wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>) to the display, as indicated by reference numeral <NUM>. At this time, the electronic device may provide charging power to the electronic pen through the wireless communication circuit (e.g., the first wireless communication circuit <NUM> of <FIG>), and the electronic pen may output (e.g., broadcast) an advertising signal. Further, the electronic device may verify whether the inserted electronic pen is the same as the electronic pen being charged through any of the various methods.

When the electronic device performs the communication connection with the inserted electronic pen, the electronic device may perform control to output a screen (hereinafter, referred to as a connection completion screen) indicating that the communication with the electronic pen is connected to the display, as indicated by reference numeral <NUM>. When a predetermined time (e.g., <NUM> seconds) passes from the output of the connection completion screen, the electronic device may perform control to output an initial screen (e.g., a home screen) to the display.

When the electronic device does not establish the communication connection with the inserted electronic pen, the electronic device may control to output a screen (hereinafter referred to as a non-connection notification screen) indicating that the communication with the electronic pen is not connected to the display, as indicated by reference numeral <NUM>. The non-connection notification screen may include a retry menu (or button) <NUM>. When the retry menu <NUM> is selected (e.g., touched), the electronic device may perform control to output the connection attempt screen <NUM> to the display while retrying the communication connection with the electronic pen. Further, the electronic device may count up the number of retries when the retry menu <NUM> is selected.

The non-connection notification screen <NUM> may be provided a predetermined number of times (N times). N may be a natural number (e.g., <NUM>). When there is no communication connection between the electronic device and the electronic pen, whether the number of retries is smaller than the predetermined number of times is identified. When the number of retries is smaller than the predetermined number of times, the electronic device may perform control to output the non-connection notification screen <NUM> again to the display.

On the other hand, when the number of retries is the same as the predetermined number of times, the electronic device cannot establish the communication connection with the electronic pen, and may perform control to output a screen (hereinafter referred to as a connection-impossible screen) suggesting a visit to a service center to the display, as indicated by reference numeral <NUM>. The connection-impossible screen may include a close menu <NUM>. When the close menu <NUM> is selected, the electronic device may control to output an initial screen (e.g., a home screen) to the display.

The electronic device need not provide the non-connection notification screen. For example, when non-connection between the electronic device and the electronic pen is displayed on the connection attempt screen <NUM>, the electronic device may perform control to directly output the connection-impossible screen <NUM> to the display.

According to various embodiments of the disclosure, a method of controlling a communication connection of an electronic device (e.g., the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, the electronic device <NUM> of <FIG>, or the electronic device <NUM> of <FIG>) may include an operation of detecting whether an electronic pen (e.g., the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> or <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, the electronic pen <NUM> of <FIG>, or the electronic pen <NUM> of <FIG>) is inserted into a recess (e.g., the recess <NUM> of <FIG>) inside a housing (e.g., the housing <NUM> of <FIG>) of the electronic device, an operation of charging the electronic pen through a wireless charging circuit (e.g., the first wireless charging circuit <NUM> of <FIG>) on the basis of the detection, and an operation of receiving inherent information of the electronic pen through a wireless communication circuit during or after the charging; and an operation of maintaining or re-establishing the communication connection with the electronic pen based on a portion of the received inherent information.

The wireless communication circuit may support a Bluetooth protocol.

The maintaining or re-establishing of the communication connection may comprise comparing the received inherent information with reference inherent information stored in a memory of the electronic device; maintaining the communication connection when the received inherent information matches the reference inherent information based on a result of the comparison; re-establishing the communication connection with the electronic pen when the received inherent information does not match the reference inherent information based on a result of the comparison.

The re-establishing of the communication connection may comprise at least one of rebooting the wireless communication circuit; and deleting pairing-related data of a previously connected electronic pen.

The inherent information may be included in an advertising signal of the electronic pen, and the maintaining or re-establishing of the communication connection may comprise randomly turning on or off the wireless charging circuit in response to reception of a plurality of advertising signals from a plurality of electronic pens; and maintaining or re-establishing the communication connection based on whether the advertising signal of the electronic pen or charging-related information contained in the advertising signal is synchronized with an on or off pattern of the wireless charging circuit.

The inherent information may be included in an advertising signal of the electronic pen, and the maintaining or re-establishing of the communication connection may comprise making a request for reducing an intensity of the advertising signal of the electronic pen connected for communication to a preset size or smaller in response to reception of a plurality of advertising signals from a plurality of electronic pens; maintaining the communication connection with the electronic pen in response to continuous reception of the advertising signal having the reduced signal intensity; and re-establishing the communication connection with the electronic pen in response to non-reception of the advertising signal having the reduced signal intensity.

The charging of the electronic pen may comprise applying charging power to the electronic pen by periodically repeating on/off of the wires charging circuit, and the electronic pen may be configured to transmit the advertising signal including the inherent information in an on period of the wireless charging circuit, not to transmit the advertising signal in an off period of the first wireless charging circuit, to transmit the advertising signal in an on period of the first wireless charging circuit, and stop transmission of the advertising signal after maintaining the transmission of the advertising signal for a predetermined time after turning off of the first wireless charging circuit.

The electronic device according to various embodiments of the disclosure may connect for communication by identifying an external electronic device that needs to be connected for communication. For example, the electronic device may provide charging power to the external electronic device and maintain or re-establish the communication connection according to whether the external electronic device to which the charging power is being provided is an external electronic device having a previous communication connection history. According to various embodiments of the disclosure, when a plurality of external electronic devices is found, the external electronic device that is inserted into the electronic device and being charged may be identified (determined) among the plurality of external electronic devices on the basis of charging-related information.

The electronic device may be one of various types of electronic devices. The electronic devices are not limited to those described above.

Various embodiments as set forth herein may be implemented as software (e.g., the program <NUM>) including one or more instructions that are stored in a storage medium (e.g., internal memory <NUM> or external memory <NUM>) that is readable by a machine (e.g., the electronic device <NUM>, the electronic device <NUM>). For example, a processor (e.g., the processor <NUM>) of the machine (e.g., the electronic device <NUM>, the electronic device <NUM>) may invoke at least one of the one or more instructions stored in the storage medium, and execute it, with or without using one or more other components under the control of the processor. The term "non-transitory" simply means that the storage medium is a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

According to an embodiment of the disclosure, a method according to various embodiments of the disclosure may be included and provided in a computer program product.

Each component (e.g., a module or a program) of the above-described components may include a single entity or multiple entities. One or more of the above-described components may be omitted, or one or more other components may be added. In such a case, according to various embodiments, the integrated component may perform one or more functions of each of the plurality of components in the same or similar manner as they are performed by a corresponding one of the plurality of components before the integration. Operations performed by the module, the program, or another component may be carried out sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations may be executed in a different order or omitted, or one or more other operations may be added.

While the disclosure has been shown described with reference to various embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. of the manufacturer's server, a server of the application store, or a relay server.

Claim 1:
An electronic device (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>) comprising:
a housing (<NUM>);
a touch-screen display (<NUM>, <NUM>) exposed through a portion of the housing;
a first wireless communication circuit (<NUM>, <NUM>) disposed inside the housing;
a recess (<NUM>) disposed inside the housing;
a first wireless charging circuit (<NUM>) disposed inside the housing so as to be adjacent to the recess;
an electronic pen (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>) inserted to be removable from the recess, the electronic pen comprising:
a second wireless communication circuit (<NUM>) configured to perform wireless communication with the first wireless communication circuit, and
a second wireless charging circuit (<NUM>) electrically coupled to the first wireless charging circuit;
a processor (<NUM>) disposed inside the housing and operatively coupled to the display, the first wireless communication circuit, and the first wireless charging circuit; and
a memory (<NUM>) operatively coupled to the processor,
wherein the memory stores instructions causing the processor to, when executed:
detect whether the electronic pen is inserted into the recess, and
characterized in that when the electronic pen is inserted into the recess:
charge the electronic pen through the first wireless charging circuit based on the detection,
receive inherent information of the electronic pen through the first wireless communication circuit during or after the charging,
compare the received inherent information with reference inherent information stored in the memory, and
when the inherent information matches the reference inherent information, while the electronic pen is inserted into the electronic device, maintain a communication connection with the inserted electronic pen based on a result of the comparison,
when the inherent information does not match the reference inherent information, while the electronic pen is inserted into the electronic device, re-establish a communication connection with the electronic pen based on the result of the comparison,
wherein re-establishing the communication connection comprises at least one of rebooting of at least one of the first wireless communication circuit of the electronic device or the second wireless communication circuit of the electronic pen or deletion of pairing-related data.