CN113115294A - Stylus pen connection method and Bluetooth system - Google Patents

Stylus pen connection method and Bluetooth system Download PDF

Info

Publication number
CN113115294A
CN113115294A CN202110436431.2A CN202110436431A CN113115294A CN 113115294 A CN113115294 A CN 113115294A CN 202110436431 A CN202110436431 A CN 202110436431A CN 113115294 A CN113115294 A CN 113115294A
Authority
CN
China
Prior art keywords
electronic device
stylus
pen
stylus pen
bluetooth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110436431.2A
Other languages
Chinese (zh)
Other versions
CN113115294B (en
Inventor
李晓睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110436431.2A priority Critical patent/CN113115294B/en
Publication of CN113115294A publication Critical patent/CN113115294A/en
Priority to PCT/CN2022/070856 priority patent/WO2022222552A1/en
Application granted granted Critical
Publication of CN113115294B publication Critical patent/CN113115294B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The application provides a stylus pen connection method and a Bluetooth system, through convenient and fast presetting operation (for example, double-click, triple-click or long-press operation), can trigger the stylus pen to be connected with unconnected electronic equipment in a matching way, and the method is simple and convenient and has strong adaptability. The method comprises the following steps: in response to detecting the target event, the first stylus transmits a bluetooth broadcast; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a three-click event or a long-press event; in response to scanning the Bluetooth broadcast, the second electronic device displays a connection prompt box; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus; and responding to the operation of the user on the first option, and performing pairing connection on the second electronic equipment and the first stylus.

Description

Stylus pen connection method and Bluetooth system
Technical Field
The application relates to the field of terminals, in particular to a handwriting pen connection method and a Bluetooth system.
Background
A stylus, which may also be referred to as a smart stylus. Because the handwriting pen has the characteristics of high precision and low delay, and the thickness of the handwriting can be determined according to the pressure, the handwriting pen can be generally used as an input device of electronic equipment by a user to perform operations such as writing and drawing on the electronic equipment.
At present, the conventional handwriting pens on the market comprise single-connection handwriting pens and multi-connection handwriting pens. For a single-connection stylus, in a situation where the single-connection stylus has been paired and connected to a first electronic device (e.g., the tablet a), if a user wants the single-connection stylus to reconnect to a second electronic device (e.g., the tablet B), the user needs to magnetically attach the single-connection stylus to a side of the tablet B first, or attach the single-connection stylus to a magnetic rod connected to the tablet B first and then connect the single-connection stylus to the magnetic rod. For the multi-connection stylus pen, the user may first press a key on the body of the multi-connection stylus pen for a long time or insert the multi-connection stylus pen into the flat panel B using a Universal Serial Bus (USB) interface of the multi-connection stylus pen, and then connect the multi-connection stylus pen. For some multi-connection handwriting pens without keys and USB interfaces, the user can magnetically attract the multi-connection handwriting pens to a magnetic attraction rod connected with the flat plate B and then connect the multi-connection handwriting pens.
It can be seen that, in the case that the stylus pen is already paired and connected with one electronic device, if the user wants to connect the stylus pen with another electronic device, in any of the above scenarios, the user is required to perform a complicated operation, which is not user-friendly.
Disclosure of Invention
The application provides a stylus pen connection method and a Bluetooth system, through convenient and fast presetting operation (for example, double-click, triple-click or long-press operation), can trigger the stylus pen to be connected with new electronic equipment (unconnected electronic equipment) in a pairing mode, and the method is simple, convenient and strong in adaptability.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a stylus pen connection method, which is applied to a bluetooth system, where the bluetooth system includes a first stylus pen, a first electronic device, and a second electronic device, the first stylus pen is already paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to detecting the target event, the first stylus transmits a bluetooth broadcast; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a three-click event or a long-press event; in response to scanning the Bluetooth broadcast, the second electronic device displays a connection prompt box; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus;
and responding to the operation of the user on the first option, the second electronic equipment is paired with the first stylus pen, and Bluetooth connection is established with the first stylus pen.
It can be seen that, under the condition that the stylus pen is paired with one electronic device (first electronic device), the user can use the stylus pen to perform any operation such as double-click, triple-click or long-press to trigger the stylus pen to be paired and connected with the unconnected electronic device (second electronic device), so that the method is simple and convenient, can be realized without the functions of a USB interface, magnetic attraction and the like of the stylus pen, and has strong adaptability.
In one possible implementation, in response to detecting the target event, the first stylus transmits a bluetooth broadcast, including: and if the first stylus pen detects the target event and the first stylus pen is not connected with the first electronic device, the first stylus pen sends the Bluetooth broadcast.
It will be appreciated that in the event that the stylus is not connected to the first electronic device, the target event may be considered to have not been initiated by the stylus on the first electronic device. Therefore, the condition that the handwriting pen sends the Bluetooth broadcast is limited, and the condition that the handwriting pen sends the Bluetooth broadcast by mistake can be avoided.
In one possible implementation, in response to detecting the target event, the first stylus transmits a bluetooth broadcast, including:
if the first handwriting pen detects a target event and the first handwriting pen is connected with the first electronic device, the first handwriting pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects the target event; the first stylus receiving a first response from the first electronic device, the first response indicating that the first electronic device did not detect the target event; the first stylus sends a bluetooth broadcast.
It will be appreciated that when the stylus is connected to the first electronic device, but the first response fed back by the first electronic device indicates that the first electronic device does not detect the target event, the target event may also be considered not to have been initiated by the stylus for the first electronic device. Therefore, the situation that the handwriting pen sends the Bluetooth broadcast by mistake can be avoided.
In one possible implementation, in response to scanning for the bluetooth broadcast, the second electronic device displays a connection prompt box, including: if the second electronic equipment scans the Bluetooth broadcast and starts the function of the handwriting pen, the second electronic equipment displays a connection prompt box; wherein the stylus function is used for instructing the second electronic device to display a connection prompt box when the connectable first stylus is found.
It can be seen that, in the case where the second electronic device scans the bluetooth broadcast, the connection prompt box can be displayed when the second electronic device simultaneously activates the function of the stylus pen (the function of instructing the second electronic device to display the connection prompt box when a connectable stylus pen is found). Therefore, the second electronic device can display the connection prompt box when the handwriting pen Bluetooth broadcast is scanned, and error prompt caused by the fact that the second electronic device scans other Bluetooth devices (such as other mobile phones and tablets) to send Bluetooth broadcast pop-up connection prompt boxes can be avoided.
In one possible implementation, the method further includes: if the first handwriting pen is single connection equipment and the first handwriting pen is connected with the first electronic equipment, the first handwriting pen sends a disconnection request to the first electronic equipment, and the disconnection request comprises an identifier of the first handwriting pen; and the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
It can be understood that, since a single-connection device can only establish a bluetooth connection with one device, the first stylus needs to be disconnected from the first electronic device, thereby ensuring that the first stylus can be paired with the second electronic device.
In one possible implementation, the method further includes: if the first handwriting pen is a multi-connection device and is connected with the first electronic device, the first handwriting pen sets the second electronic device as an active device, and the first handwriting pen sets the first electronic device as a non-active device; when the second electronic equipment is set as the active equipment, the first handwriting pen sends pressure sensing data to the second electronic equipment, and the second electronic equipment receives the pressure sensing data; when the first electronic device is set as an inactive device, the first stylus pen does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
It can be understood that, if the first stylus is a multi-connection device, after the first stylus is connected in a pairing manner with the second electronic device, the second electronic device may be set as an active device so as to transmit pressure-sensitive data to the second electronic device, so that the track of the first stylus can be normally displayed on the screen of the second electronic device; by setting the first electronic device as a non-activated device, the first stylus pen does not send pressure data to the first electronic device any more, and the problem that the track of the first stylus pen is displayed on a plurality of electronic devices is avoided.
In one possible implementation, the method further includes: and after the second electronic equipment is successfully connected with the first handwriting pen, displaying reminding information, wherein the reminding information is used for reminding a user that the second electronic equipment is successfully connected with the first handwriting pen.
Therefore, the effect of timely informing the user that the first handwriting pen can be continuously used is achieved by displaying the prompt message when the second electronic device is successfully connected with the first handwriting pen.
In one possible implementation, the first stylus transmits a bluetooth broadcast, including: the first stylus pen sends Bluetooth broadcast within a first preset time.
It can be understood that by limiting the time for the first stylus pen to transmit the bluetooth broadcast, the first stylus pen is prevented from being in a state of transmitting the bluetooth broadcast for a long time, and the power consumption of the first stylus pen can be reduced.
In one possible implementation, the method further includes: and in a first preset time, after the first handwriting pen is successfully connected with the second electronic equipment, the first handwriting pen stops sending the Bluetooth broadcast.
Therefore, the first handwriting pen stops sending the Bluetooth broadcast after being successfully connected with the second electronic device, and the power consumption of the first handwriting pen can be further reduced.
In one possible implementation manner, the first electronic device or the second electronic device is in a screen-off state or a screen-on state; when the first electronic device or the second electronic device is in a bright screen state, the first electronic device or the second electronic device is in a screen locking interface, a main interface or an interface corresponding to an application program.
Therefore, no matter what state the first electronic device and the second electronic device are or what interface is displayed, the stylus pen and the new electronic device (the unconnected electronic device) can be triggered to be connected in a matching mode through convenient and fast preset operation (such as double-click, triple-click or long-press operation), and the method is simple, convenient and strong in adaptability.
In one possible implementation, in response to detecting the target event, the first stylus transmits a bluetooth broadcast, including:
after the first handwriting pen detects the target event, judging whether the first handwriting pen is connected with first electronic equipment or not; the target event comprises a double-click event, a three-click event or a long-press event;
if the first handwriting pen is not connected with the first electronic device, the first handwriting pen sends a Bluetooth broadcast;
if the first handwriting pen is connected with the first electronic device, the first handwriting pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects a target event; the first stylus receiving a first response from the first electronic device, the first response indicating that the first electronic device did not detect the target event; the first stylus pen sends Bluetooth broadcast;
in response to scanning the bluetooth broadcast, the second electronic device displays a connection prompt box, comprising:
after the second electronic equipment scans the Bluetooth broadcast, judging whether the second electronic equipment is connected with a second handwriting pen;
if the second electronic equipment is not connected with the second handwriting pen, judging whether the second electronic equipment starts the function of the handwriting pen or not; the function of the stylus pen is used for indicating the second electronic equipment to display a connection prompt box when a first stylus pen capable of being connected is found;
if the second electronic equipment starts the function of the handwriting pen, the second electronic equipment displays a connection prompt frame;
responding to the operation of the user on the first option, the second electronic equipment is paired with the first stylus pen, and establishes Bluetooth connection with the first stylus pen, and the method comprises the following steps:
responding to the operation of the user on the first option, and pairing the second electronic equipment with the first stylus;
after the second electronic device is successfully paired with the first stylus pen, the second electronic device is connected with the first stylus pen in a Bluetooth mode.
It can be seen that the first stylus may transmit a bluetooth broadcast when it is not connected to the first electronic device, or when it is connected to the first electronic device but the first electronic device does not detect the target event; and the second electronic equipment can respond to the scanned Bluetooth broadcast display connection prompt box and respond to the operation of the user on the first option when the second electronic equipment is not connected with the second handwriting pen and starts the function of the handwriting pen, and the second electronic equipment is paired with the first handwriting pen and establishes Bluetooth connection with the first handwriting pen. The whole process only needs to carry out simple operation (double click, triple click or long press and the like) and can trigger the first handwriting pen to be paired and connected with the second electronic equipment, the user does not need to carry out complicated operation, the user experience is improved, and the adaptability is strong.
In a second aspect, the present application further provides a stylus pen connection method, which is applied to a bluetooth system, where the bluetooth system includes a first stylus pen, a first electronic device, and a second electronic device, the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to detecting a target event, the second electronic device sends a bluetooth broadcast, the bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic device can be paired, the second indication information is used for indicating that the second electronic device can be connected, and the target event comprises a double-click event, a triple-click event or a long-press event;
in response to detecting the target event and scanning the Bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a Bluetooth connection with the second electronic device.
Therefore, a user hopes that the stylus is connected with which electronic device, and only needs to use the stylus to perform preset operation (for example, double-click, three-click, long-press and the like) on the electronic device (for example, the second electronic device), the stylus and the electronic device can be triggered to be connected in a matched mode, and the operation is simple and convenient. In addition, in the whole process, the user does not need to select the electronic equipment to be connected by the handwriting pen through the connection prompt box, and the user operation is further simplified.
In one possible implementation, in response to detecting the target event and scanning the bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a bluetooth connection with the second electronic device, including:
and if the first handwriting pen is not connected with the first electronic equipment, responding to the detection of the target event and the scanning of the Bluetooth broadcast, pairing the first handwriting pen with the second electronic equipment, and establishing Bluetooth connection with the second electronic equipment.
It will be appreciated that in the case where the stylus pen is not connected to the first electronic device, the target event may be considered to have been initiated by the user in order to connect to the new electronic device, and therefore a pairing connection may be made with the new electronic device when the bluetooth broadcast is scanned. Therefore, the misoperation problem caused by pairing connection operation of the stylus only when the stylus detects the target event (even if the target event is initiated by the first stylus to the first electronic device) can be avoided.
In one possible implementation, in response to detecting the target event and scanning the bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a bluetooth connection with the second electronic device, including:
if the first stylus pen is connected with the first electronic device, responding to the detection of the target event and the scanning of the Bluetooth broadcast, and sending a first instruction to the first electronic device by the first stylus pen, wherein the first instruction is used for inquiring whether the first electronic device detects the target event; the first stylus receiving a first response from the first electronic device, the first response indicating that the first electronic device did not detect the target event; the first stylus pen is paired with the second electronic device, and Bluetooth connection is established between the first stylus pen and the second electronic device.
It is understood that, when the stylus pen is connected to the first electronic device, but the first response fed back by the first electronic device indicates that the first electronic device does not detect the target event, the target event may also be considered to be initiated by the user for connecting the new electronic device, and then the pairing connection is performed with the new electronic device. Therefore, the misoperation problem caused by pairing connection operation of the stylus only when the stylus detects the target event (even if the target event is initiated by the first stylus to the first electronic device) can be avoided.
In one possible implementation, the method further includes: if the first handwriting pen is single connection equipment and the first handwriting pen is connected with the first electronic equipment, the first handwriting pen sends a disconnection request to the first electronic equipment, and the disconnection request comprises an identifier of the first handwriting pen; and the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
It can be understood that, since a single-connection device can only establish a bluetooth connection with one device, the first stylus needs to be disconnected from the first electronic device, thereby ensuring that the first stylus can be paired with the second electronic device.
In one possible implementation, the method further includes: if the first handwriting pen is a multi-connection device and is connected with the first electronic device, the first handwriting pen sets the second electronic device as an active device, and the first handwriting pen sets the first electronic device as a non-active device; when the second electronic equipment is set as the active equipment, the first handwriting pen sends pressure sensing data to the second electronic equipment, and the second electronic equipment receives the pressure sensing data; when the first electronic device is set as an inactive device, the first stylus pen does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
It can be understood that, if the first stylus is a multi-connection device, after the first stylus is connected in a pairing manner with the second electronic device, the second electronic device may be set as an active device so as to transmit pressure-sensitive data to the second electronic device, so that the track of the first stylus can be normally displayed on the screen of the second electronic device; by setting the first electronic device as a non-activated device, the first stylus pen does not send pressure data to the first electronic device any more, and the problem that the track of the first stylus pen is displayed on a plurality of electronic devices is avoided.
In one possible implementation, the method further includes: and after the second electronic equipment is successfully connected with the first handwriting pen, displaying reminding information, wherein the reminding information is used for reminding a user that the second electronic equipment is successfully connected with the first handwriting pen.
Therefore, the effect of timely informing the user that the first handwriting pen can be continuously used is achieved by displaying the prompt message when the second electronic device is successfully connected with the first handwriting pen.
In one possible implementation, the second electronic device transmits a bluetooth broadcast, including: the second electronic equipment sends the Bluetooth broadcast within a first preset time.
It can be understood that by limiting the time for the second electronic device to transmit the bluetooth broadcast, the first stylus pen is prevented from being in a state of transmitting the bluetooth broadcast for a long time, and the power consumption of the second electronic device can be reduced.
In one possible implementation, the method further includes: and in a first preset time, after the second electronic equipment and the first handwriting pen are successfully connected, the second electronic equipment stops sending the Bluetooth broadcast.
Therefore, the second electronic device stops sending the Bluetooth broadcast after being successfully connected with the first stylus pen, and the power consumption of the first stylus pen can be further reduced.
In one possible implementation manner, the first electronic device or the second electronic device is in a screen-off state or a screen-on state; when the first electronic device or the second electronic device is in a bright screen state, the first electronic device or the second electronic device is in a screen locking interface, a main interface or an interface corresponding to an application program.
Therefore, no matter what state the first electronic device and the second electronic device are or what interface is displayed, the stylus pen and the new electronic device (the unconnected electronic device) can be triggered to be connected in a matching mode through convenient and fast preset operation (such as double-click, triple-click or long-press operation), and the method is simple, convenient and strong in adaptability.
In one possible implementation, in response to detecting the target event, the second electronic device transmits a bluetooth broadcast, including:
after the second electronic device detects the target event, judging whether the second electronic device is connected with a second handwriting pen or not; the target event comprises a double-click event, a three-click event or a long-press event;
if the second electronic equipment is connected with the second handwriting pen, judging whether the target event is initiated by the second handwriting pen;
if the second target event is not initiated by the second handwriting pen, the second electronic equipment is disconnected from the second handwriting pen and transmits Bluetooth broadcast;
if the second electronic equipment is not connected with the second handwriting pen, judging whether the second electronic equipment starts the function of the handwriting pen or not; the function of the stylus pen is used for indicating that the second electronic equipment actively performs pairing connection with the stylus pen initiating the target event after detecting the target event;
if the second electronic equipment starts the function of the handwriting pen, the second electronic equipment sends Bluetooth broadcast;
in response to detecting the target event and scanning the bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a bluetooth connection with the second electronic device, including:
after the first handwriting pen detects the target event, judging whether the first handwriting pen is connected with first electronic equipment or not;
if the first handwriting pen is not connected with the first electronic equipment, the first handwriting pen enters a scanning state;
if the first handwriting pen is connected with the first electronic device, the first handwriting pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects a target event; the first stylus receiving a first response from the first electronic device, the first response indicating that the first electronic device did not detect the target event; the first writing pen enters a scanning state;
if the Bluetooth broadcast is scanned by the first handwriting pen, the first handwriting pen is paired with the second electronic equipment;
after the first handwriting pen is successfully paired with the second electronic device, the handwriting pen is connected with the second electronic device in a Bluetooth mode.
As can be seen, if the second electronic device is not connected to the second stylus pen, it may be connected in a paired manner with the stylus pen initiating the target event when the target event is detected and the function of the stylus pen is turned on; if the second electronic device is connected with the second stylus pen, the second electronic device can be disconnected from the second stylus pen and connected with the stylus pen initiating the target event in a pairing mode under the condition that the target event is detected and the function of the stylus pen is started. That is, no matter whether the second electronic device is connected with other handwriting pens (e.g., the second handwriting pen), the second electronic device can be connected with the first handwriting pen in a paired manner, so that the operation is simple, and the user experience can be improved.
In a third aspect, the present application further provides a bluetooth system, where the bluetooth system includes a first stylus pen, a first electronic device, and a second electronic device, the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function;
the first stylus is used for responding to the detection of the target event and sending a Bluetooth broadcast; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a three-click event or a long-press event;
the second electronic equipment is used for responding to the scanned Bluetooth broadcast and displaying a connection prompt box; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus;
the second electronic equipment is used for responding to the operation of the user on the first option, pairing with the first stylus pen and establishing Bluetooth connection with the first stylus pen.
In a fourth aspect, the present application further provides a bluetooth system, where the bluetooth system includes a first stylus pen, a first electronic device, and a second electronic device, the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function;
the second electronic device is used for responding to the detection of a target event and sending a Bluetooth broadcast, the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic device can be paired, the second indication information is used for indicating that the second electronic device can be connected, and the target event comprises a double-click event, a three-click event or a long-press event;
the first stylus is used for responding to the target event detection and the Bluetooth broadcast scanning, pairing with the second electronic device and establishing Bluetooth connection with the second electronic device.
In a fifth aspect, the present application further provides a stylus connection method applied to a first stylus of a bluetooth system, where the bluetooth system further includes a first electronic device and a second electronic device, the first stylus is paired with the first electronic device, the first stylus is not paired with the second electronic device, and the first stylus, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to detecting the target event, the first stylus pen sends a Bluetooth broadcast to cause the second electronic device to display a connection prompt box in response to scanning the Bluetooth broadcast; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a three-click event or a long-press event; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus.
In a sixth aspect, the present application further provides a stylus pen connection method applied to a second electronic device of a bluetooth system, where the bluetooth system further includes a first stylus pen and the first electronic device, the first stylus pen is already paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to scanning the Bluetooth broadcast, the second electronic device displays a connection prompt box; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus; the bluetooth broadcast is transmitted by the first stylus in response to detecting the target event; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a three-click event or a long-press event;
and responding to the operation of the user on the first option, the second electronic equipment is paired with the first stylus pen, and Bluetooth connection is established with the first stylus pen.
In a seventh aspect, the present application further provides a stylus connection method, which is applied to a first stylus of a bluetooth system, where the bluetooth system further includes a first electronic device and a second electronic device, the first stylus is paired with the first electronic device, the first stylus is not paired with the second electronic device, and the first stylus, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to the detection of the target event, the second electronic equipment sends a Bluetooth broadcast, so that the first stylus pen is paired with the second electronic equipment in response to the detection of the target event and the scanning of the Bluetooth broadcast, and establishes Bluetooth connection with the second electronic equipment; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic equipment can be paired, the second indication information is used for indicating that the second electronic equipment can be connected, and the target event comprises a double-click event, a three-click event or a long-press event.
In an eighth aspect, the present application further provides a stylus pen connection method applied to a second electronic device of a bluetooth system, where the bluetooth system further includes a first stylus pen and the first electronic device, the first stylus pen is already paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device, and the second electronic device all start a bluetooth function, and the method includes:
in response to the detection of the target event and the scanning of the Bluetooth broadcast, the first handwriting pen is paired with the second electronic equipment and establishes Bluetooth connection with the second electronic equipment; wherein the Bluetooth broadcast is transmitted by the second electronic device in response to detecting the target event; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic equipment can be paired, the second indication information is used for indicating that the second electronic equipment can be connected, and the target event comprises a double-click event, a three-click event or a long-press event.
In a ninth aspect, the present application provides a bluetooth system, including a first stylus, a first electronic device, and a second electronic device, where the first stylus has been paired with the first electronic device, the first stylus has not been paired with the second electronic device, and the first stylus, the first electronic device, and the second electronic device all turn on a bluetooth function, the first stylus performs a method as in any one of the first aspect, the second aspect, the fifth aspect, and the seventh aspect, and the second electronic device performs a method as in any one of the first aspect, the second aspect, the sixth aspect, and the eighth aspect.
In a tenth aspect, the present application provides a computer readable storage medium comprising computer instructions;
when the computer instructions are run on a first stylus, causing the first stylus to perform a method as in any one of the first, second, fifth, seventh aspects;
alternatively, the computer instructions, when executed on a second electronic device, cause the second electronic device to perform the method of any of the first, second, sixth, and eighth aspects.
In an eleventh aspect, embodiments of the present application provide a chip system, which includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The chip system may be applied to an electronic device including a communication module and a memory. The interface circuit may read instructions stored in a memory in the first stylus and send the instructions to the processor. The instructions, when executed by the processor, may cause the first stylus to perform a method as any one of the first, second, fifth, seventh aspects. The interface circuit may also read instructions stored in a memory in the second electronic device and send the instructions to the processor. The instructions, when executed by the processor, may cause the second electronic device to perform the method of any one of the first, second, sixth, and eighth aspects.
It should be understood that, for the bluetooth system according to the third aspect, the fourth aspect, and the ninth aspect, the stylus pen connection method according to the fifth aspect, the sixth aspect, the seventh aspect, and the eighth aspect, the computer-readable storage medium according to the tenth aspect, and the chip system according to the eleventh aspect, the beneficial effects that can be achieved by the bluetooth system according to the third aspect, the fourth aspect, and the ninth aspect are provided above may refer to the beneficial effects in the corresponding method provided above, and are not repeated herein.
Drawings
Fig. 1 is a schematic architecture diagram of a bluetooth system according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a stylus pen according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a bluetooth protocol framework according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 5 is a diagram of a prior art stylus coupled to an electronic device;
FIG. 6 is a schematic diagram of another prior art stylus coupled electronic device;
FIG. 7 is a schematic diagram of a stylus coupled to an electronic device according to an embodiment of the present disclosure;
FIG. 8 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 9 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 10 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 11 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 12 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 13 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 14 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 15 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 16 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 17 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 18 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 19 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 20 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 21 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 22 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 23 is a flowchart of a stylus pen attachment method according to an embodiment of the present disclosure;
FIG. 24 is a flowchart of another stylus pen attachment method provided in embodiments of the present application;
FIG. 25 is a flowchart of another stylus pen attachment method provided in an embodiment of the present application;
FIG. 26 is a flowchart of yet another stylus pen attachment method provided in an embodiment of the present application;
fig. 27 is a signaling diagram of a stylus pen connection method according to an embodiment of the present application;
FIG. 28 is a signaling diagram of another stylus pen connection method according to an embodiment of the present application;
fig. 29 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, "at least one" means one or more, "a plurality" means two or more. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a bluetooth system 10 according to an embodiment of the present disclosure. As shown in fig. 1, the bluetooth system 10 may include a stylus 100, a first electronic device 200, and a second electronic device 300.
The stylus pen 100 and the first and second electronic devices 200 and 300 may communicate with each other through bluetooth technology, including classic bluetooth BR/EDR (basic rate/enhanced data rate) and Bluetooth Low Energy (BLE). The stylus pen 100 and the first electronic device 200 are in a paired state, and the stylus pen 100 and the second electronic device 300 are in an unpaired state.
The first electronic device 200 and the second electronic device 300 may specifically be a terminal device supporting a bluetooth function, such as a mobile phone, a tablet Computer, a notebook Computer, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), and the like, which is not limited in this embodiment of the present application.
Fig. 2 shows a schematic structural diagram of the stylus 100.
The stylus 100 is described in detail below. It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation to the stylus 100. In other embodiments, stylus 100 may include more or fewer components than shown in FIG. 2, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
As shown in FIG. 2, stylus 100 may include a processor 110, a memory 120, a pressure sensor 130, a Bluetooth communication module 140, and an antenna 150.
The processor 110 is operable to read and execute computer readable instructions. Specifically, the processor 110 may include a controller, an operator, and a register. The controller is mainly responsible for instruction decoding and sending out control signals for operations corresponding to the instructions. The arithmetic unit is mainly responsible for storing register operands, intermediate operation results and the like temporarily stored in the instruction execution process. In a specific implementation, the hardware architecture of the processor 110 may be an Application Specific Integrated Circuit (ASIC) architecture, an mips (micro processor with interleaved stages) architecture, an arm (advanced risc processors) architecture, or a Network Processor (NP) architecture.
Memory 120 is coupled to processor 110 for storing various software programs and/or sets of instructions. In particular implementations, memory 120 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 120 may store an operating system, such as an embedded operating system like uCOS, VxWorks, RTLinux, etc.
The pressure sensor 130 may be used to acquire a motion trace signal of the tip of the stylus 100 and sense a pressure signal applied to the tip of the stylus 100 by a contact surface (e.g., a screen of the first electronic device 200 or the second electronic device 300) cooperating with the stylus. The pressure sensor 130 can be a variety of types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may comprise at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 130, the capacitance between the electrodes changes. Stylus 100 may determine the strength of the pressure based on the change in capacitance.
The bluetooth communication module 140 may include a classic bluetooth (BR/EDR) module and a Bluetooth Low Energy (BLE) module.
In some embodiments, the bluetooth communication module 140 may listen to signals, such as probe requests, scan signals, and the like, transmitted by other devices (e.g., the first electronic device 200, the second electronic device 300), and may transmit response signals, scan responses, and the like, so that the other devices (e.g., the first electronic device 200, the second electronic device 300) may discover the stylus pen 100, establish a wireless communication connection with the other devices (e.g., the first electronic device 200, the second electronic device 300), and communicate with the other devices (e.g., the first electronic device 200, the second electronic device 300) through bluetooth.
In other embodiments, the bluetooth communication module 140 may also transmit a signal, such as a broadcast BLE signal, so that other devices (e.g., the first electronic device 200 and the second electronic device 300) may discover the stylus pen 100 and establish a wireless communication connection with the other devices (e.g., the first electronic device 200 and the second electronic device 300) to communicate with the other devices (e.g., the first electronic device 200 and the second electronic device 300) through bluetooth.
The wireless communication function of the second electronic device 200 may be implemented by the antenna 150, the bluetooth communication module 140, the modem processor, and the like.
The antenna 150 may be used to transmit and receive electromagnetic wave signals. Each antenna in the second electronic device 200 may be used to cover a single or multiple communication bands.
In some embodiments there may be one or more antennas of the bluetooth communication module 140.
As shown in fig. 3, a schematic diagram of a bluetooth protocol framework is provided for the embodiment of the present application, which includes, but is not limited to, a Host protocol stack, an hci (Host Controller interface), and a Controller (Controller).
The Host protocol stack defines a plurality of applications (profiles) and a core protocol (protocol) in a bluetooth framework, each profile defines a respective corresponding message format and Application rule, and the profile is a bluetooth service (Application). In order to achieve interconnection and interworking of different devices under different platforms, bluetooth protocols are defined in various possible and generally meaningful application scenarios, such as bluetooth audio transmission model agreement (A2 DP), hands-free profile (HFP), hog (hot over gatt profile), and the like. The core protocol includes, but is not limited to, a bluetooth basic service protocol sdp (service discovery protocol), a logical link control and adaptation protocol L2CAP (logical link control and adaptation protocol), a Generic Attribute (GATT) protocol, and the like. The core protocol is essential in the bluetooth protocol stack.
The HCI provides a unified interface entering the link manager and a unified mode entering the baseband for the upper layer protocol, there will be several transmission layers between the host core protocol stack and the controller, these transmission layers are transparent and complete the task of transmitting data, and the bluetooth alliance (SIG) specifies four physical bus modes connected to hardware, that is, four HCI transmission layers: USB, RS232, UART and PC card.
The controller defines the bottom hardware part, including Radio Frequency (RF), Baseband (Baseband, BB) and Link Manager (Link Manager, LM), the RF layer implements filtering and transmission of data bit stream through the microwave of ism (authorized scientific media) frequency band which is not authorized at 2.4GHz, and mainly defines the conditions that the bluetooth transceiver needs to meet in this frequency band for normal operation. The baseband is responsible for frequency hopping and transmission of bluetooth data and information frames. The link management is responsible for connecting, establishing and removing links and performing security control. The LM layer is a link management layer protocol of the bluetooth protocol stack, and is responsible for translating an upper layer HCI command into an operation that can be accepted by a baseband, establishing an asynchronous link (ACL) and a synchronous link (SCO), and entering a working mode of the second electronic device into an energy-saving state, and the like. The Link Control (LC) layer is responsible for responding to upper layer LM commands (e.g., LM commands that perform functions such as establishing a transport Link for packets, maintaining a Link, etc.) during the transmission of a batch of packets.
Fig. 4 shows a schematic structural diagram of the electronic device. It should be noted that the electronic device may refer to the first electronic device 200 or the second electronic device 300.
The electronic device is explained in detail below. It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation to electronic devices. In other embodiments, the electronic device may include more or fewer components than shown in FIG. 4, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
As shown in fig. 4, the electronic device may include: the mobile terminal includes a processor 210, an external memory interface 220, an internal memory 221, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display 294, and the like.
The sensor module 280 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
Processor 210 may include one or more processing units, such as: the processor 210 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a neural center and a command center of the electronic device. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that have just been used or recycled by processor 210. If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 210, thereby increasing the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
It should be understood that the interface connection relationship between the modules illustrated in this embodiment is only an exemplary illustration, and does not constitute a limitation on the structure of the electronic device. In other embodiments, the electronic device may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charge management module 240 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. The charging management module 240 may also supply power to the electronic device through the power management module 241 while charging the battery 242.
The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charging management module 240, and provides power to the processor 210, the internal memory 221, the external memory, the display 294, the camera 293, and the wireless communication module 260. In some embodiments, the power management module 241 and the charging management module 240 may also be disposed in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 250, the wireless communication module 260, the modem processor, the baseband processor, and the like. In some embodiments, the antenna 250 and the wireless communication module 260 are coupled such that the electronic device can communicate with networks and other devices through wireless communication techniques.
The antenna 250 is used to transmit and receive electromagnetic wave signals. Each antenna 250 in the electronic device may be used to cover a single or multiple communication bands. Different antennas 250 may also be multiplexed to improve the utilization of the antennas 250. For example: the antennas 250 may be multiplexed into a diversity antenna 250 of the wireless local area network. In other embodiments, the antenna 250 may be used in conjunction with a tuning switch.
The wireless communication module 260 may provide solutions for wireless communication applied to electronic devices, including WLAN (e.g., wireless fidelity, Wi-Fi) network, BT, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like.
The wireless communication module 260 may be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 250, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves via the antenna 250 for radiation.
The electronic device implements display functions via the GPU, the display screen 294, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 294 is used to display images, video, and the like. The display screen 294 includes a display panel. For example, in the embodiment of the present application, the display screen 294 may be used to display a motion trace of a stylus.
The electronic device may implement a shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor. The ISP is used to process the data fed back by the camera 293. The camera 293 is used to capture still images or video. In some embodiments, the electronic device may include 1 or N cameras 293, N being a positive integer greater than 1.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
Internal memory 221 may be used to store computer-executable program code, including instructions. The processor 210 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 221. For example, in the present embodiment, the processor 210 may execute instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.
The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the using process of the electronic device. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device may implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone interface 270D, the application processor, and the like. Such as music playing, recording, etc.
The keys 290 include a power-on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be touch keys. The motor 291 may generate a vibration cue. The motor 291 may be used for touch vibration feedback. Indicator 292 may be an indicator light that may be used to indicate a state of charge, a change in charge, or may be used to indicate a message, missed call, notification, etc.
In the method provided in the embodiment of the present application, the bluetooth protocol framework used by the first electronic device 200 and the second electronic device 300 can be referred to as shown in fig. 3, and is not described herein again.
During the use of the stylus by the user, it may be necessary to use one stylus to scribble on a plurality of electronic devices. At this time, the user needs to switch the electronic device to which the stylus pen is connected, so that the electronic device can be used as an input device of the electronic device desired by the user.
At present, the common handwriting pens in the market comprise two types, namely a single-connection handwriting pen and a multi-connection handwriting pen. Wherein, the single-connection stylus only supports to be connected with one electronic device; the multi-connection stylus can support connection of a plurality of electronic devices, but only one electronic device is in an active (active) state, and the multi-connection stylus can communicate with the electronic device in the active state. If the multi-connection stylus is connected with the electronic devices, the multi-connection stylus only transmits pressure-sensitive data to the electronic devices in an active state, and the track of the stylus is prevented from being displayed on the screens of the electronic devices.
As shown in fig. 5, if the stylus pen 100 is a single-connection stylus pen, in a situation that the stylus pen 100 is already paired with and connected to the first electronic device 200, if the user wants to reconnect the stylus pen 100 to the second electronic device 300, the user needs to magnetically attach the stylus pen 100 to a side surface of the second electronic device 300, or to magnetically attach the stylus pen to a magnetic rod connected to the second electronic device 300, and then connect the stylus pen to the magnetic rod. As shown in fig. 6, if the stylus pen 100 is a multi-connection stylus pen, the user can use the USB interface of the stylus pen 100 to plug in the second electronic device 300 and then connect. Alternatively, if the stylus pen 100 is provided with keys on the body, the user may connect after pressing the keys on the body of the stylus pen 100 for a long time. For the multi-connection stylus pen without the keys and the USB interface, the user may magnetically attach the multi-connection stylus pen to a magnetic rod connected to the second electronic device 300, and then connect the multi-connection stylus pen.
However, in the above-mentioned methods, the methods for connecting different types of styluses to a new electronic device (e.g., the second electronic device 300) are generally different, and each method requires a user to perform a relatively complicated operation, which not only affects the user experience, but also reduces the efficiency of connecting the stylus to the new electronic device.
In view of this, the embodiment of the present application provides a method for connecting a stylus pen, which can trigger the stylus pen to be connected in a pairing manner with a new electronic device (an unconnected electronic device) through a convenient and fast preset operation (for example, a double-click operation, a triple-click operation, or a long-press operation), and is simple and convenient and has strong adaptability.
A user interface diagram of a stylus pen connection method provided by the embodiment of the present application is described below.
As shown in fig. 7, the stylus pen 100 and the first electronic device 200 are in a paired state, and the stylus pen 100 and the second electronic device 300 are in an unpaired state. If the user wishes the stylus pen 100 to establish a connection with the second electronic device 300, the user may perform a first operation using the stylus pen 100. The first operation includes, but is not limited to, a user double-clicking, triple-clicking, long-pressing the screen of the second electronic device 300, the desktop, or any other operation (except the screen of the first electronic device 200) using the stylus pen 100. Alternatively, the first operation may be an operation of the user sliding up or down or drawing a specific shape (for example, a circle, a triangle, or the like) using the stylus pen 100, which is not particularly limited herein.
The stylus pen 100, upon detecting the first operation, may ask the first electronic device 200 whether the first operation is also detected. In an alternative embodiment, the stylus pen 100 may send a query instruction to the first electronic device 200 after detecting the first operation. The query instruction is used to instruct the first electronic device 200 to query whether the first operation is detected. In response to the query instruction, the first electronic device 200 may feed back a query result. In this way, the stylus pen 100 may determine whether the first electronic device 200 also detects the first operation according to the query result. It can be understood that, if the stylus pen 100 determines that the first electronic device 200 detects the first operation, it may be determined that the first operation is actually the operation of the stylus pen 100 on the first electronic device 200, and the first operation may be considered as a normal interaction between the stylus pen 100 and the first electronic device 200; if the stylus pen 100 determines that the first electronic device 200 does not detect the first operation, it may be determined that the first operation is not the operation of the stylus pen 100 on the first electronic device 200, and the first operation may be considered to be an operation initiated by a user wishing to replace a device to which the stylus pen 100 is connected.
The stylus pen 100 may transmit bluetooth broadcasts (including BLE broadcasts and classic bluetooth broadcasts), or scan for bluetooth broadcasts (including BLE broadcasts and classic bluetooth broadcasts), upon determining that the first electronic device 200 does not detect the first operation. Wherein the bluetooth broadcast is used to inform other devices that the stylus pen 100 is in a mateable, connectable state. In this way, if the second electronic device 300 scans the bluetooth broadcast, the second electronic device 300 may actively initiate pairing and connection operations to the stylus pen 100. If the stylus pen 100 scans the bluetooth broadcast transmitted by the second electronic device 300, the stylus pen 100 may actively initiate pairing and connection operations to the second electronic device 300.
In the first case, the stylus pen 100 may transmit a bluetooth broadcast when the first operation is not detected by the first electronic device 200. For example, if the second electronic device 300 has the bluetooth function turned on and is not connected to the stylus pen, the surrounding bluetooth broadcasts may be scanned. If the second electronic device 300 scans the bluetooth broadcast transmitted by the stylus 100, a connection prompt box 310 as shown in fig. 8 may be displayed. The connection prompt box 310 may be used to remind the user that the second electronic device 300 finds the stylus 100 and may establish a connection with the stylus 100. The connection prompt box 310 may include a cancel button 311 and a connect button 312. If the user does not want the second electronic device 300 to establish a connection with the stylus 100, the user may click the cancel button 311. If the second electronic device 300 detects an operation (e.g., a click operation) of the cancel button 311 by the user, the second electronic device 300 may close the connection prompt box 310 in response to the operation. If the user wishes the second electronic device 300 to establish a connection with the stylus 100, the connection button 312 may be clicked. As such, if the second electronic device 300 detects an operation (e.g., a click operation) of the connection button 312 by the user, in response to the operation, the second electronic device 300 may pair with the stylus pen 100 and establish a BT connection after the pairing is successful.
In an alternative embodiment, as shown in fig. 9, the second electronic device 300 may display the reminder message 313 on the connection prompt box 310 after establishing the bluetooth connection with the stylus 100. The reminder 313 is used to remind the user that Pencil is connected, indicating that the second electronic device 300 has established a connection with the stylus 100. The reminding information 313 can be presented in the form of text, icon, etc. The connection prompt box 310 may also include a "know" button 314. The second electronic device 300 may receive an operation of the "know" button 314 by the user, in response to which the second electronic device 300 may close the connection prompt box 310. In an alternative embodiment, if the second electronic device 300 does not receive the operation of the "know" button 314 from the user for more than the preset time, the second electronic device 300 may also automatically close the connection prompt box 310.
In an alternative embodiment, as shown in FIG. 10, the connection prompt box 310 may also display a countdown reminder 315 (e.g., "the prompt box will disappear after 5 seconds"). The countdown reminder 315 is used to remind the user of the timely operation. In this way, if the second electronic device 300 does not receive the operation of the connection button 312 by the user for more than 5 seconds, the second electronic device 300 automatically closes the connection prompt box 310, and does not perform the operation of pairing and connecting with the stylus pen 100. It should be noted that the 5 seconds may be replaced by any other time, and is not limited in particular.
It should be noted that the second electronic device 300 may also actively scan the surrounding bluetooth devices when it is not connected to the stylus pen, has the bluetooth function turned on, and has the stylus pen function turned on. Wherein the stylus functionality is used to provide a new way for the second electronic device 300 to connect to the stylus. After the function of the stylus pen is turned on, the second electronic device 300 may be triggered to connect the stylus pen through a preset operation (a double-click operation, a three-click operation, a long-press operation, etc.). In this case, if the second electronic device 300 scans the bluetooth broadcast transmitted by the stylus pen 100, a connection prompt box 310 as shown in fig. 8 may be displayed.
Fig. 11-15 illustrate a process of the second electronic device 300 for turning on a function of a stylus pen. As shown in fig. 11, the second electronic device 300 may display a settings interface 320, and the settings interface 320 may include a plurality of settings options, such as a WLAN option, a bluetooth option, a mobile network option, an auxiliary features option 321. The second electronic device 300 may receive an operation of the auxiliary function option 321 by the user, and in response to the operation, the second electronic device 300 may display a function interface 330, as shown in fig. 12. The function interface 330 may include options for various auxiliary functions, such as "one-handed mode", "quick launch and gesture", "smart split screen", "holster operation", "stylus" 331, etc. The second electronic device 300 may receive an operation of the "stylus" 331 by the user, and in response to the operation, the second electronic device 300 may display a stylus function interface 340 as shown in fig. 13 or fig. 14. It should be noted that, according to different connection states of the second electronic device 300 and the stylus pen, the stylus pen function interface 340 may display different prompt words.
Illustratively, the second electronic device 300 may be connected to a stylus, such that, in response to user manipulation of the "stylus" 331, the second electronic device 300 may display prompt text 342 as shown in FIG. 13. The prompt text 342 may be "screen-off double-click screen entry notepad application supported when pen function is on". It can be seen that when the second electronic device 300 is connected to a stylus, the stylus function is used to indicate: if the second electronic device 300 receives an operation of double-clicking the screen (or triple-clicking the screen, long-pressing the screen, etc.) while (the second electronic device 300) is off, a specific application (e.g., a notepad application) is entered.
Illustratively, the second electronic device 300 may not be connected to any stylus, so that in response to user manipulation of the "stylus" 331, the second electronic device 300 may display prompt text 343 as shown in FIG. 14. The prompt text 343 may be "when the pen function is turned on, the surrounding pen devices will be actively scanned, and when a connectable pen device is found, the pairing box will be actively popped up for you to select". It can be seen that when the second electronic device 300 is not connected to a stylus, the stylus function is used to indicate: the second electronic device 300 actively scans surrounding stylus devices and actively pops up a pairing box for user selection when a connectable stylus is found.
Further, the stylus pen function interface 340 may include a switch button 341, and the second electronic device 300 may receive an operation (e.g., a click operation, a slide operation, etc.) of the switch button 341 by the user, and in response to the operation, the second electronic device 300 may switch the switch button 341 to an on state to turn on the stylus pen function of the second electronic device 300, as shown in fig. 15. In an alternative embodiment, after the state of the switch button 341 is changed, the prompt text 342 or the prompt text 343 may be displayed according to the state of the second electronic device 300 connected to the stylus pen.
In an alternative embodiment, as shown in fig. 16, the second electronic device 300 may display a lock screen interface 350 and display a connection prompt 351 on the lock screen interface 350. The connection prompt box 351 includes a search results prompt 352 (e.g., search to pencil). Therefore, no matter whether the second electronic device 300 is in the screen locking state or not, the user can be reminded in time that the second electronic device 300 searches for the handwriting pen device, and the user can conveniently connect in time. It is to be appreciated that in an alternative embodiment, if second electronic device 300 does not receive any action by the user after displaying connection prompt 351, second electronic device 300 may display search result prompt 352 in a push message (e.g., add search result prompt 352 to the notification bar); if the second electronic device 300 receives an unlocking operation of the user, in response to the unlocking operation, the second electronic device 300 may display a connection prompt box 310 as shown in fig. 8.
It should be noted that the connection prompt box 310 provided in the embodiment of the present application may also be displayed on other interfaces, for example, an interface of a video application, an interface of a picture application, and the like, which is not limited herein.
In the second case, the stylus pen 100 may also search for a bluetooth broadcast when the first operation is not detected by the first electronic device 200. In this case, the first operation includes an operation of the second electronic device 300 screen by the stylus pen 100. Thus, in an alternative embodiment, the second electronic device 300 may determine its connection status and whether to start the bluetooth function after detecting the first operation. If it is determined that the second electronic device 300 is not connected with other handwriting pens and the bluetooth function is turned on, the second electronic device may send a bluetooth broadcast. The bluetooth broadcast is used to enable other devices (e.g., the stylus pen 100) to discover the second electronic device 300, so that the other devices (e.g., the stylus pen 100) can establish a wireless communication connection with the second electronic device 300 and communicate via bluetooth. The second electronic device 300 may directly display the connection prompt box 310 as shown in fig. 9 after establishing the bluetooth connection with the stylus pen 100. Reminder information 313 may be displayed on connection prompt box 310. The reminder 313 is used to remind the user that Pencil is connected, indicating that the second electronic device 300 has established a connection with the stylus 100.
In an alternative embodiment, after the second electronic device 300 detects the first operation, if it is determined that the bluetooth function is not turned on, a function prompt box 360 as shown in fig. 17 may be displayed. The function prompt box 360 includes a reminding character 361, and the reminding character 361 is used for reminding the user that the second electronic device 300 does not start the bluetooth function. In addition, the function prompt box 360 may also include an "unlock" button 362, the "unlock" button 362 being used to provide a way for the user to quickly unlock bluetooth functionality.
In another optional embodiment, the second electronic device 300 may further determine, after detecting the first operation, a connection state of the second electronic device, whether to start a bluetooth function, and whether to start a stylus function. If it is determined that the second electronic device 300 is not connected with other handwriting pens, has the bluetooth function turned on, and has the handwriting pen function turned on, the bluetooth broadcast may be transmitted by the second electronic device. In addition, the second electronic device 300 may directly display the connection prompt box 310 as shown in fig. 9 after establishing the bluetooth connection with the stylus pen 100.
For example, the second electronic device 300 may further display a function prompt box 370 as shown in fig. 18 when it is determined that the stylus function is not turned on. The function prompt box 370 includes a reminder text 371, and the reminder text 371 is used to remind the user that the second electronic device 300 does not start the pen function. In addition, the function prompt box 370 may also include a "go on" button 372, which "go on" button 372 is used to provide a way for the user to quickly turn on the stylus function. Second electronic device 300 may receive a user operation (e.g., a clicking operation) of "go to unlock" button 372, in response to which second electronic device 300 may jump to stylus functionality interface 380 as shown in FIG. 19. The stylus pen function interface 380 may include a switch button 381 and prompt text 382, and the second electronic device 300 may receive an operation (e.g., a click operation, a slide operation, etc.) of the switch button 381 by a user, and in response to the operation, the second electronic device 300 may switch the switch button 381 to an on state to turn on the stylus pen function of the second electronic device 300. The prompt text 382 is used to instruct the user to: 1. when the host is not connected with the stylus pen, after the function of the stylus pen is opened, if the stylus pen double-clicks the screen, the host and the stylus pen can be automatically connected in a matched mode; 2. when the host computer is connected with the handwriting pen, after the function of the handwriting pen is opened, if other handwriting pens double-click the screen, the host computer can disconnect the previously connected handwriting pen and carry out pairing connection with the double-click handwriting pen.
Of course, the user may also choose to turn on the function of the pen in the manner shown in fig. 11-15, which is not limited in this regard. In addition, it can be seen that the function of the stylus pen described in the embodiments of the present application may refer to a function of an electronic device that is quickly connected to the stylus pen. Compared with the case that the stylus pen 100 is connected with surrounding stylus pen devices (for example, the stylus pen 100) only when the stylus pen is not connected and the bluetooth function is turned on, the problem that the connection prompt box 310 frequently pops up due to excessive active bluetooth devices (i.e., devices sending bluetooth broadcasts) around the second electronic device 300 can be effectively avoided by limiting a scene of quickly connecting the stylus pen (i.e., under the condition that the stylus pen function is turned on), and the problem of mistaken touch of the surrounding stylus pen devices can be avoided.
It can be seen that fig. 7-19 illustrate a situation where only one unmatched electronic device (second electronic device 300) is present around stylus 100. In practice, there is often more than one unmatched electronic device around stylus 100. As shown in fig. 20, the stylus pen 100 may be in a paired state with the first electronic device 200, and the stylus pen 100 is in an unpaired state with the second electronic device 300 and the third electronic device 400. If the user wishes the stylus 100 to pair with the second electronic device 300 and establish a connection, the user may perform a first operation using the stylus 100. After detecting the first operation, the stylus pen 100 may query whether the first electronic device 200 also detects the first operation, and a process of querying whether the first electronic device 200 detects the first operation by the stylus pen 100 may be as described above, and is not described herein again.
In this way, if the second electronic device 300 and the third electronic device 400 receive the bluetooth broadcast transmitted by the stylus pen 100, and the second electronic device 300 is not connected with other stylus pens and has started the stylus pen function, and the third electronic device 400 is not connected with other stylus pens and has started the stylus pen function, as shown in fig. 21, the second electronic device 300 may display the connection prompt box 310, and the third electronic device 400 may display the connection prompt box 410. If the user wishes to establish a connection between the stylus 100 and the second electronic device 300, the user may operate the connection button 312 of the connection prompt box 310. If the second electronic device 300 receives the operation of the connection button 312 from the user, in response to the operation, the second electronic device 300 may initiate a pairing and connection operation on the stylus pen 100, and after the connection with the stylus pen 100 is successful, as shown in fig. 22, a prompt message 313 is displayed in the connection prompt box 310. Correspondingly, the third electronic device 400 does not receive the operation of the user, and as still shown in fig. 22, the third electronic device 400 may close the connection prompt box 410. In an alternative embodiment, the third electronic device may close the connection prompt box 410 when the operation of the connection button of the connection prompt box 410 by the user is not received for more than a preset time.
It should be noted that fig. 20-22 only briefly illustrate that when there are a plurality of unpaired devices around the stylus 100, the basic principle and the generated technical effect are the same as those of the above-mentioned embodiment, and for a brief description, no part of this embodiment is mentioned, and reference may be made to the content described in fig. 7-19, and no further description is given here.
The following describes a flow of the stylus pen connection method provided in the embodiment of the present application, and the stylus pen connection method provided in the embodiment of the present application may include the following two ways: (1) actively initiating a connection by an electronic device; (2) the connection is initiated actively by the stylus. Note that, the electronic devices (the electronic device a, the electronic device B, the electronic device C, and the electronic device D) and the styluses (the stylus pen a and the stylus pen B) mentioned later all have the bluetooth function already turned on, and therefore, the description thereof is not repeated in the flowchart.
Mode (1) (i.e., connection being actively initiated by the electronic device) is explained below.
Fig. 23 is a flowchart of a stylus pen connection method according to an embodiment of the present disclosure. The stylus pen connection method comprises the following steps:
s101, the electronic device A and the stylus pen A are successfully paired through Bluetooth.
That is, the electronic device a and the stylus pen a are in a paired state. Wherein, bluetooth pairing may include classic bluetooth pairing and BLE pairing. In addition, the electronic device a may be in a bluetooth connection state with the stylus pen a, or may be in a bluetooth disconnection state due to too far distance or the like.
S102, the handwriting pen A receives double-click operation.
For example, the double-click operation may refer to an operation in which the user double-clicks a screen or a desktop of the electronic device B (the electronic device 300) with the stylus a (the stylus 100) as shown in fig. 7. In other embodiments, the double-click operation may be a three-click operation, a long-click operation, or the like.
S103, detecting a double-click event by the stylus pen A.
It is understood that when the pressure sensor 130 of the stylus pen a detects the double-click operation, a corresponding hardware interrupt may be sent to the kernel layer (the kernel layer includes a sensor driver, a display driver, etc.), and the kernel layer may process the double-click operation into a double-click event (including information such as a time stamp of the double-click operation).
S104, the stylus pen A inquires the connection state and judges whether the electronic equipment is connected.
If the stylus pen a inquires that the stylus pen a is connected with the electronic device, S105 may be executed; if the stylus pen a inquires that the electronic device is not connected, S108 may be performed.
In an optional implementation manner, the stylus pen a may read identification information corresponding to the connection state, for example, if the identification information is 1, it indicates that the stylus pen a is connected to the electronic device; if the identification information is 0, it indicates that the stylus pen a is not connected to the electronic device. After the stylus pen a inquires that the connected electronic device exists, the device name, the MAC address, and the like of the connected electronic device may be further inquired. Illustratively, stylus A may query that the electronic device to which it is connected is electronic device A.
S105, the stylus pen A sends a query instruction to the electronic device A.
Wherein the query instruction may be used to instruct the electronic device a to query whether a double-click event is detected.
S106, the electronic device A feeds back the query result to the stylus pen A.
After receiving the query instruction, the electronic device a may query whether a double-click event is detected in response to the query instruction, and feed back a query result to the stylus pen a.
S107, the stylus pen A judges whether the electronic device A detects a double-click event.
It will be appreciated that stylus A may determine whether electronic device A detected a double-click event based on the query results. If the double-click operation in S102 is initiated by the user using the stylus pen a to the electronic device a, the electronic device a may detect a double-click event; otherwise, electronic device a cannot detect a double-click event. As such, by determining whether the double-click event is detected by the electronic device a, it can be determined whether the double-click operation in S102 is occurring between the stylus pen a and the electronic device a. If the double-click operation occurs between the stylus pen a and the electronic device a, it may be considered that the double-click operation may be caused by the user double-clicking the screen of the electronic device a using the stylus pen a, and for normal interaction between the stylus pen a and the electronic device a, the electronic device connected with the stylus pen a does not need to be replaced, and the procedure may be ended. If the double-click operation does not occur between the stylus pen a and the electronic device a, it may be considered that the double-click operation may be initiated by the user wishing to replace the electronic device to which the stylus pen a is connected, and therefore the electronic device to which the stylus pen a is connected needs to be replaced, and S108 may be continuously performed.
And S108, the stylus pen A sends Bluetooth broadcast.
The bluetooth broadcast is used to enable other devices (e.g., electronic device B) to discover the stylus a and establish a wireless communication connection with the other devices (e.g., electronic device B) to communicate with the other devices (e.g., electronic device B) via bluetooth. In an alternative embodiment, the bluetooth broadcast may carry a device name, a device address, and a device type (CoD). The Bluetooth broadcast can also carry first indication information and second indication information. The first indication information is used for indicating that the stylus pen A can be paired, and the second indication information is used for indicating that the stylus pen A can be connected. The bluetooth broadcast may also carry a Universal Unique Identifier (UUID).
The device types may include a computer type, a mobile phone type, a network access point, an audio/video device (such as an earphone and the like), a human-computer interaction device (such as a mouse, a keyboard and the like), a printer, a digital camera and the like, a wearable device (such as glasses and the like) and a toy game type. For example, the stylus A may be a human interaction device of the type used.
In an alternative embodiment, stylus a may transmit a bluetooth broadcast for a first predetermined time. For example, the stylus may transmit a bluetooth broadcast for N seconds. Wherein, N can be any number such as 2, 3.5, 5.6 and the like.
S109, the electronic equipment B inquires the connection state and judges whether the handwriting pen B is connected.
If the electronic device B inquires that the handwriting pen B is not connected, S111 can be executed; if the electronic device B inquires that the stylus pen B is connected, the process may be ended. Note that the stylus B may be any stylus other than the stylus a.
The electronic device B may query its connection status to determine whether a stylus (e.g., stylus B) is connected. In an optional implementation manner, the electronic device B may read the identification information of the connection state, for example, if the identification information is 1, it indicates that the electronic device B is connected with another stylus pen; if the identification information is 0, it indicates that the electronic device B is not connected with another stylus pen.
S110, the electronic device B inquires whether the function of the stylus pen is started.
It is understood that if the electronic device B inquires that the stylus pen function is turned on, S112 may be executed; if the electronic device B finds that the function of the stylus pen is not turned on, the electronic device B may turn on the function of the stylus pen with reference to the interfaces shown in fig. 11 to 15.
It should be noted that there may not be a strict sequence between S109-S110 and S108, and S109-S110 may be executed first; s108 may be executed first, and then S109-S110 may be executed, which is not limited herein.
S111, the electronic device B scans the Bluetooth broadcast.
It can be understood that the electronic device B may determine whether the bluetooth broadcast is sent by the stylus pen according to the type of the device carried by the bluetooth device. If the device indicated by the device type carried by the bluetooth broadcast is a stylus pen (stylus pen a), and the bluetooth broadcast carries first indication information and second indication information, wherein the first indication information is used for indicating that the stylus pen a can be paired, the second indication information is used for indicating that the stylus pen a can be connected, and the electronic device B can be paired and connected with the stylus pen a.
And S112, popping up a connection prompt box by the electronic equipment B.
It is to be appreciated that the connection prompt box can be the connection prompt box 310 shown in FIG. 8.
S113, the electronic device B receives the operation of confirming the connection.
It is to be understood that the operation of confirming the connection may be an operation of the user clicking the connection button 312 as shown in fig. 8.
And S114, responding to the operation of confirming the connection, and pairing the electronic equipment B and the stylus pen A.
S115, the electronic device B and the handwriting pen A are connected through Bluetooth.
It will be appreciated that the bluetooth connection may include a classic bluetooth connection and a BLE connection. Illustratively, the electronic device B and the stylus a may establish a BLE connection. Thus, the electronic device B can establish GATT connection with the stylus pen first to align the core protocol of the electronic device B and the stylus pen a; and then establishing HOGP connection to align the application specifications of the electronic equipment B and the handwriting pen A.
It should be noted that, if the stylus pen a is a single-connection stylus pen and the stylus pen a is in a connection state with the electronic device a, before the electronic device B establishes a bluetooth connection with the stylus pen a, the connection between the stylus pen a and the electronic device a needs to be disconnected. If the stylus pen A is a multi-connection stylus pen, the stylus pen A can directly establish Bluetooth connection with the electronic device B, and after the connection is established, the electronic device B is used as active equipment and the electronic device A is set as inactive equipment.
It should be noted that after the stylus pen a establishes a bluetooth connection with the electronic device B, the stylus pen a may stop sending the bluetooth broadcast.
Therefore, according to the connection method of the handwriting pen provided by the embodiment of the application, the connection prompt box can be popped up by only double-clicking (or other operations) the pen point of the handwriting pen on the screen of the non-connection device (such as the electronic device B), and the electronic device (the electronic device B) with the function of the handwriting pen around the handwriting pen can be selected by a user according to requirements to carry out pairing and connection. In addition, the Bluetooth connection between the handwriting pen and the non-connection equipment can be established only by double-click operation of the user, the process is simple and convenient, the handwriting pens of different types can use the handwriting pen connection method of the embodiment of the application, the adaptability is high, and the method is user-friendly.
As shown in fig. 24, the embodiment of the present application further provides another stylus pen connection method. In the embodiment, the stylus pen a is a multi-connection stylus pen and is connected with a plurality of electronic devices in a matching manner; in addition, there are a plurality of unpaired electronic devices around stylus a. The method comprises the following steps:
s201, the electronic device A and the stylus pen A are successfully paired through Bluetooth.
S202, the electronic device D is successfully paired with the handwriting pen A through Bluetooth.
S203, the stylus pen A receives double-click operation.
S204, the stylus pen A detects a double-click event.
S205, the stylus pen A inquires the connection state and judges whether the electronic equipment is connected.
For example, the stylus pen a may be a multi-connection stylus pen that can detect that multiple electronic devices (e.g., electronic device a, electronic device D) are connected to itself. Thus, if the stylus pen a inquires that the stylus pen a is connected with the electronic device, S206 and S208 can be executed; if the stylus pen a inquires that the electronic device is not connected, S211 may be performed.
S206, the stylus pen A sends a query instruction to the electronic device A.
And S207, the electronic equipment A feeds back the query result to the stylus pen A.
S208, the stylus pen A sends a query instruction to the electronic device D.
It should be noted that there is no strict sequence between S206 and S208, S206 and S208 may be executed first, or S208 and S206 may be executed first, or S206 and S208 may be executed simultaneously.
S209, the electronic device D feeds back the query result to the handwriting pen.
S210, the stylus pen judges whether the electronic equipment A and the electronic equipment D detect double-click events.
It can be understood that, if the query result indicates that any one of the electronic device a or the electronic device D detects a double-click event, the double-click event may be considered as an operation triggered by the user during normal use of the stylus pen a, and the process may be ended. On the contrary, if the query result indicates that neither the electronic device a nor the electronic device D has detected the double-click event, it may be considered that the double-click event is initiated by the user wishing to replace the electronic device to which the stylus pen is connected, and S211 may be executed.
S211, the handwriting pen sends Bluetooth broadcast.
S212, the electronic device B scans for bluetooth broadcasts.
S213, the electronic device C scans for bluetooth broadcasts.
It should be noted that there is no strict sequence between S212 and S213, S212 and S213 may be executed first, S213 and S212 may also be executed first, or S212 and S213 may be executed simultaneously.
S214, the electronic device B inquires the connection state and judges whether the handwriting pen B is connected.
It will be appreciated that stylus B is not the same stylus device as stylus a.
S215, the electronic device B inquires whether the function of the stylus pen is started.
S216, the electronic equipment B pops up a connection prompt box.
It is to be understood that the connection prompt box may be the connection prompt box 310 shown in fig. 8 or the connection prompt box 351 shown in fig. 16.
S217, the electronic equipment C inquires the connection state and judges whether the handwriting pen C is connected.
It will be appreciated that stylus C is not the same stylus device as stylus a. Stylus C and stylus B may be the same stylus device.
S218, the electronic device C inquires whether the function of the stylus pen is started.
And S219, popping up a connection prompt box by the electronic equipment C.
It is to be understood that the connection prompt box may be the connection prompt box 310 shown in fig. 8 or the connection prompt box 351 shown in fig. 16.
And S220, the electronic device B receives the operation of confirming the connection.
It is to be understood that the operation of confirming the connection may be an operation of the user clicking the connection button 312 of the connection prompt box 310 as shown in fig. 8.
And S221, responding to the operation of confirming the connection, and pairing the electronic equipment B and the stylus pen A.
S222, the electronic device B establishes BT connection with the stylus pen A.
It should be noted that the basic principle and the generated technical effect of the stylus pen connection method provided in the embodiment of the present application are the same as those of the above embodiment, and for a brief description, no part of this embodiment is mentioned, and reference may be made to the corresponding contents of S101 to S116 described above.
Therefore, the handwriting pen connection method provided by the embodiment of the application is provided. Only by double-clicking (or other operations) the pen point of the handwriting pen on a screen of a non-connection device (such as the electronic device B, the electronic device C and a desktop), the electronic device (the electronic device B and the electronic device C) with the function of starting the handwriting pen around the handwriting pen can pop up a connection prompt box, so that a user can select the device to pair and connect according to requirements.
Next, the mode (2) (i.e., the connection is actively initiated by the stylus) will be explained.
Fig. 25 is a flowchart of a stylus pen connection method according to an embodiment of the present disclosure. The stylus pen connection method comprises the following steps:
s301, the electronic device A and the stylus pen A are successfully paired through Bluetooth.
S302, double-clicking the main screen of the electronic device B by the stylus pen A.
S303, the stylus pen A detects a double-click event.
S304, the stylus pen A inquires the connection state and judges whether the electronic equipment is connected.
If the stylus pen a inquires that the electronic device (e.g., the electronic device a) is connected to itself, S305 may be executed; if the stylus pen a inquires that the electronic device is not connected, S308 may be executed.
S305, the stylus pen A sends a query instruction to the electronic device A.
S306, the electronic device A feeds back the query result to the stylus pen A.
S307, the stylus pen A judges whether the electronic device A detects a double-click event.
If the stylus pen a determines that the electronic device a does not detect the double-click event, S308 may be executed; and if the stylus pen A judges that the electronic equipment A detects the double-click event, ending the process.
It should be noted that, in the embodiment of the present application, S301 to S307 are processes of determining whether the electronic device a detects a double-click event by the stylus 100, and the basic principle and the generated technical effect are the same as those of the above embodiment, and for a brief description, reference may be made to the contents of S101 to S107 in the above embodiment for what is not mentioned in this embodiment.
S308, the stylus pen A enters a scanning (scan) state.
It can be understood that, after the stylus pen a enters the scan state, the bluetooth scanning can be performed by using 32 frequency points in the frequency band of 2.402GHz to 2.480GHz as channels. The stylus pen a as a scanning device can scan from 32 channels at certain time intervals whether there is bluetooth broadcast transmitted by other devices (e.g., the electronic device B).
S309, the electronic device B detects a double-click event.
It will be appreciated that since the double-click event is initiated by stylus a on electronic device B, electronic device B may also detect the double-click event.
S310, the electronic device B inquires the connection state and judges whether the handwriting pen B is connected.
After detecting the double-click event, the electronic device B may query its connection status to determine whether a stylus (e.g., stylus B) is connected. In an optional implementation manner, the electronic device B may read the identification information of the connection state, for example, if the identification information is 1, it indicates that the electronic device B is connected with another stylus pen; if the identification information is 0, it indicates that the electronic device B is not connected with another stylus pen.
If the electronic device B inquires that the stylus pen is not connected, S311 may be executed; if the electronic device B inquires that the stylus pen (e.g., the stylus pen B) is connected, S312 may be executed.
S311, the electronic device B judges whether the function of the stylus pen is started.
If the electronic device B determines that the function of the stylus pen is turned on, S314 may be executed; and if the electronic equipment B judges that the function of the handwriting pen is not started, ending the process.
S312, the electronic device B judges whether the double-click event is initiated by the stylus pen B.
It will be appreciated that in the case where it is determined that electronic device B is connected to stylus B, it is also possible that a double-click event detected by electronic device B is initiated by stylus B. If the double-click event is initiated by the stylus pen B, it may be considered that the double-click operation may be caused by the user double-clicking the screen of the electronic device B using the stylus pen B, and for normal interaction between the stylus pen B and the electronic device B, the electronic device connected to the stylus pen B does not need to be replaced, and the process may be ended.
If the double-click operation is not initiated by the stylus B, it can be considered that the double-click operation may be initiated by the user who wishes to replace the electronic device to which the stylus a is connected, and thus S312 may be continuously performed.
In an alternative embodiment, electronic device B may send a query instruction to stylus B, which may be used to indicate whether a double-click event is detected by stylus B query. After receiving the query instruction, the stylus pen B may query whether a double-click event is detected in response to the query instruction, and feed back a query result to the electronic device B. In this way, electronic device B may determine whether the double-click event was initiated by stylus B based on the query result.
S313, the electronic device B is disconnected from the stylus pen B.
Since the double-click operation is not initiated by stylus B, it can be considered that the double-click operation may be initiated by the user wishing to replace the electronic device to which stylus a is connected, and thus the electronic device B is disconnected from stylus B to establish a connection between electronic device B and stylus a.
S314, the electronic device B sends the Bluetooth broadcast.
It should be noted that S303 to S308 show the flow of the stylus pen B entering the scan state, and S309 to S315 show the flow of the electronic device B sending the bluetooth broadcast. However, the sequence numbers are only for explanation and illustration, and in reality, there is no strict sequence between the two flows.
In an alternative embodiment, the electronic device B may transmit the bluetooth broadcast within a second preset time. For example, the stylus may transmit a bluetooth broadcast for M seconds. Wherein, M can be any number such as 1, 2.5, 4.7, etc.
S315, the stylus pen A scans the Bluetooth broadcast.
And S316, pairing the stylus pen A and the electronic equipment.
It will be appreciated that stylus a is in the scan state and electronic device B is in the discoverable, connectable state. After the stylus pen A scans the Bluetooth broadcast of the electronic device B, the pairing with the electronic device B can be carried out.
S317, establishing Bluetooth connection between the stylus pen A and the electronic equipment.
Therefore, according to the stylus connection method provided by the embodiment of the application, after the stylus double-clicks the electronic device (for example, the electronic device B) with the stylus function, the stylus can be automatically paired with the electronic device and connected without a connection prompt box; and even if other stylus (e.g., stylus B) is connected to the electronic device in front, the previous stylus is actively disconnected. The whole connection process is simpler, and secondary selection by a user is not needed.
As shown in fig. 26, the embodiment of the present application further provides another stylus pen connection method. The method comprises the following steps:
s401, the electronic device A and the stylus pen A are successfully paired through Bluetooth.
S402, double-clicking the main screen of the electronic device B by the stylus pen A.
S403, the stylus pen A detects a double-click event.
S404, the stylus pen A inquires the connection state and judges whether the electronic equipment is connected.
If the stylus pen a inquires that the stylus pen a is connected with the electronic device (e.g., the electronic device a), S405 may be executed; if the stylus pen a inquires that the electronic device is not connected, S408 may be performed.
S405, the stylus pen A sends a query instruction to the electronic device A.
S406, the electronic device A feeds back the query result to the stylus pen A.
S407, the stylus pen A judges whether the electronic device A detects a double-click event.
If the stylus pen A judges that the electronic device A does not detect the double-click event, S408 can be executed; and if the stylus pen A judges that the electronic equipment A detects the double-click event, ending the process.
S408, the stylus pen A enters a scanning scan state.
It should be noted that, in the embodiment of the present application, S401 to S408 are processes of entering the scanning scan state by the stylus pen 100, the basic principle and the generated technical effect are the same as those of the above embodiment, and for the sake of brief description, no part of this embodiment is mentioned, and the contents of S401 to S408 in the above embodiment may be referred to.
And S409, the electronic device B detects a double-click event.
S410, the electronic equipment B inquires the connection state and judges whether the handwriting pen B is connected.
If the electronic device B inquires that the stylus pen is not connected, S413 may be executed; if the electronic device B inquires that the stylus pen (e.g., the stylus pen B) is connected, S411 may be executed.
S411, the electronic device B judges whether the double-click event is initiated by the stylus pen B.
If the double-click event is initiated by stylus B, the process may end. If the double-click operation is not initiated by stylus B, execution may continue with S412.
And S412, disconnecting the electronic equipment B from the stylus pen B.
Since the double-click operation is not initiated by the stylus pen B, it can be considered that the double-click operation may be initiated by the user wishing to replace the electronic device to which the stylus pen a is connected, and therefore the electronic device B is disconnected from the stylus pen B to establish a connection between the electronic device B and the stylus pen a.
S413, the electronic device B judges whether the function of the handwriting pen is started or not.
If the electronic device B determines that the function of the stylus pen is turned on, S416 may be executed; if the electronic device B determines that the stylus pen function is not turned on, S412 may be executed.
And S414, popping up a function prompt box.
It is to be appreciated that the function prompt box can be the function prompt box 370 shown in FIG. 18. The function prompt box 370 is provided with a reminding character 371, and the reminding character 371 is used for reminding the user that the second electronic device 300 does not start the function of the handwriting pen.
S415, the electronic device B receives an operation of starting the function of the stylus pen.
In addition, the function prompt box 370 may also include a "go to open" button 372. As such, the operation of starting the function of the stylus pen may include: electronic device B receives an operation of the "go on" button 372 by the user, and in response to the operation, the second electronic device 300 jumps to a stylus function interface 380 shown in fig. 19, the stylus function interface 380 being provided with a switch button 381. The second electronic device 300 receives an operation (for example, a click operation, a slide operation, or the like) of the switch button 381 by the user, and in response to the operation, the second electronic device 300 may switch the switch button 381 to the on state.
And S416, the electronic device B sends the Bluetooth broadcast.
S403 to S408 show the flow of the stylus pen B entering the scan state, and S409 to S416 show the flow of the electronic device B sending the bluetooth broadcast. However, the sequence numbers are only for explanation and illustration, and in reality, there is no strict sequence between the two flows.
S417, the stylus pen A scans the Bluetooth broadcast.
And S418, pairing the stylus pen A and the electronic equipment B.
S419, the stylus pen A and the electronic device B establish Bluetooth connection.
It should be noted that the basic principle and the generated technical effect of the stylus pen connection method provided in the embodiment of the present application are the same as those of the above embodiment, and for a brief description, no part of this embodiment is mentioned, and reference may be made to the corresponding contents of S301 to S317 described above.
Compared with the foregoing embodiment, the handwriting pen connection method provided by the embodiment of the application can prompt the user to start the handwriting pen function in time when the electronic device does not start the handwriting pen function, and can effectively reduce the problem of connection failure caused by the fact that the handwriting pen function is not started.
Please refer to fig. 27, which is a signaling diagram of a stylus pen connection method according to an embodiment of the present application. The method comprises the following steps:
s2701, the first stylus pen detects a target event.
It can be seen that the first stylus has been paired with the first electronic device and not with the second electronic device. The first stylus pen may be the stylus pen 100 (stylus pen a) in the bluetooth system 10 shown in fig. 1, the first electronic device may be the first electronic device 200 (electronic device a), and the second electronic device may be the second electronic device 300 (electronic device B). In addition, the first stylus pen, the first electronic device and the second electronic device all start a Bluetooth function.
The target event may include a double-click event, a triple-click event, a long-press event or a slide-up event, a slide-down event, a draw-a-particular-shape (e.g., a circle, a triangle, etc.) event, and is not particularly limited herein.
S2702, in response to detecting the target event, the first stylus pen transmits a Bluetooth broadcast.
The Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first handwriting pen can be paired, and the second indication information is used for indicating that the first handwriting pen can be connected.
In an alternative embodiment, the first stylus pen sends the bluetooth broadcast if the first stylus pen detects the target event and the first stylus pen is not connected to the first electronic device.
In an optional implementation manner, if the first stylus pen detects a target event and the first stylus pen is connected to the first electronic device, the first stylus pen sends a first instruction to the first electronic device, where the first instruction is used to query whether the first electronic device detects the target event; the first stylus receiving a first response from the first electronic device, the first response indicating that the first electronic device did not detect the target event; the first stylus sends a bluetooth broadcast. The first instruction may be a query instruction, and the first response may be a query result.
In an alternative embodiment, the first stylus transmits the bluetooth broadcast for a first predetermined time.
In an optional implementation manner, after the first stylus pen is successfully connected with the second electronic device within a first preset time, the first stylus pen stops sending the bluetooth broadcast.
S2703, the second electronic device scans the Bluetooth broadcast.
S2704, in response to the scanning of the Bluetooth broadcast, the second electronic device displays a connection prompt box.
Illustratively, the connection prompt box may be the connection prompt box 310 shown in fig. 8. The connection prompt box includes a first option (e.g., a connection button 312) for instructing the second electronic device to establish a bluetooth connection with the first stylus.
In an optional implementation manner, if the second electronic device scans the bluetooth broadcast and starts the function of the handwriting pen, the second electronic device displays a connection prompt box; wherein the stylus function is used for instructing the second electronic device to display a connection prompt box when the connectable first stylus is found.
S2705, responding to the operation of the user on the first option, the second electronic device is paired with the first stylus pen, and Bluetooth connection is established between the second electronic device and the first stylus pen.
In an optional implementation manner, after the second electronic device is connected with the first stylus pen in a pairing manner, the second electronic device may display a reminding message, where the reminding message is used to prompt a user that the second electronic device is successfully connected with the first stylus pen. Illustratively, the reminder may be reminder 313 as shown in FIG. 9.
In an optional implementation manner, if the first stylus pen is a single connection device and the first stylus pen is connected to the first electronic device, after the second electronic device is connected to the first stylus pen in a pairing manner, the first stylus pen sends a disconnection request to the first electronic device, where the disconnection request includes an identifier of the first stylus pen. And the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
In an optional implementation manner, if the first stylus is a multi-connection device and the first stylus is connected to the first electronic device, after the second electronic device is connected to the first stylus in a pairing manner, the first stylus sets the second electronic device as an active device, and the first stylus sets the first electronic device as an inactive device. When the second electronic equipment is set as the active equipment, the first handwriting pen sends pressure-sensitive data to the second electronic equipment, and the second electronic equipment receives the pressure-sensitive data; when the first electronic device is set as an inactive device, the first stylus pen does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
It should be noted that, in the embodiment of the present application, the first electronic device or the second electronic device may be in a screen-off state or a screen-on state; when the first electronic device or the second electronic device is in a bright screen state, the first electronic device or the second electronic device is in a screen locking interface, a main interface or an interface corresponding to an application program.
Please refer to fig. 28, which is a signaling diagram of another stylus pen connection method according to an embodiment of the present application. The method comprises the following steps:
s2801, the second electronic device detects a target event.
It can be seen that the second electronic device is not paired with the first stylus, but the first stylus has been paired with the first electronic device. The first stylus pen may be the stylus pen 100 (stylus pen a) in the bluetooth system 10 shown in fig. 1, the first electronic device may be the first electronic device 200 (electronic device a), and the second electronic device may be the second electronic device 300 (electronic device B). In addition, the first stylus pen, the first electronic device and the second electronic device all start a Bluetooth function.
The target event may include a double-click event, a triple-click event, a long-press event or a slide-up event, a slide-down event, a draw-a-particular-shape (e.g., a circle, a triangle, etc.) event, and is not particularly limited herein.
S2802, in response to detecting the target event, the second electronic device transmits a bluetooth broadcast.
The Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic equipment can be paired, the second indication information is used for indicating that the second electronic equipment can be connected, and the target event comprises a double-click event, a three-click event or a long-press event.
In an alternative embodiment, the second electronic device transmits the bluetooth broadcast within a first preset time.
In an optional implementation manner, within a first preset time, after the second electronic device and the first stylus pen are successfully connected, the second electronic device stops sending the bluetooth broadcast.
S2803, the first stylus pen detects a target event.
It should be noted that there is no strict order between S2803 and S2801. S2801 and S2803 may be performed first, S2803 and S2801 may be performed first, or S2801 and S2803 may be performed simultaneously.
S2804, the first stylus scans the Bluetooth broadcast.
S2805, in response to the target event being detected and the Bluetooth broadcast being scanned, the first stylus pen is paired with the second electronic device, and Bluetooth connection is established with the second electronic device.
In an alternative embodiment, if the first stylus is not connected to the first electronic device, the first stylus is paired with the second electronic device and bluetooth connection is established with the second electronic device in response to detecting the target event and scanning for the bluetooth broadcast.
In an alternative embodiment, if the first stylus is connected to the first electronic device, in response to detecting the target event and scanning for the bluetooth broadcast, the first stylus sends a first instruction to the first electronic device, where the first instruction is used to query whether the first electronic device detects the target event. The first stylus receives a first response from the first electronic device indicating that the first electronic device did not detect the target event. The first stylus pen is paired with the second electronic device, and Bluetooth connection is established between the first stylus pen and the second electronic device.
In an optional implementation manner, after the second electronic device is connected with the first stylus pen in a pairing manner, if the first stylus pen is a single connection device and the first stylus pen is connected with the first electronic device, the first stylus pen sends a disconnection request to the first electronic device, where the disconnection request includes an identifier of the first stylus pen. And the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
In an optional implementation manner, after the second electronic device is connected with the first stylus in a paired manner, if the first stylus is a multi-connection device and the first stylus is connected with the first electronic device, the first stylus sets the second electronic device as an active device, and the first stylus sets the first electronic device as an inactive device. When the second electronic equipment is set as the active equipment, the first handwriting pen sends pressure-sensitive data to the second electronic equipment, and the second electronic equipment receives the pressure-sensitive data; when the first electronic device is set as an inactive device, the first stylus pen does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
In an alternative embodiment, after the second electronic device is connected with the first stylus pen in a pairing mode, the second electronic device can display a reminding message. The reminding information is used for reminding the user that the second electronic equipment is successfully connected with the first handwriting pen.
Another embodiment of the present application provides a bluetooth system, which includes a first stylus pen, a first electronic device, and a second electronic device, where the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, the bluetooth function is enabled in all of the first stylus pen, the first electronic device, and the second electronic device, the first stylus pen performs each function or step of the stylus pen a in the above-mentioned embodiments of the methods, and the second electronic device performs each function or step of the electronic device B in the above-mentioned embodiments of the methods.
Another embodiment of the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are run on the first stylus, the first stylus is caused to perform the functions or steps of the stylus a in the above-mentioned embodiments of the methods; the computer instructions, when executed on the second electronic device, cause the second electronic device to perform the functions or steps of electronic device B in the above-described method embodiments.
Another embodiment of the present application provides a chip system, as shown in fig. 29, which includes at least one processor 2901 and at least one interface circuit 2902. The processor 2901 and the interface circuit 2902 may be interconnected by wires. For example, interface circuit 2902 might be used to receive signals from another apparatus (e.g., the memory of a first stylus or the memory of a second electronic device). Also for example, interface circuit 2902 might be used to send signals to other devices (e.g., processor 2901).
For example, interface circuit 2902 may read instructions stored in memory in the first stylus and send the instructions to processor 2901. The instructions, when executed by the processor 2901, may cause a first stylus (such as stylus 100 shown in FIG. 2) to perform various steps in the various embodiments described above.
Also for example, interface circuit 2902 may read instructions stored in a memory in the second electronic device and send the instructions to processor 2901. The instructions, when executed by the processor 2901, may cause a second electronic device (such as the electronic device shown in fig. 4) to perform the various steps in the embodiments described above.
Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
In summary, compared with the manner of pairing connection by using magnetic attraction, a USB interface and the like in the prior art, the method for connecting the stylus pen provided by the embodiment of the application can realize pairing connection only by double-click operation of the user, and is simpler and more convenient. In addition, the method is also suitable for the handwriting pen equipment without a magnetic attraction function and a USB interface, and has strong adaptability.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (23)

