Information processing apparatus, method, and program

JP2024078180A5Pending Publication Date: 2025-12-09CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022190576
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

Existing systems fail to seamlessly switch between USB and network connections for printer communication, leading to mixed executable and non-executable device functions within applications.

Method used

An information processing apparatus that includes first and second communication means to communicate with a device via OS and non-OS functions, respectively, with control means to manage connection switching based on communication status.

Benefits of technology

Prevents mixing of executable and non-executable device functions by seamlessly switching between USB and network connections, ensuring consistent functionality in applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide an information processing apparatus that prevents the mixing of device functions that can be executed in an application with device functions that cannot be executed, depending on a connection form of communication between the information processing apparatus and a device.SOLUTION: An information processing apparatus includes: first communication means for communicating with the device via a predetermined function of an OS in an application capable of executing a function of a device; second communication means for communicating with the device not via the predetermined function of the OS in the application; and control means for controlling the second communication means to communicate with the device according to a form of connection with the device capable of communication by the first communication means in the application.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an information processing apparatus, method, and program capable of executing the functions of a device. [Background technology]

[0002] Printer-specific software provided by printer vendors (hereinafter referred to as "specific printer drivers") is known as software for controlling printers. There is also known technology in which an operating system (hereinafter referred to as "OS") provides standard printing functions (hereinafter referred to as "OS standard printing functions") without the need for specific printer drivers. The OS standard printing functions run on a printing system provided by the OS (hereinafter referred to as "OS printing system"). One such printing system is the CUPS (registered trademark) (Common UNIX (registered trademark) Printing System) printing system that runs on macOS (registered trademark) from Apple Inc.

[0003] Also, as software for controlling a printer, there are known software that provide various functions such as displaying printing and printer status information and executing maintenance functions in applications, apart from printer drivers and standard OS printing functions. The printer status information here refers to information about errors that have occurred in the printer itself and information about the amount of ink remaining in the printer. The maintenance functions include a function for cleaning the print head and a test print function for checking whether the print head is clogged. Displaying printer status information and executing maintenance functions are performed using printer vendor-specific commands (hereinafter referred to as vendor commands) defined for each printer vendor, and therefore cannot be achieved by the OS standard printing functions like the print function. Such functions are hereinafter referred to as vendor-specific functions.

[0004] Incidentally, printer connection can be achieved, for example, by connection using a Universal Serial Bus (USB) or connection via a network. Patent Document 1 describes that information is acquired from the printer via a network line, but if a normal connection cannot be established via the network line, the connection is switched to a USB connection.

[0005] A feature of the standard printing function of MacOS is how it handles the situation when, after creating a printer queue for a USB connection, the USB cable is unplugged and USB communication becomes impossible. If the same printer is connected to a network that macOS can access at this time, the communication path can be changed from USB to network and printing can be performed without recreating the printer queue. If USB communication becomes possible again after that, the communication path is changed back from network to USB and communication resumes. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] JP 2006-311032 A Summary of the Invention [Problem to be solved by the invention]

[0007] In vendor-specific communication using vendor commands, the above-mentioned seamless switching is not possible. Therefore, when an application uses standard OS functions, it may happen that some of the device's functions are available in the application and some of the device's functions are not available.

[0008] The present invention aims to provide an information processing device, method, and program that prevent device functions that can be executed within an application from being mixed with device functions that cannot be executed depending on the communication connection form between the information processing device and the device. [Means for solving the problem]

[0009] In order to solve the above problem, the information processing device of the present invention is characterized in that it comprises a first communication means, in an application capable of executing the functions of a device, for communicating with the device via a specified function of the OS, a second communication means, in the application, for communicating with the device without going through the specified function of the OS, and a control means, in the application, for controlling the second communication means to communicate with the device via a connection form between the device and the application that enables communication via the first communication means. Effect of the Invention

[0010] According to the present invention, it is possible to prevent a situation in which device functions that can be executed within an application and device functions that cannot be executed are mixed together depending on the communication connection form between the information processing device and the device. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 illustrates a printing system. [Diagram 2] FIG. 2 is a block diagram showing a software configuration of a host computer. [Diagram 3] FIG. 13 is a diagram showing a screen provided by the OS printing system. [Figure 4] FIG. 13 is a diagram showing a screen provided by the OS printing system. [Diagram 5] FIG. 13 is a diagram showing a screen displayed by an application. [Figure 6] FIG. 13 is a diagram showing a screen displayed by an application. [Figure 7] 10 is a flowchart showing a process executed by an application. [Figure 8] 10 is a flowchart showing a process executed by an application. [Figure 9] 10 is a flowchart showing a process executed by an application. [Figure 10]FIG. 13 is a diagram showing a screen displayed by an application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.

