Information processing method and storage medium

An information processing method includes the steps of detecting a device by searching one or more devices in a network, and communicating with the device which has been detected in the detecting step, by a communication method varying depending on whether or not searching for another device is in progress in the detecting step. In a case where the searching is in progress, communication is performed with the detected device by broadcast communication or multicast communication including an identifier allocated uniquely to the detected device, and in a case where the searching is not in progress, communication is performed with the detected device by unicast communication using an IP address which is allocated to the detected device and is acquired by the detecting of the detected device.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an information processing method and a storage medium, and in particular, to a technique to determine a communication method with a device connected to a network.

Description of the Related Art

In an office environment, a plurality of devices is connected to a network and many users use those devices. Devices include, for example, network equipment, such as a network printer. In such an environment, a setting and management of those devices are performed by an application intended for a manager (hereinafter, referred to as a management application) installed on a dedicated computer.

As a method of performing, by a management application, processing to acquire information and to change a setting for a specific device, there is a method that uses unicast communication. The unicast communication is a method of performing communication by specifying an IP address of a specific device. However, in the case where an invalid setting (e.g., a setting of a duplicate of an IP address) is set to a specific device, there is a possibility that a command for the specific device is transmitted to another device. As described above, with the method that uses unicast communication, it is not possible for a management application to perform bidirectional communication with a specific device, and therefore, there is a possibility that it is not possible to perform processing for the device.

In the case where a setting and management of a device are performed, there is a method that uses broadcast communication or multicast communication, besides unicast communication. Japanese Patent No. 5300562 has described the method of, in the case where a printer connected to a network is searched for again at the time of printing or at the time of acquisition of status, searching again by broadcast communication or unicast communication based on information indicating whether the printer can perform broadcast communication or can perform unicast communication.

However, the method that uses broadcast communication or multicast communication has such a problem that the amount of communication traffic becomes large. Depending on the scale of an office environment, there is a case where one hundred or more devices exist, and in the case where a setting and management of the devices are performed by using broadcast communication or multicast communication in such an environment, there is a possibility that an increase in communication traffic will result.

Consequently, in the case where a manager manages a device in an office environment, it is desired to suppress communication traffic by appropriately selecting a communication method with the device, not only to be capable of securely performing bidirectional communication with the device.

SUMMARY OF THE INVENTION

An information processing method according to the present invention includes the steps of detecting a device by searching a network and communicating with the device detected in the detecting, and in the communicating, in the case where a predetermined condition is satisfied, communication is performed with the detected device by broadcast communication or multicast communication including an identifier allocated uniquely to the detected device, and in the case where the predetermined condition is not satisfied, communication is performed with the detected device by unicast communication, and the predetermined condition is that an IP address allocated to the detected device is a duplicate of an IP address allocated to another device, or a possibility of the duplicate.

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, with reference to the attached drawings, embodiments for embodying the present invention are explained. The configurations shown in the following embodiments are merely exemplary and the present invention is not limited to the configurations shown schematically.

FIG. 1is a block diagram showing an example of a configuration of a network system including an information processing apparatus (computer101) according to a first embodiment.

In the network system shown inFIG. 1, the computer101, devices102to105, and a router106are connected via a network107. Each of the devices and the apparatuses performs communication in accordance with the TCP/IP (Transmission Control Protocol/Internet Protocol) protocol. The network107is connected with an external network110via the router106.

The computer101is, for example, a personal computer (PC). The devices102to105are peripherals such as a printer, a copy machine, a facsimile machine, and a scanner, or a multi function peripheral (MFP) including the functions thereof. The router106has a DHCP (Dynamic Host Configuration Protocol) server function and allocates an IP address to the computer and the devices102to105. InFIG. 1, the numeric value shown within parentheses located below and to the right of each of the devices and the apparatuses is an IP address that is allocated to each of the devices and the apparatuses in the present embodiment.

FIG. 2is a block diagram showing a hardware configuration of the information processing apparatus (the computer101) according to the first embodiment.

The computer101includes a monitor201, a CPU202, a ROM203, a RAM204, an auxiliary storage apparatus205, a keyboard206, a pointing device207, and a network board208. Each component is connected to one another via a bus209.

The monitor201displays a UI of an application, such as a management application, and a driver.