1. A stylus pen connection method is applied to a Bluetooth system, the Bluetooth system comprises a first stylus pen, a first electronic device and a second electronic device, the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device and the second electronic device all start Bluetooth functions, and the method comprises the following steps:
in response to detecting a target event, the first stylus sending a Bluetooth broadcast; the Bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the first stylus pen can be paired, the second indication information is used for indicating that the first stylus pen can be connected, and the target event comprises a double-click event, a triple-click event or a long-press event;
in response to scanning the Bluetooth broadcast, the second electronic device displaying a connection prompt box; the connection prompt box comprises a first option, and the first option is used for indicating the second electronic equipment to establish Bluetooth connection with the first stylus;
and responding to the operation of the user on the first option, the second electronic equipment is paired with the first stylus pen, and Bluetooth connection is established with the first stylus pen.
2. The stylus connection method of claim 1, wherein in response to detecting a target event, the first stylus transmits a bluetooth broadcast comprising:
and if the first handwriting pen detects the target event and the first handwriting pen is not connected with the first electronic device, the first handwriting pen sends the Bluetooth broadcast.
3. The stylus connection method of claim 1, wherein in response to detecting a target event, the first stylus transmits a bluetooth broadcast comprising:
if the first stylus pen detects the target event and the first stylus pen is connected with the first electronic device, the first stylus pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects the target event;
the first stylus receiving a first response from the first electronic device indicating that the target event was not detected by the first electronic device;
the first stylus pen sends the bluetooth broadcast.
4. The stylus connection method of any one of claims 1-3, wherein in response to scanning the Bluetooth broadcast, the second electronic device displays a connection prompt box comprising:
if the second electronic device scans the Bluetooth broadcast and starts a handwriting pen function, the second electronic device displays the connection prompt box; wherein the stylus function is used for instructing the second electronic device to display the connection prompt box when the connectable first stylus is found.
5. The stylus connection method according to any one of claims 1-4, further comprising:
if the first handwriting pen is a single connection device and the first handwriting pen is connected with the first electronic device, the first handwriting pen sends a disconnection request to the first electronic device, wherein the disconnection request comprises an identifier of the first handwriting pen;
and the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
6. The stylus connection method according to any one of claims 1-4, further comprising:
if the first stylus is a multi-connection device and the first stylus is connected with the first electronic device, the first stylus sets the second electronic device as an active device, and the first stylus sets the first electronic device as a non-active device;
when the second electronic device is set as an active device, the first stylus pen sends pressure sensing data to the second electronic device, and the second electronic device receives the pressure sensing data; when the first electronic device is set as an inactive device, the first stylus does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
7. The stylus connection method according to any one of claims 1-6, further comprising:
and after the second electronic equipment is successfully connected with the first handwriting pen, displaying reminding information, wherein the reminding information is used for reminding a user that the second electronic equipment is successfully connected with the first handwriting pen.
8. The stylus connection method according to any one of claims 1-7, wherein the first stylus transmits a Bluetooth broadcast, comprising:
and the first handwriting pen sends the Bluetooth broadcast in first preset time.
9. The stylus pen connection method of claim 8, further comprising:
and in the first preset time, after the first handwriting pen is successfully connected with the second electronic equipment, the first handwriting pen stops sending the Bluetooth broadcast.
10. The stylus pen connection method according to any one of claims 1 to 9,
the first electronic equipment or the second electronic equipment is in a screen-off state or a screen-on state; and when the first electronic equipment or the second electronic equipment is in a bright screen state, the first electronic equipment or the second electronic equipment is in a screen locking interface, a main interface or an interface corresponding to an application program.
11. The stylus pen connection method according to any one of claims 1 to 10,
the first stylus, in response to detecting a target event, transmitting a Bluetooth broadcast, comprising:
after the first handwriting pen detects the target event, judging whether the first handwriting pen is connected with the first electronic device or not; wherein the target event comprises a double-click event, a triple-click event or a long-press event;
if the first handwriting pen is not connected with the first electronic device, the first handwriting pen sends the Bluetooth broadcast;
if the first stylus pen is connected with the first electronic device, the first stylus pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects the target event; the first stylus receiving a first response from the first electronic device indicating that the target event was not detected by the first electronic device; the first stylus pen sends the Bluetooth broadcast;
the second electronic device displaying a connection prompt box in response to scanning the Bluetooth broadcast, comprising:
after the second electronic device scans the Bluetooth broadcast, judging whether the second electronic device is connected with a second handwriting pen;
if the second electronic equipment is not connected with a second handwriting pen, judging whether the second electronic equipment starts the function of the handwriting pen; wherein the stylus function is to instruct the second electronic device to display the connection prompt box when a connectable first stylus is found;
if the second electronic equipment starts the function of the handwriting pen, the second electronic equipment displays the connection prompt box;
the second electronic device is paired with the first stylus pen and establishes a bluetooth connection with the first stylus pen in response to the user operating the first option, including:
in response to user operation of the first option, the second electronic device is paired with the first stylus;
after the second electronic device is successfully paired with the first stylus pen, the second electronic device is connected with the first stylus pen in a Bluetooth mode.
12. A stylus pen connection method is applied to a Bluetooth system, the Bluetooth system comprises a first stylus pen, a first electronic device and a second electronic device, the first stylus pen is paired with the first electronic device, the first stylus pen is not paired with the second electronic device, and the first stylus pen, the first electronic device and the second electronic device all start Bluetooth functions, and the method comprises the following steps:
in response to detecting a target event, the second electronic device sends a bluetooth broadcast, the bluetooth broadcast carries first indication information and second indication information, the first indication information is used for indicating that the second electronic device can be paired, the second indication information is used for indicating that the second electronic device can be connected, and the target event includes a double-click event, a triple-click event or a long-press event;
in response to detecting the target event and scanning the Bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a Bluetooth connection with the second electronic device.
13. The stylus connection method of claim 12, wherein in response to detecting the target event and scanning for the bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a bluetooth connection with the second electronic device, comprising:
and if the first stylus pen is not connected with the first electronic device, responding to the detection of the target event and the scanning of the Bluetooth broadcast, pairing the first stylus pen with the second electronic device, and establishing Bluetooth connection with the second electronic device.
14. The stylus connection method of claim 12, wherein in response to detecting the target event and scanning for the bluetooth broadcast, the first stylus is paired with the second electronic device and establishes a bluetooth connection with the second electronic device, comprising:
if the first stylus pen is connected with the first electronic device, responding to the detection of the target event and the scanning of the Bluetooth broadcast, the first stylus pen sends a first instruction to the first electronic device, wherein the first instruction is used for inquiring whether the first electronic device detects the target event;
the first stylus receiving a first response from the first electronic device indicating that the target event was not detected by the first electronic device;
the first stylus pen is paired with the second electronic device, and Bluetooth connection is established between the first stylus pen and the second electronic device.
15. The stylus pen connection method according to any one of claims 12-14, further comprising:
if the first handwriting pen is a single connection device and the first handwriting pen is connected with the first electronic device, the first handwriting pen sends a disconnection request to the first electronic device, wherein the disconnection request comprises an identifier of the first handwriting pen;
and the first electronic equipment receives the disconnection request and disconnects the first handwriting pen.
16. The stylus pen connection method according to any one of claims 12-14, further comprising:
if the first stylus is a multi-connection device and the first stylus is connected with the first electronic device, the first stylus sets the second electronic device as an active device, and the first stylus sets the first electronic device as a non-active device;
when the second electronic device is set as an active device, the first stylus pen sends pressure sensing data to the second electronic device, and the second electronic device receives the pressure sensing data; when the first electronic device is set as an inactive device, the first stylus does not transmit pressure-sensitive data to the first electronic device, and the first electronic device does not receive the pressure-sensitive data.
17. The stylus pen connection method according to any one of claims 12-16, further comprising:
and after the second electronic equipment is successfully connected with the first handwriting pen, displaying reminding information, wherein the reminding information is used for reminding a user that the second electronic equipment is successfully connected with the first handwriting pen.
18. The stylus pen connection method according to any one of claims 12-17, wherein the second electronic device transmits a bluetooth broadcast comprising:
and the second electronic equipment sends the Bluetooth broadcast in first preset time.
19. The stylus pen connection method of claim 18, further comprising:
and in the first preset time, after the second electronic equipment and the first handwriting pen are successfully connected, the second electronic equipment stops sending the Bluetooth broadcast.
20. The stylus pen connection method according to any one of claims 12 to 19,
the first electronic equipment or the second electronic equipment is in a screen-off state or a screen-on state; and when the first electronic equipment or the second electronic equipment is in a bright screen state, the first electronic equipment or the second electronic equipment is in a screen locking interface, a main interface or an interface corresponding to an application program.
21. The stylus pen connection method according to any one of claims 12 to 20,
the second electronic device transmitting a Bluetooth broadcast in response to detecting the target event, comprising:
after the second electronic device detects the target event, judging whether the second electronic device is connected with a second handwriting pen; wherein the target event comprises a double-click event, a triple-click event or a long-press event;
if the second electronic equipment is connected with the second handwriting pen, judging whether the target event is initiated by the second handwriting pen;
if the second target event is not initiated by the second handwriting pen, the second electronic device is disconnected from the second handwriting pen and sends a Bluetooth broadcast;
if the second electronic equipment is not connected with the second handwriting pen, judging whether the second electronic equipment starts the function of the handwriting pen; the function of the stylus pen is used for indicating that the second electronic equipment actively performs pairing connection with the stylus pen initiating the target event after detecting the target event;
if the second electronic device starts the function of a handwriting pen, the second electronic device sends the Bluetooth broadcast;
the step of, in response to detecting the target event and scanning the bluetooth broadcast, pairing the first stylus with the second electronic device and establishing a bluetooth connection with the second electronic device includes:
after the first handwriting pen detects the target event, judging whether the first handwriting pen is connected with the first electronic device or not;
if the first handwriting pen is not connected with the first electronic device, the first handwriting pen enters a scanning state;
if the first stylus pen is connected with the first electronic device, the first stylus pen sends a first instruction to the first electronic device, and the first instruction is used for inquiring whether the first electronic device detects the target event; the first stylus receiving a first response from the first electronic device indicating that the target event was not detected by the first electronic device; the first stylus enters a scanning state;
if the Bluetooth broadcast is scanned by the first stylus pen, pairing the first stylus pen and the second electronic equipment;
after the first stylus pen is successfully paired with the second electronic device, the stylus pen is connected with the second electronic device in a Bluetooth mode.
22. A bluetooth system comprising a first stylus, a first electronic device, and a second electronic device, the first stylus having been paired with the first electronic device, the first stylus not being paired with the second electronic device, the first stylus, the first electronic device, and the second electronic device all having bluetooth functionality enabled, the first stylus performing the method of any of claims 1-21, the second electronic device performing the method of any of claims 1-21.
23. A computer-readable storage medium comprising computer instructions;
when the computer instructions are run on a first stylus, causing the first stylus to perform the method of any one of claims 1-21;
alternatively, the computer instructions, when executed on a second electronic device, cause the second electronic device to perform the method of any of claims 1-21.
CN202110436431.2A 2021-04-22 2021-04-22 Stylus pen connection method and Bluetooth system Active CN113115294B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110436431.2A CN113115294B (en) 2021-04-22 2021-04-22 Stylus pen connection method and Bluetooth system
PCT/CN2022/070856 WO2022222552A1 (en) 2021-04-22 2022-01-07 Stylus connection method and bluetooth system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110436431.2A CN113115294B (en) 2021-04-22 2021-04-22 Stylus pen connection method and Bluetooth system