[0013] [First embodiment] [System Configuration] The hardware configuration of the image forming system in this embodiment will be described with reference to the block diagram of Fig. 1. Fig. 1 is a diagram showing an example of a printing system in which a host computer 11 and a printer 12 can communicate with each other via a network such as Ethernet (registered trademark) or a communication bus 121 such as USB. Although only one printer is shown in Fig. 1, any number of printers may be connected via the communication bus 121.

[0014] The host computer 11 is an example of an information processing device. An operating system (hereinafter, OS) is installed in the host computer 11. The OS includes an OS-standard print function unit 202, which is OS-standard print software, which will be described later.

[0015] The host computer 11 is, for example, a personal computer (PC), and includes an interface (I / F) unit 107, a CPU 101, a ROM 102, a RAM 103, a display unit 104, an input unit 105, and an external storage device 106. The host computer 11 is not limited to a desktop PC, and may be a notebook PC, a tablet PC, or a smartphone.

[0016] The host computer 11 transmits to the printer 12 instructions for controlling the printer 12, print data, setting commands, etc. The CPU 101 is a central processing unit that controls each part of the host computer 11, and executes control programs such as the OS and the specific printer driver unit 203 described below. The ROM 102 is a read-only memory that stores programs and data that control the host computer 11. The RAM 103 is a writable / readable memory that is used as a work area by the CPU 101. The external storage device 106 stores various control programs such as applications and the specific printer driver unit 203.

[0017] The input unit 105 is an input device such as a keyboard and a mouse for operating the host computer 11. The display unit 104 is a display device for displaying information input from the input unit 105, displaying user interface screens of the OS and applications, displaying messages, etc. The I / F unit 107 is a communication module for transmitting and receiving data to and from the printer 12.

[0018] Printer 12, which is a printing device, is, for example, an inkjet printer. Printer 12 has an I / F unit 115, a CPU 111, a ROM 112, a RAM 113, and a print engine 114. CPU 111 is a central processing unit that controls the following units. ROM 112 is a read-only memory, and stores a program that controls print engine 114. RAM 113 is a writable / readable memory, and temporarily stores a program required for the operation of print engine 114, setting values ​​received from host computer 11, etc.

[0019] The print engine 114 prints on a recording medium such as printing paper based on print data sent from the host computer 11. The I / F unit 115 is a communication module that realizes communication with the host computer 11. The I / F unit 115 has a function of receiving print data from the host computer 11 and sending the current status information of the printer 12 to the host computer 11. The status information here is, for example, status data that indicates the state of the printer 12 that the printer 12 can send in response to a request from the host computer 11 connected via the I / F unit 115. The status data includes information indicating the operating state of the printer 12, such as "printing" or "standby state," and error states of the printer 12, such as "out of paper," "cover open," or "no consumables remaining." The status data also includes information such as the type of consumables installed in the printer 12, the display color of each consumable, and the remaining amount of each consumable.

[0020] [Software configuration] FIG. 2 is a block diagram showing an example of the software configuration of the host computer 11. The host computer 11 is equipped with an OS printing system 201, which is OS standard printing software. The OS printing system 201 is equipped with an OS standard printing function unit 202 and a unique printer driver unit 203 so that they can be operated. Furthermore, the host computer 11 is equipped with an application 205. Furthermore, the OS printing system 201 is equipped with a print setting UI unit 211, the OS standard printing function unit 202 is equipped with a print setting UI unit 212, and the unique printer driver unit 203 is equipped with a print setting UI unit 213. Furthermore, the application 205 is equipped with a print setting UI unit 215 and a status data display unit 216. To use a printer on the OS printing system 201, it is first necessary to register the printer in the printer management unit 231. This registration process is performed for each printer and for each connection type. For example, even if the printer is the same, it is registered and managed separately for the case of USB connection and the case of network connection.

