Patent Description:
Recent improvements in computing power and wireless networking technology have significantly increased the capabilities of electronic devices. For example, laptop computers, tablet computers, portable media players, smartphones, digital media receivers, video game consoles, and/or other modern electronic devices are typically equipped with WiFi capabilities that allow the electronic devices to retrieve webpages, stream audio and/or video, share desktops and/or user interfaces (UIs), and/or transfer files wirelessly among one another.

However, conventional wireless networking technology may require the use of preexisting access points, cellular radio towers, and/or other structured networks to connect electronic devices to each other and/or the Internet. As a result, network traffic and/or communication between two electronic devices may be limited by the availability, bandwidth, signal strength, latencies, and/or capabilities of structured network components used to transmit the network traffic.

On the other hand, modern electronic devices may be capable of forming wireless ad hoc networks that bypass the use of access points, cellular towers, and/or structured networks to transmit network traffic among nodes of the wireless ad hoc networks. Instead, the electronic devices may use the wireless ad hoc networks to communicate directly with one another, thereby increasing throughput and/or removing limitations associated with transmitting data through the access points and/or structured networks. Consequently, communication among electronic devices may be facilitated by mechanisms for increasing the use of wireless ad hoc networks by the electronic devices.

The present invention provides a method for providing a service by a first electronic device, an electronic device, and a computer-readable storage medium as set out in the appended independent claims. The disclosed embodiments provide a system that provides a service on a first electronic device. During operation, the system uses a virtual access point interface and a discovery protocol to advertise the service on the first electronic device. The virtual access point interface may enable discovery of the service by a second electronic device without an infrastructure connection between the first and second electronic devices. Next, the system uses the virtual access point interface to establish a wireless peer-to-peer connection between the first electronic device and a second electronic device. Finally, the system provides the service to the second electronic device through the wireless peer-to-peer connection.

The system also disables the virtual access point interface upon detecting a termination of advertising for the service.

In some embodiments, the system also uses the infrastructure connection to provide the service to the second electronic device if the infrastructure connection is more robust (e.g., has higher signal strength, greater bandwidth, etc.) than the wireless peer-to-peer connection.

In some embodiments, the system also scans for one or more electronic devices in proximity to the first electronic device. Upon detecting the one or more electronic devices in proximity to the first electronic device, the system uses the discovery protocol to obtain a set of services advertised by the one or more electronic devices. For example, the system may browse for and/or discover services advertised by nearby electronic devices while advertising the service on the first electronic device.

Using the discovery protocol and the virtual access point interface to advertise the service on the first electronic device includes:.

In some embodiments, the advertising request includes a request to advertise the service using a non-infrastructure mechanism.

The discovery request includes one or more service offerings (e.g., advertised services) on the second electronic device. Each of the service offerings may include an advertised identifier for the service offering and data associated with the service offering. The discovery request may enable discovery of the service offering(s) by the first electronic device without requiring the first electronic device to transmit a separate discovery request to the second electronic device and receiving a discovery response from the second electronic device.

In the figures, like reference numerals refer to the same figure elements.

The following description is presented to enable any person skilled in the art to make and use the embodiments, and is provided in the context of a particular application and its requirements.

The data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. The computer-readable storage medium includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs), DVDs (digital versatile discs or digital video discs), or other media capable of storing code and/or data now known or later developed.

The methods and processes described in the detailed description section can be embodied as code and/or data, which can be stored in a computer-readable storage medium as described above. When a computer system reads and executes the code and/or data stored on the computer-readable storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the computer-readable storage medium.

Furthermore, methods and processes described herein can be included in hardware modules or apparatus. These modules or apparatus may include, but are not limited to, an application-specific integrated circuit (ASIC) chip, a field-programmable gate array (FPGA), a dedicated or shared processor that executes a particular software module or a piece of code at a particular time, and/or other programmable-logic devices now known or later developed. When the hardware modules or apparatus are activated, they perform the methods and processes included within them.