Publications (2)

Publication Number Publication Date
CN113115294A true CN113115294A (en) 2021-07-13
CN113115294B CN113115294B (en) 2022-05-03

Family

ID=76719584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110436431.2A Active CN113115294B (en) 2021-04-22 2021-04-22 Stylus pen connection method and Bluetooth system

Country Status (2)

Country Link
CN (1) CN113115294B (en)
WO (1) WO2022222552A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518336A (en) * 2021-07-16 2021-10-19 Oppo广东移动通信有限公司 Bluetooth connection prompting method, device, terminal and storage medium
CN113645599A (en) * 2021-08-13 2021-11-12 联想(北京)有限公司 Information processing method based on electronic equipment interaction and first electronic equipment
CN113810884A (en) * 2021-09-15 2021-12-17 荣耀终端有限公司 Electronic equipment connection method and electronic equipment
CN114217699A (en) * 2021-11-02 2022-03-22 华为技术有限公司 Method for detecting pen point direction of stylus pen, electronic equipment and stylus pen
WO2022222552A1 (en) * 2021-04-22 2022-10-27 荣耀终端有限公司 Stylus connection method and bluetooth system
WO2023051204A1 (en) * 2021-09-29 2023-04-06 华为技术有限公司 Cross-device connection method, electronic device and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050073393A (en) * 2004-01-09 2005-07-13 구대근 Finger-cad-pen,c-pen
EP2343630A2 (en) * 2010-01-06 2011-07-13 Samsung Electronics Co., Ltd. Multi-functional pen and method for using multi-functional pen
CN103744555A (en) * 2014-01-06 2014-04-23 溢洋光电(深圳)有限公司 Bidirectional display and reduction method for instant messaging handwriting as well as related system and method
KR20150069969A (en) * 2013-12-16 2015-06-24 최준호 Bluetooth stylus pen, including NFC tag
CN105094383A (en) * 2014-05-13 2015-11-25 联想(新加坡)私人有限公司 Smart pen pairing and connection
US20160134738A1 (en) * 2011-10-06 2016-05-12 Qualcomm Incorporated Pen-based content transfer system and method thereof
CN205302216U (en) * 2015-12-29 2016-06-08 广州磐信计算机科技有限公司 Bluetooth communication writing pen
CN105898678A (en) * 2016-03-29 2016-08-24 联想(北京)有限公司 Pairing method and electronic device
CN106131971A (en) * 2016-06-20 2016-11-16 乐视控股(北京)有限公司 The method of attachment of bluetooth equipment and device
CN108919983A (en) * 2018-06-15 2018-11-30 广州视源电子科技股份有限公司 Writing starting method and system based on intelligent pen operation
CN110347269A (en) * 2019-06-06 2019-10-18 华为技术有限公司 A kind of sky mouse mode implementation method and relevant device
CN110582078A (en) * 2019-08-28 2019-12-17 RealMe重庆移动通信有限公司 Bluetooth pairing method and device, storage medium and electronic equipment
WO2020024273A1 (en) * 2018-08-03 2020-02-06 深圳市汇顶科技股份有限公司 Short-distance wireless communication connection method and system, active pen, and touch screen
CN111679755A (en) * 2020-04-29 2020-09-18 上海奇初教育科技有限公司 Handwriting big data collection system
CN112527134A (en) * 2020-12-03 2021-03-19 维沃移动通信有限公司 Touch pen, control method thereof and electronic equipment
CN112637826A (en) * 2020-12-14 2021-04-09 深圳市皓丽智能科技有限公司 Method for connecting touch pen and touch equipment and related equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004038354A (en) * 2002-07-01 2004-02-05 Toshiba Corp Information terminal
CN109871143A (en) * 2019-02-12 2019-06-11 广州视源电子科技股份有限公司 Pairing method and device for touch pen and touch equipment
CN110968206A (en) * 2019-11-21 2020-04-07 上海墨案智能科技有限公司 Method and equipment for pressing extended function key of electromagnetic handwriting pen
CN113115294B (en) * 2021-04-22 2022-05-03 荣耀终端有限公司 Stylus pen connection method and Bluetooth system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050073393A (en) * 2004-01-09 2005-07-13 구대근 Finger-cad-pen,c-pen
EP2343630A2 (en) * 2010-01-06 2011-07-13 Samsung Electronics Co., Ltd. Multi-functional pen and method for using multi-functional pen
US20160134738A1 (en) * 2011-10-06 2016-05-12 Qualcomm Incorporated Pen-based content transfer system and method thereof
KR20150069969A (en) * 2013-12-16 2015-06-24 최준호 Bluetooth stylus pen, including NFC tag
CN103744555A (en) * 2014-01-06 2014-04-23 溢洋光电(深圳)有限公司 Bidirectional display and reduction method for instant messaging handwriting as well as related system and method
CN105094383A (en) * 2014-05-13 2015-11-25 联想(新加坡)私人有限公司 Smart pen pairing and connection
CN205302216U (en) * 2015-12-29 2016-06-08 广州磐信计算机科技有限公司 Bluetooth communication writing pen
CN105898678A (en) * 2016-03-29 2016-08-24 联想(北京)有限公司 Pairing method and electronic device
CN106131971A (en) * 2016-06-20 2016-11-16 乐视控股(北京)有限公司 The method of attachment of bluetooth equipment and device
CN108919983A (en) * 2018-06-15 2018-11-30 广州视源电子科技股份有限公司 Writing starting method and system based on intelligent pen operation
WO2020024273A1 (en) * 2018-08-03 2020-02-06 深圳市汇顶科技股份有限公司 Short-distance wireless communication connection method and system, active pen, and touch screen
CN110347269A (en) * 2019-06-06 2019-10-18 华为技术有限公司 A kind of sky mouse mode implementation method and relevant device
CN110582078A (en) * 2019-08-28 2019-12-17 RealMe重庆移动通信有限公司 Bluetooth pairing method and device, storage medium and electronic equipment
CN111679755A (en) * 2020-04-29 2020-09-18 上海奇初教育科技有限公司 Handwriting big data collection system
CN112527134A (en) * 2020-12-03 2021-03-19 维沃移动通信有限公司 Touch pen, control method thereof and electronic equipment
CN112637826A (en) * 2020-12-14 2021-04-09 深圳市皓丽智能科技有限公司 Method for connecting touch pen and touch equipment and related equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YANG BO: "Bluetooth:Technology and Applications", 《CAICT》 *
工业设计: "世界之大,任尔挥洒:Phree手写笔", 《工业设计》 *
鲁大师: "华为M-Pencil手写笔的使用方法 你知道吗?", 《新浪财经》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022222552A1 (en) * 2021-04-22 2022-10-27 荣耀终端有限公司 Stylus connection method and bluetooth system
CN113518336A (en) * 2021-07-16 2021-10-19 Oppo广东移动通信有限公司 Bluetooth connection prompting method, device, terminal and storage medium
CN113645599A (en) * 2021-08-13 2021-11-12 联想(北京)有限公司 Information processing method based on electronic equipment interaction and first electronic equipment
CN113810884A (en) * 2021-09-15 2021-12-17 荣耀终端有限公司 Electronic equipment connection method and electronic equipment
WO2023051204A1 (en) * 2021-09-29 2023-04-06 华为技术有限公司 Cross-device connection method, electronic device and storage medium
CN114217699A (en) * 2021-11-02 2022-03-22 华为技术有限公司 Method for detecting pen point direction of stylus pen, electronic equipment and stylus pen
CN114217699B (en) * 2021-11-02 2023-10-20 华为技术有限公司 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
CN117707349A (en) * 2021-11-02 2024-03-15 华为技术有限公司 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen
CN117707349B (en) * 2021-11-02 2024-09-24 华为技术有限公司 Method for detecting pen point direction of handwriting pen, electronic equipment and handwriting pen