[0021] The application 205 is printer software capable of generating drawing data and acquiring and displaying printer status data based on a user instruction on the print setting UI unit 215. The application 205 is software that runs on the OS, which is the basic software of the host computer 11. The application 205 has a function of printing generated drawing data. The drawing data generated by the application 205 is, for example, data in a portable document format (PDF). After generating the drawing data, the application 205 makes a print request to the OS print system 201 based on a user instruction. Note that, when a print request is made, the print setting may be received from a user on a setting screen provided by the print setting UI unit 215 of the application 205 and a setting screen provided by the print setting UI unit 211 of the OS print system 201. Furthermore, the user may make a print request using either the OS standard print function unit 202 or the specific printer driver unit 203. In that case, the setting instruction from the user may be received on a setting screen provided by each of the print setting UI unit 212 and the print setting UI unit 213.

[0022] The OS standard print function unit 202 has a print data generation unit 222, and the native printer driver unit 203 has a print data generation unit 223. When the OS print system 201 receives a print request, the renderer unit 221 generates print data from drawing data generated by the application 205 and passes it to the print data generation unit 222 or the print data generation unit 223. The print data generation unit 222 or the print data generation unit 223 reflects print settings made by each UI unit in the print data. Then, the print data reflecting the print settings is transmitted to the printer 12 via the print communication unit 204.

[0023] The above series of functions can be operated on a printer-by-printer basis managed by the printer management unit 231, and it is possible to switch which printer the functions are to be operated on on the application 205. In this embodiment, a case where the OS standard print function unit 202 is used will be described.

[0024] [Outline of the printer management part of the OS printing system] Next, an overview of the printer management unit 231 of the OS printing system 201 will be described. FIG. 3 is a diagram showing an example of a screen provided by the printer management unit 231 of the OS printing system 201. The screen of FIG. 3 is displayed when the user registers a printer in the OS printing system 201. A printer list section 32, a printer add / delete button 33, a printer preview section 34, a printer information section 35, a default printer setting section 36, and a default paper size setting section 37 are displayed inside the main window 31. When the user registers a printer in the OS printing system 201, first, the user presses the "+" button of the printer add / delete button 33. Then, a connected printer list window 38 of the printer management unit 231 is opened in a separate window, and the printers currently connected to the host computer 11 are displayed in the connected printer list section 39. At this time, even if it is the same printer, if the connection form is different, such as USB and network, the printers are displayed separately. When the user selects a desired printer from the list and presses the printer addition execution button 310, the printer addition process to the printer management unit 231 is performed. When the printer addition process is performed, the connected printer list window 38 of the printer management unit 231 is closed, and the added printer is displayed in the printer list section 32 of the main window 31. The printers displayed in the printer list section 32 are printers registered in the OS printing system 201, and are printers for which printing and status data can be obtained. When an arbitrary printer is selected in the printer list section 32, a preview image that resembles that printer is displayed in the printer preview section 34. In addition, information such as the connection type (e.g., "USB"), information on the software used (e.g., "OS standard printing function section"), and printer status (e.g., "standby") are displayed in the printer information section 35.

[0025] [OS standard printing function behavior when USB is offline] Next, a description will be given of the printing operation when the USB connection becomes unavailable when using the OS standard printing function unit 202. Fig. 4 is a screen provided by the printer management unit 231 in Fig. 3, showing the state in which Printer A, which was connected via USB, has become offline as a result of the USB cable being unplugged. As shown in Fig. 4, Printer A selected in the printer list unit 42 is displayed as "offline", and the printer status displayed in the printer information unit 45 also becomes "offline".

[0026] FIG. 5 is a diagram showing an example of a screen displayed by the print setting UI unit 215 of the application 205 in the state shown in FIG. 4. A printer selection unit 52, a print preview unit 53, a print copy number setting unit 54, a paper size setting unit 55, a cancel button 56, and a print button 57 are displayed inside the main window 51. When a print instruction is executed on the main screen of the application 205, the print setting UI unit 215 displays the screen of FIG. 5. When the cancel button 56 is pressed, control returns to the main screen of the application 205. When the print button 57 is pressed, a print instruction is issued to the printer 12 based on the settings of the print setting UI unit 215. In this embodiment, it is assumed that a print instruction is issued to the printer using the OS standard print function unit 202. At that time, the printer selected in the printer selection unit 52 is output with the paper size set in the paper size setting unit 55 and the number of copies specified in the print copy number setting unit 54.

[0027] The settings in the printer selection section 52, number of copies setting section 54, and paper size setting section 55 are managed by the OS printing system 201. Therefore, when Printer A is "offline" as shown in Fig. 4, the printer selection section 52 in Fig. 5 also displays "offline" or an icon indicating offline. When the print button 57 is pressed in the state shown in Fig. 5, printing is performed by the OS standard printing function section 202.