The disclosed embodiments provide a method and system for advertising, discovering, and/or using a service on an electronic device. As shown in <FIG>, a number of electronic devices <NUM>-<NUM> are connected to a network <NUM> through network links <NUM>-<NUM> provided by devices such as wireless access points, cellular towers, and/or routers. Electronic devices <NUM>-<NUM> may correspond to personal computers, laptop computers, tablet computers, mobile phones, portable media players, digital media receivers, video game consoles, printers, scanners, and/or other network-enabled electronic devices. Network <NUM> may include a local area network (LAN), wide area network (WAN), personal area network (PAN), virtual private network, intranet, mobile phone network (e.g., a cellular network), WiFi network, Ethernet network, and/or other type of network with existing infrastructure (e.g., network links <NUM>-<NUM>) that facilitates communication among electronic devices (e.g., electronic devices <NUM>-<NUM>) connected to network <NUM>.

Electronic devices <NUM>-<NUM> may communicate with one another and/or with other electronic devices or servers through network <NUM>. For example, electronic device <NUM> may use a discovery protocol such as Bonjour (Bonjour™ is a registered trademark of Apple Inc. ) to advertise services on electronic device <NUM> to electronic device <NUM> and/or other electronic devices on network <NUM>. In turn, electronic device <NUM> may use the discovery protocol and network <NUM> to discover (e.g., detect) the services on electronic device <NUM>. Finally, electronic device <NUM> may use the services by connecting to electronic device <NUM> through network <NUM> and accessing the services. For example, electronic device <NUM> may use the discovery protocol and network <NUM> to access services for transferring files, streaming media, printing, collaborating on documents, and/or sharing desktops on electronic device <NUM>.

However, communication between electronic devices <NUM>-<NUM> may be limited by the availability, bandwidth, and/or capabilities of network links <NUM>-<NUM> and/or network <NUM>. For example, each electronic device <NUM>-<NUM> may be unable to discover and/or use services on other electronic devices in the absence of a structured network (e.g., network <NUM>) connecting the electronic device to the other electronic devices.

In one or more embodiments, electronic devices <NUM>-<NUM> include functionality to advertise, discover, and/or use services with one another in the absence of network links <NUM>-<NUM> and/or other existing network infrastructure between electronic devices <NUM>-<NUM>. As shown in <FIG>, a set of electronic devices <NUM>-<NUM> may be connected through one or more network links <NUM> (e.g., access points, routers, cellular towers, etc.) of a structured network, such as network <NUM> of <FIG>. Conversely, network links <NUM> may not be available (e.g., out of range, secured, etc.) to one or both electronic devices <NUM>-<NUM>, and electronic devices <NUM>-<NUM> may be unable to connect to one another through the structured network.

To enable use of a service <NUM> provided by an application <NUM> on electronic device <NUM> by an application <NUM> on electronic device <NUM> without communicating through network links <NUM> and/or other existing network infrastructure, electronic device <NUM> advertises service <NUM> through a virtual access point interface <NUM> and a discovery protocol <NUM> (e.g., Bonjour). In turn, electronic device <NUM> may discover and use service <NUM> through discovery protocol <NUM> and virtual access point interface <NUM>.

In particular, a discovery apparatus <NUM> on electronic device <NUM> receives an advertising request for service <NUM> from application <NUM>. The advertising request may include a request to advertise service <NUM> using a non-infrastructure mechanism. For example, the advertising request may include a flag and/or indicator for advertising service <NUM> through virtual access point interface <NUM> and/or another ad hoc peer-to-peer mechanism. Alternatively, application <NUM> may be unaware of the availability of virtual access point interface <NUM> on electronic device <NUM>, and the advertising request may omit the request to advertise service <NUM> using virtual access point interface <NUM>.