The CPU202loads a program, such as an application and a driver, stored in the ROM203or the auxiliary storage apparatus205into the RAM204and executes the loaded program.

The ROM203stores the basic software, such as a BIOS, and various programs for implementing processing that is performed by the computer101.

The RAM204temporarily stores software, such as an application and a driver, and data that is used by the software.

The auxiliary storage apparatus205is, for example, a hard disk. The auxiliary storage apparatus205stores software (program), such as an operating system (OS), an application, a driver, and various modules.

The driver stored in the auxiliary storage apparatus205includes device drivers (scanner driver, printer driver, facsimile driver, etc.) that control the devices102to105. Further, the driver stored in the auxiliary storage apparatus205includes a display control driver that controls the display on the monitor201, a keyboard driver that controls the keyboard206, and a pointing device driver that controls the pointing device207. Furthermore, the driver stored in the auxiliary storage apparatus205includes a network driver that controls communication of the network board208.

The application stored in the auxiliary storage apparatus205includes a management application. The management application has a device search function by the TCP/IP protocol (SNMP (Simple Network Management Protocol) or the like), and a function to set information to a device by the TCP/IP protocol. It may also be possible for the management application to call a module having the search function and the information setting function and to cause the module to perform those functions. Further, it may also be possible to provide the search function and the information setting function in different modules, respectively.

The keyboard206and the pointing device207are input apparatuses with which to input instructions from a user.

The network board208performs communication with a device via the network.

Here, the hardware configuration of the devices102to105is explained. The devices102to105have the same hardware configuration, and therefore, in the following, the device102is explained.

FIG. 3is a block diagram showing an example of the hardware configuration of the device102. The hardware configuration shown inFIG. 3is an example of the hardware configuration in the case where the device102is a printer.

As shown inFIG. 3, the device102includes a CPU301, a ROM302, a RAM303, a communication unit304, a printing unit305, an operation unit306, and a display unit307. Each component constituting the device102is connected to one another via a bus308.

The CPU301is, for example, a microprocessor. The CPU301functions as a central processing unit of the device102. The CPU301loads programs stored in the ROM302into the RAM303and controls the communication unit304, the printing unit305, the operation unit306, and the display unit307by executing the loaded programs.

The ROM302stores various programs for implementing processing that is performed by the device102.

The RAM303is used as a work area of the CPU301. The RAM303temporarily stores various kinds of data.

The communication unit304performs communication with another device via the network.

The printing unit305prints, for example, image data on a printing medium, such as paper.

The operation unit306includes an input apparatus, such as a button and a touch panel.

The display unit307displays a UI screen for operating the device102and various kinds of information on the device102.

In the case where the device102is a device other than a printer, the device102includes another component in place of the printing unit305or in addition to the printing unit305. For example, in the case where the device102is a scanner, the device102includes a read unit configured to read an image on a document as another component.

In the present embodiment, as shown inFIG. 1, the IP address of the router106is assumed to be 192.168.0.1. Further, the range of the IP address that can be allocated to the devices102to105on the network107is assumed to be 192. 168.0.2 to 192.168.0.255. To the computer101, the IP address 192.168.0.2 is allocated. To the device102, the IP address 192.168.0.3 is allocated. To the device103and the device104, the same IP address 192.168.0.4 is allocated. Further, to the device105, the IP address 10.0.1.5 that is not included in the above-described range of the IP address is allocated.

FIG. 4is a block diagram showing the software configuration of the image processing apparatus (the computer101) according to the first embodiment. As shown inFIG. 4, the computer101includes a device search unit401, a detected device output unit402, a search-processing-in-progress determination unit403, and a bidirectional communication unit404. Each unit shown inFIG. 4is implemented by the CPU202of the computer101executing the management application stored in the auxiliary storage apparatus205after reading the management application. In the present embodiment, the management application searches the network and displays a list of detected devices on the monitor201. Further, the management application performs processing, such as information acquisition processing and setting change processing, for a device selected by a user from the list of detected devices.

The device search unit401searches for a device on the network107that is connected to the computer101. In the present embodiment, the device search unit401detects the devices102to105.

The detected device output unit402displays a list of devices detected by the device search unit401on the monitor201.

A user selects a specific device from the list of devices displayed on the monitor201.