[0028] In this embodiment, when the selected printer is USB connected and offline, the OS standard print function unit 202 judges whether the selected printer exists on the network. If it is judged to exist on the network, the connection mode is automatically switched from USB to the network and printing is executed. Specifically, the print communication unit 204 transmits print data to the printer 12 via a communication module for network connection. At that time, the "offline" display in the printer information unit 45 in FIG. 4 becomes "standby" display, and the "offline" display in the printer selection unit 52 disappears and is displayed to indicate that normal communication is possible. On the other hand, if it is judged that the selected printer does not exist on the network, printing is not executed. At this time, the "offline" display in the printer information unit 45 in FIG. 4 is maintained. Note that once printing is executed via the network, if the USB connection becomes online again after that, printing is executed again by communication via the USB connection.

[0029] [Vendor-specific communication processing] Next, communication processing of the vendor-specific function of the application 205 will be described. As already mentioned, the application 205 is printer software capable of acquiring and displaying printer status data based on a user instruction. FIG. 6 is a diagram showing an example of a screen displayed by the status data display unit 216 of the application 205. FIG. 6 shows a state in which, among the printers managed by the printer management unit 231 on the application 205, the USB-connected "Printer A" is selected and status display is instructed. A printer preview unit 62, a printer ink remaining amount display unit 63, a printer status display unit 64, and an information update button 65 are displayed inside a main window 61.

[0030] When an instruction to display the screen of FIG. 6 is given, the application 205 determines whether or not communication with the printer 12 is possible using the vendor's proprietary method. That is, in the case of FIG. 6, it is determined whether or not communication with the printer 12 is possible using the vendor's proprietary method via a USB connection. If it is determined that communication with the printer 12 is possible using the vendor's proprietary method, the application 205 performs communication processing with the printer 12 using the vendor's proprietary method and acquires status information from the printer 12. The acquired status information is, for example, information on the remaining amount of ink and information on errors occurring in the printer 12. The acquired information on the remaining amount of ink is displayed for each ink color on the printer ink remaining amount display unit 63. In addition, the acquired error information is displayed on the printer status display unit 64.

[0031] On the other hand, if it is determined that communication with the printer 12 is not possible using the vendor-specific method, the application 205 determines whether the OS standard print function unit 202 can switch the connection mode from USB to network and communicate. This determination process is executed by passing the DeviceURI information of the printer 12 when connected via USB, which has been acquired in advance, to a DNS (Domain Name System) service function of the OS and performing a conversion process. Specifically, for example, DeviceURI information starting with ippusb: / / is passed to a DNS service function of the OS to acquire the IP address and port information used. If the IP address and the specified port information are acquired by converting the domain included in the DeviceURI, the connection mode of the OS standard print function unit 202 is switched from USB to network. Then, the printer status information acquired from the printer 12 via the network is reflected in the printer ink remaining amount display unit 63 and the printer status display unit 64.

[0032] The above operation is executed when an instruction to display the screen of FIG. 6 is given, but is also executed when the information update button 65 is pressed.

[0033] [Vendor-specific function communication processing flow] Next, a description will be given of the processing executed by the status data display unit 216, which is a vendor-specific function of the application 205. Fig. 7 is a flowchart showing the processing of the status data display unit 216. The processing shown in Fig. 7 is realized, for example, by the CPU 101 reading a program stored in the ROM 102 or the like into the RAM 103 and executing it.

[0034] 6 is received from the user, the status data display unit 216 acquires information about the printer registered in the application 205. The status data display unit 216 may perform the process of S701 when the application 205 is started by the user. The printer registered in the application 205 is, in other words, a printer managed by the printer management unit 231. When the application 205 is started, the application 205 acquires information about the printer registered in the printer management unit 231, and stores the information inside the application 205 together with data used by the application 205. The status data display unit 216 acquires the printer information when communication associated with acquisition of status information from the printer 12 is started.

[0035] In S702, the status data display unit 216 identifies the printer selected by the user from the acquired printer information. The application 205 has a function that allows the user to select the printer to be used from a list of printer information, and here, the printer selected by the user is identified. The process of S702 may be executed based on the selection result of the printer selection unit 52 in FIG. 5, for example. In S703, the status data display unit 216 determines whether the printer identified in S702 is USB-connected. If it is determined that the printer is not USB-connected, that is, if it is network-connected, the process proceeds to S704.