In response to the advertising request, discovery apparatus <NUM> and/or a communication apparatus <NUM> on electronic device <NUM> may enable virtual access point interface <NUM>. For example, communication apparatus <NUM> may activate virtual access point interface <NUM> after receiving the advertising request and/or a request to activate virtual access point interface <NUM> from discovery apparatus <NUM>. To create virtual access point interface <NUM>, communication apparatus <NUM> may configure a radio on electronic device <NUM> to operate as a "lightweight" access point and/or provide a wireless ad hoc network.

Communication apparatus <NUM> may also include functionality to connect to a structured network (e.g., through network links <NUM>) while providing virtual access point interface <NUM>. For example, communication apparatus <NUM> may concurrently provide network connectivity through a connection with a WiFi network and an ad hoc mechanism for advertising service <NUM> through virtual access point interface <NUM>.

To advertise service <NUM>, discovery apparatus <NUM> and/or communication apparatus <NUM> may enable the detection of virtual access point interface <NUM> and/or service <NUM> by other electronic devices (e.g., electronic device <NUM>) in proximity to electronic device <NUM>. For example, discovery apparatus <NUM> and/or communication apparatus <NUM> may periodically transmit a beacon frame containing information about virtual access point interface <NUM> and/or service <NUM>. The beacon frame may specify a set of capabilities, supported data rates, and/or an identifier (e.g., an <NUM> service set identifier (SSID)) for virtual access point interface <NUM>. The beacon frame may also include one or more information elements describing service <NUM>, support for discovery protocol <NUM>, and/or other unique attributes of virtual access point interface <NUM>. Discovery apparatus <NUM> and/or communication apparatus <NUM> may also receive probe request frames from the other electronic devices and transmit probe response frames containing the same information as the beacon frame to the other electronic devices.

As shown in <FIG>, electronic device <NUM> may also include a discovery apparatus <NUM> and a communication apparatus <NUM>. Discovery apparatus <NUM> and/or communication apparatus <NUM> may include functionality to detect virtual access point interface <NUM>, even if discovery apparatus <NUM> and/or communication apparatus <NUM> do not include functionality to provide a separate virtual access point interface on electronic device <NUM>. For example, discovery apparatus <NUM> may receive a browse request from application <NUM> to browse and/or scan for services advertised on nearby electronic devices, such as electronic device <NUM>. Communication apparatus <NUM> may scan for the nearby electronic devices by transmitting a probe request frame on each channel of one or more <NUM> bands supported by communication apparatus <NUM>. During the scan, communication apparatus <NUM> may receive a beacon frame and/or a probe response frame on the channel used by communication apparatus <NUM>. Moreover, the beacon frame and/or probe response frame may include information about virtual access point <NUM> and/or service, as described above.

Next, discovery apparatus <NUM> and/or communication apparatus <NUM> may perform discovery of service <NUM> using information obtained during the scan for nearby electronic devices. To initiate discovery of service <NUM>, discovery apparatus <NUM> and/or communication apparatus <NUM> may use discovery protocol <NUM> to transmit a discovery request <NUM> for service <NUM> to electronic device <NUM>. For example, discovery apparatus <NUM> and/or communication apparatus <NUM> may transmit discovery request <NUM> as a Generic Advertisement Service (GAS) frame containing a browsed identifier for service <NUM>. The browsed identifier may be provided by application <NUM> in the browse request to discovery apparatus <NUM>. In other words, the browsed identifier may identify service <NUM> as a service that application <NUM> is interested in using.

The discovery request <NUM> also includes one or more service offerings on electronic device <NUM>. For example, discovery request <NUM> may include advertised identifiers (e.g., service types) for the service offerings, data associated with the service offerings, and/or other information that enables discovery of the service offerings by electronic device <NUM>. In other words, discovery request <NUM> may provide information about services advertised on electronic device <NUM> and request information about services advertised on electronic device <NUM> at the same time. Discovery request <NUM> may thus facilitate mutual and/or "symmetric" discovery of services between electronic devices <NUM>-<NUM>, as discussed in further detail below with respect to <FIG>.

