Communication apparatus and control method of communication apparatus
A communication apparatus includes one or more computers, with each computer having a memory for storing instructions and a processor for executing the instructions to obtain status information which indicates whether a relay function of a first apparatus, different from the communication apparatus, which uses a first wireless communication method is valid or not, using a second wireless communication method, and to request, using the second wireless communication method, the first apparatus to start the relay function, in a case where the obtained status information indicates that the relay function is valid. In addition, data for communicating with a second apparatus, different from the communication apparatus, connected via the first apparatus is communicated with the first apparatus using the first wireless communication method, in a case where the first apparatus is requested to start the relay function.
1. A communication apparatus comprising:
one or more processors; and
one or more memories including instructions that, when executed by the one or more processors, cause the apparatus to:
obtain, by a communication that conforms to a first communication scheme, execution information representing whether or not a first apparatus is executing a relay function that enables the communication apparatus to communicate with a second apparatus via the first apparatus;
request, by the communication that conforms to the first communication scheme, the first apparatus to start the relay function, in a case where the execution information represents that the first apparatus is not executing the relay function;
communicate with the second apparatus via the first apparatus, by performing a communication that conforms to a second communication scheme that is different from the first communication scheme with the first apparatus that is executing the relay function;
determine whether the first apparatus has been requested to start the relay function in a case where the communication with the second apparatus is terminated; and
request the first apparatus to stop the relay function in a case where it is determined that the first apparatus has been requested to start the relay function, and not request the first apparatus to stop the relay function in a case where it is determined that the first apparatus has not been requested to start the relay function.
2. The apparatus according to claim 1 , wherein the processors execute the instructions to connect to a wireless network so that the communication apparatus communicates with the second apparatus via the first apparatus.
3. The apparatus according to claim 2 , wherein the processors execute the instructions to obtain parameter information of the network, and
to connect to the wireless network using the parameter information.
4. The apparatus according to claim 1 , wherein the processors execute instructions to request the first apparatus to change a transmission interval of the execution information from the first apparatus based on a user operation on the communication apparatus.
5. The apparatus according to claim 4 , wherein the processors execute instructions to make the transmission interval shorter in a case where the user operation is a power-on operation of the communication apparatus than when the user operation is a power-off operation of the communication apparatus.
6. The apparatus according to claim 1 , wherein the first communication scheme is a communication scheme by Bluetooth low energy and the second communication scheme is a communication scheme certified by Wi-Fi.
7. The apparatus according to claim 1 , wherein the communication apparatus requests to terminate the relay function by the first communication scheme.
8. A control method of a communication apparatus, comprising:
an obtaining step of obtaining, by a communication that conforms to a first communication scheme, execution information representing whether or not a first apparatus is executing a relay function that enables the communication apparatus to communicate with a second apparatus via the first apparatus;
a requesting step of requesting, by the communication that conforms to the first communication scheme, the first apparatus to start the relay function, in a case where the execution information represents that the first apparatus is not executing the relay function;
a communicating step of communicating with the second apparatus via the first apparatus, by performing a communication that conforms to a second communication scheme that is different from the first communication scheme with the first apparatus that is executing the relay function;
a determining step of determining whether the first apparatus has been requested to start the relay function, in a case where the communication with the second apparatus is terminated; and
a requesting step of requesting the first apparatus to stop the relay function in a case where it is determined that the first apparatus has been requested to start the relay function, and not requesting the first apparatus to stop the relay function in a case where it is determined that the first apparatus has not been requested to start the relay function.
9. A non-transitory computer-readable storage medium storing a computer program for causing a computer to execute a control method of a communication apparatus, comprising:
obtaining, by a communication that conforms to a first communication scheme, execution information representing whether or not a first apparatus is executing a relay function that enables the communication apparatus to communicate with a second apparatus via the first apparatus;
requesting, by the communication that conforms to the first communication scheme, the first apparatus to start the relay function, in a case where the execution information represents that the first apparatus is not executing the relay function;
communicating with the second apparatus via the first apparatus, by performing a communication that conforms to a second communication scheme that is different from the first communication scheme with the first apparatus that is executing the relay function;
determining whether the first apparatus has been requested to start the relay function, in a case where the communication with the second apparatus is terminated; and
requesting the first apparatus to stop the relay function in a case where it is determined that the first apparatus has been requested to start the relay function, and not requesting the first apparatus to stop the relay function in a case where it is determined that the first apparatus has not been requested to start the relay function.