[0036] In S704, the status data display unit 216 determines whether the printer identified in S702 is in a state where network communication is possible through the vendor-specific communication process. The process of S704 may be performed based on whether the result of the attempt of the vendor-specific communication process is successful or unsuccessful. If it is determined that network communication is possible through the vendor-specific communication process, in S706, the status data display unit 216 acquires status information of the printer 12 via the network. Thereafter, in S707, the status data display unit 216 displays the acquired status information on the printer ink remaining amount display unit 63 and the printer status display unit 64 in FIG. 6, and ends the process of FIG. 7. On the other hand, if it is determined in S704 that network communication is not possible through the vendor-specific communication process, in S705, the status data display unit 216 displays a message indicating that a communication error has occurred as a UI screen (not shown), and ends the process of FIG. 7.

[0037] Next, a case will be described where it is determined in S703 that the printer identified in S702 is USB-connected. In this case, in S708, the status data display unit 216 determines whether the printer identified in S702 is in a state where USB communication is possible through vendor-specific communication processing. The processing of S708 may be performed based on whether the result of the attempt of the vendor-specific communication processing is successful or unsuccessful. Here, if it is determined that the printer is in a state where USB communication is possible through the vendor-specific communication processing, in S709, the status data display unit 216 acquires status information of the printer 12 via USB. Thereafter, in S707, the status data display unit 216 displays the acquired status information on the printer ink remaining amount display unit 63 and the printer status display unit 64 in FIG. 6, and the processing of FIG. 7 ends.

[0038] On the other hand, if it is determined that the printer specified in S702 is not in a state where USB communication is possible through the vendor-specific communication process, the process proceeds to S710. In S710, the status data display unit 216 checks the network communication status of the OS-standard printing function unit 202 and determines whether network communication through the OS-standard printing function unit 202 is possible. For example, if the USB cable is unplugged, it is determined that the printer specified in S702 is not in a state where USB communication is possible through the vendor-specific communication process. As already described, in S710, the DeviceURI information of the printer at the time of USB connection is converted through a function of the DNS service of the OS, and the determination is made based on the processing result. The process of S710 will be described later with reference to FIG. 8. If it is determined in S710 that network communication through the OS-standard printing function unit 202 is possible, this means that the printer specified in S702 exists on the network and communication is possible. In this case, in S711, the status data display unit 216 switches the vendor-specific communication process from USB communication to network communication, and acquires status information from the printer 12 via the network.

[0039] In S711, the status data display unit 216 passes the previously acquired DeviceURI information of the printer 12 when connected via USB to a DNS service function of the OS to perform a conversion process. Here, the DNS service function is, for example, the DnsServiceResolve function. Then, the status data display unit 216 acquires the IP address of the communication destination based on the result of the conversion process. That is, the process executed at this time is an IP address acquisition process by the OS. The acquired IP address may be either IPv4 or IPv6, and the acquisition result differs depending on the IP address valid / invalid setting of the OS. The status data display unit 216 executes a status information acquisition process with the acquired IP address as a target, thereby making it possible to switch the vendor-specific communication process. After that, in S707, the status data display unit 216 displays the acquired status information on the printer ink remaining amount display unit 63 and the printer status display unit 64 of FIG. 6, and ends the process of FIG. 7.

[0040] On the other hand, if it is determined in S710 that network communication by the OS standard print function unit 202 is not possible, this means that the printer identified in S702 does not exist on the network. Therefore, in S712, the status data display unit 216 displays on a UI screen (not shown) that a communication error has occurred, and ends the processing in FIG.

[0041] In this way, when the connection form for the printer selected by the user is a USB connection and the vendor-specific communication process cannot be performed, the connection form for the printer 12 is switched to a network connection based on the network communication status of the OS standard printing function unit 202. As a result, the vendor-specific communication process for the printer 12 can be executed in the switched connection form.

[0042] It should be noted that the process may be other than that shown in the flowchart in Fig. 7. For example, if it is determined in S703 that the printer identified in S702 is a USB-connected printer, the following process may be performed.

[0043] If it is determined in S702 that the printer identified is USB-connected, the status data display unit 216 checks the network communication status of the OS standard printing function unit 202 as described above in S710. Then, the process is switched depending on the following communication statuses (1) to (3) of the OS standard printing function unit 202 obtained from the check result. Note that the following (1), (2), and (3) correspond to S808, S807, and S804 in FIG. 8, which will be described later.