In response to discovery request <NUM>, discovery apparatus <NUM> and/or communication apparatus <NUM> may generate a discovery response <NUM> to discovery request <NUM>. Discovery response <NUM> may include data associated with service <NUM>. For example, discovery response <NUM> may include the browsed identifier (e.g., service type) for service <NUM>, a unique name for service <NUM>, and/or other information that allows electronic device <NUM> to sufficiently discover service <NUM>. Discovery apparatus <NUM> and/or communication apparatus <NUM> may then complete discovery of service <NUM> by electronic device <NUM> by transmitting discovery response <NUM> to electronic device <NUM>.

While service <NUM> is being advertised and/or discovered, discovery apparatus <NUM> and/or communication apparatus <NUM> may also perform discovery of services advertised by electronic devices in proximity to electronic device <NUM>, such as electronic device <NUM>. For example, application <NUM> may send a browse request to discovery apparatus <NUM>, and discovery apparatus <NUM> and/or communication apparatus <NUM> may scan for nearby electronic devices by sending probe request frames over a range of <NUM> channels and receiving probe response frames for the probe request frames from the nearby electronic devices. Discovery apparatus <NUM> and/or communication apparatus <NUM> may then use information from the browse request, probe response frames, and/or discovery protocol <NUM> to transmit discovery requests to the nearby electronic devices and receive discovery responses to the discovery requests from the nearby electronic devices.

Once a service (e.g., service <NUM>) is discovered by an electronic device (e.g., electronic device <NUM>), the service may be used by the electronic device. For example, communication apparatus <NUM> may use the unique name for service <NUM> from discovery response <NUM> to perform a Domain Name System (DNS) lookup of the network address, port number, and/or other configuration information for accessing service <NUM> on electronic device <NUM>. Alternatively, communication apparatus <NUM> may obtain the configuration information directly from discovery response <NUM>. Communication apparatus <NUM> may subsequently use the configuration information and virtual access point interface <NUM> to establish a wireless peer-to-peer connection <NUM> with electronic device <NUM>, and electronic device <NUM> may use service <NUM> through wireless peer-to-peer connection <NUM>.

As mentioned above, electronic devices <NUM>-<NUM> may also be connected through an infrastructure connection provided by network links <NUM> and/or other existing network infrastructure. If the infrastructure connection is available and associated with a more robust connection (e.g., higher signal strength, more bandwidth, etc.) than wireless peer-to-peer connection <NUM>, communication apparatuses <NUM>-<NUM> may use the infrastructure connection to provide service <NUM> to electronic device <NUM>. Conversely, if no infrastructure connection is available and/or the infrastructure connection is less robust than wireless peer-to-peer connection <NUM>, electronic device <NUM> may continue to use wireless peer-to-peer connection <NUM> to access service <NUM> until use of service <NUM> by electronic device <NUM> is complete.

Discovery apparatus <NUM> and/or communication apparatus <NUM> may also continue advertising service <NUM> and/or providing virtual access point interface <NUM> until a termination of advertising for service <NUM> is received from application <NUM>. For example, application <NUM> may transmit a request to terminate advertising for service <NUM> to discovery apparatus <NUM>, and discovery apparatus <NUM> may discontinue advertising of service <NUM> through virtual access point interface <NUM>. Communication apparatus <NUM> may also disable virtual access point interface <NUM> if no other services are being advertised through virtual access point interface <NUM>.

Consequently, virtual access point interface <NUM> may allow electronic devices <NUM>-<NUM> to advertise, discover, and use services (e.g., service <NUM>) with one another in the absence of an infrastructure connection between electronic devices <NUM>-<NUM>. In addition, advertising of services on each electronic device may be streamlined by enabling a virtual access point interface (e.g., virtual access point interface <NUM>) upon receiving advertising requests for the services instead of after negotiating with other electronic devices to select a provider of the virtual access point interface. Finally, transmission of discovery requests (e.g., discovery request <NUM>) containing service offerings may enable the "symmetric" discovery of services between electronic devices <NUM>-<NUM> and reduce delays associated with conventional, "asymmetric" service discovery that requires the transmission of discovery requests and discovery responses by both electronic devices <NUM>-<NUM> to mutually discover services on electronic devices <NUM>-<NUM>.

