Communication device and control method thereof
09807807 · 2017-10-31
Assignee
Inventors
Cpc classification
G06F3/1205
PHYSICS
H04W8/22
ELECTRICITY
H04N1/00347
ELECTRICITY
H04N2201/0027
ELECTRICITY
H04L12/281
ELECTRICITY
H04N1/00278
ELECTRICITY
International classification
H04N1/00
ELECTRICITY
H04L12/28
ELECTRICITY
Abstract
A communication apparatus includes an acquisition unit, a determination unit, and a control unit. The acquisition unit acquires capability information on other communication apparatuses in a network. The determination unit determines, based on the capability information acquired by the acquisition unit, whether there is a communication apparatus having a specific function, related to data communication, to be performed after processing to set communication parameters is performed. The control unit perform controls, in response to the determination unit determining that there is a communication apparatus having the specific function, to continue the processing to set the communication parameters, and performs control, in response to the determination unit determining that there is no communication apparatus having the specific function, to terminate the processing to set the communication parameters.
Claims
1. A communication apparatus comprising: a memory configured to store a program; a processor; the program stored in the memory causes the communication apparatus to: acquire information of another communication apparatus; decide which of the communication apparatus and said another communication apparatus provides a communication parameter for communicating in a predetermined wireless network; communicate the communication parameter with said another communication apparatus according to the decision in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is decided according to the acquired information of said another communication apparatus and information of the communication apparatus; and in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is not decided according to the acquired information of said another communication apparatus and the information of the communication apparatus: 1) terminate communication with said another communication apparatus without communicating the communication parameter with said another communication apparatus, 2) notify said another communication apparatus of failure of communication processing of the communication parameter, and 3) display an error.
2. The communication apparatus according to claim 1, wherein the information of said another communication apparatus includes type information on said another communication apparatus.
3. The communication apparatus according to claim 1, wherein the communication apparatus notifies a user of a result of the decision.
4. The communication apparatus according to claim 1, wherein the communication parameter is used for wireless communication based on IEEE802.11 series.
5. The communication apparatus according to claim 1, wherein the communication parameter includes an SSID, an encryption method, an encryption key, an authentication method and an authentication key.
6. The communication apparatus according to claim 1, wherein the communication apparatus is a digital camera.
7. The communication apparatus according to claim 1, wherein the communication apparatus determines to decide which of the communication apparatus and said another communication apparatus transfers a communication parameter based on the acquired information of said another communication apparatus and information of the communication apparatus when the information of said another communication apparatus is acquired from said another communication apparatus.
8. The communication apparatus according to claim 1, wherein the error is displayed by using LED.
9. A control method for controlling a communication apparatus, the control method comprising: acquiring information of another communication apparatus; deciding which of the communication apparatus and said another communication apparatus provides a communication parameter for communicating in a predetermined wireless network; communicating the communication parameter with said another communication apparatus according to the decision in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is decided according to the acquired information of said another communication apparatus and information of the communication apparatus; and in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is not decided according to the acquired information of said another communication apparatus and the information of the communication apparatus: 1) terminating communication with said another communication apparatus without communicating the communication parameter with said another communication apparatus, 2) notifying said another communication apparatus of failure of communication processing of the communication parameter, and 3) displaying an error.
10. A non-transitory computer readable storage medium storing a program capable of causing a computer to execute a control method for controlling a communication apparatus, the control method comprising: acquiring information of another communication apparatus; deciding which of the communication apparatus and said another communication apparatus provides a communication parameter for communicating in a predetermined wireless network; communicating the communication parameter with said another communication apparatus according to the decision in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is decided according to the acquired information of said another communication apparatus and information of the communication apparatus; and in a case where which of the communication apparatus and said another communication apparatus provides the communication parameter is not decided according to the acquired information of said another communication apparatus and the information of the communication apparatus: 1) terminating communication with said another communication apparatus without communicating the communication parameter with said another communication apparatus, 2) notifying said another communication apparatus of failure of communication processing of the communication parameter, and 3) displaying an error.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
DESCRIPTION OF THE EMBODIMENTS
(18) Numerous exemplary embodiments for implementing the present invention will now herein be described in detail with reference to the drawings.
First Exemplary Embodiment
(19)
(20) A wireless communication device B is a printer 201 having an IEEE802.11-compliant wireless LAN function (or the like) as a wireless communication function 204, for example. When the user switches a communication parameter setting start switch 207, the printer 201 can constitute a part of the network in communication parameter setting mode.
(21) Like the wireless communication device A, a wireless communication device C is a digital camera 202 having an IEEE802.11-compliant wireless LAN function (or the like) as a wireless communication function 205, for example. When the user selects an option from a communication menu 208 displayed in a display unit to start setting mode, the digital camera 202 can constitute a part of the network in communication parameter setting mode.
(22) Then, the setting of wireless communication parameters for ad hoc communication between the digital camera 200 (device A), printer 201 (device B), and digital camera 202 (device C) is performed. Examples of wireless communication parameters include SSIDs serving as network identifiers, encryption methods, encryption keys, authentication methods, and authentication keys that are necessary for communication over an IEEE802.11-compliant wireless LAN. Communication parameter setting mode is a mode for automatically setting communication parameters such as those described above.
(23) The configuration of the digital camera 200 (device A) and printer 201 (device B) will now be described with reference to
(24)
(25) The digital camera 200 further includes an image pickup unit 308, a charge-coupled device (CCD) 309, a card interface (IF) 310, a display unit 311, an operation unit 312, a power source 313, a communication interface 314, and a communication parameter setting button 315. The image pickup unit 308 receives pixel signals input from the CCD 309. The card interface 310 controls a recording medium card for storing captured images and setting information. The display unit 311 displays error messages and the like. The operation unit 312 has buttons for allowing photographing, reproduction, setting, and the like. The power source 313 includes a secondary battery. The communication interface 314 is not a wireless interface but is, for example, a wired interface, such as a universal serial bus (USB) or IEEE1394 interface. The communication parameter setting button 315 is provided for starting the setting of communication parameters.
(26)
(27) The printer 201 further includes a paper feeding/ejecting unit 407, a printer engine 408, a card interface 409, a display unit 410, an operation unit 411, a wireless communication processor 412, an antenna 413, an antenna controller 414, and a communication parameter setting button 415. The paper feeding/ejecting unit 407 feeds and ejects printer paper. The printer engine 408 performs print control for electrophotographic printing, inkjet printing, or the like. The card interface 409 controls a recording medium card in which images are stored. The display unit 410 displays error messages and the like. The operation unit 411 includes menu buttons and setting buttons. The wireless communication processor 412 performs communication control in a wireless LAN. The communication parameter setting button 415 is provided for starting the setting of communication parameters.
(28) To share the printer 201 for printing, each of the users of the digital cameras 200 and 202 selects, from the respective communication menus 206 and 208 (see
(29) The following describes, with reference to
(30)
(31) <Communication Parameter Setting Network Formation Step 601>
(32) This step involves forming an ad hoc network between the device A, device B, and device C for setting communication parameters therebetween.
(33) <Master Device Determination Step 602>
(34) This step involves selecting a master device and slave devices from the device A, device B, and device C on the communication parameter setting network. At the same time, each device continuously monitors whether a device with which to communicate is present on the same network.
(35) <Device Capability Collection Step 603>
(36) In this step, a master device selected in step 602 sends requests to slave devices for device capability attribute values of the slave devices and collects the received attribute values. After the collection, the master device performs network continuation determination processing, using the collected device capability attribute values and its own device capability attribute values, to determine whether to retain the network.
(37) <Communication Parameter Transfer Direction Determination Step 604>
(38) In this step, the master device compares each slave device's capability attribute values collected in step 603 with its own device capability attribute values to determine from which device to which device communication parameters should be transferred. Moreover, the master device transfers, to each slave device, instructions including destination and source information necessary for the transfer of communication parameters.
(39) <Communication Parameter Transfer Step 605>
(40) This step involves actually transferring communication parameters from a device with communication parameter sending capabilities to a device with communication parameter receiving capabilities, according to the communication parameter transfer direction determined in step 604.
(41) <Communication Parameter Setting Network Termination Step 606>
(42) This step involves performing processing necessary for terminating the communication parameter setting network in response to the completion of the transfer in step 605. After the completion of step 606, another network is created using communication parameters transferred in step 605.
(43) Next, exemplary network continuation determination processing performed during the above-described setting of communication parameters will be described in detail.
(44) In the first exemplary embodiment, when a master device is selected in master device determination step 602, the master device stores in a storage unit thereof (i.e., the RAM 304 of the digital camera 200 or 202, or the RAM 404 of the printer 201) network continuation condition information shown in
(45) As shown in
(46) Next, network continuation determination processing performed by the master device in device capability collection step 603 will be described with reference to
(47) In step S802, since a device essential for performing the processing is not present, the master device determines that it is impossible to continue the processing and broadcasts an end message to each slave device. The end message can contain the cause of termination of the communication parameter setting. In the first exemplary embodiment, a message “Essential device is not present” is sent as a cause of the termination.
(48) Next, in step S803, the master device determines whether the device itself has a display unit. If the master device has a display unit, the process proceeds to step S804. If the master device does not have a display unit, the communication parameter setting ends unsuccessfully.
(49) In step S804, the master device displays an error message, as in
(50) In the first exemplary embodiment described above, the master device displays an error message as in
(51) Thus, the network continuation determination processing is performed according to the procedure described above.
(52) Next, error message display processing performed when a slave device receives an end message sent by the master device in step S802 will be described with reference to
(53) In step S1103, the slave device displays an error message in the display unit thereof to immediately inform the user of the failure of the processing and the cause of the failure. Then, the slave device terminates the communication parameter setting unsuccessfully.
(54) Thus, according to the procedure described above, the slave device performs the error message display processing upon receipt of an end message.
(55) The following describes, with reference to sequence diagrams of
(56)
(57) First, after starting the processing, the device A activates a timer for use in collecting device capability attribute information and collects device capability attribute information from each slave device during a time period TH1200. Specifically, during the time period TH1200, the device A sends device capability attribute request messages (F1201 and F1203) to the device B and device C, respectively, and receives device capability attribute information (F1202 and F1204) as responses.
(58) After the timer for use in collecting device capability attribute information comes to an end (i.e., a timeout occurs), the device A uses network continuation condition information (see
(59)
(60) First, after starting the processing, the device A activates a timer for use in collecting device capability attribute information and attempts to collect device capability attribute information from each slave device during a time period TH1300. The device A sends a device capability attribute request message (F1301) to the device B but cannot receive a response therefrom, as the device B has already left the network. When sending the device capability attribute request message (F1301), the device A sets a response waiting timer (for a time period TH1302). If device capability attribute information cannot be received as a response before a timeout occurs, the device A determines that an attempt to obtain device capability attribute information from the device B has failed. Subsequently, the device A sends a device capability attribute request message (F1303) to the device C and receives device capability attribute information (F1304) as a response.
(61) After the timer for use in collecting device capability attribute information comes to an end, the device A uses network continuation condition information (see
(62) Upon receipt of the end message (F1305) from the device A, the device C displays an error message in the display unit thereof (1313) and terminates the communication parameter setting unsuccessfully.
(63)
(64) First, after starting the processing, the device A activates a timer for use in collecting device capability attribute information and attempts to collect device capability attribute information from each slave device during a time period TH1400. The device A sends a device capability attribute request message (F1401) to the device B and receives device capability attribute information (F1402) as a response. Next, the device A sends a device capability attribute request message (F1403) to the device C but cannot receive a response therefrom, as the device C has already left the network. When sending the device capability attribute request message (F1403), the device A sets a response waiting timer (for a time period TH1404). If device capability attribute information cannot be received as a response before a timeout occurs, the device A determines that an attempt to obtain device capability attribute information from the device C has failed.
(65) After the timer for use in collecting device capability attribute information comes to an end, the device A uses network continuation condition information (see
(66) In the examples shown in
(67) According to the first exemplary embodiment, even if a device has left an ad hoc network where a plurality of devices joining the network are setting communication parameters therefor, a proper determination as to whether to continue the setting can prevent an unnecessary exchange of parameters and improve user friendliness.
Second Exemplary Embodiment
(68) The second exemplary embodiment of the present invention will now be described in detail with reference to the drawings. While the first exemplary embodiment describes processing performed when a slave device has left the network in device capability collection step 603, the second exemplary embodiment describes processing performed when a master device has left the network during the setting of communication parameters.
(69) In the second exemplary embodiment, when a slave device detects that a master device has left the network, each remaining slave device returns to master device determination step 602 to automatically select a new master device from the remaining devices. Then, the new master device obtains device capability attribute information about each slave device and performs network continuation determination processing to determine whether to continue setting communication parameters in the newly created network.
(70) Exemplary network continuation determination processing in the second exemplary embodiment will now be described in detail with reference to sequence diagrams of
(71)
(72) First, each slave device continuously monitors the presence of a master device (1511) and detects through the monitoring process that the master device has left the network if it has left the network during the setting of communication parameters. After the detection, each slave device terminates the processing that has been performed and automatically executes master device determination step (1512) again.
(73) In the example shown in
(74) Next, the newly selected device A executes device capability collection step, activates a timer for use in collecting device capability attribute information after starting the processing, and collects device capability attribute information from the slave device C during a time period TH1500. Here, the device A sends a device capability attribute request message (F1502) to the device C and receives device capability attribute information (F1503) as a response.
(75) After the timer for use in collecting device capability attribute information comes to an end, the device A uses network continuation condition information (see
(76) Upon receipt of the end message (F1504) from the device A, the device C displays an error message in the display unit thereof (1515) and terminates the communication parameter setting unsuccessfully.
(77)
(78) First, each slave device continuously monitors the presence of a master device (1611) and detects through the monitoring process that the master device has left the network if it has left the network during the setting of communication parameters. After the detection, each slave device terminates the processing that has been performed and automatically executes master device determination step (1612) again.
(79) In the example shown in
(80) Next, the newly selected device A executes device capability collection step, activates a timer for use in collecting device capability attribute information after starting the processing, and collects device capability attribute information from the slave device B during a time period TH1600. Here, the device A sends a device capability attribute request message (F1601) to the device B and receives device capability attribute information (F1602) as a response.
(81) After the timer for use in collecting device capability attribute information comes to an end, the device A uses network continuation condition information (see
(82) According to the second exemplary embodiment, even if the master device has left the network in the process of setting communication parameters, it is possible to automatically continue the setting of communication parameters between the remaining devices. If the master device that has left the network is an essential device required for processing to be performed in a network to be created according to set parameters, it is possible to immediately terminate the processing and send notifications to the users.
Third Exemplary Embodiment
(83) The third exemplary embodiment of the present invention will now be described in detail with reference to the drawings. In the first exemplary embodiment, network continuation determination processing is performed upon completion of device capability collection step 603. In the third exemplary embodiment, a slave device leaves the network during the setting of communication parameters after device capability collection step 603, and a master device detects that the slave device has left the network. Then, from stored device capability attribute information, the master device deletes information about the slave device that has left the network and performs network continuation determination processing.
(84) Next, network continuation determination processing performed after device capability collection step 603 will be described with reference to
(85) In step S1702, if there is no item that matches the network continuation condition information, the master device determines that there is no essential device required for the processing and that it is impossible to continue the processing. Then, the process proceeds to step S1703, where the master device broadcasts an end message to each slave device. The end message can contain the cause of termination of the setting of communication parameters. In the third exemplary embodiment, a message “Essential device is not present” is sent as a cause of the termination.
(86) Next, in step S1704, the master device determines whether the device itself has a display unit. If the master device has a display unit, the process proceeds to step S1705. If the master device does not have a display unit, the communication parameter setting ends unsuccessfully.
(87) In step S1705, the master device displays an error message in the display unit thereof to immediately inform the user of the failure of the processing and the cause of the failure. Then, the master device terminates the communication parameter setting unsuccessfully.
(88) Thus, the network continuation determination processing of the third exemplary embodiment is performed according to the procedure described above.
(89) According to the third exemplary embodiment, if a slave device has left the network after device capability attribute information has been obtained, the master device can immediately determine using the obtained device capability attribute information whether to continue the processing.
(90) As described above, according to the present invention, a proper determination as to whether to continue predetermined processing can prevent an unnecessary exchange of communication parameters if a communication device has left the network, and thus can improve user friendliness.
Other Exemplary Embodiments
(91) Although the present invention is applied to a wireless LAN in the first to third exemplary embodiments described above, the present invention is applicable to other wireless communication methods, such as Bluetooth (registered trademark), wireless USB, wireless 1394, ultrawideband (UWB), worldwide interoperability for microwave access (WiMAX) or any other similar wireless protocols.
(92) Although the present invention is applied to printing via a shared printer in the first to third exemplary embodiments described above, the scope of the present invention is not limited to this. For example, the present invention is applicable to reading via a shared scanner. In this case, personal computers and a scanner or multi function peripheral (MFP), instead of digital cameras and a printer, form an ad hoc network. Then, “Scanner” or “MFP”, instead of “Printer”, is stored as network continuation condition information shown in
(93) The present invention is applicable to a system composed of a plurality of devices (e.g., a host computer, an interface device, a reader, and a printer), and is also applicable to a system composed of a single device (e.g., a copier or a facsimile).
(94) The present invention may be implemented when a recording medium on which software program code for performing the functions of the above-described embodiments is recorded is supplied to a system or apparatus, and a computer (central processing unit (CPU) or micro-processing unit (MPU)) in the system or apparatus reads and executes the program code stored in the recording medium.
(95) In this case, the program code itself implements the functions of the above-described embodiments and thus, the recording medium on which the program code is recorded constitutes the present invention.
(96) Examples of a recording medium to be used for supplying the program code include a floppy disk, a hard disk, an optical disk, a magneto-optical (MO) disk, a compact-disk read-only memory (CD-ROM), a CD-recordable (CD-R), a magnetic tape, a nonvolatile memory card, and a ROM.
(97) In addition to the cases where the functions of the above-described embodiments are performed when a computer reads and executes the program code, there are other cases where the functions of the above-described embodiments are performed. For example, on the basis of instructions of the program code, an operating system (OS) running on the computer carries out all or part of the actual processing. This also allows the functions of the above-described embodiments to be performed.
(98) The functions of the above-described embodiments are also performed when the program code read out of a recording medium is written in a function expansion board in a computer or in a memory of a function expansion unit connected to a computer and then, on the basis of instructions of the program code, the function expansion board or a CPU in the function expansion unit carries out all or part of the actual processing.
(99) While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all modifications, equivalent structures and functions.