[0044] (1) USB communication is possible (2) USB communication is not possible, but network communication is possible (3) USB communication is not possible, and network communication is not possible In the case of (1), the status data display unit 216 acquires the status information of the printer 12 via USB. After that, the status data display unit 216 displays the acquired status information in the printer ink remaining amount display unit 63 and the printer status display unit 64 in FIG. 6, and ends the process.

[0045] In the case of (2), the status data display unit 216 switches the vendor-specific communication process from USB communication to network communication, and acquires status information from the printer 12 via the network. Thereafter, the status data display unit 216 displays the acquired status information in the printer ink remaining amount display unit 63 and the printer status display unit 64 in Fig. 6, and ends the process.

[0046] In the case of (3), the status data display unit 216 displays on a UI screen (not shown) a message indicating that a communication error has occurred, and ends the process.

[0047] Furthermore, at the timing of switching the connection mode in S711, a UI screen of the status data display unit 216 may be displayed to inform the user that the connection mode is to be switched. Furthermore, an item "Match vendor-specific communication processing to the connection mode of the OS standard print function unit" may be provided as a setting item of the status data display unit 216 of the application 205. For example, when this item is selected by the user, the switching process is executed according to the above-mentioned (1) to (3).

[0048] 8 is a flowchart showing the process of S710. In S801, the status data display unit 216 acquires USB DeviceURI information that was acquired in advance when USB communication was possible. The DeviceURI information is, for example, URI information starting with ippusb: / / .

[0049] In S802, the status data display unit 216 performs DeviceURI conversion and name resolution by passing the DeviceURI information acquired in S801 to a DNS service function. From the result of this conversion, the status data display unit 216 can determine the communication status of the OS standard printing function unit 202.

[0050] In S803, the status data display unit 216 determines whether the conversion and name resolution process in S802 was successful. If it is determined in S803 that the conversion and name resolution process failed, the process proceeds to S804. In S804, the status data display unit 216 determines that the OS standard printing function unit 202 is not capable of both USB communication and network communication, stores the determination result in a storage area, and ends the process of FIG. 8. On the other hand, if it is determined in S803 that the conversion and name resolution process was successful, the status data display unit 216 determines the communication status of the OS standard printing function unit 202 from the conversion result in the subsequent process. In this embodiment, the determination is made based on the characteristics of the conversion result according to the connection form of the OS standard printing function unit 202.

[0051] In S805, the status data display unit 216 determines whether or not the condition that "the character string resulting from the conversion contains both "local" and the port number "631" is met." If it is determined that the condition is met, in S807, the status data display unit 216 determines that the OS standard printing function unit 202 is unable to communicate via USB but is able to communicate via network, stores the determination result in a storage area, and ends the processing in FIG. 8. If it is determined as in S807, the converted DeviceURI becomes an address representing a network connection. In that case, the communication processing of the vendor-specific function will be successful if a network connection is established, so in S711 in FIG. 7, the connection type is switched from a USB connection to a network connection.

[0052] On the other hand, if it is determined in S805 that the condition is not satisfied, the process proceeds to S806. In S806, the status data display unit 216 determines whether or not the condition that "the character string resulting from the conversion contains "local", but the port number contains a numerical value other than "631"" is satisfied. If it is determined that the condition is satisfied, in S808, the status data display unit 216 determines that the OS standard printing function unit 202 is capable of USB communication, stores the determination result in a storage area, and ends the process of FIG. 8. In the process of switching the process according to the communication statuses (1) to (3) of the OS standard printing function unit 202 described above, there are cases where a determination is made as in S808. In that case, the status data display unit 216 acquires the status information of the printer 12 via the USB.

[0053] On the other hand, if it is determined in S806 that the conditions are not satisfied, the conversion is successful but the conversion result is unknown. Therefore, in S809, the status data display unit 216 determines that the communication status of the OS standard printing function unit 202 is unknown, stores the determination result in a storage area, and ends the processing in Fig. 8. If it is determined as in S809, it is determined that communication is not possible even via network connection, and in S712 in Fig. 7, a user is notified that a communication error has occurred.

[0054] In FIG. 8, in S805 and S806, "631" (Internet Printing Protocol) is used as the determination criterion as a port number other than "local", but other port numbers may be used as the determination criterion.

[0055] As described above, according to this embodiment, it is possible to change the connection state with the printer 12 in the vendor-specific communication processing of the application 205 in accordance with the communication status of the OS standard printing function unit 202. That is, in an application that provides both the OS standard printing function and a function provided by the vendor, it is possible to prevent, for example, a state in which the OS standard printing function can be executed and a state in which the function provided by the vendor cannot be executed from being mixed together.