The search-processing-in-progress determination unit403determines whether the device search is still in progress or the device search has been completed, i.e., whether the search processing in the device search unit401is still in progress or has been completed.

The bidirectional communication unit404determines a communication method at the time of performing bidirectional communication with a device selected by a user. In the present embodiment, the bidirectional communication unit404determines a communication method at the time of performing bidirectional communication with a device selected by a user based on the determination results of the search-processing-in-progress determination unit403. Specifically, in the case where the search-processing-in-progress determination unit403determines that the search processing is in progress, the bidirectional communication unit404determines the communication method with a device selected by a user to be broadcast communication or multicast communication including an identifier (e.g., MAC address) allocated uniquely to the device in a packet. Further, in the case where the search-processing-in-progress determination unit403determines that the search processing has been completed, the bidirectional communication unit404determines whether a device selected by a user can perform unicast communication. The bidirectional communication unit404performs unicast communication on trial to a device selected by a user and in the case where there is a response from the device, the bidirectional communication unit404determines the communication method with the device to be unicast communication. On the contrary, in the case where there is no response from a device selected by a user, the bidirectional communication unit404determines the communication method with a device selected by a user to be broadcast communication or multicast communication including an identifier (e.g., MAC address) allocated uniquely to the device in a packet. Then, the bidirectional communication unit404transmits a communication command for performing information acquisition processing or setting change processing for a device selected by a user by the determined communication method.

Here, the operation of the present embodiment is explained.

FIG. 5is a flowchart showing processing of the information processing apparatus (the computer101) of the first embodiment.FIGS. 6A and 6Bare each an explanatory diagram showing an example of a UI screen of the management application in the first embodiment.

The processing shown inFIG. 5is implemented by the computer101executing the management application stored in the auxiliary storage apparatus205after loading the management application into the RAM204.

First, in the case where the management application is activated by the CPU202, on the monitor201, a main screen501of the management application shown inFIG. 6Ais displayed. In the case where a Search start button504on the main screen501is pressed down by a user operation, the device search unit401starts to search for a device on the network107. In the case where the device search unit401has detected a device, the detected device output unit402outputs information on the detected device to the monitor201. Due to this, devices that have been searched for are added sequentially to a list (search list502). A user selects a specific device from the search list502. In the case where a user presses down a Network setting button503in this state, a Network setting screen505shown inFIG. 6Bis displayed. A user inputs information to be set to the selected device in input areas507to509on the Network setting screen505and presses down a Set button506.

In the case where the Set button506is pressed down, instructions to perform a setting for the device are sent to the search-processing-in-progress determination unit403of the computer101, and the processing shown inFIG. 5is started.

First, upon receipt of the instructions to perform a setting for the device, the search-processing-in-progress determination unit403checks whether the device search unit401is currently performing the search processing (step S101). At this time, in the case where the device search unit401is currently performing the search processing (YES at step S101), the bidirectional communication unit404determines the communication method at the time of performing bidirectional communication with a device that a user has selected from the search list502to be broadcast communication or multicast communication including an identifier (MAC address or the like) allocated uniquely to the device in a packet (step S105). In the case where the device search unit401has completed the search processing (NO at step S101), the search-processing-in-progress determination unit403checks whether there exists an IP address that is a duplicate of the IP address selected by the user in the search list502(step S102). At this time, in the case where a duplicate of the IP address exists in the search list502(YES at step S102), the bidirectional communication unit404determines the communication method with the device selected by the user to be broadcast communication or multicast communication including an identifier allocated uniquely to the device in a packet (step S105). On the other hand, in the case where a duplicate of the IP address does not exist in the search list502(NO at step S102), the bidirectional communication unit404determines whether or not the device selected by the user can perform unicast communication (step S103). In the case where the device selected by the user can perform unicast communication (YES at step S103), the bidirectional communication unit404determines the bidirectional communication with the device selected by the user to be unicast communication (step S104). In the case where the device selected by the user cannot perform unicast communication (NO at step S103), the bidirectional communication unit404determines the communication method with the device selected by the user to be broadcast communication or multicast communication including an identifier allocated uniquely to the device in a packet (step S105). The bidirectional communication unit404transmits an information acquisition command or a setting command to the device by the determined communication method (step S106).