Those skilled in the art will appreciate that the system of <FIG> may be implemented in a variety of ways. First, discovery apparatuses <NUM>-<NUM> and communication apparatuses <NUM>-<NUM> on each electronic device <NUM>-<NUM> may be provided by the same software and/or hardware component, or discovery apparatuses <NUM>-<NUM> and communication apparatuses <NUM>-<NUM> may execute independently from one another. For example, discovery apparatuses <NUM>-<NUM> and communication apparatuses <NUM>-<NUM> may be implemented using different combinations of an application processor, a baseband processor, a multi-core processor, a single-core processor, an operating system kernel, a standalone application, and/or a driver.

Second, electronic devices <NUM>-<NUM> may use various techniques to advertise and discover services. For example, electronic devices <NUM>-<NUM> may use different types and/or sequences of <NUM> frames and/or other networking mechanisms to scan for other electronic devices, discover services on the other electronic devices, and/or advertise services to the other electronic devices.

<FIG> shows a discovery request <NUM> and a discovery response <NUM> in accordance with the disclosed embodiments. Discovery request <NUM> and discovery response <NUM> may allow a service on a first electronic device (e.g., electronic devices <NUM>-<NUM> of <FIG>) to be discovered by a second electronic device. As a result, discovery request <NUM> may be transmitted by the second electronic device to initiate discovery of the service on the first electronic device. To identify the service, discovery request <NUM> may include a browsed identifier <NUM> for the service. For example, the second electronic device may obtain a Bonjour service type for the service from an application on the second electronic device that is interested in using the service. The second electronic device may include the Bonjour service type as browsed identifier <NUM> in discovery request <NUM> to request more information about the service.

As shown in <FIG>, discovery request <NUM> may also include a set of advertised identifiers <NUM> and a set of data <NUM>. As mentioned above, advertised identifiers <NUM> and data <NUM> specify one or more service offerings (e.g., advertised services) on the second electronic device. For example, advertised identifiers <NUM> may be service types for the service offerings, and data <NUM> may include unique names for the service offerings, descriptions of the service offerings, and/or other information that enables discovery of the service offerings by the first electronic device and/or other nearby electronic devices. Furthermore, advertised identifiers <NUM> and data <NUM> may apply to service offerings that are analogous and/or related to the service, or advertised identifiers <NUM> and data <NUM> may describe a variety of service offerings on the second electronic device, including those not related to the service.

The first electronic device may generate discovery response <NUM> in response to discovery request <NUM> and transmit discovery response <NUM> to the second electronic device. Because discovery request <NUM> contains advertised identifiers <NUM> and data <NUM>, the first electronic device may omit the transmission of a different discovery request to the second electronic device to discover services (e.g., the service offerings) advertised by the second electronic device.

Like discovery request <NUM>, discovery response <NUM> may include browsed identifier <NUM> to identify the service being discovered. Discovery response <NUM> may also include data <NUM> associated with the service. For example, discovery response <NUM> may include a unique name for the service, a description of the service, a graphic (e.g., icon) related to the service, and/or other information related to discovery of the service. Once discovery response <NUM> is received by the second electronic device, each electronic device will have discovered one or more services on the other electronic device.

The first and/or second electronic devices may use information in discovery request <NUM> and/or discovery response <NUM> to use the service. More specifically, the second electronic device may use data <NUM> from discovery response <NUM> to establish a network connection (e.g., wireless peer-to-peer connection, infrastructure connection, etc.) with the first electronic device. Alternatively, the first electronic device may use data <NUM> from discovery request <NUM> to initiate the network connection with the second electronic device. Once the network connection is initiated, the first electronic device may provide the service to the second electronic device through the network connection, or the first electronic device may initiate use of an analogous and/or related service on the second electronic device.