[0056] [Second embodiment] The second embodiment will be described below with respect to the differences from the first embodiment. In the first embodiment, the connection mode is temporarily switched when the vendor-specific communication process is performed. In this embodiment, after the connection mode is switched in S711, the connection mode is permanently switched. With such a configuration, it is possible to prevent the user from repeatedly performing the process for switching the connection mode.

[0057] Fig. 9 is a flowchart showing the processing of the status data display unit 216 in this embodiment. The processing shown in Fig. 9 is realized, for example, by the CPU 101 reading a program stored in the ROM 102 or the like into the RAM 103 and executing it. S701 to S712 in Fig. 9 are the same as those in S701 to S712 in Fig. 7, and therefore their description will be omitted.

[0058] After S711, in this embodiment, the process proceeds to S901 after switching from USB communication to network communication in the vendor-specific communication process in S711. In S901, the status data display unit 216 adds a new network-connected printer to the application 205 and changes the connection destination to the network-connected printer. After S901, the process proceeds to S707.

[0059] 10 is a diagram showing an example of a confirmation message presented to a user when changing the connection destination to a network-connected printer in S901. A message section 1002, a cancel button 1003, and an OK button 1004 are displayed in a message window 1001. The status data display unit 216 displays this message at the timing when the registered printer information of the application 205 is rewritten in S901. When the user presses the OK button 1004, the status data display unit 216 updates the USB-connected printer information previously held by the application 205 to rewrite it to the network-connected printer information. The information to be rewritten at this time is, for example, the DeviceURI information of the printer. In addition to rewriting the information held by the application 205, the status data display unit 216 may request the printer management unit 231 of the OS to rewrite the printer information managed by the printer management unit 231. At this time, the printer management unit 231 of the OS performs a process of adding the network-connected printer information to the management target while leaving the USB-connected printer information. For example, when the user presses the OK button 1004, the status data display unit 216 calls the DeviceURI at the time of network connection as an argument, and the OS printer management unit 231 performs processing to add the network-connected printer information. After that, the status data display unit 216 performs processing to delete the registered USB-connected printer information that originally existed in the application 205. In addition, the OS printer management unit 231 executes processing to delete the registered USB-connected managed printer information. With the above flow, it becomes possible to rewrite the information of the OS registered printer itself.

[0060] As described above, according to this embodiment, it is not necessary to execute the process of switching the connection type every time. Therefore, it is possible to improve the communication performance of the application. It is also not necessary to execute the process of deleting the registered printer information of the USB connection that exists in the application 205 and the managed printer information of the USB connection that is managed by the printer management unit 231 of the OS.

[0061] The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.

[0062] The disclosure of the present embodiment includes the following information processing device, method, and program. (Item 1) A first communication means for communicating with the device via a predetermined function of the OS in an application capable of executing a function of the device; a second communication means for communicating with the device without going through a predetermined function of the OS in the application; a control means in the application for controlling the second communication means to communicate with the device in a connection form with the device in which communication by the first communication means is possible; An information processing device comprising: (Item 2) When communication by the second communication means is not possible due to the first connection form with the device, and communication by the first communication means is possible due to the second connection form with the device, the control means controls the second communication means to communicate with the device via the second connection form. 2. The information processing device according to item 1, (Item 3) a first determination means for determining whether or not communication by the second communication means is possible in the first connection mode, When the first determination means determines that communication by the second communication means is not possible in the first connection mode, and communication by the first communication means is possible in the second connection mode, the control means controls the second communication means to communicate with the device via the second connection form. 3. The information processing device according to item 2. (Item 4) The information processing device described in item 3 is characterized in that when the first determination means determines that communication by the second communication means is not possible in the first connection mode and the first connection mode is set as the connection mode in which communication by the second communication means is performed, the control means switches the connection mode in which communication by the second communication means is performed from the first connection mode to the second connection mode. (Item 5) 5. The information processing device according to item 4, wherein the control means switches the connection mode in which communication by the second communication means is performed from the first connection mode to the second connection mode based on a user instruction. (Item 6) 6. The information processing device according to any one of items 2 to 5, wherein the first connection form is a USB (Universal Serial Bus) connection. (Item 7) 7. The information processing device according to item 6, wherein the second connection form is a network connection. (Item 8) The information processing device according to item 6 or 7, further comprising a second determination means for obtaining information regarding communication with the device executed by the OS from the OS, and determining a connection form with the device that allows communication via the first communication means based on the obtained information. (Item 9) 9. The information processing device according to item 8, wherein the information regarding communication with the device executed by the OS includes an IP address and a port number. (Item 10) The information processing device according to any one of items 2 to 9, further comprising a notification means for notifying that communication with the device is not possible when communication by the first communication means is not possible in the second connection form and when communication by the second communication means is not possible in the first connection form. (Item 11) The application further comprises a storage means for storing information about the device, 11. The information processing device according to any one of items 1 to 10, wherein the device information includes information on a connection form. (Item 12) 12. The information processing device according to item 11, wherein the device information is updated in accordance with control by the control means. (Item 13) 13. The information processing device according to any one of items 1 to 12, wherein the application obtains status information of the device by the second communication means. (Item 14) 14. The information processing apparatus according to any one of items 1 to 13, wherein the device is a printer. (Item 15) 15. The information processing device according to any one of items 1 to 14, wherein the predetermined function of the OS is a standard printing function. (Item 16) A method executed in an information processing device, comprising: a first communication step of communicating with the device via a predetermined function of the OS in an application capable of executing a function of the device; a second communication step in which the application communicates with the device without going through a predetermined function of the OS; a control step of controlling, in the application, the second communication step so as to communicate with the device in a connection form with the device that allows communication in the first communication step; The method according to claim 1, further comprising: (Item 17) 16. A program for causing a computer to function as each of the means of the information processing device according to any one of items 1 to 15.