Here, an example of the operation in the case where the computer101performs the above-described processing flow for the network system shown inFIG. 1is explained.

For example, in the case where a user performs the setting operation for one of the devices in the search list502during the search processing of the device search unit401, the search-processing-in-progress determination unit403determines that the device search unit401is currently performing the search processing in the processing at step S101. Consequently, in this case, the processing at step S105is performed and the communication method with the device is determined to be broadcast communication or multicast communication including an identifier (MAC address or the like) with which the specific device can be identified in a packet. As described above, according to the present embodiment, even in the case where all the devices on the network have not been detected yet, i.e., even in the case where there is a possibility of a duplicate of an IP address, it is possible to transmit a command without fail to the device selected by the user. Consequently, it is possible for a manager to acquire information on the device and to change the setting of the device without the need to wait until the management application detects all the devices on the network.

Further, for example, in the case where the user performs the setting operation for the device102in the search list502after the search processing of the device search unit401has been completed, the search processing has already been completed (NO at step S101), and therefore, the processing at step S102is performed. In the processing at step S102, the search-processing-in-progress determination unit403checks whether there exists a duplicate of the IP address 192.168.0.3 of the device102in the search list502. At this time, no duplicate of the IP address exists, and therefore, the bidirectional communication unit404determines whether or not the device102can perform unicast communication in the processing at step S103. At this time, the bidirectional communication unit404determines that the device102can perform unicast communication because the IP address 192.168.0.3 of the device102is included in the range of IP address (192.168.0.2 to 192.168.0.255) that the router106allocates to the devices on the network107. Then, the bidirectional communication unit404performs unicast communication on trial for the device102and in the case where there is a response from the device102, the bidirectional communication unit404determines the communication method with the device102to be unicast communication in the processing at step S104. On the other hand, in the case where the user performs the setting operation for the device105in the search list502after the search processing of the device search unit401has been completed, the bidirectional communication unit404determines that the device105cannot perform unicast communication in the processing at step S103because the IP address 10.0.1.5 of the device105is not included in the above-described range of IP address. As a result of this, the processing at step S105is performed and the communication method with the device105is determined to be broadcast communication or multicast communication including an identifier (MAC address or the like) with which the specific device can be identified in a packet. As described above, in the case where no duplicate of the IP address of the device selected by the user exists, unicast communication is performed preferentially, and therefore, it is possible to suppress the occurrence of unnecessary communication traffic.

Further, for example, in the case where the user performs the setting operation for the device103in the search list502after the search processing of the device search unit401has been completed, the search processing has already been completed (NO at step S101), and therefore, the processing at step S102is performed. In the processing at step S102, the search-processing-in-progress determination unit403checks whether there exists a duplicate of the IP address (192.168.0.4) of the device103in the search list502. At this time, a duplicate of the IP address (the IP address of the device104) exists, and therefore, the processing at step S105is performed. Then, the communication method with the device103is determined to be broadcast communication or multicast communication including an identifier (MAC address or the like) allocated uniquely to the device in a packet. Due to this, even in the case where a duplicate of the IP address of the device selected by the user exists, it is possible to transmit a command without fail to the specific device.

In the present embodiment, the case is taken as an example where device information is acquired or set by the user operation, but it may also be possible to cause the computer101to automatically acquire or set device information.

Further, in the present embodiment, the search-processing-in-progress determination unit403checks whether there is a duplicate of an IP address, but it may also be possible to cause the device search unit401or the detected device output unit402to check whether there is a duplicate of an IP address.

In the present embodiment, the case is taken to be an example where the IP address is an IPv4 address, but the IP address may be an IPv6 address.

The device information that the computer101can acquire or set may be information other than the IP address. For example, it may also be possible for the computer101to acquire or set information that a user can set arbitrarily, such as a device name and a password.

It may also be possible for the bidirectional communication unit404to determine whether unicast communication is possible by a method other than the method of performing unicast communication on trial for a specific device. For example, there is a method of determining whether the IP address allocated to a device is included in the range of IP address that the router allocates.

Other Embodiments

According to the present invention, it is possible to securely perform bidirectional communication with a specific device at the time of management of the specific device and to reduce communication traffic.

This application claims the benefit of Japanese Patent Application No. 2015-110496, filed May 29, 2015, which is hereby incorporated by reference wherein in its entirety.