For example, the first and second electronic devices may both advertise a peer-to-peer file transfer service and use discovery request <NUM> and discovery response <NUM> to perform "symmetric" discovery of the peer-to-peer file transfer service. Each electronic device may then use information from discovery request <NUM> and/or discovery response <NUM> to establish a peer-to-peer connection with the other electronic device and transfer a file over the peer-to-peer connection to the other electronic device.

<FIG> shows a flowchart illustrating the process of providing a service on a first electronic device in accordance with the disclosed embodiments. In one or more embodiments, one or more of the steps may be omitted, repeated, and/or performed in a different order. Accordingly, the specific arrangement of steps shown in <FIG> should not be construed as limiting the scope of the embodiments.

Initially, a virtual access point interface and a discovery protocol are used to advertise the service on the first electronic device. To advertise the service, the virtual access point interface is enabled in response to an advertising request for the service from an application providing the service (operation <NUM>). The virtual access point interface may be enabled by configuring a radio on the electronic device to operate as a "lightweight" access point and/or provide a wireless ad hoc network. The advertising request may include a request to advertise the service using a non-infrastructure mechanism.

A browse request may also be received (operation <NUM>) from the application. If the browse request is received, a scan for one or more electronic devices in proximity to the first electronic device is performed (operation <NUM>). The scan may occur in response to a browse request from the application to the first electronic device. In addition, the scan may be performed independently of advertising of the service for the application. During the scan, a probe request frame may be transmitted on each channel of one or more bands used for wireless communication by the first electronic device. Probe response frames to the probe request frame may then be received from one or more electronic devices in proximity to the first electronic device. Once the electronic device(s) are detected by the scan, a discovery protocol is used to obtain a set of services advertised by the electronic device(s) (operation <NUM>), as discussed in further detail below with respect to <FIG>. In other words, discovery of services on other electronic devices may be performed by the first electronic device at the same time as advertising of the service to the other electronic devices. If no browse request is received, scanning and/or browsing of services on other electronic devices may not be performed by the first electronic device.

A discovery request may be received (operation <NUM>) from a second electronic device through the virtual access point interface. If a discovery request is not received, discovery of the service may not be performed. If a discovery request is received, a discovery response to the discovery request is transmitted (operation <NUM>). The discovery response may contain information that allows the second electronic device to discover the service. In addition, the discovery request includes one or more service offerings on the second electronic device, thus enabling discovery of the service offering(s) on the first electronic device without transmitting a separate discovery request to the second electronic device and receiving a discovery response from the second electronic device.

Next, the virtual access point interface is used to establish a wireless peer-to-peer connection between the first and second electronic devices (operation <NUM>), and the service is provided to the second electronic device through the wireless peer-to-peer connection (operation <NUM>). For example, the second electronic device may establish the wireless peer-to-peer connection by connecting to the virtual access point interface using information in a probe response frame from the first electronic device. The second electronic device may then use information from the discovery response and the wireless peer-to-peer connection to transfer files, share desktops, collaborate on documents, stream audio and/or video, and/or perform a print job with the first electronic device.

An infrastructure connection between the first and second electronic devices may be available and more robust (operation <NUM>) than the wireless peer-to-peer connection. For example, the first and second electronic devices may be connected through a WiFi access point with higher signal strength and/or greater bandwidth than the wireless peer-to-peer connection. If the infrastructure connection is more robust than the wireless peer-to-peer connection, the infrastructure connection is used to provide the service to the second electronic device (operation <NUM>). If the infrastructure connection is not more robust than the wireless peer-to-peer connection, the wireless peer-to-peer connection may continue to be used to provide the service to the second electronic device.

A termination of advertising for the service may be detected (operation <NUM>). For example, the termination of advertising may be detected upon receiving a request from the application to discontinue advertising the service. If termination of advertising for the service is not detected, scanning and service discovery may continue to be performed on nearby electronic devices (operations <NUM>-<NUM>) in conjunction with advertising of the service to the electronic devices (operations <NUM>-<NUM>) and use of the service by the other electronic devices (operations <NUM>-<NUM>). If termination of advertising for the service is detected, the virtual access point interface is disabled (operation <NUM>), and the service is no longer advertised and/or offered through the virtual access point interface. Scanning and/or browsing of services from nearby electronic devices (operations <NUM>-<NUM>) may continue until browsing of services is also disabled on the first electronic device.