Also Published As

Publication number Publication date
WO2022222552A1 (en) 2022-10-27
CN113115294B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN113115294B (en) Stylus pen connection method and Bluetooth system
US11989365B2 (en) Electronic device including electronic pen and method of controlling communication connection between electronic device and electronic pen
EP3905786B1 (en) Method and device for controlling networking of smart home device
EP3454240B1 (en) Unlocking methods and related products
WO2022042656A1 (en) Interface display method, and device
CN110636477B (en) Device connection method, device, terminal and storage medium
CN108702605A (en) A kind of method and apparatus that wireless communication connection is established
US11166141B2 (en) Electronic device and method for displaying inquiry list of external electronic device in Bluetooth™ network environment
US11671806B2 (en) Method for communication based on state of external electronic device and electronic device thereof
WO2020132878A1 (en) Bluetooth service query method and electronic device
WO2023179425A1 (en) Input device connection method, device, and system
US20210045030A1 (en) Electronic device for reducing power consumption and operating method thereof
CN114143906B (en) Electronic equipment connection method and electronic equipment
WO2022228028A1 (en) File sharing method and electronic device
KR102613405B1 (en) Method for sharing for Bluetooth communication Information and Electronic Device
CN114531741A (en) Method, device, equipment and storage medium for connecting external equipment and terminal
US11234113B2 (en) Electronic device and method for providing service by electronic device
US11770693B2 (en) Electronic device for setting address information and method for operating same
CN108304709B (en) Face unlocking method and related product
CN110764808B (en) Client upgrade detection method, device and computer readable storage medium
CN115802325A (en) Stylus pen connection method and Bluetooth system
EP3923537A1 (en) Method for sharing channel information in bluetooth network, and electronic device therefor
CN111601300A (en) Multi-card PDU session establishment method and related equipment
WO2022052907A1 (en) Display method and electronic device
US20220225452A1 (en) Electronic device for transmitting data packets in bluetooth network environment, and method therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant