CPC G06F 3/04162 (2019.05) [G06F 3/03545 (2013.01); H02J 50/12 (2016.02); H02J 50/80 (2016.02); H02J 50/90 (2016.02)] | 19 Claims |
1. An electronic device comprising:
a housing;
a touch-screen display exposed through a portion of the housing;
a first wireless communication circuit disposed inside the housing;
a recess disposed inside the housing;
a first wireless charging circuit disposed inside the housing so as to be adjacent to the recess;
an electronic pen inserted to be removable from the recess, the electronic pen comprising:
a second wireless communication circuit configured to perform wireless communication with the first wireless communication circuit, and
a second wireless charging circuit electrically coupled to the first wireless charging circuit;
a processor disposed inside the housing and operatively coupled to the display, the first wireless communication circuit, and the first wireless charging circuit; and
a memory operatively coupled to the processor,
wherein the memory stores instructions causing the processor to, when executed:
charge the electronic pen through the first wireless charging circuit,
receive inherent information of the electronic pen through the first wireless communication circuit during or after the charging,
compare the inherent information with information stored in the electronic device,
when the inherent information matches the stored information, while the electronic pen is inserted into the electronic device, maintain a communication connection with the electronic pen based on a result of the comparison, and
when the inherent information does not match the stored 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.
|