<FIG> shows a flowchart illustrating the process of using a service on a first electronic device in accordance with the disclosed embodiments. In one or more embodiments, one or more of the steps may be omitted, repeated, and/or performed in a different order. Accordingly, the specific arrangement of steps shown in <FIG> should not be construed as limiting the scope of the embodiments.

First, a browse request containing a browsed identifier for the service is obtained on the second electronic device (operation <NUM>). For example, the second electronic device may obtain the browse request from an application on the second electronic device interested in using the service on nearby electronic devices, including the first electronic device.

Next, a scan for one or more electronic devices in proximity to the second electronic device is used to detect the first electronic device (operation <NUM>). For example, the first electronic device may be detected by transmitting a probe request on a channel used by the first electronic device and receive a probe response to the probe request from the first electronic device.

After the first electronic device is detected, a discovery protocol is used to transmit a discovery request containing the browsed identifier and one or more service offerings on the second electronic device to the first electronic device (operation <NUM>). Each service offering may include an advertised identifier for the service offering and data associated with the service offering. The service offering(s) may allow the first electronic device to discover services advertised by the second electronic device (e.g., the service offering(s)) without transmitting a separate discovery request to the second electronic device and obtaining a discovery response from the second electronic device, unlike existing and/or conventional service discovery techniques. In other words, the service offering(s) may facilitate "symmetric" discovery of services on the first and second electronic devices, whereas other discovery mechanisms may utilize slower, "asymmetric" discovery mechanisms.

A discovery response to the discovery request is then received from the first electronic device (operation <NUM>) and used to access the service on the first electronic device from the second electronic device (operation <NUM>). For example, the discovery response may include the browsed identifier and data associated with the service. The data may allow the second electronic device to establish a network connection (e.g., wireless peer-to-peer connection, infrastructure connection) with the first electronic device and access the service through the network connection. The first electronic device may also use the data from the second electronic device's discovery request to connect to the second electronic device and use services on the second electronic device.

<FIG> shows a computer system <NUM> in accordance with the disclosed embodiments. Computer system <NUM> may correspond to an apparatus that includes a processor <NUM>, memory <NUM>, storage <NUM>, and/or other components found in electronic computing devices. Processor <NUM> may support parallel processing and/or multi-threaded operation with other processors in computer system <NUM>. Computer system <NUM> may also include input/output (I/O) devices such as a keyboard <NUM>, a mouse <NUM>, and a display <NUM>.

Computer system <NUM> may include functionality to execute various components of the present embodiments. In particular, computer system <NUM> may include an operating system (not shown) that coordinates the use of hardware and software resources on computer system <NUM>, as well as one or more applications that perform specialized tasks for the user. To perform tasks for the user, applications may obtain the use of hardware resources on computer system <NUM> from the operating system, as well as interact with the user through a hardware and/or software framework provided by the operating system.

In one or more embodiments, computer system <NUM> provides a system for providing a service on a first electronic device. The system may include a discovery apparatus that uses a virtual access point interface and a discovery protocol to advertise the service on the first electronic device. The virtual access point interface may enable discovery of the service by a second electronic device without an infrastructure connection between the first and second electronic devices. The system may also include a communication apparatus that provides the virtual access point interface and uses the virtual access point interface to establish a wireless peer-to-peer connection between the first electronic device and a second electronic device. The communication apparatus may also provide the service to the second electronic device through the wireless peer-to-peer connection.

In addition, one or more components of computer system <NUM> may be remotely located and connected to the other components over a network. Portions of the present embodiments (e.g., discovery apparatus, communication apparatus, electronic devices, etc.) may also be located on different nodes of a distributed system that implements the embodiments. For example, the present embodiments may be implemented using a number of electronic devices connected to one another through a set of wireless peer-to-peer connections and/or infrastructure connections.

