abstract |
According to various embodiments of the present disclosure, an electronic device may include a housing including an inner space, a hole formed through the housing to the inner space, a stylus pen that may be inserted into the inner space through the hole, and the stylus pen A wireless charging transmission circuit comprising a first wireless communication circuit and a wireless charging receiving circuit, the wireless charging transmitting circuit being located inside the housing and configured to provide charging to the wireless charging receiving circuit when the stylus pen is inserted into the internal space; A second wireless communication circuit located therein, at least one processor operatively connected to the wireless charging transmission circuit and the second wireless communication circuit, and at least one memory operatively connected to the at least one processor And wherein the at least one memory is executed by the at least one processor when After detecting that the stylus pen is inserted into the inner space and detecting that the stylus pen is inserted into the inner space, the charging is provided to the wireless charging receiving circuit for a first period using the wireless charging transmission circuit. To start charging, and after starting charging to provide charging, using the second wireless communication circuit, scans a radio signal from the first wireless communication circuit, and uses the second wireless communication circuit Receiving the wireless signal from the first wireless communication circuit, and after receiving the wireless signal, stopping charging to provide charging to the wireless charging receiving circuit for the first period, and the second wireless communication The circuit may store instructions for transmitting a connection request to the first wireless communication circuit. Various other embodiments are possible. |