Communication apparatus for determining transmission destination by distance measurement and determination of presence or absence of obstacle, control method therefor, and system
A communication apparatus capable of determining the presence or absence of an obstacle between devices while achieving highly accurate distance measurement. The communication apparatus communicates with a distance measurement device. The communication apparatus outputs, at a constant interval, an advertisement packet including information to be used for first distance measurement using a signal strength of radio waves, receives, from the distance measurement device, an inquiry wave for performing second distance measurement using a time of arrival of radio waves, stops output of the advertisement packet in accordance with reception of the inquiry wave, and when a predetermined time has elapsed since the reception of the inquiry wave, outputs a response wave to be used for the second distance measurement to the distance measurement device and resumes output of the advertisement packet.
1 . An image forming apparatus that executes print processing based on print data received from a mobile terminal, the image forming apparatus comprising:
at least one memory storing instructions; and
at least one processor that executes the instructions to:
transmit, at a constant interval, an advertisement packet including information for performing a first distance measurement by the mobile terminal using a signal strength of radio waves, to measure a first distance between the image forming apparatus and the mobile terminal;
receive, from the mobile terminal, an inquiry wave for performing a second distance measurement by the mobile terminal using a time of arrival of radio waves, to measure a second distance between the image forming apparatus and the mobile terminal;
stop transmitting the advertisement packet in accordance with reception of the inquiry wave;
after a predetermined time has elapsed since receiving the inquiry wave, transmit to the mobile terminal a response wave to be used for the second distance measurement; and
resume transmitting the advertisement packet at the constant interval after transmitting the response wave,
wherein a difference between the first distance and the second distance measured by the mobile terminal enables the mobile terminal to determine presence or absence of an obstacle between the mobile terminal and the image forming apparatus, wherein:
in a case where a difference between the first and second distances exists, the obstacle is determined to be present; and
in a case where no difference between the first and second distances exists, the obstacle is determined to be absent.
2 . A mobile terminal that measures a distance to an image forming apparatus, which transmits, at a constant interval, an advertisement packet, the mobile terminal comprising:
at least one memory storing instructions; and
at least one processor that executes the instructions to:
receive, from the image forming apparatus at the constant interval, the advertisement packet, which includes information for performing a first distance measurement using a signal strength of received radio waves, to measure a first distance between the image forming apparatus and the mobile terminal;
transmit, to the image forming apparatus, an inquiry wave for performing a second distance measurement using a time of arrival of radio waves, to measure a second distance between the image forming apparatus and the mobile terminal;
receive, from the image forming apparatus, a response wave to be used for the second distance measurement;
cause the image forming apparatus to stop outputting the advertisement packet in accordance with reception of the inquiry wave by the image forming apparatus;
perform the second distance measurement to measure the second distance using the response wave received from the image forming apparatus;
perform the first distance measurement to measure the first distance using the advertisement packet received from the image forming apparatus together with the received response wave; and
determine presence or absence of an obstacle between the mobile terminal and the image forming apparatus based on a difference between the second distance and the first distance, wherein:
in a case where a difference between the first and second distances exists, the obstacle is determined to be present; and
in a case where no difference between the first and second distances exists, the obstacle is determined to be absent.
3 . The mobile terminal according to claim 2 , wherein the mobile terminal is configured to transmit print data to the image forming apparatus to execute print processing.
4 . The mobile terminal according to claim 2 , further comprising:
a display,
wherein the at least one processor further executes instructions to:
perform the first distance measurement and the second distance measurement for each of a plurality of image forming apparatuses;
determine presence or absence of an obstacle between the mobile terminal and each of the plurality of image forming apparatuses;
cause the display to display a list of the plurality of image forming apparatuses based on the second distance measured by the second distance measurement and a result of the determination for each of the plurality of image forming apparatuses, in ascending order of distance from the mobile terminal,
wherein the display is caused to display one image forming apparatus, among the plurality of image forming apparatuses, where the obstacle is determined to be present between the mobile terminal and the one image forming apparatus, in an unselectable manner.
5 . The mobile terminal according to claim 3 , further comprising:
a display,
wherein the at least one processor further executes the instructions to:
perform the first distance measurement and the second distance measurement for each of a plurality of image forming apparatuses;
determine presence or absence of an obstacle between the mobile terminal and each of the plurality of image forming apparatuses;
cause the display to display a list of the plurality of image forming apparatuses based on the second distance measured by the second distance measurement and a result of the determination for each of the plurality of image forming apparatuses; and
cause the display to display first image forming apparatuses, among the plurality of image forming apparatuses, where the obstacle is determined to be absent between the mobile terminal and the first image forming apparatuses, in ascending order of distance from the mobile terminal.
6 . The mobile terminal according to claim 4 , wherein the at least one processor further executes the instructions to cause a user to selectably set ON/OFF of a function of narrowing down transmission destination candidates of the print data.
7 . The mobile terminal according to claim 2 , wherein reliability of a result of the determination is determined on the basis of the distance measured by the second distance measurement.
8 . A control method for an image forming apparatus that executes print processing based on print data received from a mobile terminal, the control method comprising:
transmitting, at a constant interval, an advertisement packet including information for performing a first distance measurement by the mobile terminal using a signal strength of radio waves, to measure a first distance between the image forming apparatus and the mobile terminal;
receiving, from the mobile terminal, an inquiry wave for performing a second distance measurement by the mobile terminal using a time of arrival of radio waves for measuring a second distance between the image forming apparatus and the mobile terminal;
stopping transmitting the advertisement packet in accordance with reception of the inquiry wave;
after a predetermined time has elapsed since the reception of the inquiry wave, transmitting to the mobile terminal a response wave to be used for the second distance measurement; and
resuming transmitting the advertisement packet at the constant interval after transmitting the response wave,
wherein the first distance and the second distance measured by the mobile terminal allows the mobile terminal to determine presence or absence of an obstacle between the mobile terminal and the image forming apparatus, wherein:
in a case where a difference between the first and second distances exists, the obstacle is determined to be present; and
in a case where no difference between the first and second distances exists, the obstacle is determined to be absent.
9 . A system that measures a distance from a mobile terminal to an image forming apparatus, the system comprising:
the image forming apparatus, which comprises at least one first memory storing instructions, and at least one first processor that executes the instructions to:
transmit, at a constant interval, an advertisement packet including information for performing a first distance measurement by the mobile terminal using a signal strength of radio waves, to measure a first distance between the image forming apparatus and the mobile terminal;
receive, from the mobile terminal, an inquiry wave to be used by the mobile terminal for performing second distance measurement using a time of arrival of radio waves, to measure a second distance between the image forming apparatus and the mobile terminal;
stop transmitting the advertisement packet in accordance with reception of the inquiry wave; and
after a predetermined time has elapsed since receiving the inquiry wave, transmit to the mobile terminal a response wave to be used for the second distance measurement; and
resume transmitting the advertisement packet at the constant interval after transmitting the response wave; and
the mobile terminal, which comprises at least one second memory storing instructions and at least one second processor that executes the instructions to:
receive, from the image forming apparatus at the constant interval, the advertisement packet, which includes information for performing the first distance measurement using the signal strength of radio waves;
transmit, to the image forming apparatus, the inquiry wave for performing the second distance measurement using the time of arrival of radio waves;
receive, from the image forming apparatus, the response wave;
cause the image forming apparatus to stop transmitting the advertisement packet in accordance with reception of the inquiry wave by the image forming apparatus;
after the predetermined time has elapsed since the image forming apparatus received the inquiry wave, cause the image forming apparatus to transmit the response wave and to thereafter resume transmitting the advertisement packet at the constant interval;
perform the second distance measurement to measure the second distance using the response wave received from the image forming apparatus;
perform the first distance measurement to measure the first distance using the advertisement packet together with the received response wave; and
determine presence or absence of an obstacle between the mobile terminal and the image forming apparatus based on a difference between the second distance and the first distance, wherein:
in a case where a difference between the first and second distances exists, the obstacle is determined to be present; and
in a case where no difference between the first and second distances exists, the obstacle is determined to be absent.