<FIG> shows an exemplary system for providing a virtual access point interface <NUM> in accordance with the disclosed embodiments. The system may be implemented on an electronic device, such as electronic device <NUM> of <FIG>. As shown in <FIG>, the system includes an application <NUM> that generates an advertising request <NUM> for a service provided by application <NUM>. For example, application <NUM> may request advertising of a peer-to-peer file sharing service on the electronic device.

Application <NUM> may provide advertising request <NUM> to a multicast Domain Name System (mDNS) responder <NUM> that enables advertising of services by applications, and mDNS responder <NUM> may use a plugin <NUM> to transmit advertising request <NUM> to a peer-to-peer (P2P) supervisor <NUM>. Application <NUM>, mDNS responder <NUM>, and P2P supervisor <NUM> may all reside in user space <NUM> on the electronic device.

Next, P2P supervisor <NUM> may transmit a message through a vendor abstraction layer <NUM> (e.g., an application programming interface (API)) to a vendor-specific <NUM> driver <NUM>, and <NUM> driver <NUM> may create a new virtual access point interface <NUM>. For example, <NUM> driver <NUM> may configure an <NUM> radio on the electronic device to provide virtual access point interface <NUM> by acting as a "lightweight" access point to nearby electronic devices. <NUM> driver <NUM> may also configure the radio to connect to a structured WiFi network while providing virtual access point interface <NUM>. Vendor abstraction layer <NUM> and <NUM> driver <NUM> may reside in kernel space <NUM> on the electronic device.

P2P supervisor <NUM> may then advertise the service through beacon frames and/or probe response frames that are transmitted from virtual access point interface <NUM> to nearby electronic devices. P2P supervisor <NUM> may also receive discovery requests from the electronic devices through virtual access point interface <NUM>, generate discovery responses to the discovery requests, and send the discovery responses to the discovery requests through <NUM> driver <NUM> and/or virtual access point interface <NUM>. Finally, P2P supervisor <NUM> may send discovery requests to the electronic devices and receive discovery responses containing services advertised by the electronic devices.

To use the service provided by application <NUM>, a second electronic device may establish a wireless P2P connection with the electronic device through virtual access point interface <NUM> and transmit packets through virtual access point interface <NUM> and a network stack <NUM> on the electronic device to application <NUM>. Application <NUM> may also use the wireless P2P connection, network stack <NUM>, and virtual access point interface <NUM> to transmit packets to the second electronic device, thus providing the service to the second electronic device. Finally, an infrastructure connection between the two electronic devices may be used to provide the service to the second electronic device if the infrastructure connection is available and more robust than the wireless P2P connection.

Claim 1:
A method for providing a service by a first electronic device, comprising:
receiving an advertising request to advertise the service through a virtual access point interface from an application, executing on the first electronic device, that provides the service, wherein the advertising request comprises an indicator for advertising the service through the virtual access point interface;
enabling the virtual access point interface in the first electronic device in response to receiving the advertising request to advertise the service from the application;
using the virtual access point interface and a discovery protocol to advertise the service, wherein the virtual access point interface enables discovery of the service by a second electronic device, wherein using the virtual access point interface to advertise the service further comprises:
receiving a discovery request from the second electronic device through the virtual access point interface, wherein the discovery request comprises one or more service offerings on the second electronic device; and
in response to receiving the discovery request from the second electronic device, transmitting a discovery response to the discovery request through the virtual access point interface, wherein the discovery response comprises information that allows the second electronic device to access the service;
using the virtual access point interface to establish a wireless peer-to-peer connection between the first electronic device and a second electronic device;
providing the service to the second electronic device through the wireless peer-to-peer connection;
detecting a termination of advertising for the service, wherein the detecting comprises receiving a request from the application executing on the first electronic device to discontinue advertising the service; and
disabling the virtual access point interface based at least in part on the detecting.