[0063] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]

[0064] 11 Host computer: 12 Printer: 101, 111 CPU: 102, 112 ROM: 103, 113 RAM

Claims

1. In an application capable of executing a function of a device using a printer driver, a first communication means for communicating with the device via a USB (Universal Serial Bus) connection; second communication means in the application for communicating with the device via a network connection; a control means for executing control for communicating with the device in the application by changing communication with the device from communication via the USB connection to communication via the network connection when communication with the device via the USB connection is not executable in the application and communication with the device via the network connection is executable by a predetermined function of an operating system (OS); An information processing device comprising:

2. The application further comprises a storage means for storing information about the device; 2. The information processing apparatus according to claim 1, wherein the device information includes information on a connection mode.

3. 3. The information processing apparatus according to claim 2, wherein the device information is updated in accordance with control by the control means.

4. 2. The information processing apparatus according to claim 1, wherein the application acquires status information of the device.

5. 2. The information processing apparatus according to claim 1, wherein the device is a printer.

6. 2. The information processing apparatus according to claim 1, wherein the predetermined function of the OS is a standard printing function.

7. The application is capable of instructing the device to print using the printer driver, The application can instruct the device to print using a standard print function; the predetermined function of the OS is the standard printing function; 2. The information processing apparatus according to claim 1, wherein:

8. The information processing device described in Claim 1, characterized in that the control means changes communication with the device from communication via the USB connection to communication via the network connection in order to execute control for communicating with the device in the application based on the fact that communication with the device via the network connection can be executed using a specified function of the OS.

9. If communication with the device via the USB connection is feasible in the application, the control means performs communication with the device via the USB connection; If the application is unable to communicate with the device via the USB connection and the OS is unable to communicate with the device via the network connection in accordance with a predetermined function of the OS, the control unit executes a process of notifying an error.

2. The information processing apparatus according to claim 1, wherein:

10. The information processing device described in Claim 1, characterized in that the control means changes communication with the device from communication via the USB connection to communication via the network connection in order to execute control for communicating with the device in the application based on information obtained from the device through communication via the USB connection.

11. The information processing device according to claim 10, wherein the information acquired from the device is a Device URI.

12. The information processing device described in Claim 1, characterized in that the application displays a screen indicating the remaining ink level of the device based on information obtained from the device through communication via the USB connection or communication via the network connection.

13. A method executed in an information processing device, a first communication step of communicating with the device via a USB connection in an application capable of executing a function of the device using a printer driver; a second communication step in the application communicating with the device over a network connection; a control step of executing control for communicating with the device in the application by changing communication with the device from communication via the USB connection to communication via the network connection when communication with the device via the USB connection is not executable in the application and communication with the device via the network connection is executable using a predetermined function of the OS; A method comprising:

14. A program for causing a computer to function as each of the means of the information processing apparatus according to any one of claims 1 to 12.