Information processing apparatus and control method
By calling a predefined API to obtain Wi-Fi information from the operating system, the problem of applications being unable to determine whether to use location-based services on a specific operating system is solved, ensuring the successful processing of connection setup.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2026-03-10
AI Technical Summary
In certain operating systems, applications cannot directly determine whether location-based services are allowed, leading to inappropriate connection settings.
By calling a predefined API to obtain wireless LAN function information from the operating system, it determines whether the application has successfully obtained location information. If it fails, it will not perform location-based service operations; if it succeeds, it will allow the operations.
It enables appropriate control over whether applications use location-based services within a specific operating system, ensuring successful connection setup processing.
Smart Images

Figure CN121645136A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to an information processing apparatus and a control method. BACKGROUND
[0002] Known is a configuration in which, in an information processing apparatus such as a smartphone, a user permits an application program to use a location-based service, so that the location-based service is available to the application program. Japanese Patent Application Publication No. 2021-069052 describes permitting an application that performs Wi-Fi direct communication to access location information in a mobile terminal.
[0003] Incidentally, with the spread of the configuration in which an application program uses a location-based service, there is a demand for more appropriately making a determination of whether to permit an application program to use a location-based service. SUMMARY
[0004] The present disclosure aims to more appropriately make a determination of whether to permit an application program to use a location-based service.
[0005] An aspect of the present disclosure provides a control method for an information processing apparatus having a predetermined application program. The control method includes calling a predetermined application programming interface (API) for acquiring predetermined information acquired by the information processing apparatus using a wireless local area network (LAN) function from an operating system (OS) of the information processing apparatus, determining whether acquisition of the predetermined information by the predetermined application program calling the predetermined API is successful, and based on the acquisition of the predetermined information by the predetermined application program being successful, not performing a predetermined process for causing a user to perform an operation of permitting the predetermined application program to use a location-based service, and based on the predetermined application program failing to acquire the predetermined information, performing the predetermined process, wherein the acquisition of the predetermined information by the predetermined application program is successful when the predetermined application program is permitted to use the location-based service, and when the predetermined application program is not permitted to use the location-based service, the acquisition of the predetermined information by the predetermined application program fails even when the predetermined API is called.
[0006] The features of the present disclosure will become apparent from the following description of the embodiments with reference to the accompanying drawings. The following description of embodiments is described by way of example. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 is a diagram showing an example of a communication system.
[0008] Figure 2 is an example of a hardware configuration diagram of a terminal apparatus and a communication apparatus.
[0009] Figure 3 is a view showing an example of a setting screen.
[0010] Figure 4 is a flowchart showing an example of processing performed by the terminal device using a predetermined application program.
[0011] Figures 5A to 5F is an example of various screens displayed by the terminal device.
[0012] Figure 6 is a view showing an example of an inquiry screen.
[0013] Figure 7 is a flowchart showing an example of connection setting processing performed by the terminal device using a predetermined application program.
[0014] Figure 8 is a flowchart showing an example of processing performed by the terminal device using a predetermined application program.
[0015] Figure 9A and Figure 9B is a flowchart showing an example of processing performed by the terminal device using a predetermined application program.
[0016] Figure 10A and Figure 10B is a view showing an example of a guide screen. DETAILED DESCRIPTION
[0017] First Embodiment
[0018] An information processing device and a communication device included in a communication system of the present embodiment will be described. The information processing device is also referred to as a terminal device. In the present embodiment, a personal computer (PC) is shown as an example of the information processing device; however, the information processing device is not limited thereto. Various items such as a smartphone, a tablet terminal, a personal digital assistant (PDA), and a digital camera can be applied as the information processing device. In the present embodiment, a printer is shown as an example of the communication device. The printer can be an inkjet printer that prints using ink or a laser beam printer that prints using toner. The printer can be a full-color printer that is capable of color printing, or a monochrome printer that is not capable of color printing but is capable of monochrome printing. In the present embodiment, the communication device is not limited to a printer; any device capable of wireless communication with the information processing device can be applied as the communication device. For example, a copier, a facsimile machine, a scanner, a smartphone, a PC, a tablet terminal, a PDA, a digital camera, an audio playback device, a television, a smart speaker, a robotic vacuum cleaner, an automatic cooking pot, and a refrigerator can be applied as the communication device. A multifunction peripheral having multiple functions such as a copying function, a facsimile function, and a printing function can be applied as the communication device.
[0019] First, the system configuration for implementing the present embodiment will be described.Figure 1 is a diagram showing an example of the configuration of a communication system of the present embodiment. The system includes a communication device 151, a terminal device 101, an access point (AP) 131, and an external server 171.
[0020] The terminal device 101 is an information processing device of the present embodiment. The communication device 151 is a communication device of the present embodiment. The AP 131 is an access point operated by an external device existing outside the terminal device 101 and outside the communication device 151. The access point has a function of forming a network. Therefore, in the present embodiment, a connection to the access point is synonymous with a connection to a network formed by the access point. The external device is, for example, a wireless local area network (LAN) router. The external server 171 is a server that can provide a service to a device connected to the AP 131 via the Internet.
[0021] In a case where the communication device 151 and the terminal device 101 are connected to the AP 131, a LAN formed by the AP 131 includes the AP 131, the communication device 151, and the terminal device 101. On the other hand, a wide area network (WAN) includes the AP 131 and the external server 171.
[0022] In the present embodiment, the terminal device 101 can communicate with the communication device 151 via the AP 131 when an infrastructure connection (described later) is established. Furthermore, the terminal device 101 can directly communicate with the communication device 151 by intervening the AP 131 when a direct connection (described later) is established. Hereinafter, a connection to the AP corresponds to a connection to a network formed by the AP. A single external device can operate a plurality of APs, and a single external device is capable of simultaneously forming a plurality of networks.
[0023] In the present embodiment, the connection 141 between the terminal device 101 and the AP 131 and the connection 142 between the communication device 151 and the AP 131 are assumed to be connections using a communication method based on the IEEE 802.11 standard. The communication method based on the IEEE 802.11 standard is specifically Wireless Fidelity (Wi-Fi) (registered trademark). The connection 143 between the terminal device 101 and the communication device 151 is also assumed to be a connection using a communication method based on the IEEE 802.11 standard. However, the communication method for the connection 143 is not limited to this configuration. The communication method can be, for example, Bluetooth (registered trademark) Low Energy (BLE), Bluetooth Classic, Wi-Fi Aware, or Near Field Communication (NFC). The AP 131 and the external server 171 can communicate via the Internet. When the AP 131 is connected to the Internet, the devices (the terminal device 101 and the communication device 151) connected to the AP 131 can also use the Internet. The connection 141 between the terminal device 101 and the AP 131 and the connection 142 between the communication device 151 and the AP 131 can be connections using a wired LAN.
[0024] Next, the hardware configuration of the information processing device of the present embodiment and the communication device capable of communicating with the information processing device of the present embodiment will be described with reference to the block diagram of Figure 2 In the present embodiment, the following configuration will be described as an example; however, the present embodiment is applicable to a device capable of communicating with a communication device, and the functions are not specifically limited to those shown in the drawing.
[0025] The terminal device 101 includes an input interface 102, a CPU 103, a ROM 104, a RAM 105, an external storage device 106, an output interface 107, a display portion 108, a wireless communication unit 109, a short-range wireless communication unit 110, an imaging device 111, a wired communication unit 112, and the like. The computer of the terminal device 101 is configured by the CPU 103, the ROM 104, the RAM 105, and the like.
[0026] The input interface 102 is an interface for accepting data input and operation instructions from a user, and is configured by a physical keyboard, a button, a touch panel, and the like. The output interface 107 (described later) and the input interface 102 can have the same configuration to output on a screen and accept operations from a user with the same configuration.
[0027] The CPU 103 is a system control unit, and controls the entire terminal device 101. In the present embodiment, the CPU 103 performs control of the display content on the display portion 108 (display control).
[0028] The ROM 104 stores fixed data such as a control program, a data table, and an operating system (hereinafter, referred to as an OS) program. The control program, the data table, and the OS program are executed by the CPU 103. In the present embodiment, the control program stored in the ROM 104 performs software execution control such as scheduling, task switching, and interrupt processing under the control of an embedded OS stored in the ROM 104. In the present embodiment, it is assumed that the OS provided in the terminal device 101 is a Windows (registered trademark) OS. Therefore, in the present embodiment, it is assumed that an application program operating on the terminal device 101 is an application program for the Windows (registered trademark) OS. In the present embodiment, the ROM 104 stores a predetermined application (app) for controlling the communication device 151. In other words, the application program is application software. The predetermined app is an app provided by the vendor of the communication device 151, and is an app for performing network recovery so that the terminal device 101 and the communication device 151 can communicate with each other. The predetermined app can have other functions in addition to the network recovery function. Examples of the other functions specifically include a function of transmitting a print job to the communication device 151 to perform printing (print job transmission function) and a function of transmitting a scan job to the communication device 151 to perform scanning (scan job transmission function). The predetermined app is installed on the terminal device 101 from the outside via, for example, a web page provided by the vendor of the communication device 151. The processing described in the present embodiment as being executed by the OS is exactly processing executed by the CPU 103 according to a program within the OS. Similarly, the processing described as being executed by the app is exactly processing executed by the CPU 103 according to a program within the app.
[0029] The RAM 105 is constituted by a static random access memory (SRAM) or the like that requires a backup power source. Since the RAM 105 holds data by using a primary cell (not shown) for data backup, the RAM 105 can store important data such as a program control variable without losing the data. A storage area for storing setting information of the terminal device 101, management data of the terminal device 101, and the like is also provided in the RAM 105. The RAM 105 also serves as a main memory and a work memory of the CPU 103.
[0030] The external storage device 106 includes various programs including a print information generation program for generating print information interpretable by the communication device 151, an information transmission and reception control program for transmitting and receiving information to and from the communication device 151 connected via the wireless communication unit 109, and other programs. The external storage device 106 also stores various information used by these programs and image data obtained from other information processing devices and the Internet.
[0031] Output interface 107 is an interface for controlling the display unit 108 to display data and notify the terminal device 101 of its status.
[0032] The display unit 108 is composed of light-emitting diodes (LEDs), liquid crystal displays (LCDs), etc., and displays data and notifies the terminal device 101 of the status. A soft keyboard with keys such as numeric input keys, mode setting keys, setting keys, cancel keys, and power keys can be installed on the display unit 108 to accept input from the user. In this embodiment, the display unit 108 is a touch panel capable of accepting operations from the user using a tool such as a finger or pen.
[0033] The wireless communication unit 109 is a component used for wirelessly connecting to devices (i.e., communication device 151, AP 131, etc.) for data communication. For example, the wireless communication unit 109 can communicate directly with the communication device 151 via wireless communication, or it can communicate through the AP 131 located outside the terminal device 101 and the communication device 151. In this embodiment, it is assumed that the wireless communication method of the wireless communication unit 109 is Wi-Fi, a communication method based on the IEEE 802.11 standard. In this embodiment, it is assumed that the wireless LAN is a network using Wi-Fi. Therefore, the wireless communication unit 109 uses the wireless LAN function of the terminal device 101 to perform wireless LAN communication. In this embodiment, a connection using a method that directly connects the terminal device 101 and the communication device 151 without intervening in an external AP is called a direct connection. A connection using a method that connects the terminal device 101 and the communication device 151 via an external AP is called an infrastructure connection.
[0034] The short-range wireless communication unit 110 is a component that uses a short-range wireless communication method to communicate data with a device (i.e., communication device 151, etc.), and communicates using a different communication method than the wireless communication unit 109. The short-range wireless communication unit 110 can be connected to the short-range wireless communication unit 157 of the communication device 151. Examples of communication methods for the short-range wireless communication unit 110 include BLE, Bluetooth Classic, Wi-Fi Sensing, and NFC.
[0035] The camera device 111 is a device that converts images captured by a camera element into digital data.
[0036] The digital data is temporarily stored in RAM 105. Then, a program running on CPU 103 converts the data into a predetermined image format and saves the converted data as image data in external storage device 106.
[0037] Wired communication unit 112 is a component that is connected to a device (i.e., communication device 151, AP 131, etc.) via a wired connection for data communication. For example, wired communication unit 112 communicates via a wired LAN. In this embodiment, it is assumed that the wired LAN communicates based on the Ethernet standard. Wired communication unit 112 is not limited to this configuration and can communicate via, for example, a Universal Serial Bus (USB) cable. For example, when terminal device 101 is a smartphone, terminal device 101 does not need to include wired communication unit 112.
[0038] The communication device 151 includes a ROM 152, RAM 153, CPU 154, printing engine 155, wireless communication unit 156, short-range wireless communication unit 157, input interface 158, output interface 159, function control unit 160, display unit 161, wired communication unit 162, etc.
[0039] The computer of the communication device 151 consists of ROM 152, RAM 153, CPU 154, etc.
[0040] The wireless communication unit 156 is a component for wirelessly connecting to a device (i.e., terminal device 101, AP 131, etc.) for data communication. In this embodiment, it is assumed that the wireless communication method of the wireless communication unit 156 is Wi-Fi, a communication method based on the IEEE 802.11 standard. Alternatively, classic Bluetooth or the like can be used. The wireless communication unit 156 has an AP 156-a for connecting to the device (i.e., terminal device 101, etc.), serving as an AP within the communication device 151. The AP can be connected to the wireless communication unit 109 of the terminal device 101. The wireless communication unit 156 can communicate directly with the terminal device 101 via the AP 156-a, or it can communicate with the terminal device 101 via the AP 131. The AP 156-a can be hardware used as an AP, or the wireless communication unit 156 can operate as AP 156-a through software that enables the wireless communication unit 156 to function as an AP. The communication device 151 can internally run multiple APs with different Service Set Identifiers (SSIDs) and passwords.
[0041] RAM 153 is composed of DRAM or similar components that require a backup power supply. Since RAM 153 retains data using a power supply (not shown) for data backup, it can store important data such as program control variables without data loss. RAM 153 is used as the main memory and working memory of CPU 154, and also temporarily stores various information as a receive buffer for temporarily storing printed information received from terminal device 101, etc.
[0042] ROM 152 stores fixed data such as control programs, data tables, and OS programs. The control programs, data tables, and OS programs are executed by CPU 154. In this embodiment, the control programs stored in ROM 152 perform software execution control, such as scheduling, task switching, and interrupt handling, under the control of the embedded OS stored in ROM 152. A memory area is provided in ROM 152 for storing data that needs to be retained even when power is off, namely, the setting information and management data of communication device 151.
[0043] CPU 154 is the system control unit and controls the entire communication device 151.
[0044] The printing engine 155 forms an image on a printing medium such as paper using a recording material such as ink, based on information stored in RAM 153 and print jobs received from the terminal device 101, etc., and outputs the print result. At this time, print jobs sent from the terminal device 101, etc., use high-speed communication in the case of large amounts of data, so print jobs are received via a wireless communication unit 156 that can perform communication faster than the short-range wireless communication unit 157.
[0045] The short-range wireless communication unit 157 is a component that communicates with a device (i.e., terminal device 101, etc.) using a short-range wireless communication method. Examples of communication methods for the short-range wireless communication unit 157 include BLE, Bluetooth Classic, and Wi-Fi Sensing.
[0046] Input interface 158 is an interface for receiving data input and operation commands from the user, and consists of a physical keyboard, buttons, touch panel, etc. Output interface 159 (described later) can have the same structure as input interface 158, so as to output and receive operations from the user on the screen using the same structure. Output interface 159 is an interface for controlling display unit 161 to display data and notifying communication device 151 of status.
[0047] The function control unit 160 manages the function operation regarding whether to operate the communication device 151 simultaneously.
[0048] The display unit 161 is composed of light-emitting diodes (LEDs), liquid crystal displays (LCDs), etc., and displays data and notifies the communication device 151 of the status. A soft keyboard with keys such as numeric input keys, mode setting keys, setting keys, cancel keys, and power keys can be installed on the display unit 161 to accept input from the user through the display unit 161.
[0049] The wired communication unit 162 is a component used to connect to a device (i.e., terminal device 101, AP 131, etc.) via a wired connection for data communication. For example, the wired communication unit 162 communicates via a wired LAN. The wired communication unit 162 is not limited to this configuration and can also communicate via, for example, a USB cable.
[0050] Direct connection method
[0051] Direct connection refers to devices connecting directly to each other (i.e., point-to-point) without the intervention of external devices such as AP 131. Direct connection is also called point-to-point connection (P2P connection). Communication device 151 can operate in a mode (direct connection mode) for communication via direct connection as one of the connection modes. In Wi-Fi communication, there are several modes for communication via direct connection, namely, software AP mode and Wi-Fi Direct (WFD) mode.
[0052] The mode used for direct connection via WFD is called WFD mode. WFD is a standard developed by the Wi-Fi Alliance and is included in the IEEE 802.11 communication standard. In WFD mode, after finding a device as a communication partner via a device search command, the roles of the P2P group owner (GO) and the P2P client are determined, and then the remaining wireless connection processing proceeds. The group owner corresponds to the Wi-Fi master, and the client corresponds to the Wi-Fi slave. This role determination corresponds to, for example, GO negotiation in P2P. In WFD mode before role determination, the communication device 151 is neither a master nor a slave. Specifically, initially, between the communicating devices, one device issues a device search command and searches for devices connected in WFD mode. When another device as a communication partner is found, both devices check information about the services and functions that can be provided by the device. This device provision information check is optional and not essential. This device provision information check stage corresponds to, for example, P2P provision discovery. Subsequently, the devices check each other's device supply information and, as a result, determine which becomes the P2P client and which becomes the P2P group owner. Then, when the client and group owner are determined, the devices exchange communication parameters between them via WFD. Based on the exchanged parameters, the P2P client and P2P group owner perform the remaining wireless connection processing and IP connection processing between them. In WFD mode, communication device 151 can deterministically operate as a GO without performing the aforementioned GO negotiation. In other words, communication device 151 can operate in WFD mode as an autonomous GO mode. The state of communication device 151 operating in WFD mode means, for example, that although a connection via WFD has not yet been established, communication device 151 is in a state of GO operation, or that a connection via WFD has been established and communication device 151 is in a state of GO operation.
[0053] In software AP mode, between the communicating devices (e.g., terminal device 101 and communication device 151), one device (e.g., terminal device 101) acts as a client, playing a role in requesting various services. The other device implements the functions of an AP in Wi-Fi through software settings. The software AP corresponds to the Wi-Fi master station, while the client corresponds to the Wi-Fi slave station. In software AP mode, the client uses device search commands to search for devices that can become software APs. When a software AP is found, the client and the software AP perform the remaining wireless connection processing (such as establishing a wireless connection), and then perform IP connection processing between them (such as assigning IP addresses). The commands and parameters sent and received when establishing a wireless connection between the client and the software AP can be commands and parameters defined in the Wi-Fi standard, which are omitted here.
[0054] In this embodiment, when communication device 151 has established and is maintaining a direct connection, communication device 151 operates as a master station within the network to which it belongs. The master station is a device that constructs a wireless network and provides slave stations with parameters for connecting to the wireless network. These parameters are, for example, parameters related to the channel used by the master station. The slave station receives these parameters to connect to the wireless network constructed by the master station using the channel used by the master station. In direct connection mode, since communication device 151 operates as a master station, it can determine which frequency band and channel to use for communication. In this embodiment, it is assumed that communication device 151 can use channels corresponding to the 2.4 GHz band and channels corresponding to the 5 GHz band for communication in direct connection mode.
[0055] Infrastructure connectivity methods
[0056] Infrastructure connection is a connection configuration for connecting devices to an AP (e.g., AP 131), which typically controls a network of devices (e.g., terminal device 101 and communication device 151) to communicate with each other via the AP. Communication device 151 is capable of operating in an infrastructure connection mode, which is one of the connection modes for communicating via infrastructure connection.
[0057] In infrastructure connectivity, individual devices use device search commands to search for access points (APs). Once an AP is found, the device and the AP perform the remaining wireless connectivity processing (such as establishing a wireless connection), followed by IP connectivity processing between them (such as assigning IP addresses). The commands and parameters sent and received when establishing a wireless connection between a device and an AP can be those defined in the Wi-Fi standard, and are omitted here.
[0058] In this embodiment, when the communication device 151 operates using an infrastructure connection, the AP 131 operates as the master station, and the communication device 151 operates as the slave station. In other words, in this embodiment, the infrastructure connection refers to the connection between the communication device 151 operating as the slave station and the device operating as the master station. When the communication device 151 has established an infrastructure connection and the terminal device 101 has also established an infrastructure connection with the AP 131, the communication device 151 and the terminal device 101 can communicate with each other via the AP 131. The channel used for communication in the infrastructure connection is determined by the AP 131, therefore the communication device 151 uses the channel determined by the AP 131 for communication in the infrastructure connection. In this embodiment, it is assumed that the communication device 151 can use channels corresponding to the 2.4 GHz band and channels corresponding to the 5 GHz band for communication in the infrastructure connection. The communication device 151 can also use channels corresponding to the DFS band within the 5 GHz band for communication in the infrastructure connection. Terminal device 101 identifies and marks that communication device 151 belongs to the network formed by AP 131 and to which terminal device 101 belongs, so as to communicate with communication device 151 via AP 131.
[0059] Connection settings processing
[0060] In this embodiment, terminal device 101 uses wireless communication with communication device 151 to perform connection setup (network setup), which is a setup for enabling communication device 151 to operate according to at least one communication method, including infrastructure connection and direct connection. The connection setup process in this embodiment is performed via wireless communication, therefore it is also referred to as wireless setup (CLS). Connection setup process can also be performed via wired communication. When a predetermined app stored in external storage device 106 or the like is running, terminal device 101 performs connection setup process for communication device 151. Communication device 151 can operate in a connection setup mode (connection setup state), which is the mode for performing connection setup process, and performs connection setup process while operating in connection setup mode (described later). Details of the connection setup mode will be described later.
[0061] When terminal device 101 enables communication device 151 to operate in infrastructure connection mode, terminal device 101 wirelessly transmits infrastructure configuration information to communication device 151. This infrastructure configuration information is setup information for operating communication device 151 in infrastructure connection mode. The infrastructure configuration information includes information about AP 131. Information about AP 131 includes, for example, information about service set identifier (SSID), password, and frequency band.
[0062] On the other hand, when terminal device 101 operates communication device 151 in direct connection mode, terminal device 101 wirelessly transmits direct setting information to communication device 151. This direct setting information is configuration information for operating communication device 151 in direct connection mode. The direct setting information includes instructions for enabling WFD functionality to operate as a group owner or for enabling access point settings for communication device 151. Terminal device 101 obtains connection information from communication device 151 for directly connecting to communication device 151. For example, the connection information for directly connecting to communication device 151 includes information such as the SSID and password of communication device 151 operating in direct connection mode.
[0063] In this embodiment, the direct connection for establishing a connection between the terminal device 101 and the communication device 151 is used to send infrastructure setup information and direct setup information, and to acquire information for directly connecting to the communication device 151 during the connection setup process. Then, in this embodiment, the connection setup process using Wi-Fi is executed as a direct connection for connection setup. Alternatively, other wireless communication standards besides Wi-Fi, such as Bluetooth, can also be used. Wired communication standards such as wired LAN and Universal Serial Bus (USB) can also be used for the direct connection for connection setup.
[0064] After a Wi-Fi-based infrastructure connection or direct connection is established between the terminal device 101 and the communication device 151 through the connection setup process, communication can occur between the terminal device 101 and the communication device 151 via the established connection. Specifically, for example, the terminal device 101 can send a print job to the communication device 151 for printing, or send a scan job to the communication device 151 for scanning via the established connection. The function of sending print jobs and scan jobs to the communication device 151 can be performed by a predetermined app. In this embodiment, the communication device 151 can be operated in infrastructure connection mode or direct connection mode through the connection setup process. However, this configuration is not limited to this. For example, the communication device 151 can be operated only in infrastructure connection mode (i.e., the communication device 151 cannot be operated in direct connection mode) through the connection setup process.
[0065] Connection settings mode
[0066] The communication device 151 can operate in a connection setting mode. The trigger for the communication device 151 to begin operating in connection setting mode could be, for example, a user pressing a button for connection setting mode, or the communication device 151 being activated (powered on) for the first time after delivery. The button for connection setting mode could be a hardware button provided with the communication device 151, or a software button displayed on the display unit 132 of the communication device 151.
[0067] When communication device 151 begins operation in connection setup mode, it enables both Wi-Fi and BLE communication. Specifically, communication device 151 activates its internal AP (access point for connection setup) dedicated to connection setup mode, as a Wi-Fi communication activation process. As a result, communication device 151 is in a state where it can establish a direct connection with terminal device 101 via Wi-Fi. The connection information (SSID and password) used to connect to the AP for connection setup is pre-stored in a predetermined app installed on terminal device 101. In other words, it is assumed that terminal device 101 has pre-existing connection information for connecting to the AP for connection setup. Therefore, unlike the connection information of the AP enabled in direct connection mode, the connection information used to connect to the AP for connection setup cannot be arbitrarily changed by the user. It is permissible not to set an encryption method for connection setup in the AP and not to use a password to connect to the AP. In connection setup mode, communication device 151 can connect to terminal device 101 using Wi-Fi Direct (WFD) instead of regular Wi-Fi. In other words, the communication device 151 can operate as a group owner and receive setting commands from the terminal device 101 via communication via WFD.
[0068] Register communication devices to the App
[0069] In this embodiment, the pre-defined app can register the communication device 151 by obtaining information about the communication device 151 from the communication device 151.
[0070] Information about the communication device 151 includes, for example, capability information of the communication device 151, identification information of the communication device 151 (such as a MAC address), and model information of the communication device 151. Specifically, the capability information of the communication device 151 includes: a list of multiple pieces of information about the functions supported by the communication device 151, information about the consumables (ink, paper) available to the communication device 151, information indicating the printing method of the communication device 151, etc. Then, the scheduled app selects a device as a communication partner from one or more communication devices 151 registered in the scheduled app. The communication device 151 currently selected as a communication partner for the scheduled app is referred to as the selected communication device 151. The selection of a device as a communication partner using the scheduled app can be done by accepting a user's selection from one or more communication devices 151 registered in the scheduled app, or it can be done automatically by the scheduled app according to predetermined criteria. Changing a device as a communication partner using the scheduled app can, for example, be done by accepting a user's selection from one or more communication devices 151 registered in the scheduled app. In this embodiment, the pre-defined app sends various jobs, such as printing and scanning jobs, to a selected communication device 151. In other words, the selected communication device 151 is the device to which the various jobs are sent.
[0071] Screen for setting up location-based services
[0072] like Figure 3 As shown, the OS standard settings app of terminal device 101 can display a settings screen 300 for changing settings regarding location-based services. Settings screen 300 is displayed within the window shown by the OS standard settings app. In settings screen 300, area 301 is used to allow or disallow terminal device 101 to use location-based services. Area 301 includes a first toggle button. When the first toggle button is activated, allowing or disallowing terminal device 101 to use location-based services is either enabled or disabled. When terminal device 101 is allowed to use location-based services, apps selected as allowed to use location-based services in areas 302 to 304 can use location-based services. In other words, even when terminal device 101 is allowed to use location-based services, apps not selected as allowed to use location-based services cannot use location-based services. Conversely, when terminal device 101 is not allowed to use location-based services, all apps on terminal device 101 cannot use location-based services. When the terminal device 101 is not allowed to use location-based services, areas 302 to 304 described below can be grayed out to invalidate operations on areas 302 to 304.
[0073] Area 302 is used to allow or disallow the Universal Windows Platform (UWP) app and desktop app of terminal device 101 to use location-based services. Area 302 includes a second toggle button. When the second toggle button is activated, the UWP app and desktop app of terminal device 101 are allowed or disallowed to use location-based services. A UWP app is an app created using a method called UWP and installed via information downloaded through a Windows Store feature. A Windows Store feature specifically refers to, for example, the Microsoft Store. On the other hand, a desktop app is an app installed without information downloaded via a Windows Store feature. Specifically, a desktop app is an app installed via information downloaded from a webpage provided by the app's vendor. Alternatively, a desktop app is an app installed via information downloaded from a recording medium (such as a CD and USB storage) attached to terminal device 101. In this embodiment, it is assumed that the intended app is a desktop app.
[0074] Area 303 is used to allow or disallow a UWP app on terminal device 101 to use location-based services. In this embodiment, terminal device 101 can individually allow or disallow a UWP app to use location-based services. Therefore, in area 303, toggle buttons are assigned to each app. When a toggle button is activated, the corresponding app is individually allowed or disallowed to use location-based services. In other words, the app corresponding to the toggle button in area 303 that is activated to allow the use of location-based services is selected as the app allowed to use location-based services.
[0075] Region 304 is a region used to allow or disallow desktop apps of terminal device 101 to use location-based services. In this embodiment, terminal device 101 cannot individually allow or disallow desktop apps to use location-based services. In other words, terminal device 101 can collectively allow or disallow desktop apps to use location-based services. Therefore, when the toggle button displayed in region 304 is operated, all desktop apps of terminal device 101 are allowed or disallowed to use location-based services. In other words, when the toggle button in region 304 is operated to allow the use of location-based services, all desktop apps of terminal device 101 are selected as apps allowed to use location-based services. Region 304 may include a region showing the desktop apps of terminal device 101.
[0076] In this embodiment, based on the type of account logged into terminal device 101, the area that the user can operate on in the settings screen 300 is controlled by setting an app. Specifically, when the account logged into terminal device 101 is an administrator account, the app is set to perform control, allowing the user to operate on any of areas 301 to 304. On the other hand, when the account logged into terminal device 101 is a standard user account with lower privileges than an administrator account, the app is set to perform control, preventing the user from operating on area 301, and allowing them to operate only on areas 302, 303, and 304.
[0077] In other words, when a user is logged in with an administrator account in the user operation area 301, a user logged in with a standard user account cannot change the settings for the use of location-based services in the UWP app and the desktop app of the terminal device 101 before the terminal device 101 itself is allowed to use location services.
[0078] The challenges to be addressed in this embodiment
[0079] As described above, in this embodiment, when an operation is performed on the setup screen 300, the intended app can use location-based services. In other words, the intended app is allowed to use location-based services. However, when the OS of the terminal device 101 is a specific OS, the intended app cannot obtain information about Wi-Fi communication functions from the OS unless the intended app is allowed to use location-based services. Specifically, the information about Wi-Fi communication functions refers to, for example, information about the AP that the terminal device 101 is currently connected to via Wi-Fi. This information could be, for example, information about APs that emit beacons around the terminal device 101 and are found by the terminal device 101 using Wi-Fi. In this embodiment, the terminal device 101 needs to obtain from the OS during the connection setup process information about the AP that the terminal device 101 is currently connected to via Wi-Fi and information about the connection setup AP enabled by the communication device 151 operating in connection setup mode. Therefore, when the intended app is not allowed to use location-based services, the terminal device 101 cannot properly perform the connection setup process.
[0080] Therefore, a scheduled app can determine whether to allow the scheduled app to use location-based services, and when not allowed, prompt the user to allow the scheduled app to use location-based services. However, in certain operating systems such as Windows (registered trademark), there is no API (Application Programming Interface) to directly indicate from the OS whether the scheduled app is allowed to use location-based services. In other words, when a scheduled app operates on a particular OS, there is a challenge: the scheduled app cannot use an API to determine whether to obtain information directly indicating from the OS whether the scheduled app is allowed to use location-based services. To address this challenge, in this embodiment, a different method than using an API is used to determine whether to obtain information directly indicating from the OS whether the scheduled app is allowed to use location-based services. Then, based on the determination result, the user is prompted to allow the scheduled app to use location-based services.
[0081] The processing of the predetermined app execution in this embodiment
[0082] Figure 4 This is a flowchart illustrating an example of a process performed by the terminal device 101 using a predetermined app in this embodiment. For example, when the CPU 103 expands the predetermined app stored in the memory (i.e., ROM 104, etc.) to the RAM 105 and executes the predetermined app, the following is implemented: Figure 4 The processing of flowcharts. Figure 4 The flowchart in the document begins with the fact that the user has accepted the operation for network recovery on the screen displayed by the pre-selected app.
[0083] Figure 4 The flowchart can begin in response to the launch of a pre-defined app.
[0084] It can begin based on a failed attempt by a pre-defined app or another app to communicate with communication device 151. Figure 4 The flowchart.
[0085] In S401, CPU 103 calls a predetermined API. In this embodiment, the predetermined API is an API used to obtain information about location-based services from the OS. In other words, the predetermined API is an API used by the app to access information about location-based services. In this embodiment, the information about location-based services is information obtained by terminal device 101 through the wireless LAN function. This is because, using the information obtained by terminal device 101 through the wireless LAN function, the application that has obtained this information can identify the location of terminal device 101 and the location of another device. The information obtained by terminal device 101 through the wireless LAN function specifically includes, for example: information about a list of wireless networks accessible to terminal device 101, information about a list of basic service sets (BSS) of networks accessible to terminal device 101, and information about the network that terminal device 101 is currently connected to via Wi-Fi.
[0086] When an app, as the source of a scheduled API call, is not permitted to use a location-based service, the app calling the scheduled API is not notified of the correct value from the OS, and is even notified of an error when the scheduled API is called. Specifically, the OS notifies the error code ERROR_ACCESS_DENIED, indicating that access to information about the location-based service has been denied. On the other hand, when an app, as the source of a scheduled API call, is permitted to use a location-based service, when the scheduled API is called, the OS notifies the app, as the source of the scheduled API call, of the correct value of the information about the location-based service. Specifically, the OS notifies the app of the code ERROR_SUCCESS, indicating successful access to the location-based service, and notifies the app of the correct value of the information about the location-based service.
[0087] There are several predefined APIs. Specifically, as predefined APIs supporting Windows OS, there are WlanGetAvailableNetworkList (hereinafter referred to as the first API), WlanGetAvailableBSSList (hereinafter referred to as the second API), WlanQueryInterface (hereinafter referred to as the third API), and WlanScan (hereinafter referred to as the fourth API).
[0088] The first API is an API used to obtain information about a list of wireless networks accessible to terminal device 101. The wireless networks accessible to terminal device 101 are networks existing around terminal device 101 and formed by access points that emit beacons based on the Wi-Fi standard. Specifically, the information obtained by the first API includes the SSID of the access points that form the wireless networks accessible to terminal device 101, the authentication and encryption methods of the access points, and the frequency band used by the access points.
[0089] The second API is an API used to obtain information about a list of Basic Service Sets (BSS) of networks accessible to terminal device 101. Specifically, the information obtained by the second API is the SSID of the access point that forms the wireless network accessible to terminal device 101, and the BSS of the wireless network accessible to terminal device 101. The wireless networks indicated by the information obtained by the first and second APIs are assumed to be wireless networks not found through a search (scan) performed based on the execution of the first or second API. In other words, it is assumed that the OS does not perform a new search for wireless networks based on the call to the first or second API. Wireless networks indicated by the information obtained through the first or second API are networks found, for example, through a search performed by the OS at any time prior to the call to the first or second API, or through a search based on the call to the fourth API.
[0090] The third API is used to obtain information about the network that the terminal device 101 is currently connected to via Wi-Fi. In other words, the information about the network that the terminal device 101 is currently connected to via Wi-Fi is information about the access point that forms the network that the terminal device 101 is currently connected to via Wi-Fi. Specifically, the information obtained through the predetermined API is information indicating the SSID of the access point that the terminal device 101 is currently connected to via Wi-Fi, as well as the authentication method and encryption method of that access point.
[0091] The fourth API is used to enable the OS to search for wireless networks accessible to the terminal device 101.
[0092] In this embodiment, it is assumed that the third API among the first to fourth APIs is called in S401; however, the construction is not limited to this construction. Any API can be called, as long as the API is a predefined API. The predefined API is not limited to a construction that only includes the first to fourth APIs. The predefined API can include other types of APIs, as long as the API is used to obtain information about location-based services from the OS.
[0093] When a pre-defined app calls a pre-defined API in S401, the OS performs processing based on the pre-defined API call. Specifically, initially, the OS determines whether this is the first time the pre-defined app has called the pre-defined API, and whether the pre-defined app is permitted to use location-based services. When the OS determines that this is the first time the pre-defined app has called the pre-defined API and that the pre-defined app is permitted to use location-based services, the OS displays a prompt screen to ask the user whether to allow the pre-defined app to use location-based services. Figure 6 The query screen 600 shown is an example of a query screen displayed here. The query screen 600 includes an area 601 displaying a message asking whether a pre-selected app is allowed to use location-based services and a message instructing the pre-selected app that it needs permission to use location-based services. The query screen 600 includes a button 602 for displaying a settings screen 300. When the user operates button 602, the OS launches the OS Standard Settings app and displays the Settings screen 300. The query screen 600 includes a button 603 for allowing the pre-selected app to use location-based services and a button 604 for disallowing the pre-selected app from using location-based services. When the user operates button 603, the OS allows the terminal device 101 to use location-based services and also allows the pre-selected app to use location-based services. Conversely, when the user operates button 604, the OS maintains the state where the pre-selected app is disallowed from using location-based services.
[0094] After pressing button 603 or button 604 and changing or maintaining the settings related to whether a scheduled app is allowed to use the location-based service, the OS determines whether the scheduled app is allowed to use the location-based service. When the OS determines that the scheduled app's call to the scheduled API is not the first time, the OS does not display the query screen 600 and determines whether the scheduled app is allowed to use the location-based service. Then, when the scheduled app is allowed to use the location-based service, the OS notifies the scheduled app of the error code ERROR_SUCCESS corresponding to the successful call to the scheduled API, and notifies the scheduled app of the correct values for information about the location-based service. On the other hand, when the scheduled app is not allowed to use the location-based service, the OS notifies the scheduled app of the error code ERROR_ACCESS_DENIED corresponding to the failure to access the scheduled API information, without notifying the scheduled app of the correct values for information about the location-based service.
[0095] In S402, CPU 103 determines whether the scheduled app is allowed to use the location-based service. Specifically, for example, CPU 103 determines whether a code corresponding to successful access to information via the scheduled API has been received as a result of calling the scheduled API. This determination is equivalent to determining whether access to information about the location-based service was successful by calling the scheduled API. When the scheduled app is not allowed to use the location-based service, and the result is negative based on a notification from the OS of an error code corresponding to a failure to access the scheduled API information, CPU 103 proceeds to S403. Conversely, when the scheduled app is allowed to use the location-based service, and the result is positive based on a notification from the OS of a correct value, CPU 103 proceeds to S408.
[0096] In S403, CPU 103 identifies the type of user account currently logged into terminal device 101 and determines whether the identified account is an administrator account (or a standard user account). If the determination is affirmative, CPU 103 proceeds to S404; if the determination is negative, CPU 103 proceeds to S407.
[0097] In S404, CPU 103 performs display processing to display a guide screen that prompts the user to allow the scheduled app to use location-based services. Figure 5A The shown guide screen 500 is an example of a guide screen displayed in S404. Guide screen 500 includes an area 501 displaying a message prompting the user to allow a pre-selected app to use location-based services and a message instructing the user on actions to allow the pre-selected app to use location-based services. Guide screen 500 may include a message instructing the pre-selected app to obtain information about location-based services. In other words, in this embodiment, guide screen 500 may include, for example, a message instructing the pre-selected app to obtain information about the AP (Wi-Fi router) as information about location-based services. Guide screen 500 includes a button 502 for displaying setup screen 300. When the user operates button 502, CPU 103 launches the OS standard setup app and causes the OS standard setup app to display setup screen 300. The display of guide screen 500 is maintained even when button 502 is operated and setup screen 300 is displayed. Therefore, the user can operate button 503 included in guide screen 500 after allowing the pre-selected app to use location-based services on setup screen 300. When button 503 is pressed, CPU 103 proceeds to step S405.
[0098] In S405, as in S401, CPU 103 calls the predefined API again.
[0099] Then, in S406, as in S402, CPU 103 determines whether the scheduled app is allowed to use the location-based service. If the scheduled app is not allowed to use the location-based service and the result is negative based on an error code notification from the OS as the result of calling the scheduled API, CPU 103 proceeds to S407. On the other hand, if the scheduled app is allowed to use the location-based service and the result is positive based on a correct value notification from the OS as the result of calling the scheduled API, CPU 103 proceeds to S408.
[0100] In S407, CPU 103 stores details of the current settings regarding the permission of the scheduled app to use location-based services in memory. In other words, CPU 103 stores information in memory indicating the settings corresponding to the fact that the scheduled app is not allowed to use location-based services. Afterwards, CPU 103 proceeds to S408.
[0101] In step S408, CPU 103 obtains information about the network that terminal device 101 is currently connected to via Wi-Fi. Specifically, in step S408, CPU 103 calls a third API. When a pre-defined app is allowed to use a location-based service, this API call successfully obtains information about the network that terminal device 101 is currently connected to via Wi-Fi. Therefore, in other words, the network that terminal device 101 is currently connected to via Wi-Fi is the network that terminal device 101 is connected to via Wi-Fi when the third API is called.
[0102] When the app is not allowed to use location-based services, information about the network that the terminal device 101 is currently connected to via Wi-Fi cannot be obtained even when the API is called. The API call succeeds when the terminal device 101 is not currently connected to any network via Wi-Fi; however, no information about the network that the terminal device 101 is currently connected to via Wi-Fi is obtained.
[0103] When information about the AP is successfully obtained by calling the API in S401, it is not necessary to call the API in S408 to obtain information about the network to which the terminal device 101 is currently connected via Wi-Fi. The information obtained by calling the API in S401 can then be used in the following processes. In S408, the CPU 103 also obtains information that can be obtained even when the scheduled app is not allowed to use location-based services. Specifically, the CPU 103 obtains information about the Wi-Fi connection (wireless LAN connection) and the wired LAN connection of the terminal device 101, as information that can be obtained even when the scheduled app is not allowed to use location-based services. The information about the Wi-Fi connection and the wired LAN connection of the terminal device 101 specifically includes, for example, information indicating whether IPv4 or IPv6 is enabled, and information indicating the IP address, MAC address, and channel used for the connection. Information about the Wi-Fi connection of the terminal device 101 is not obtained when the terminal device 101 has not yet established a Wi-Fi connection. When terminal device 101 has not yet established a wired LAN connection, information about the wired LAN connection of terminal device 101 is not obtained. Therefore, in this process, the network to which terminal device 101 is connected is identified based on whether information has already been obtained. When information about the network to which terminal device 101 is currently connected via Wi-Fi has already been obtained by calling a predetermined API, the wireless profile corresponding to the network to which terminal device 101 is currently connected via Wi-Fi can be obtained.
[0104] The wireless profile is information managed by the OS and contains information about the networks that the terminal device 101 has previously connected to. The wireless profile then includes the password used to connect to the network. Therefore, the CPU 103 can identify the password of the network that the terminal device 101 is currently connected to via Wi-Fi by retrieving the wireless profile, without requiring the user to input a password for a pre-defined app.
[0105] Accessing the wireless profile, including the password, requires administrator privileges.
[0106] Processing requiring administrator privileges is an executable process based on the fact that app privilege escalation is performed as a result of permission obtained from the user. In this embodiment, the process of allowing the app to perform processing requiring administrator privileges is called privilege escalation. For example, permission is obtained from the user by instructing them to allow input operations requiring administrator privileges to be performed on a screen displayed by the User Account Control (hereinafter referred to as UAC) function. When the user account logged into terminal device 101 is an administrator account, input operations can be performed on the screen displayed by the UAC function without entering a password. Then, when the user account logged into terminal device 101 is not an administrator account, input operations can be performed by entering the administrator account's password on the screen displayed by the UAC function. Then, in this embodiment, since the intended app is a desktop app, when privilege escalation has already been performed on the intended app, the intended app can obtain a wireless profile including the password. Therefore, in this embodiment, it is assumed that privilege escalation has already been performed for the intended app to obtain a wireless profile including the password. When privilege escalation has not yet been performed for the intended app, a screen for performing privilege escalation can be displayed through the UAC function. When a screen is displayed but no privilege escalation is performed due to lack of user permission, and therefore no password is obtained from the pre-defined app via the pre-defined API, the CPU 103 can display an input screen for accepting password input using the pre-defined app. During connection setup processing, the password entered on the input screen can be used instead of the password obtained via the pre-defined API.
[0107] In S408, the CPU 103 can obtain not only the wireless profile corresponding to the network to which the terminal device 101 is currently connected via Wi-Fi, but also other wireless profiles. Specifically, for example, the CPU 103 can obtain the wireless profile corresponding to a list of wireless networks accessible to the terminal device 101, as indicated by information obtained from the OS by calling the first API and the second API.
[0108] The method for obtaining wireless profiles is not limited to the above-described configuration. For example, CPU 103 can request all wireless profiles managed and stored by terminal device 101 from the OS. Then, from the multiple wireless profiles obtained in this way, the wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi can be identified. Similarly, from the multiple wireless profiles obtained in this way, the wireless profile corresponding to a wireless network included in the list of wireless networks accessible to terminal device 101 can be identified.
[0109] The information obtained in S408 is not limited to the above-described configuration. Only one of the above-described pieces of information may be obtained, or other information may be obtained. Specifically, for example, it is possible not to obtain the wireless profile, or to obtain the SSID included in the wireless profile but not the password. Therefore, for example, since the API called in S401 and the API called in S408 are different from each other, the information obtained in S401 and the information obtained in S408 may be different from each other.
[0110] In S409, the CPU 103 searches the network connected to the terminal device 101 identified in S408 for a communication device 151 that supports the predetermined app. The communication device 151 supporting the predetermined app is, for example, a communication device 151 provided by the same supplier as the supplier of the predetermined app. Then, the CPU 103 displays a selection screen for selecting one of the one or more communication devices 151 found through the search. Figure 5B The selection screen 510 shown is an example of the selection screen displayed in S409. The selection screen 510 includes an area 511, which is an area showing one or more communication devices 151 found through the search described above.
[0111] In area 511, information indicating one or more communication devices 151 that were not found through the aforementioned search but were previously connected to terminal device 101 can be displayed. The information displayed in area 511 specifically includes, for example, the product name, part of the serial number, IP address, and MAC address of the communication device 151. The user operates area 511 to select a communication device 151 from the one or more communication devices 151 found through the aforementioned search and the one or more communication devices 151 that were not found through the aforementioned search but were previously connected to terminal device 101. Selection screen 510 includes area 512, which the user operates when no communication device 151 that the user expects to be restored is among the one or more communication devices 151 displayed in area 511. When any communication device 151 is selected through operation of area 511, or when area 512 is selected, area 513 becomes available for user operation. When area 513 is operated, CPU 103 proceeds to S410.
[0112] In S410, the CPU 103 determines whether the communication device 151 found on the network to which the terminal device 101 is connected has been selected on the selection screen 510. If the communication device 151 that was not found through the above search but was previously connected to by the terminal device 101 is selected, or if area 512 is selected, the result of this determination is negative.
[0113] When CPU 103 makes a positive determination, CPU 103 proceeds to S416; and when CPU 103 makes a negative determination, CPU 103 proceeds to S411.
[0114] In S411, CPU 103 determines whether to perform connection setup processing. Specifically, in S411, CPU 103 determines whether terminal device 101 is currently connected to the network via Wi-Fi. CPU 103 determines whether the IPv4 function is enabled on terminal device 101. These determinations are made using information obtained in S408. Then, a case where both determinations are positive corresponds to determining to perform connection setup processing. Then, a case where at least one determination is negative corresponds to determining not to perform connection setup processing. When CPU 103 makes a positive determination, CPU 103 proceeds to S413; and when CPU 103 makes a negative determination, CPU 103 proceeds to S412.
[0115] In S412, the CPU 103 displays a guide screen for manual connection as part of the manual connection process. In this embodiment, manual connection refers to the state where the communication device 151 connects to an access point without receiving setup information from the terminal device 101. Specifically, in manual connection, the communication device 151 searches for surrounding access points based on operations performed on the communication device 151, displays a list of found access points, and connects to an access point selected from that list. Figure 5C The shown guide screen 520 is an example of a guide screen displayed in S412. Guide screen 520 includes area 521, which contains messages indicating the operating method for manually connecting to communication device 151. Guide screen 520 includes area 522, which is a button for displaying a webpage showing details of the operating method for manually connecting to communication device 151. When area 522 is activated, CPU 103 launches a web browser and causes the web browser to display a webpage showing details of the operating method for manually connecting to communication device 151.
[0116] Details of the operation method for manually connecting to the communication device 151 can be displayed on a screen (such as the boot screen 520) shown by a pre-defined app, rather than on a web browser. When operating area 523, CPU 103 proceeds to S416.
[0117] In S413, the CPU 103 displays a boot screen for operating the communication device 151 in connection setting mode as a process for performing connection setting processing. Figure 5DThe shown guide screen 530 is an example of a guide screen displayed in S413. Guide screen 530 includes an area 531 that contains messages indicating the operation method for operating the communication device 151 in connection setting mode. Guide screen 530 may also include an area 532 as a button for displaying a guide screen related to manual connection. When area 532 is activated, CPU 103 proceeds to S412 and displays a guide screen related to manual connection.
[0118] In S414, CPU 103 detects communication devices 151 present around terminal device 101 and operating in connection setting mode. Specifically, in S414, CPU 103 calls a fourth API to cause the OS to search for wireless networks accessible to terminal device 101. Then, CPU 103 calls a first API to obtain information from the OS about a list of wireless networks accessible to terminal device 101. Then, it detects a network formed by communication devices 151 operating in connection setting mode from the list of wireless networks accessible to terminal device 101. In other words, a network formed by communication devices 151 operating in connection setting mode is a network formed by access points enabled by communication devices 151 operating in connection setting mode. A second API can be called instead of the first API. When any communication device 151 has been selected on selection screen 510, CPU 103 operates in connection setting mode and detects communication devices 151 that match the communication device 151 selected on selection screen 510. When a communication device 151 operating in connection setting mode is successfully detected, CPU 103 proceeds to S415.
[0119] In S415, CPU 103 performs connection setup processing for communication device 151. Details of this processing will be described later.
[0120] In S416, CPU 103 searches for communication device 151 on the network currently connected to terminal device 101. If any of the communication devices 151 has already been selected on selection screen 510, CPU 103 detects a communication device 151 that matches the selected communication device 151 on selection screen 510. If connection setup processing has already been performed in S415, CPU 103 searches for the communication device 151 to which the connection setup processing was performed. If no communication device 151 exists on the network currently connected to terminal device 101, the search fails to find a communication device 151.
[0121] In S417, CPU 103 determines whether the communication device 151 has been found through the search performed in S416. If the determination is positive, CPU 103 proceeds to S419; if the determination is negative, CPU 103 proceeds to S418.
[0122] In S418, the CPU 103 displays a failure screen indicating a failure to connect to the communication device 151 as a diagnostic result. In other words, a failure to connect to the communication device 151 means that communication with the communication device 151 cannot be established because the search performed in S416 did not find the communication device 151. Figure 5E The failure screen 540 shown is an example of a failure screen displayed in S418. Failure screen 540 includes area 541, which displays a message indicating a connection failure with communication device 151. Failure screen 540 also includes area 542, which is a button for checking the network status of communication device 151. When area 542 is activated, CPU 103 launches a web browser and displays a webpage detailing methods for checking the network status of communication device 151. These methods include, for example, printing information indicating the network status of communication device 151. The webpage may also provide methods for troubleshooting network failures by referring to the printed information. Details of the methods for checking the network status of communication device 151 may be displayed on a screen shown by a pre-defined app (such as failure screen 540) instead of on the web browser. When area 543 is activated, CPU 103 terminates the processing of this flowchart.
[0123] In S419, CPU 103 determines whether the scheduled app is allowed to use the location-based service. This determination is made based on information stored in memory that indicates current settings details regarding permission to use the location-based service for the scheduled app. In other words, the scheduled API is not invoked in this determination. If information indicating that the scheduled app is not allowed to use the location-based service is stored in memory in S407, the determination is negative. Then, if the information has not been stored in memory because S407 has not yet been executed, the determination is positive. This configuration is not limited to this. The scheduled API can be invoked as in the case of S401, and the determination based on the result of the scheduled API invocation can be performed as in the case of S402. When the determination is positive, CPU 103 proceeds to S420; and when the determination is negative, CPU 103 proceeds to S421.
[0124] In S420, CPU 103 acquires information about the radio wave conditions between terminal device 101 and the access point currently connected to terminal device 101 (radio wave condition information of terminal device 101). The radio wave condition information of terminal device 101 is information that a predetermined app cannot obtain when the app is not allowed to use location-based services, and is acquired through a predetermined API. The radio wave condition information of terminal device 101 includes, for example, information about the radio wave strength in communication between terminal device 101 and the access point. Specifically, the information about the radio wave strength is information about the received strength of the radio waves received by terminal device 101 from the access point. In S420, CPU 103 acquires information about the radio wave conditions between terminal device 101 and various wireless networks accessible to terminal device 101 from OS by calling a first API. In other words, CPU 103 acquires multiple pieces of radio wave condition information from OS. Then, CPU 103 performs this processing by extracting the radio wave condition information corresponding to the network currently connected to terminal device 101 from the acquired multiple pieces of radio wave condition information. The radio wave status information of the terminal device 101 can also be obtained by the second API or the third API, so these APIs can be called instead of the first API.
[0125] In S421, CPU 103 obtains information from communication device 151 regarding the radio wave conditions between communication device 151 and the access point to which communication device 151 is currently connected (radio wave condition information of communication device 151). The radio wave condition information of communication device 151 includes, for example, information about the radio wave strength in communication between communication device 151 and the access point. Specifically, the information about the radio wave strength is information about the received strength of the radio waves received by communication device 151 from the access point. The radio wave condition information includes, for example, information about the radio noise around communication device 151. In this embodiment, it is assumed that the information about the radio noise is the signal-to-noise ratio (SNR) value measured by communication device 151. Since the radio wave condition information of communication device 151 is obtained from communication device 151 through communication with communication device 151, a predefined app can obtain the radio wave condition information of communication device 151 without calling a predefined API.
[0126] In S422, the CPU 103 displays a diagnostic result screen based on the radio wave status information of the terminal device 101 obtained in S420 and the radio wave status information of the communication device 151 obtained in S421. Figure 5FThe diagnostic result screen 550 shown is an example of a diagnostic result screen displayed in S422. Diagnostic result screen 550 is a diagnostic result screen displayed when both the radio wave strength in communication between terminal device 101 and the access point, and the radio wave strength in communication between communication device 151 and the access point, exceed a threshold, and both the radio wave status of terminal device 101 and the radio wave status of communication device 151 are good. Diagnostic result screen 550 includes an area 551 that displays messages based on the radio wave status of terminal device 101 and communication device 151. When both the radio wave status of terminal device 101 and the radio wave status of communication device 151 are good, area 551 displays a message indicating that terminal device 101 and communication device 151 can communicate with each other. When neither the radio wave strength in communication between terminal device 101 and the access point, nor the radio wave strength in communication between communication device 151 and the access point, exceeds a threshold, area 551 displays a message indicating that terminal device 101 and communication device 151 cannot communicate or that the radio wave strength is weak. The diagnostic results screen 550 includes a button 552 for instructing the communication device 151 to perform a test print. When button 552 is pressed, the CPU 103 sends a print job for the test print to the communication device 151, causing the communication device 151 to perform the test print. When area 553 is accessed, the CPU 103 terminates the processing of this flowchart.
[0127] Figure 7 This is a flowchart illustrating an example of connection setup processing performed by terminal device 101 using a predetermined app in this embodiment. For example, when CPU 103 expands the predetermined app stored in memory (i.e., ROM 104, etc.) to RAM 105 and executes the predetermined app, the following is implemented: Figure 7 The processing of flowcharts. Figure 7 The flowchart is a flowchart showing the details of the connection setup process performed in S415.
[0128] In S701, CPU 103 disconnects the Wi-Fi connection between terminal device 101 and the network, and in S414, communication device 151, which is detected and operating in connection setting mode, establishes a Wi-Fi connection with terminal device 101.
[0129] In S702, the CPU 103 obtains from the communication device 151 a list of networks found by the search performed by the communication device 151 and accessible by the communication device 151.
[0130] In S703, CPU 103 determines whether the network that terminal device 101 connected to before connecting to communication device 151 operating in connection setting mode is included in the received list. The network that terminal device 101 connected to before connecting to communication device 151 operating in connection setting mode is the network that terminal device 101 connected to when terminal device 101 accepted network recovery operation from user. Information about the network has already been obtained in S408, so this determination is made based on the information obtained in S408. When the determination is affirmative, CPU 103 proceeds to S707; and when the determination is negative, CPU 103 proceeds to S704.
[0131] In S704, CPU 103 displays the list received from communication device 151 and allows the user to select any network from the list.
[0132] In S705, CPU 103 uses a predefined app to display the input screen, which accepts the password for connecting to the network selected in S704. This process can be omitted if the password has already been obtained in S408 by retrieving the wireless profile.
[0133] In S706, CPU 103 sends infrastructure setup information for connecting to the network selected in S704. This infrastructure setup information includes the password entered on the input screen displayed in S705 and information (such as the SSID) used to identify the network selected in S704. If the password has already been obtained in S408 through obtaining a wireless profile, the password obtained through obtaining the wireless profile can be included in the infrastructure setup information. The infrastructure setup information sent here may include information indicating the authentication method, encryption method, and frequency band used by the network selected in S704. When the infrastructure setup information is sent in S706, communication device 151 uses the infrastructure setup information to connect to the network selected in S704. Afterwards, CPU 103 proceeds to S708.
[0134] In S707, CPU 103 sends infrastructure setup information for connecting to the network that terminal device 101 connected to before connecting to communication device 151. This infrastructure setup information includes the password obtained in S408 and information (such as SSID) used to identify the network that terminal device 101 connected to before connecting to communication device 151. The infrastructure setup information may include information indicating the authentication method, encryption method, and frequency band used by the network that terminal device 101 connected to before connecting to communication device 151. When the infrastructure setup information is sent in S707, communication device 151 uses the infrastructure setup information to connect to the network that terminal device 101 connected to before connecting to communication device 151.
[0135] In S708, CPU 103 disconnects the Wi-Fi connection between terminal device 101 and communication device 151. When the Wi-Fi connection is disconnected, the reconnection function provided by the OS of terminal device 101 attempts to establish a connection between terminal device 101 and a network that can be connected using the wireless profile maintained by terminal device 101. Here, it is assumed that the reconnection function attempts to establish a connection between terminal device 101 and the network that terminal device 101 was connected to before connecting to communication device 151. As a result, terminal device 101 reconnects to the network that terminal device 101 was connected to before connecting to communication device 151. The establishment of the connection between terminal device 101 and the network that terminal device 101 was connected to before connecting to communication device 151 can be done not through the reconnection function provided by the OS of terminal device 101, but by instructing a predetermined app of the OS. Afterwards, CPU 103 ends the processing of this flowchart and proceeds to S416.
[0136] Using this construct, it is possible to appropriately determine whether a pre-booked app is allowed to use location-based services. Then, processing can be appropriately performed based on the determination of whether the pre-booked app is allowed to use location-based services.
[0137] The following configuration has been described above: the pre-defined app displays a boot screen 500 based on a pre-defined error notification as a result of the execution of a pre-defined API. Alternatively, the pre-defined app may display the boot screen 500 for other reasons. Specifically, for example, the pre-defined app may display the boot screen 500 based on selecting a pre-defined menu item from the menu displayed when the "Help" tab is operated by the pre-defined app. The pre-defined app does not execute the pre-defined API based on the selection of the pre-defined menu item. In other words, when a pre-defined menu item is selected, the pre-defined app does not display the boot screen 500 based on a pre-defined error notification as a result of the execution of the pre-defined API. However, this configuration is not limited to this. When a pre-defined menu item is selected, the pre-defined app may execute the pre-defined API and may display the boot screen 500 based on a pre-defined error notification as a result of the execution of the pre-defined API.
[0138] The above description has outlined the structure of a pre-defined app for network recovery; however, the structure is not limited thereto. A pre-defined app can be an app for connection setup processing that does not perform network recovery processing (such as displaying diagnostic results), but performs connection setup processing. The pre-defined app can have functions other than connection setup processing. Examples of other functions specifically include sending print jobs to communication device 151 to perform printing (print job sending function) and sending scan jobs to communication device 151 to perform scanning (scan job sending function).
[0139] Second Embodiment
[0140] The construction of a pre-ordered app as a desktop app has been described above; however, this construction is not limited to this. A pre-ordered app can also be a UWP app. In this embodiment, the construction of a pre-ordered app as a UWP app will be described.
[0141] UWP apps have restrictions that prevent them from performing processes requiring administrator privileges. In this embodiment, terminal device 101 has a UWP app as a pre-defined app and a desktop app as an app different from the pre-defined app, and it is assumed that terminal device 101 performs processing by linking these apps together. Hereinafter, the UWP app as the pre-defined app is referred to as App A, and the desktop app as an app different from the pre-defined app is referred to as App B. In this embodiment, App A is installed on terminal device 101 from an external source using storage provided by the OS vendor, and App B is installed on terminal device 101 from an external source using a webpage provided by the App B vendor. App B can be downloaded and installed on terminal device 101 based on instructions from App A.
[0142] Figure 8 This is a flowchart illustrating an example of a process performed by the terminal device 101 using a predetermined app in this embodiment. For example, when the CPU 103 expands the predetermined app stored in the memory (i.e., ROM 104, etc.) to the RAM 105 and executes the predetermined app, the following is implemented: Figure 8 The flowchart processing. Based on the fact that the user accepted the operation for connection setup processing on the screen displayed in App A, it begins... Figure 8 The flowchart. Figure 8 The flowchart can begin in response to the launch of App A.
[0143] In S801, CPU 103 determines whether the OS operating on terminal device 101 is an S-mode OS. S-mode is a mode that restricts certain functions to enhance the security of terminal device 101. On an S-mode OS, UWP apps can run, but desktop apps cannot. In other words, when the OS operating on terminal device 101 is an S-mode OS, App A can run, but App B cannot. If the determination is affirmative, CPU 103 proceeds to S806 and proceeds to a process that does not execute various processes (S802, S803, S811) for running App B. On the other hand, if the determination is negative, CPU 103 proceeds to S802.
[0144] In S802, CPU 103 downloads and installs App B based on instructions from App A.
[0145] In S803, CPU 103 attempts to launch App B. When attempting to launch App B, the OS uses the User Account Control (UAC) function to display a screen for privilege escalation. At this time, as described above, if the currently logged-in user account on terminal device 101 is an administrator account, no password is requested for privilege escalation. However, if the currently logged-in user account on terminal device 101 is not an administrator account, a password is requested for privilege escalation. In the privilege escalation screen, if the password for privilege escalation is incorrect, an error is notified, and the password is requested again. App B is not launched if an operation requiring administrator privileges has already been indicated as not allowed. App B is launched if an operation requiring administrator privileges has already been indicated on the privilege escalation screen, or if the password for privilege escalation is correct.
[0146] In S804, CPU 103 identifies the type of user account currently logged into terminal device 101 and determines whether the identified account is an administrator account (or a standard user account). If the determination is affirmative, CPU 103 proceeds to S810; if the determination is negative, CPU 103 proceeds to S805.
[0147] In S805, CPU 103 determines whether App B has been launched through the processing of S803. If the determination is positive, CPU 103 proceeds to S812; if the determination is negative, CPU 103 proceeds to S806 without displaying the navigation screen that guides the user to allow App B to perform processing requiring administrator privileges.
[0148] In S806, CPU 103 invokes a predefined API using App A. In this embodiment, it is assumed that the first API among the first to fourth APIs is invoked in S806; however, the construction is not limited to this. Any API can be invoked as long as it is a predefined API, and specifically, for example, a third API can be invoked. The processing performed by the OS when the predefined API is invoked is as described in the description of S401. In this processing, the predefined API is invoked by App A, therefore the information notified from the OS varies depending on whether App A is allowed to use location-based services.
[0149] In S807, CPU 103 determines whether App A is allowed to use the location-based service. This process is similar to that in S402. In other words, CPU 103 determines whether the code corresponding to the successful access to the information of the predefined API has been notified as a result of calling the predefined API. If the determination is positive, CPU 103 proceeds to S818; if the determination is negative, CPU 103 proceeds to S808.
[0150] In S808, CPU 103 identifies the type of user account currently logged into terminal device 101 and determines whether the identified account is an administrator account (or a standard user account). This process is the same as in S804. When the determination is affirmative, CPU 103 proceeds to S809, and when the determination is negative, CPU 103 proceeds to S817.
[0151] In S809, CPU 103 displays a guide screen to prompt the user to allow App A to use location-based services. Figure 10BThe shown guide screen 1010 is an example of a guide screen displayed in S809. Guide screen 1010 includes an area 1011 displaying a message prompting the user to allow App A to use location-based services and a message instructing the user on actions to allow App A to use location-based services. Guide screen 1010 may include a message instructing App A to obtain information about location-based services. In other words, in this embodiment, for example, guide screen 1010 may include a message instructing App A to obtain information about the AP (Wi-Fi router) as information about location-based services. Guide screen 1010 includes a button 1012 for displaying setup screen 300. Button 1012 is similar to button 502. The display of guide screen 1010 is maintained even when button 1012 is operated and setup screen 300 is displayed. Therefore, after allowing the intended app to use location-based services on setup screen 300, the user can operate button 1013 included in guide screen 1010. When button 1013 is operated, CPU 103 enters S818.
[0152] In S810, CPU 103 determines whether App B has been started through the processing of S803. This processing is the same as that of S805. When the determination is affirmative, CPU 103 proceeds to S812, and when the determination is negative, CPU 103 proceeds to S811.
[0153] In S811, CPU 103 displays a navigation screen to guide the user and allow App B to perform processing requiring administrator privileges. The reason the navigation screen is not displayed when the determination result of S805 is negative, but is displayed when the determination result of S810 is negative, is that using the administrator account, App B can easily be allowed to perform processing requiring administrator privileges without entering a password. Afterwards, CPU 103 enters S803.
[0154] In S812, CPU 103 uses App A to call a predefined API. This process is the same as that in S806.
[0155] In S813, CPU 103 instructs App A to instruct App B to call a predetermined API. When the instruction is provided, CPU 103 utilizes App B to call the predetermined API. The processing performed by the OS when the predetermined API is called is as described in the description of S401. In this processing, the predetermined API is called by App B, and therefore the information notified from the OS varies depending on whether App B is allowed to use the location-based service. When App B accepts the notification, App B sends the accepted notification content to App A. When App A has the notification content, App A is able to determine whether App B is allowed to use the location-based service. In this embodiment, it is assumed that an instruction to call the first API among the first to fourth APIs is provided in S813; however, this construction is not limited to this. An instruction to call any API can be provided, as long as the API is a predetermined API, and specifically, for example, an instruction to call the third API can be provided.
[0156] In S814, CPU 103 determines whether both App A and App B are allowed to use the location-based service. The determination of whether App A is allowed to use the location-based service is similar to the determination in S402. In other words, CPU 103 determines whether a code corresponding to a successful access to information via a predetermined API has been notified as a result of the predetermined API call. The determination of whether App B is allowed to use the location-based service is made by determining whether the notification content received by App B from the OS corresponds to a code indicating successful access to information via the predetermined API. When this determination is affirmative based on the fact that both App A and App B are allowed to use the location-based service, CPU 103 proceeds to S818. On the other hand, when this determination is negative because at least one of App A and App B is not allowed to use the location-based service, CPU 103 proceeds to S815.
[0157] In S815, CPU 103 identifies the type of user account currently logged into terminal device 101 and determines whether the identified account is an administrator account (or a standard user account). This process is similar to that in S804. When the determination is affirmative, CPU 103 proceeds to S816; and when the determination is negative, CPU 103 proceeds to S817.
[0158] In S816, CPU 103 displays a guide screen to prompt the user to allow App A and App B to use location-based services. Figure 10AThe shown guide screen 1000 is an example of a guide screen displayed in S816. Guide screen 1000 allows not only App A but also App B to use location-based services. Therefore, guide screen 1000 differs partially in the content it displays from guide screen 1010, which is the screen allowing App A to use location-based services. Guide screen 1000 includes an area 1001 displaying messages prompting the user to allow App A and App B to use location-based services, as well as messages instructing the user on actions to allow App A and App B to use location-based services. Guide screen 1000 may include messages instructing App A and App B to obtain information about location-based services. In other words, in this embodiment, guide screen 1000 may include, for example, messages instructing App A and App B to obtain information about the AP (Wi-Fi router) as information about location-based services. Guide screen 1000 includes a button 1002 for displaying settings screen 300. Button 1002 is similar to button 502. Even when button 1002 is pressed and the settings screen 300 is displayed, the guide screen 1000 remains displayed. Therefore, after allowing the scheduled app to use the location-based service on the settings screen 300, the user can press button 1003 included in the guide screen 1000. When button 1003 is pressed, CPU 103 enters S818.
[0159] In S817, CPU 103 stores in memory the current settings regarding permissions for App A and App B to use location-based services. In other words, CPU 103 stores in memory information corresponding to settings that disallow App A and App B from using location-based services. Afterwards, CPU 103 proceeds to S818.
[0160] Not implementing S817 also applies. In other words, App A does not need to manage the current settings regarding permissions for App A and App B to use location-based services.
[0161] In S818, CPU 103 obtains information about the network that terminal device 101 is currently connected to via Wi-Fi. Specifically, in S818, CPU 103 uses App A to call a third API. When App A is allowed to use location-based services, the information about the network that terminal device 101 is currently connected to via Wi-Fi is successfully obtained by calling this API. Therefore, in other words, the network that terminal device 101 is currently connected to via Wi-Fi is the network that terminal device 101 is connected to via Wi-Fi when the third API is called. When App A is not allowed to use location-based services, the acquisition of information about the network that terminal device 101 is currently connected to via Wi-Fi fails even when the API is called. When terminal device 101 is not currently connected to any network via Wi-Fi, the API call succeeds; however, no information about the network that terminal device 101 is currently connected to via Wi-Fi is obtained. When information about the AP is successfully obtained by calling the API in S806 or S812, it is not necessary to call the API in S818 to obtain information about the network that terminal device 101 is currently connected to via Wi-Fi. Then, the information obtained by calling the API in S806 or S812 can be used for the following processing. The call to the third API can be performed by AppB instead of AppA. Then, it is appropriate for AppA to obtain the information obtained by AppB by calling the third API.
[0162] Furthermore, in S818, CPU 103 detects (discovers) a communication device 151 existing around terminal device 101 and operating in connection setting mode. Specifically, in S818, CPU 103 uses App A to call a fourth API to cause the OS to search for wireless networks accessible to terminal device 101. Then, CPU 103 uses App A to call a first API to obtain information from the OS about a list of wireless networks accessible to terminal device 101. Then, it detects an access point formed by the communication device 151 operating in connection setting mode from the list of wireless networks accessible to terminal device 101. A second API can be called instead of the first API. The call to either the first or second API can be performed by App B instead of App A. Then, it is applicable for App A to obtain the information obtained by App B through calling the first or second API.
[0163] Furthermore, in S818, CPU 103 acquires a wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi. Specifically, in S818, when CPU 103 recognizes that App B is running, CPU 103 instructs App A to instruct App B to acquire a wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi. Having received the instruction, App B initially acquires the identification information of the network that terminal device 101 is currently connected to via Wi-Fi by calling a third API. Then, App B specifies the acquired identification information and requests a wireless profile from the OS to acquire the wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi. The process of acquiring a wireless profile containing a password requires administrator privileges. Then, when App B runs, App B is allowed to perform processes requiring administrator privileges. Therefore, the wireless profile acquired by App B here is a wireless profile containing a password. Afterwards, App B sends the acquired wireless profile to App A. As a result, App A acquires the wireless profile. When App B is not allowed to use location-based services, App B cannot obtain identification information even when calling the third API. As a result, it is impossible to obtain a wireless profile with the specified identification information, so neither App A nor App B can obtain a wireless profile. Not limited to this configuration, when CPU 103 recognizes that App B is not allowed to use location-based services, App A can obtain identification information by calling the third API. App A can then specify the obtained identification information and request a wireless profile from the OS to obtain the wireless profile corresponding to the network currently connected to by terminal device 101 via Wi-Fi. In S818, when CPU 103 recognizes that App B has not yet started, CPU 103 uses App A to call the third API to obtain identification information using App A. App A can then specify the obtained identification information and request a wireless profile from the OS to obtain the wireless profile corresponding to the network currently connected to by terminal device 101 via Wi-Fi. In S818, when CPU 103 recognizes that App B has not been started, CPU 103 uses App A to call the third API to obtain App A's identification information. Then, App A specifies the acquired identification information and requests a wireless profile from the OS to obtain the wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi. However, since App A cannot perform processes that require administrator privileges, it is assumed that the wireless profile obtained by App A does not contain a password.In this case, CPU 103 can display an input screen for accepting password input using a pre-defined app. Then, during connection setup processing, the password entered on the input screen can be used instead of the password obtained by executing the pre-defined API.
[0164] When App A is not allowed to use location-based services, it cannot obtain identification information even if it calls a third-party API. As a result, it is impossible to obtain a wireless profile with the specified identification information, and therefore neither App A nor App B can obtain the wireless profile.
[0165] In S818, the CPU 103 can obtain not only the wireless profile corresponding to the network to which the terminal device 101 is currently connected via Wi-Fi, but also other wireless profiles. Specifically, for example, as indicated by information obtained from the OS by calling the first API and the second API, the CPU 103 can obtain the wireless profile corresponding to the wireless networks included in the list of wireless networks accessible to the terminal device 101.
[0166] The method for obtaining wireless profiles is not limited to the above-described configuration. For example, CPU 103 can request all wireless profiles managed and stored by terminal device 101 from the OS. Then, from the multiple wireless profiles obtained in this way, the wireless profile corresponding to the network that terminal device 101 is currently connected to via Wi-Fi can be identified. Similarly, from the multiple wireless profiles obtained in this way, the wireless profile corresponding to the wireless network included in the list of wireless networks accessible to terminal device 101 can be identified.
[0167] In S818, CPU 103 also acquires information that can be obtained even when App A or App B is not allowed to use location-based services. Specifically, CPU 103 acquires information about the Wi-Fi connection (wireless LAN connection) and the wired LAN connection of terminal device 101, as information that can be obtained even when App A or App B is not allowed to use location-based services. The information about the Wi-Fi connection and the wired LAN connection of terminal device 101 specifically includes, for example, information indicating whether IPv4 or IPv6 is enabled, and information indicating the IP address, MAC address, and channel used for connection. When terminal device 101 has not established a Wi-Fi connection, information about the Wi-Fi connection of terminal device 101 is not acquired. Similarly, when terminal device 101 has not established a wired LAN connection, information about the wired LAN connection of terminal device 101 is not acquired. Therefore, in this process, the network to which terminal device 101 is connected is identified based on whether information has been acquired.
[0168] In S818, the CPU 103 searches the network to which the terminal device 101 is connected for a communication device 151 that supports the predetermined app. The communication device 151 that supports the predetermined app is, for example, a communication device 151 provided by the same supplier as the supplier of the predetermined app.
[0169] The information obtained in S818 is not limited to the above-described configuration. Only one of the above-described pieces of information may be obtained, or other information may be obtained. Specifically, for example, the following applies: either the wireless profile is not obtained, or the SSID included in the wireless profile is obtained but the password is not. Therefore, for example, due to the condition that the API called in S812 or S813 is different from the API called in S818, the information obtained in S812 or S813 may be different from the information obtained in S818.
[0170] Afterwards, CPU 103 finishes processing the flowchart and begins... Figure 9A and Figure 9B The flowchart shown illustrates the processing.
[0171] Figure 9A and Figure 9B The following flowchart illustrates an example of processing performed by the terminal device 101 using a predetermined app in this embodiment. For example, this is achieved when the CPU 103 expands the predetermined app stored in memory (i.e., ROM 104, etc.) to RAM 105 and executes the predetermined app. Figure 9A and Figure 9B Processing of flowcharts. Based on Figure 8 The process of processing the flowchart begins after it ends.Figure 9A and Figure 9B The flowchart.
[0172] In S901, CPU 103 determines whether the communication device 151 operating in connection setting mode has been found through the processing of S818. If the determination is positive, CPU 103 proceeds to S905, and if the determination is negative, CPU 103 proceeds to S902.
[0173] In S902, the CPU 103 displays a selection screen for selecting one communication device from one or more communication devices 151. This process is similar to the process in S409. Assuming it is executed in S818, a search is performed on the network to which the terminal device 101 is connected for communication devices 151 that support a predetermined app.
[0174] In S903, CPU 103 determines whether the communication device 151 found on the network to which terminal device 101 is connected has been selected on selection screen 510. This process is similar to that in S410. When CPU 103 makes an affirmative determination, CPU 103 proceeds to S904; and when CPU 103 makes a negative determination, CPU 103 proceeds to S906.
[0175] In S904, CPU 103 executes various setup processes for communicating with the communication device 151 selected on the selection screen 510. Specifically, for example, CPU 103 executes processes for installing a printer driver corresponding to the communication device 151 on the terminal device 101. Afterward, CPU 103 terminates the flowchart processing.
[0176] In S905, which is executed when the determination in S901 is affirmative, CPU 103 determines whether to perform connection setup processing. Specifically, in S905, CPU 103 determines whether terminal device 101 is currently connected to a network via Wi-Fi. CPU 103 determines whether the function of using IPv4 is enabled on terminal device 101. CPU 103 determines whether a wireless profile corresponding to the network to which terminal device 101 is currently connected via Wi-Fi has been obtained. These determinations are made using the information obtained in S818. Then, if all determinations are affirmative, it corresponds to determining that connection setup processing will be performed. Then, if at least one determination is negative, it corresponds to determining that connection setup processing will not be performed. When CPU 103 makes an affirmative determination, CPU 103 proceeds to S926; and when CPU 103 makes a negative determination, CPU 103 proceeds to S906.
[0177] In S906, the CPU 103 displays an interface selection screen that accepts the user's selection of the interface used for the connection between the terminal device 101 and the communication device 151. In this embodiment, the interface selection screen allows selection of one of the following: an interface corresponding to a wireless LAN, an interface corresponding to a wired LAN, or an interface corresponding to a USB. In other words, the interface selection screen is used to select the connection method between the terminal device 101 and the communication device 151, and allows selection of one of the following as the connection method: wireless LAN, wired LAN, or USB.
[0178] In S907, CPU 103 determines whether an interface corresponding to wireless LAN has been selected on the interface selection screen. When CPU 103 makes an affirmative determination, CPU 103 proceeds to S909; and when CPU 103 makes a negative determination, CPU 103 proceeds to S908. Specifically, a negative determination occurs, for example, when the interface selected on the interface selection screen is an interface corresponding to wired LAN or an interface corresponding to USB.
[0179] In S908, which is executed when the determination in S907 is negative, CPU 103 performs processing corresponding to the interface selected on the interface selection screen. Specifically, for example, CPU 103 displays a screen prompting the user to establish a connection between terminal device 101 and communication device 151 using the interface selected on the interface selection screen. CPU 103 searches the interface selection screen for communication device 151 on the network to which the selected interface is connected. Then, when communication device 151 is found, CPU 103 performs various settings to enable communication with communication device 151 using the interface selected on the interface selection screen. Specifically, for example, CPU 103 performs processing to install a printer driver corresponding to communication device 151 on terminal device 101. Afterwards, CPU 103 terminates the flowchart processing.
[0180] In S909, which is executed when the determination in S907 is affirmative, CPU 103 determines whether App B has been started through the processing in S803. This processing is similar to that in S805. When the determination is affirmative, CPU 103 proceeds to S915; and when the determination is negative, CPU 103 proceeds to S910.
[0181] In S910, which is executed when the determination in S909 is negative, CPU 103 calls a predefined API using App A. This process is similar to that in S806.
[0182] In S911, CPU 103 determines whether App A is allowed to use location-based services. This process is similar to that in S807. If the determination is affirmative, CPU 103 proceeds to S923; if the determination is negative, CPU 103 proceeds to S912.
[0183] In S912, which is executed when the determination in S910 is negative, the CPU 103 identifies the type of user account currently logged into the terminal device 101 and determines whether the identified account is an administrator account (or a standard user account).
[0184] This process is similar to that of S804. When the determination is affirmative, CPU 103 proceeds to S913; and when the determination is negative, CPU 103 proceeds to S919.
[0185] In S913, which is executed when the confirmation in S912 is affirmative, CPU 103 displays a guide screen prompting the user to allow App A to use location-based services. This process is similar to that in S809. When button 1013 is pressed, CPU 103 proceeds to S914.
[0186] In S914, CPU 103 again determines whether App A is allowed to use the location-based service. This process is similar to that in S911. When the user allowed App A to use the location-based service by displaying a guide screen in S912, this determination is affirmative. When the determination is affirmative, CPU 103 proceeds to S923; and when the determination is negative, CPU 103 proceeds to S922.
[0187] In S915, which is executed when the determination in S909 is affirmative, CPU 103 calls a predefined API using App A. This process is similar to that in S806.
[0188] In S916, CPU 103 causes App A to instruct App B to call a predefined API. This process is similar to that in S813.
[0189] In S917, CPU 103 determines whether App A and App B are allowed to use the location-based service. This process is similar to that in S814. If the determination is affirmative, CPU 103 proceeds to S923; if the determination is negative, CPU 103 proceeds to S918.
[0190] In S918, which is executed when the determination in S917 is negative, the CPU 103 identifies the type of user account currently logged into the terminal device 101 and determines whether the identified account is an administrator account (or a standard user account).
[0191] This process is similar to that of S804. When the determination is affirmative, CPU 103 proceeds to S920; and when the determination is negative, CPU 103 proceeds to S919.
[0192] In S919, which is executed when the determination in S912 is negative or when the determination in S918 is negative, CPU 103 stores the current settings regarding the permission for App A and App B to use the location-based service in memory. In other words, CPU 103 stores information in memory indicating settings corresponding to the fact that App A and App B are not allowed to use the location-based service. Afterwards, CPU 103 proceeds to S922. It is also possible not to execute S919. In other words, App A does not need to manage the current settings regarding the permission for App A and App B to use the location-based service. In this configuration, when the determination in S912 is negative or when the determination in S918 is negative, CPU 103 proceeds to S922 without executing S919.
[0193] In S920, which is executed when the confirmation in S918 is affirmative, CPU 103 displays a guide screen prompting the user to allow App A and App B to use the location-based service. This process is similar to that in S816. When button 1003 is pressed, CPU 103 proceeds to S921.
[0194] In S921, CPU 103 again determines whether App A and App B are allowed to use the location-based service. This process is similar to that in S917. When the user allowed App A to use the location-based service by displaying a guide screen in S912, this determination is affirmative. When the determination is affirmative, CPU 103 proceeds to S923; when the determination is negative, CPU 103 proceeds to S922.
[0195] In S922, which is executed when the determination in S914 is negative or when the determination in S921 is negative, the CPU 103 displays a guide screen for manual connection as part of the manual connection process. This process is similar to the process in S412. Afterwards, the process in this flowchart ends.
[0196] As described above, when it is determined to be affirmative in S911, S914, S917, or S921, S923 is executed. Then, in S923, the CPU 103 displays a boot screen for operating the communication device 151 in connection setting mode, as a process for performing connection setting procedures. This process is similar to the process in S413. The boot screen displayed in S923 may include a button for connecting the communication device 151 to any network without performing connection setting procedures. Then, when this button is activated, the CPU 103 can proceed to S922.
[0197] In S924, CPU 103 obtains information about the network that terminal device 101 is currently connected to via Wi-Fi. This process is similar to that in S818.
[0198] In S925, CPU 103 determines whether the communication device 151 operating in connection setting mode has been found through the processing in S924. This processing is similar to that in S901.
[0199] When the determination is affirmative, CPU 103 proceeds to S926; and when the determination is negative, CPU 103 returns to S924 and continues searching for communication device 151 operating in connection setting mode.
[0200] In S926, CPU 103 executes connection setup processing for communication device 151. This processing is similar to that in S415. When S926 is executed after S925, communication device 151, which is the target of the connection setup processing and the target to which terminal device 101 connects in S701, is assumed to be the communication device 151 discovered in S924 and operating in connection setup mode. When S926 is executed after the determination in S905 is affirmative, communication device 151, which is the target of the connection setup processing and the target to which terminal device 101 connects in S701, is assumed to be the communication device 151 discovered in S818 and operating in connection setup mode. The information obtained in S818 or S924 is used for the connection setup processing executed in S926, and not in... Figure 7 The flowchart description describes the information obtained in S408. Afterwards, CPU 103 terminates the processing of this flowchart.
[0201] Using this construct, App A can determine whether App B is allowed to use the location-based service. Then, when it is determined that App B is not allowed to use the location-based service, App A can execute the processing to allow App B to use the location-based service.
[0202] The above description has outlined the structure of a pre-ordered app as a UWP app; however, the structure is not limited to this. For example, a pre-ordered app could be an app constructed by packaging a UWP app and a desktop app using a mechanism such as a desktop bridge. Here, the packaged desktop app is a different desktop app from App B, and App B is installed separately from the packaged desktop app on the terminal device 101. In this construction, the pre-ordered app includes a module corresponding to the UWP app and a module corresponding to the desktop app. Then, in this construction, the module corresponding to the desktop app included in the pre-ordered app can be used for implementation. Figure 8 And the processing of the flowchart in Figure 9. In other words, Figure 8 The processing described in the flowchart of Figure 9 as being performed by a predetermined app can be a process performed by a module within the predetermined app corresponding to the desktop app. Even when the OS operating on the terminal device 101 is an S-mode OS, the module within the predetermined app corresponding to the desktop app can still perform the processing.
[0203] Other embodiments
[0204] In the above embodiments, the connection between the communication device 151 operating in connection setup mode and the terminal device 101 has been described as a Wi-Fi configuration; however, this configuration is not limited to this. The connection between the communication device 151 operating in connection setup mode and the terminal device 101 can be established using communication methods other than Wi-Fi (such as Bluetooth Classic and Bluetooth Low Energy). In this configuration, even when establishing a connection between the communication device 151 operating in connection setup mode and the terminal device 101, the terminal device 101 can maintain a Wi-Fi connection with the AP. In this configuration, a predetermined API is not used in the process of searching for the communication device 151 operating in connection setup mode, but a predetermined API is used in the process of, for example, obtaining information about the AP to which the terminal device 101 is connected. Therefore, a determination is made as to whether a predetermined app is allowed to use location-based services.
[0205] This disclosure is also implemented by providing a recording medium to a system or apparatus, on which program code of software implementing the functions of the above embodiments is recorded. In other words, this disclosure is also implemented by a computer (or CPU or MPU) of a system or apparatus that reads and executes program code stored in the recording medium. In this case, the program code read from the recording medium itself implements the functions of the above embodiments, and the recording medium storing the program code constitutes this disclosure.
[0206] Examples of recording media used to provide program code include floppy disks, hard disk drives, optical disks, magneto-optical disks, CD-ROMs, CD-Rs, magnetic tapes, non-volatile memory cards, ROMs, and DVDs.
[0207] Of course, this disclosure also includes situations where an OS or similar operating system on a computer performs some or all of the actual processing based on instructions from program code read by the computer and achieves the functions of the above embodiments through these processing.
[0208] The embodiments disclosed herein can also be implemented as follows: a computer of a system or apparatus that reads and executes computer-executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be more fully referred to as a "non-transitory computer-readable storage medium") to perform one or more functions of the above-described embodiments, and / or, the system or apparatus includes one or more circuits (e.g., application-specific integrated circuits (ASICs)) for performing one or more functions of the above-described embodiments; and a method performed by the computer of the system or apparatus, for example, reading and executing the computer-executable instructions from the storage medium to perform one or more functions of the above-described embodiments, and / or, controlling the one or more circuits to perform one or more functions of the above-described embodiments. The computer may include one or more processors (e.g., a central processing unit (CPU), a microprocessor unit (MPU)) and may include separate computers or a network of separate processors to read and execute the computer-executable instructions. The computer-executable instructions may be provided to the computer, for example, from a network or a storage medium. The storage medium may include, for example, a hard disk, random access memory (RAM), read-only memory (ROM), the memory of a distributed computing system, or an optical disc (such as a compact disc (CD), a digital versatile optical disc (DVD), or a Blu-ray disc (BD)). TM One or more of the following: flash memory devices and memory cards.
[0209] Although this disclosure has been described with reference to embodiments, it should be understood that this disclosure is not limited to the disclosed embodiments. The scope of the appended claims should be given the broadest interpretation to cover all such variations and equivalent structures and functions.
Claims
1. A control method for an information processing apparatus having a predetermined application program, the control method comprising: calling a predetermined application programming interface (API) for acquiring predetermined information acquired by the information processing apparatus using a wireless local area network (LAN) function from an operating system (OS) of the information processing apparatus; determining whether acquisition of the predetermined information by the predetermined application program through calling the predetermined API is successful; and based on the acquisition of the predetermined information by the predetermined application program being successful, not performing a predetermined process for causing a user to perform an operation of permitting the predetermined application program to use a location-based service, and based on the predetermined application program failing to acquire the predetermined information, performing the predetermined process, wherein when the predetermined application program is permitted to use the location-based service, the acquisition of the predetermined information by the predetermined application program through calling the predetermined API is successful, and when the predetermined application program is not permitted to use the location-based service, the acquisition of the predetermined information by the predetermined application program fails even when the predetermined API is called.
2. The control method according to claim 1, further comprising determining whether a user account logged into the information processing apparatus is an administrator account, wherein based on the predetermined application program failing to acquire the predetermined information and determining that the user account logged into the information processing apparatus is an administrator account, performing the predetermined process. when determining that the user account logged into the information processing apparatus is not an administrator account, not performing the predetermined process even when the predetermined application program is not permitted to use the location-based service.
3. The control method according to claim 2, wherein 4. The control method according to claim 1, further comprising performing a connection setting process for connecting a communication apparatus outside the information processing apparatus to any network using the predetermined information acquired through calling the predetermined API.
5. The control method according to claim 4, wherein the predetermined information used in the connection setting process and acquired through calling the predetermined API includes information on a list of wireless networks accessible to the information processing apparatus, the connection setting process includes a process of detecting a network formed by the communication apparatus operating in a mode for the connection setting process among the list of wireless networks accessible to the information processing apparatus, and a process of establishing a connection between the information processing apparatus and the network formed by the communication apparatus operating in the mode for the connection setting process, and information for connecting a communication apparatus to any network is transmitted to a communication apparatus via a connection between the information processing apparatus and the network formed by the communication apparatus operating in the mode for the connection setting process.
6. The control method according to claim 4, wherein, The predetermined information used in the connection setting processing and acquired by calling the predetermined API includes information about a network to which the information processing apparatus is connected via wireless LAN at the time of calling the predetermined API, and The connection setting processing includes a process of transmitting, to the communication apparatus, information about a network to which the information processing apparatus is connected via wireless LAN at the time of calling the predetermined API.
7. The control method according to claim 6, wherein The information about a network to which the information processing apparatus is connected via wireless LAN at the time of calling the predetermined API includes identification information and a password of a network to which the information processing apparatus is connected via wireless LAN at the time of calling the predetermined API.
8. The control method according to claim 4, wherein The predetermined information used in the connection setting processing is acquired by calling the predetermined API after determining whether or not the predetermined application succeeds in acquiring the predetermined information.
9. The control method according to claim 4, wherein The predetermined API for acquiring the predetermined information used for determining whether or not the predetermined application succeeds in acquiring the predetermined information is different from the predetermined API for acquiring the predetermined information used in the connection setting processing.
10. The control method according to claim 1, further comprising executing a display process to display a screen about a radio wave condition between the information processing apparatus and an access point to which the information processing apparatus is connected, using the predetermined information acquired by calling the predetermined API.
11. The control method according to claim 10, wherein The predetermined information used in the display process and acquired by calling the predetermined API includes information about a radio wave condition between the information processing apparatus and an access point to which the information processing apparatus is connected.
12. The control method according to claim 10, further comprising receiving, from a communication apparatus outside the information processing apparatus, information about a radio wave condition between the communication apparatus and an access point to which the communication apparatus is connected, without calling the predetermined API, wherein The screen about a radio wave condition between the communication apparatus and an access point to which the communication apparatus is connected is further displayed using the information about a radio wave condition between the communication apparatus and the access point to which the communication apparatus is connected.
13. The control method according to claim 1, executed by a different application program different from the predetermined application program, the control method further comprising: providing an instruction to call the predetermined API; determining whether or not the different application program succeeds in acquiring the predetermined information by calling the predetermined API; based on the different application program succeeding in acquiring the predetermined information, not executing a specific process for causing a user to perform an operation of permitting the different application program to use the location-based service, and based on the different application program failing to acquire the predetermined information, executing the specific process, wherein when the different application program is permitted to use the location-based service, the different application program succeeds in acquiring the predetermined information by calling the predetermined API by the different application program, and When the different application program is not allowed to use the location-based service, the acquisition of the predetermined information by the different application program fails even when the different application program calls the predetermined API.
14. The control method according to claim 13, further comprising performing connection setting processing for causing a communication device outside the information processing device to connect to any one of networks using the predetermined information acquired by the predetermined application program calling the predetermined API and the predetermined information acquired by the different application program calling the predetermined API.
15. The control method according to claim 14, wherein the predetermined information acquired by the different application program calling the predetermined API includes a password of any network, and the connection setting processing includes processing of transmitting information including the password of the any network to the communication device.
16. The control method according to claim 13, wherein the predetermined application program is a Universal Windows Platform (UWP) application or a combination package of a UWP application and a desktop application, and the different application program is a desktop application.
17. The control method according to claim 1, wherein the predetermined processing is processing of displaying a screen for causing a user to perform an operation of allowing the predetermined application program to use the location-based service.
18. The control method according to claim 1, further comprising transmitting a print job for causing a communication device outside the information processing device to perform printing to the communication device.
19. An information processing device having a predetermined application program, the information processing device comprising: a calling unit configured to call, from an operating system (OS) of the information processing device, a predetermined API for acquiring predetermined information acquired by the information processing device using a wireless local area network (LAN) function; a first determination unit configured to determine whether acquisition of the predetermined information by the predetermined application program through calling of the predetermined API is successful; a first execution unit configured to, based on the acquisition of the predetermined information by the predetermined application program being successful, not perform predetermined processing for causing a user to perform an operation of allowing the predetermined application program to use a location-based service, and based on the predetermined application program failing to acquire the predetermined information, perform the predetermined processing, wherein the acquisition of the predetermined information by the predetermined application program through calling of the predetermined API is successful when the predetermined application program is allowed to use the location-based service, and the acquisition of the predetermined information by the predetermined application program fails even when the predetermined API is called when the predetermined application program is not allowed to use the location-based service.
20. A non-transitory storage medium storing a first application program for causing a computer of an information processing device to perform operations of: calling a predetermined application programming interface (API) for acquiring predetermined information acquired by the information processing apparatus using a wireless local area network (LAN) function from an operating system (OS) of the information processing apparatus; determining whether acquisition of the predetermined information by the predetermined application program through calling the predetermined API is successful; and based on the acquisition of the predetermined information by the predetermined application program being successful, not performing a predetermined process for causing a user to perform an operation of permitting the predetermined application program to use a location-based service, and based on the predetermined application program failing to acquire the predetermined information, performing the predetermined process, wherein when the predetermined application program is permitted to use the location-based service, the acquisition of the predetermined information by the predetermined application program through calling the predetermined API is successful, and when the predetermined application program is not permitted to use the location-based service, the acquisition of the predetermined information by the predetermined application program fails even when the predetermined API is called.
Citation Information
Patent Citations
Information processing apparatus, program, and control method
JP2021069052A