WO2019090466A1 - 触控笔的固件升级方法、终端及触控笔 - Google Patents

触控笔的固件升级方法、终端及触控笔 Download PDF

Info

Publication number
WO2019090466A1
WO2019090466A1 PCT/CN2017/109687 CN2017109687W WO2019090466A1 WO 2019090466 A1 WO2019090466 A1 WO 2019090466A1 CN 2017109687 W CN2017109687 W CN 2017109687W WO 2019090466 A1 WO2019090466 A1 WO 2019090466A1
Authority
WO
WIPO (PCT)
Prior art keywords
stylus
frame
firmware upgrade
file
touch signal
Prior art date
Application number
PCT/CN2017/109687
Other languages
English (en)
French (fr)
Inventor
殷海林
王诗伟
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN201780001581.2A priority Critical patent/CN110352402A/zh
Priority to PCT/CN2017/109687 priority patent/WO2019090466A1/zh
Publication of WO2019090466A1 publication Critical patent/WO2019090466A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to a firmware upgrade technology, and more particularly to a firmware upgrade method for a stylus, a terminal, and a stylus.
  • the stylus in the prior art is mainly divided into an active pen and a passive pen.
  • the active pen includes a circuit, and the touch signal is transmitted to the touch screen through the pen, so that the touch screen receives the signal, detects the track coordinates of the pen, and realizes the information transmission between the pen and the touch screen.
  • Passive pen which is equivalent to the user's finger, does not emit a signal by itself, but can change the capacitance of the touch screen matrix by contact with the touch screen, thereby realizing the operation of the touch screen.
  • the firmware of the internal circuit can be upgraded, and the upgrade mode can now adopt online upgrade and wireless upgrade.
  • the so-called online upgrade requires professional equipment, for example, a dedicated host computer tool, and the pen end needs to have a programming interface matched with the host computer tool.
  • the customer cannot upgrade according to the above method. operating.
  • the so-called wireless upgrade requires a wireless communication module configured to implement wireless upgrade in the active pen, for example, Bluetooth, WIFI module, etc., but currently most of the active pens are not equipped with a wireless module.
  • the invention provides a firmware upgrade method, a terminal and a stylus for a stylus, which are used to solve the technical problem that the firmware of the stylus without the wireless communication module cannot be upgraded in the prior art.
  • One aspect of the present invention provides a method for upgrading a firmware of a stylus, including:
  • the terminal acquires a firmware upgrade file of the stylus, and encodes the firmware upgrade file;
  • the touch screen of the terminal is in contact with the stylus, and generates a solid after the encoding process.
  • the touch signal corresponding to the upgrade file is sent to the stylus.
  • the touch signal is a capacitively coupled electrical signal.
  • the encoding processing the firmware upgrade file includes:
  • the determining a touch signal waveform corresponding to each of the codes includes:
  • the method further includes:
  • the frame file includes: frame data obtained by dividing a firmware upgrade file by a preset data bit length, a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data, a frame check code for verifying the frame data;
  • Encoding the firmware upgrade file including:
  • a touch signal waveform corresponding to each frame file is determined, and a touch signal of each frame file having the waveform is sent to the stylus.
  • the method further includes:
  • the firmware upgrade file After receiving the upgrade synchronization response signal fed back by the stylus, the firmware upgrade file is encoded.
  • Another aspect of the present invention provides a firmware upgrade method of a stylus, including:
  • the touch signal is a capacitively coupled electrical signal.
  • the decoding process is performed on the touch signal to obtain a firmware upgrade file corresponding to the touch signal, including:
  • the method further includes:
  • the determining each data bit corresponding to the encoding, and generating the firmware upgrade file that includes the data bits includes:
  • the frame file includes: frame data for combining to form a firmware upgrade file, a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data;
  • Each obtained frame file is stored in a memory, and after obtaining all the frame files, the firmware upgrade file is generated.
  • the frame file further includes: a frame check code used to check the frame data; the method further includes:
  • the method before contacting the touch screen of the terminal to receive the touch signal, the method further includes:
  • a terminal includes:
  • the obtaining module is configured to obtain a firmware upgrade file of the stylus
  • An encoding module configured to encode the firmware upgrade file
  • the encoding module is further configured to generate a firmware upgrade file corresponding to the encoding process
  • the touch signal is sent to the stylus.
  • the touch signal is a capacitively coupled electrical signal.
  • the encoding module includes:
  • Determining a sub-module configured to determine a code corresponding to each data bit in the firmware upgrade file; and determining a touch signal waveform corresponding to each of the codes;
  • a sending submodule configured to send a touch signal having the waveform to the stylus.
  • the determining sub-module is specifically configured to determine, according to the preset duration, a duration of each of the encoded waveforms to form a touch signal waveform corresponding to each of the encodings.
  • it also includes:
  • a splitting module configured to split the firmware upgrade file to form each frame file
  • the frame file includes: frame data obtained by dividing a firmware upgrade file by a preset data bit length, a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data, a frame check code for verifying the frame data;
  • the determining sub-module is specifically configured to determine a code corresponding to each data bit in the frame file, and determine a touch signal waveform corresponding to each frame file;
  • the sending submodule is specifically configured to send a touch signal of each frame file having the waveform to the stylus.
  • it also includes:
  • a sending module configured to send an upgrade synchronization signal to the stylus that is in contact with the touch screen of the terminal
  • the encoding module is specifically configured to perform encoding processing on the firmware upgrade file after receiving the upgrade synchronization response signal fed back by the stylus.
  • a stylus including:
  • a touch screen module configured to contact a touch screen of the terminal to receive the touch signal
  • a decoding module configured to perform decoding processing on the touch signal to obtain a firmware upgrade file corresponding to the touch signal
  • the upgrade module is configured to perform firmware upgrade on the stylus according to the firmware upgrade file.
  • the touch signal is a capacitively coupled electrical signal.
  • the decoding module includes:
  • Determining a submodule configured to determine, according to a waveform of the touch signal, a waveform corresponding to the waveform Encoding; determining respective data bits corresponding to the encoding;
  • it also includes:
  • the identification module is configured to identify, according to the duration of the waveform corresponding to each encoding, whether the received waveform signal is a waveform corresponding to the touch signal.
  • the determining sub-module is specifically configured to determine a frame header and a frame tail corresponding to the encoding, to obtain a frame file that includes the data bits, where the frame file includes: a frame data of the upgrade file, a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data;
  • the method further includes: a storage module, configured to store each acquired frame file in a memory, and generate the firmware upgrade file after obtaining all the frame files.
  • the frame file further includes: a frame check code used to check the frame data;
  • the determining submodule is further configured to determine the frame check code corresponding to the code, perform verification on the frame file according to the frame check code, and receive the next frame file after the verification succeeds.
  • the touch screen module includes:
  • the detecting submodule is configured to contact with the touch screen of the terminal to periodically detect the upgrade synchronization signal
  • a sending submodule configured to: when the detecting submodule detects the upgrade synchronization signal, feed back an upgrade synchronization response signal to the terminal, so that the terminal sends the firmware to the stylus according to the synchronization response signal a.
  • a stylus pen including: a touch unit, a demodulator, and a processor;
  • the touch unit is configured to contact a touch screen of the terminal to receive a touch signal
  • the demodulator is connected to the touch unit, and is configured to perform decoding processing on the touch signal to obtain a firmware upgrade file corresponding to the touch signal;
  • the processor is connected to the demodulator, and configured to receive the firmware upgrade file demodulated by the demodulator, and perform firmware upgrade of the stylus according to the firmware upgrade file.
  • the touch unit includes: a capacitive sensor.
  • the demodulator comprises: an active front end (AFE) circuit, an analog to digital conversion (ADC) circuit, and a mixer (Mixer) circuit;
  • AFE active front end
  • ADC analog to digital conversion
  • Mcixer mixer
  • the AFE circuit is configured to perform signal amplification on the received touch signal
  • the ADC circuit is configured to convert a signal amplified voltage and/or current touch signal into a digital touch signal
  • the Mixer circuit is configured to demodulate a digital touch signal output by the ADC circuit to obtain a demodulated firmware upgrade file.
  • the firmware upgrade method, the terminal and the stylus of the stylus provided by the invention, the terminal obtains the firmware upgrade file of the stylus, and encodes the firmware upgrade file; the touch screen of the terminal contacts the stylus, and generates The touch signal corresponding to the firmware upgrade file after the encoding process is sent to the stylus to implement firmware upgrade of the stylus.
  • the stylus contacts the touch screen of the terminal to receive the touch signal; the touch signal is decoded to obtain a firmware upgrade file corresponding to the touch signal; and the stylus is firmware upgraded according to the firmware upgrade file. .
  • the stylus receives the firmware upgrade file by contacting the touch screen of the terminal, and the firmware upgrade file is processed by the codec to conform to the touch signal that can be transmitted between the terminal and the stylus.
  • the form is passed, and the firmware upgrade of the stylus without the wireless module is implemented.
  • FIG. 1 is a flowchart of a method for upgrading a firmware of a stylus according to an exemplary embodiment of the present invention
  • FIG. 2 is a flowchart of a method for upgrading a firmware of a stylus according to another exemplary embodiment of the present invention
  • FIG. 3 is a flowchart of a method for upgrading a firmware of a stylus according to another exemplary embodiment of the present invention
  • FIG. 4 is a flowchart of a method for upgrading a firmware of a stylus according to an exemplary embodiment of the present invention
  • FIG. 5 is a flowchart of a method for upgrading a firmware of a stylus according to another exemplary embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for upgrading a firmware of a stylus according to another exemplary embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a demodulation circuit of a stylus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a test of a demodulation circuit of a stylus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of bandwidth testing of a demodulation circuit of a stylus according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of interaction between a terminal and a stylus according to an exemplary embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a terminal according to an exemplary embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a terminal according to another exemplary embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a stylus according to an exemplary embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a stylus according to another exemplary embodiment of the present invention.
  • FIG. 15 is a schematic structural diagram of a stylus according to an exemplary embodiment of the present invention.
  • FIG. 1 is a flowchart of a firmware upgrade method of a stylus according to an exemplary embodiment of the present invention.
  • an execution body of a firmware upgrade method of a stylus in this embodiment may be a touch screen.
  • Electronic devices such as desktop PCs, notebook computers, tablet PCs (PADs), or mobile phones, such as mobile phones, may be collectively referred to as "terminals.”
  • the firmware upgrade method of the stylus of the embodiment may specifically include:
  • Step 101 The terminal acquires a firmware upgrade file of the stylus and encodes the firmware upgrade file.
  • the terminal can obtain a program file for firmware upgrade of the stylus through the wireless communication mode or other wired connection mode, or the storage device that can be disconnected from the network, and the program file can be A program in any format that matches the format of the stylus firmware upgrade program, for example, a binary file with the suffix ".bin". Since the communication between the terminal and the stylus is based on the contact between the two, if the terminal transmits the firmware upgrade file to the stylus, the firmware upgrade file needs to be converted to match the format of the contact signal between the two. The file format is only able to transfer the firmware upgrade file between the two. Therefore, the terminal can be The firmware upgrade file is encoded so that the numbered file conforms to the delivery format of the information between the two.
  • Step 102 The touch screen of the terminal is in contact with the stylus, and generates a touch signal corresponding to the firmware upgrade file after the encoding process, and sends the touch signal to the stylus.
  • the touch screen of the terminal is in contact with the stylus, and is usually in contact with the sensing unit of the nib portion of the stylus, so that a channel for information interaction is formed between the two, and the signal type of the channel depends on The type of signal that is coupled between the touch screen and the stylus, for example, if capacitively coupled, a capacitively coupled information transfer channel is established between the two.
  • the terminal sends the firmware upgrade file to the stylus according to the signal type of the information interaction channel between the two, so that the stylus receives the firmware upgrade file, thereby implementing the firmware upgrade.
  • the terminal encodes the firmware upgrade file by acquiring the firmware upgrade file of the stylus; the touch screen of the terminal is in contact with the stylus, and the firmware upgrade after the encoding process is generated.
  • the touch signal corresponding to the file is sent to the stylus to implement firmware upgrade of the stylus.
  • the stylus receives the touch signal by contacting the touch screen of the terminal; decoding the touch signal to obtain a firmware upgrade file corresponding to the touch signal; and performing firmware upgrade on the stylus according to the firmware upgrade file. .
  • the stylus receives the firmware upgrade file by contacting the touch screen of the terminal, and the firmware upgrade file is processed by the codec to conform to the touch signal that can be transmitted between the terminal and the stylus.
  • the form is passed, and the firmware upgrade of the stylus without the wireless module is implemented.
  • FIG. 2 is a flowchart of a method for upgrading a firmware of a stylus according to another exemplary embodiment of the present invention. As shown in FIG. 2 , the firmware upgrade method of the stylus of the embodiment is performed on the basis of the previous embodiment. Specifically, including:
  • Step 201 The terminal acquires a firmware upgrade file of the stylus, and determines a code corresponding to each data bit in the firmware upgrade file.
  • the firmware upgrade file it is a file composed of various data bits, and the data bits may be in a binary format or other data formats, for example, a hexadecimal format, etc. What is the data format of each data bit, it is necessary to determine the encoding corresponding to each data bit. In general, for non-binary data bits, they can be converted to a binary machine code representation first, followed by each data bit identified by a "0" or "1".
  • Step 202 The touch screen of the terminal contacts the stylus, determines a touch signal waveform corresponding to each code, and sends a touch signal having the waveform to the stylus.
  • the touch screen of the terminal is in contact with the stylus, and the contact between the two forms a channel for information interaction, and the touch signal transmitted in the channel may be a capacitively coupled electrical signal.
  • the terminal modulates a touch signal waveform capable of representing a firmware upgrade file, and is coupled with the contact capacitance of the pen through the screen, and the pen end receives the touch signal waveform, demodulates the waveform signal, and demodulates the firmware upgrade file.
  • the duration of each coded waveform may be determined according to the preset duration, and a touch signal waveform corresponding to each code is formed. For example (refer to the demodulated waveform shown in FIG.
  • each "0" in the encoding can be represented by a trough in the square wave waveform.
  • Each "1” can be represented by a peak in a square wave waveform, and each bit has a duration of 1 second, then for a "1010” square wave, it lasts for 4 seconds, that is, by a preset duration
  • a square wave signal of a specific format can be formed, and when there are other interference signals at the pen end, it can quickly recognize the regular square wave signal with an interval of 1 s as the touch signal of the firmware upgrade file.
  • FIG. 3 is a flowchart of a firmware upgrade method of a stylus according to another exemplary embodiment of the present invention. As shown in FIG. 3, based on the foregoing embodiment, further, in order to improve the transmission efficiency of the firmware upgrade file, To ensure the accuracy of the firmware upgrade file transfer, you can split the firmware upgrade file into a frame file and transmit it as a frame file.
  • the details can include:
  • Step 301 The terminal acquires a firmware upgrade file of the stylus, and splits the firmware upgrade file to form each frame file.
  • the frame file includes: frame data obtained by dividing the firmware upgrade file by the preset data bit length, a frame header for identifying the start position of the frame data, and a frame tail for identifying the end position of the frame data, for The frame check code for the frame data to be checked.
  • the terminal decomposes the stylus firmware upgrade file (bin file) into frame data of several frames, and adds security information such as a frame header and a frame end, a check code, and the like.
  • the check code can be calculated by calculating the checksum of the frame data.
  • the frame header can be used to accurately identify the starting position of the data of the frame by the stylus.
  • the stylus When the stylus receives the code of the frame header, Knowing the subsequent frame data, and after identifying the encoding of the frame tail, determining that the frame data is received, may return a response signal of the frame received to the terminal, and after receiving the response signal, the terminal transmits the next frame data.
  • the stylus can verify the received frame data according to the check code. If the verification is correct, the terminal returns a response signal for successfully receiving the frame data. If the verification error occurs, the response signal that is not successfully received may be returned, and the terminal resends the frame file according to the unsuccessfully received information.
  • Step 302 Determine an encoding corresponding to each data bit in the frame file.
  • the terminal determines the code corresponding to the data bits in each frame file frame by frame, and of course, the code corresponding to the data bits such as the added frame header, the frame tail, and the frame check code.
  • each data bit of the entire firmware upgrade file is encoded, and a lot of redundant information (such as frame header, end of frame, check code) is added, but the split is adopted.
  • Sending the entire firmware upgrade file in a frame file manner is advantageous for accurate receiving of the firmware upgrade file. If an error occurs during data transfer, only the error frame file can be repeatedly transmitted without the entire firmware upgrade file. Retransmission, therefore, even if the identification or verification information is added during the formation of the frame file, the transmission efficiency and transmission accuracy are improved.
  • Step 303 The touch screen of the terminal contacts the stylus, determines a touch signal waveform corresponding to each frame file, and sends a touch signal of each frame file having the waveform to the stylus.
  • each time the terminal sends a touch signal waveform corresponding to one frame of the file it waits for the response signal of the successful reception of the stylus to be received, and then sends the touch signal of the next frame file until the firmware upgrade file is removed.
  • the touch signals of all the frame files that are separated are all sent out.
  • the terminal may send an upgrade synchronization signal to the stylus that is in contact with the touch screen; after receiving the upgrade synchronization response signal of the stylus feedback, Encode the firmware upgrade file. That is to say, in the present invention, through the inherent hardware structure in the terminal and the stylus, the firmware of the terminal to the stylus is upgraded without adding hardware such as a wireless module, and therefore, between the terminal and the stylus The only way to communicate is the capacitive coupling formed by the contact between the two. The waveform signal is transmitted through the capacitive coupling. Therefore, if the contact between the two is disconnected, the communication between the two will be interrupted. Therefore, it can be obtained at the terminal.
  • the firmware upgrade file After the firmware upgrade file, send an upgrade synchronization signal to the stylus asking whether the upgrade can be performed. If the stylus can be upgraded, the upgrade synchronization response signal is fed back to the terminal, and the terminal is always maintained and the upgrade period is successful. Contact between touch screens to ensure uninterrupted upgrade process. In general, the size of the upgrade file is not large, for example, around 4k, the upgrade can be completed very quickly. However, if the contact between the stylus and the screen is unexpected during the upgrade process On, the upgrade is aborted.
  • the stylus can be equipped with an indicator light and/or a buzzer. The indicator light flashes and/or the buzzer sounds a warning tone to prompt the user to fail the upgrade. Please upgrade again.
  • the terminal The display screen also displays a message indicating that the upgrade failed, prompting the user to re-operate.
  • the terminal can use the method provided by the present invention, and the person skilled in the art can use the invention provided on the basis of no need for creative work.
  • the scheme of transmitting information between the terminal and the stylus, and the solution of transmitting other information than the firmware upgrade file to the stylus are all within the protection scope of the present invention.
  • an execution body of a firmware upgrade method of the stylus in the embodiment includes a stylus, especially Applicable to active pens that are not equipped with wireless communication modules; this method includes but is not limited to stylus, and is also applicable to other terminal devices with touch screens, such as desktop PCs, notebook computers, tablet PCs, mobile phones, etc. Touch screen electronic device for touch operation.
  • the method for upgrading the firmware of the stylus of the embodiment includes:
  • Step 401 Contact with a touch screen of the terminal to receive the touch signal.
  • the stylus contacts the touch screen of the terminal to receive the touch signal sent by the terminal to the stylus through the touch screen through a sensing mode such as capacitive coupling.
  • the touch signal can be demodulated into information of a firmware upgrade file for firmware upgrade of the stylus.
  • Step 402 Perform decoding processing on the touch signal to obtain a firmware upgrade file corresponding to the touch signal.
  • the demodulation module of the stylus obtains the information of the firmware upgrade file implied in the touch signal by decoding the touch signal.
  • the touch screen of the terminal is in contact with the stylus, and the contact between the two forms a channel for information interaction, and the touch signal transmitted in the channel may be a capacitively coupled electrical signal.
  • the terminal side modulates a touch signal waveform capable of representing a firmware upgrade file, and is coupled with the contact capacitance of the pen through the screen, and the pen end receives the touch signal waveform, demodulates the waveform signal, and demodulates the firmware upgrade file.
  • the duration of each coded waveform may be determined according to the preset duration, and a touch signal waveform corresponding to each code is formed. For example, taking the example in step 201 that the terminal encodes bit "1" into “1010", each "0" in the encoding can be represented by a trough in a square wave waveform, and each "1" can be in a square wave waveform.
  • the peak indicates that the duration of each bit is 1 second, for a "1010" square wave, it lasts for 4 seconds, that is, a square wave signal of a specific format can be formed by a preset duration, and when there is other interference signal at the pen end, it can be quickly recognized.
  • the regular square wave signal with an interval of 1 s is the touch signal of its firmware upgrade file.
  • Step 403 Perform firmware upgrade on the stylus according to the firmware upgrade file.
  • the demodulation module of the stylus demodulates the firmware upgrade file in the touch signal, it can be stored, such as an electrically erasable programmable read only memory (Electrically Erasable Programmable read only memory).
  • EEPROM Electrically Erasable Programmable read only memory
  • reset the stylus chip for example, clear the boot_flag flag, perform a system soft reset
  • restart for example, load code from the EEPROM memory
  • the terminal encodes the firmware upgrade file by acquiring the firmware upgrade file of the stylus; the touch screen of the terminal is in contact with the stylus, and the firmware upgrade after the encoding process is generated.
  • the touch signal corresponding to the file is sent to the stylus to implement firmware upgrade of the stylus.
  • the stylus receives the firmware upgrade file by contacting the touch screen of the terminal, and at the same time, the firmware upgrade file is processed by the codec to conform to the transferable touch between the terminal and the stylus.
  • the form of the control signal is transmitted, and the firmware upgrade of the stylus without the wireless module is realized.
  • FIG. 5 is a flowchart of a firmware upgrade method of a stylus according to another exemplary embodiment of the present invention. As shown in FIG. 5 , the firmware upgrade method of the stylus of the embodiment is performed on the basis of the foregoing method embodiment. include:
  • Step 501 Contact the touch screen of the terminal to receive the touch signal.
  • Step 502 Determine, according to a waveform of the touch signal, a code corresponding to the waveform.
  • the touch signal may be a capacitively coupled electrical signal.
  • the stylus can identify whether the received waveform signal is a touch signal according to the duration of the waveform corresponding to each code. Waveform.
  • the duration of each coded waveform may be determined according to the preset duration, and a touch signal waveform corresponding to each code is formed. For example (refer to the demodulated waveform shown in FIG.
  • the terminal encodes bit "1" into “1010", and each "0" in the encoding can be represented by a trough in the square wave waveform, each "1” It can be represented by a peak in a square wave waveform, and each bit has a duration of 1 second.
  • a square wave of "1010” it lasts for 4 seconds, that is, a specific format can be formed by a preset duration.
  • the square wave signal when there are other interference signals at the pen end, can quickly identify the regular square wave signal with a interval of 1 s as the touch signal of the firmware upgrade file.
  • Step 503 Determine each data bit corresponding to the encoding, and generate a firmware upgrade file including each data bit.
  • the pen end decoding module of the stylus can decode the data bit information corresponding to the code by the signal coupled by the pen head, and can combine the minimum granularity data bit information in the previous firmware upgrade file into byte byte information. Then, according to the combined byte, the data frame (including multiple bytes) is combined. After all the data frames are received, the boot_flag flag can be cleared, the system soft reset is performed, and the chip reloads the code from the EEPROM memory to complete the firmware upgrade.
  • Step 504 Perform firmware upgrade on the stylus according to the firmware upgrade file.
  • FIG. 6 is a flowchart of a firmware upgrade method of a stylus according to another exemplary embodiment of the present invention. As shown in FIG. 6 , based on the foregoing method embodiment, further, in order to improve the transmission efficiency of the firmware upgrade file. To ensure the accuracy of the firmware upgrade file transmission, the firmware upgrade file can be divided into a single frame file and transmitted in the form of a frame file, which may include:
  • Step 601 contacting the touch screen of the terminal, and periodically detecting the upgrade synchronization signal.
  • the stylus side can set a periodic detection signal, for example, every tens of milliseconds, performing a microsecond or a few milliseconds of synchronization signal detection to sense that the terminal's touch screen transmits it. Upgrade sync signal. In general, the insertion of a very short duration of detection time in the stylus's operating mode is not noticeable to users using the stylus. Does not affect the user's experience.
  • the periodic detection signal may occupy one cycle period alone or may share a cycle period with a noise detection signal for detecting a noise signal of the screen. The detection of the noise signal refers to the stylus periodically detecting the noise of the received screen.
  • the stylus can adjust the communication frequency between itself and the screen;
  • the detection of the synchronization signal shares a period of time with the detection of the noise signal.
  • the upgrade synchronization signal can be encoded by the specific waveform signal of the touch signal of the firmware upgrade file as described above. Method (refer to step 402), identifying the upgrade synchronization signal with a regular waveform signal, so that the stylus can In the case where other interfering signals are present at the same time, the regular upgrade synchronizing signal having a specific waveform is quickly recognized.
  • Step 602 If the upgrade synchronization signal is detected, the upgrade synchronization response signal is fed back to the terminal, so that the terminal sends the firmware upgrade file to the stylus according to the synchronization response signal.
  • the upgrade synchronization response signal may be fed back to the terminal, and at the same time, the display function may be activated at the pen end, for example, the user is prompted to perform the firmware upgrade.
  • the indicator light or, in the interface of the upgrade application (APP) on the terminal side, shows the progress of the upgrade.
  • Step 603 Contact with a touch screen of the terminal to receive the touch signal.
  • Step 604 Determine a code corresponding to the waveform according to the waveform of the touch signal.
  • Step 605 Determine a frame header and a frame tail corresponding to the encoding, and obtain a frame file including each data bit.
  • the frame file includes: frame data for combining to form a firmware upgrade file, a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data.
  • the frame file may further include a frame check code for verifying the frame data; and the stylus may determine, according to the received frame file, a frame check code corresponding to the code, according to the frame check.
  • the code verifies the frame file, and after the verification is successful, the next frame file is received.
  • Step 606 Store each acquired frame file in a memory, and obtain a firmware upgrade file after acquiring all the frame files.
  • Step 607 Perform firmware upgrade on the stylus according to the firmware upgrade file.
  • the hardware for completing the upgrade process of the stylus end includes the demodulation circuit shown in FIG. 7, wherein the demodulation circuit may include: an active front end AFE (Active Front End) circuit, because the touch screen of the terminal is transmitted to the touch through the capacitive coupling
  • the touch signal of the control pen is usually weak, and the AFE circuit can be used to amplify the received touch electric signal, and then the differential signal output by the AFE is input to the subsequent analog/digital converter ADC (Analog-to- Digital Converter)
  • ADC Analog-to- Digital Converter
  • the sampling circuit performs signal sampling.
  • the mixer Mixer circuit decodes the code shown in Figure 8, and the firmware upgrade file can be restored according to the code corresponding to bit "0" or "1".
  • the parameter values of the components in the demodulation circuit of FIG. 7 are for reference only and are not limited to the solution of the present invention.
  • the bit “1” is encoded into “1010”
  • the accumulated number is set to 200 points
  • the communication frequency is 48 kHZ.
  • the signal amplitude is 10mV, the demodulation effect.
  • the parameters in the above-mentioned FIG. 8 and FIG. 9 are also merely examples, and are not intended to limit the technical solution of the present invention.
  • FIG. 10 is a flowchart of interaction between a terminal and a stylus according to an exemplary embodiment of the present invention.
  • the signaling interaction between the terminal and the stylus may include:
  • Step 1001 The terminal acquires a firmware upgrade file.
  • Step 1002 Send an upgrade synchronization signal to the stylus
  • Step 1003 The stylus periodically detects the upgrade synchronization signal
  • Step 1004 Detecting an upgrade synchronization response signal sent by the stylus, and returning an upgrade synchronization response signal;
  • Step 1005 After receiving the upgrade synchronization response signal, the terminal side divides the firmware upgrade file into several frames, and adds information such as a frame header, a frame tail, and a check code to each frame.
  • Step 1006 Send a frame frame file.
  • Step 1007 the stylus receives the frame file, and stores the frame data in the EEPROM;
  • Step 1008 Perform verification on the frame data by using a check code in the frame file. If the verification succeeds, return a feedback message successfully received by the frame to the terminal.
  • the terminal After receiving the message successfully received by the frame, the terminal sends the frame file of the next frame, and repeats the above steps 1006 to 1008;
  • Step 1009 After receiving all the frame files, the stylus clears the boot_flag, soft resets the chip, and reloads the code from the EEPROM, and the upgrade ends.
  • the terminal may send a frame attribute file to the stylus, where the frame attribute file indicates a total number of frames included in the firmware upgrade file, so that the stylus receives the frame number.
  • the response message of all the frame file received is returned to the terminal, so that the terminal exits the firmware upgrade program.
  • FIG. 11 is a schematic structural diagram of a terminal according to an exemplary embodiment of the present invention.
  • the terminal in this embodiment may include, but is not limited to, an electronic device with a touch screen, for example, a desktop PC.
  • Electronic devices such as laptops, tablet PCs (PADs) or mobile phones. Its specific includes:
  • the obtaining module 10 is configured to obtain a firmware upgrade file of the stylus
  • the encoding module 11 is configured to perform encoding processing on the firmware upgrade file
  • the encoding module 11 is further configured to generate a touch signal corresponding to the firmware upgrade file after the encoding process and send the touch signal to the stylus.
  • the terminal in this embodiment may be used to perform the steps of the foregoing method embodiment of FIG. 1, and the implementation principle is similar, and details are not described herein again.
  • the terminal encodes the firmware upgrade file by acquiring the firmware upgrade file of the stylus; the touch screen of the terminal is in contact with the stylus, and generates a touch signal corresponding to the firmware upgrade file after the encoding process. And sent to the stylus to achieve firmware upgrade of the stylus.
  • the stylus contacts the touch screen of the terminal to receive the touch signal; the touch signal is decoded to obtain a firmware upgrade file corresponding to the touch signal; and the stylus is firmware upgraded according to the firmware upgrade file.
  • the stylus receives the firmware upgrade file by contacting the touch screen of the terminal, and the firmware upgrade file is processed by the codec to conform to the touch signal that can be transmitted between the terminal and the stylus. The form is passed, and the firmware upgrade of the stylus without the wireless module is implemented.
  • FIG. 12 is a schematic structural diagram of a terminal according to another exemplary embodiment of the present invention. As shown in FIG. 12, based on the foregoing embodiment,
  • the touch signal is a capacitively coupled electrical signal.
  • the encoding module 11 includes:
  • the determining sub-module 111 is configured to determine a code corresponding to each data bit in the firmware upgrade file, and determine a touch signal waveform corresponding to each code;
  • the sending submodule 112 is configured to send the touch signal having the waveform to the stylus.
  • the determining sub-module 111 is configured to determine a duration of each encoded waveform according to a preset duration, and form a touch signal waveform corresponding to each encoding.
  • the terminal further includes:
  • the splitting module 13 is configured to split the firmware upgrade file to form each frame file
  • the frame file includes: frame data obtained by dividing the firmware upgrade file by a preset data bit length, a frame header for identifying a start position of the frame data, a frame tail for identifying an end position of the frame data, and used for performing frame data.
  • Checked frame check code
  • the determining sub-module 111 is specifically configured to determine a code corresponding to each data bit in the frame file, and determine a touch signal waveform corresponding to each frame file;
  • the sending sub-module 112 is specifically configured to send a touch signal of each frame file having the waveform to the stylus.
  • the terminal further includes:
  • the sending module 14 is configured to send an upgrade synchronization signal to the stylus that is in contact with the touch screen of the terminal;
  • the encoding module 11 is specifically configured to perform encoding processing on the firmware upgrade file after receiving the upgrade synchronization response signal fed back by the stylus.
  • the terminal in this embodiment may be used to perform the steps of the foregoing method embodiment of FIG. 2 or FIG. 3, and the implementation principle is similar, and details are not described herein again.
  • FIG. 13 is a schematic structural diagram of a stylus according to an exemplary embodiment of the present invention.
  • the stylus of the embodiment is suitable for an active pen, and is particularly suitable for an active pen that is not configured with a wireless communication module;
  • the method includes, but is not limited to, a stylus, and is also applicable to other touch screen electronic devices having touch operations with a touch device, such as a desktop PC, a notebook computer, a tablet PC, or a mobile phone.
  • the touch screen module 20 is configured to contact the touch screen of the terminal to receive the touch signal
  • the decoding module 21 is configured to perform decoding processing on the touch signal to obtain a firmware upgrade file corresponding to the touch signal;
  • the upgrade module 22 is configured to perform firmware upgrade on the stylus according to the firmware upgrade file.
  • the terminal in this embodiment may be used to perform the steps of the foregoing method embodiment of FIG. 4, and the implementation principle is similar, and details are not described herein again.
  • the terminal encodes the firmware upgrade file by acquiring the firmware upgrade file of the stylus; the touch screen of the terminal is in contact with the stylus, and generates a touch corresponding to the firmware upgrade file after the encoding process.
  • the control signal is sent to the stylus to implement firmware upgrade of the stylus.
  • the stylus contacts the touch screen of the terminal to receive the touch signal; the touch signal is decoded to obtain a firmware upgrade file corresponding to the touch signal; and the stylus is firmware upgraded according to the firmware upgrade file.
  • the stylus receives the firmware upgrade file by contacting the touch screen of the terminal, and the firmware upgrade file is processed by the codec to conform to the touch signal that can be transmitted between the terminal and the stylus. The form is passed, and the firmware upgrade of the stylus without the wireless module is implemented.
  • FIG. 14 is a schematic structural diagram of a stylus according to another exemplary embodiment of the present invention, as shown in FIG. 14 is shown on the basis of the above embodiment,
  • the touch signal is a capacitively coupled electrical signal.
  • the decoding module 21 includes:
  • a determining sub-module 211 configured to determine, according to a waveform of the touch signal, an encoding corresponding to the waveform; and determine each data bit corresponding to the encoding;
  • a sub-module 212 is generated for generating a firmware upgrade file containing each data bit.
  • it also includes:
  • the identification module 23 is configured to identify, according to the duration of the waveform corresponding to each encoding, whether the received waveform signal is a waveform corresponding to the touch signal.
  • the determining submodule 211 is specifically configured to determine a frame header and a frame tail corresponding to the encoding, to obtain a frame file including each data bit, where the frame file includes: frame data used for combining to form a firmware upgrade file. a frame header for identifying a start position of the frame data, and a frame tail for identifying an end position of the frame data;
  • the method further includes: a storage module 24, configured to store each acquired frame file in a memory, and obtain a firmware upgrade file after acquiring all the frame files.
  • the frame file further includes: a frame check code used to check the frame data;
  • the determining sub-module 211 is further configured to determine a frame check code corresponding to the encoding, and perform verification on the frame file according to the frame check code. After the verification succeeds, the next frame file is received.
  • the touch screen module 20 includes:
  • the detecting sub-module 201 is configured to contact the touch screen of the terminal to periodically detect the upgrade synchronization signal
  • the sending sub-module 202 is configured to: when the detecting sub-module detects the upgrade synchronization signal, feed back the upgrade synchronization response signal to the terminal, so that the terminal sends the firmware upgrade file to the stylus according to the synchronization response signal.
  • the terminal in this embodiment may be used to perform the steps of the foregoing embodiment of the method in FIG. 5 and FIG. 6.
  • the implementation principle is similar, and details are not described herein again.
  • FIG. 15 is a schematic structural diagram of a stylus according to an exemplary embodiment of the present invention.
  • the stylus includes: a touch unit 1501 , a demodulator 1502 , a processor 1503 , and a touch unit 1501 .
  • the touch screen is connected to the touch screen of the terminal to receive the touch signal; the demodulator 1502 is connected to the touch unit 1501 for decoding the touch signal to obtain a touch signal.
  • the firmware upgrade file is connected to the demodulator 1502, and is configured to receive the firmware upgrade file demodulated by the demodulator 1502, and perform firmware upgrade to the stylus according to the firmware upgrade file.
  • the touch unit 1501 includes: a capacitance sensor.
  • the demodulator 1502 includes: an active front end AFE circuit 15021, an analog to digital conversion ADC circuit 15022, a mixer Mixer circuit 15023;
  • the AFE circuit 15021 is configured to perform signal amplification on the received touch signal.
  • the ADC circuit 15022 is configured to convert the amplified voltage and/or current touch signal into a digital touch signal
  • the Mixer circuit 15023 is configured to demodulate the digital touch signal output by the ADC circuit 15022 to obtain a demodulated firmware upgrade file.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

一种触控笔的固件升级方法、终端及触控笔,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理(101);终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔(102),实现对触控笔的固件升级。同样的,触控笔通过与终端的触控屏幕接触以接收触控信号(401);对触控信号进行解码处理,得到与触控信号对应的固件升级文件(402);根据固件升级文件对触控笔进行固件升级(403)。基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。

Description

触控笔的固件升级方法、终端及触控笔 技术领域
本发明涉及固件升级技术,尤其涉及一种触控笔的固件升级方法、终端及触控笔。
背景技术
随着电子屏幕技术的发展,越来越多的操作可以通过手指触摸屏幕的方式来完成,为了能够对屏幕操作更加流畅和精准,可以采用触控笔替代用户的手指来完成。
现有技术中的触控笔主要分为主动笔和被动笔,主动笔中包含有电路,通过笔发射信号给触摸屏,使得触摸屏接收信号,检测笔的轨迹坐标,实现笔与触摸屏间的信息传递;被动笔,其相当于用户的手指,自身不发射信号,但通过与触摸屏的接触可以改变触摸屏矩阵的电容,从而实现对触摸屏的操作。对于包含有电路的主动笔,为了能够对其功能进行不断的优化,可以对其内电路的固件进行升级,升级方式目前可以采用在线升级和无线升级。所谓在线升级需要专业设备,例如,专用的上位机工具,笔端需要留有与该上位机工具相配合的烧写接口,通常来说,在主动笔卖给客户之后客户无法根据上述方法自行进行升级操作。所谓无线升级则需要主动笔中配置有实现无线升级的无线通讯模块,例如,蓝牙,WIFI模块等,但目前大部分的主动笔中是没有配置无线模块的。
因此,对没有配置无线通讯模块的主动笔的固件升级问题成为了亟需解决的技术问题。
发明内容
本发明提供一种触控笔的固件升级方法、终端及触控笔,用于解决现有技术中对没有配置无线通讯模块的触控笔的固件无法升级的技术问题。
本发明一个方面提供一种触控笔的固件升级方法,包括:
终端获取触控笔的固件升级文件,对所述固件升级文件进行编码处理;
所述终端的触控屏幕与所述触控笔接触,产生与所述编码处理后的固 件升级文件对应的触控信号并发送给所述触控笔。
可选的,所述触控信号为电容耦合电信号。
可选的,所述对所述固件升级文件进行编码处理,包括:
确定所述固件升级文件中的各数据位对应的编码;
所述产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔,包括:
确定与各所述编码对应的触控信号波形,并将具有该波形的触控信号发送给所述触控笔。
可选的,所述确定与各所述编码对应的触控信号波形,包括:
根据预设时长,确定每个所述编码的波形持续时长,形成与各所述编码对应的触控信号波形。
可选的,所述对所述固件升级文件进行编码处理之前,还包括:
对所述固件升级文件进行拆分,形成各个帧文件;
其中,所述帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾、用于对所述帧数据进行校验的帧校验码;
所述对所述固件升级文件进行编码处理,包括:
确定所述帧文件中的各数据位对应的编码;
所述产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔,包括:
确定与每帧帧文件对应的触控信号波形,并将具有该波形的各帧文件的触控信号发送给所述触控笔。
可选的,所述终端获取触控笔的固件升级文件之后,还包括:
向与所述终端的触控屏幕接触的触控笔发送升级同步信号;
接收到所述触控笔反馈的升级同步响应信号后,对所述固件升级文件进行编码处理。
本发明另一个方面提供一种触控笔的固件升级方法,包括:
与终端的触控屏幕接触以接收触控信号;
对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
根据所述固件升级文件对触控笔进行固件升级。
可选的,所述触控信号为电容耦合电信号。
可选的,所述对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件,包括:
根据所述触控信号的波形,确定与所述波形对应的编码;
确定与所述编码对应的各数据位,生成包含所述各数据位的所述固件升级文件。
可选的,所述方法还包括:
根据每个编码对应的波形持续时长,识别接收到的波形信号是否为所述触控信号对应的波形。
可选的,所述确定与所述编码对应的各数据位,生成包含所述各数据位的所述固件升级文件,包括:
确定与所述编码对应的帧头、帧尾,得到包含所述各数据位的帧文件;
其中,所述帧文件包含:用于组合形成固件升级文件的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾;
将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,生成所述固件升级文件。
可选的,所述帧文件还包括:用于对所述帧数据进行校验的帧校验码;所述方法还包括:
确定与所述编码对应的所述帧校验码,根据所述帧校验码对所述帧文件进行校验,校验成功后,接收下一个帧文件。
可选的,所述与终端的触控屏幕接触以接收触控信号之前,还包括:
与终端的触控屏幕接触,对升级同步信号进行周期性检测;
若检测到所述升级同步信号,向所述终端反馈升级同步响应信号,以使终端根据所述同步响应信号,向所述触控笔发送所述固件升级文件。
本发明还一个方面提供一种终端,包括:
获取模块,用于获取触控笔的固件升级文件;
编码模块,用于对所述固件升级文件进行编码处理;
触摸屏幕,用于与所述触控笔接触;
所述编码模块,还用于产生与所述编码处理后的固件升级文件对应的 触控信号并发送给所述触控笔。
可选的,所述触控信号为电容耦合电信号。
可选的,所述编码模块,包括:
确定子模块,用于确定所述固件升级文件中的各数据位对应的编码;确定与各所述编码对应的触控信号波形;
发送子模块,用于将具有该波形的触控信号发送给所述触控笔。
可选的,所述确定子模块,具体用于根据预设时长,确定每个所述编码的波形持续时长,形成与各所述编码对应的触控信号波形。
可选的,还包括:
拆分模块,用于对所述固件升级文件进行拆分,形成各个帧文件;
其中,所述帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾、用于对所述帧数据进行校验的帧校验码;
所述确定子模块,具体用于确定所述帧文件中的各数据位对应的编码;确定与每帧帧文件对应的触控信号波形;
所述发送子模块,具体用于将具有该波形的各帧文件的触控信号发送给所述触控笔。
可选的,还包括:
发送模块,用于向与所述终端的触控屏幕接触的触控笔发送升级同步信号;
所述编码模块,具体用于在接收到所述触控笔反馈的升级同步响应信号后,对所述固件升级文件进行编码处理。
本发明再一个方面提供一种触控笔,包括:
触屏模块,用于与终端的触控屏幕接触以接收触控信号;
解码模块,用于对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
升级模块,用于根据所述固件升级文件对触控笔进行固件升级。
可选的,所述触控信号为电容耦合电信号。
可选的,所述解码模块,包括:
确定子模块,用于根据所述触控信号的波形,确定与所述波形对应的 编码;确定与所述编码对应的各数据位;
生成子模块,用于生成包含所述各数据位的所述固件升级文件。
可选的,还包括:
识别模块,用于根据每个编码对应的波形持续时长,识别接收到的波形信号是否为所述触控信号对应的波形。
可选的,所述确定子模块,具体用于确定与所述编码对应的帧头、帧尾,得到包含所述各数据位的帧文件;其中,所述帧文件包含:用于组合形成固件升级文件的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾;
还包括:存储模块,用于将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,生成所述固件升级文件。
可选的,所述帧文件还包括:用于对所述帧数据进行校验的帧校验码;
所述确定子模块,还用于确定与所述编码对应的所述帧校验码,根据所述帧校验码对所述帧文件进行校验,校验成功后,接收下一个帧文件。
可选的,所述触屏模块包括:
检测子模块,用于与终端的触控屏幕接触,对升级同步信号进行周期性检测;
发送子模块,用于当所述检测子模块检测到所述升级同步信号,向所述终端反馈升级同步响应信号,以使终端根据所述同步响应信号,向所述触控笔发送所述固件升级文件。
本发明又一个方面提供一种触控笔,包括:触控单元、解调器、处理器;
所述触控单元,用于与终端的触控屏幕接触以接收触控信号;
所述解调器与所述触控单元连接,用于对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
所述处理器与所述解调器连接,用于接收所述解调器解调出的所述固件升级文件,根据所述固件升级文件执行对触控笔的固件升级。
可选的,所述触控单元包括:电容传感器。
可选的,所述解调器包括:主动前端(AFE)电路、模数转换(ADC)电路、混频器(Mixer)电路;
所述AFE电路用于对接收到的所述触控信号进行信号放大;
所述ADC电路用于将信号放大后的电压和/或电流触控信号转换为数字触控信号;
所述Mixer电路用于对所述ADC电路输出的数字的触控信号进行解调,得到解调后的固件升级文件。
本发明提供的触控笔的固件升级方法、终端及触控笔,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理;终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔,实现对触控笔的固件升级。同样的,触控笔通过与终端的触控屏幕接触以接收触控信号;对触控信号进行解码处理,得到与触控信号对应的固件升级文件;根据固件升级文件对触控笔进行固件升级。基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明一示例性实施例示出的触控笔的固件升级方法的流程图;
图2为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图;
图3为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图;
图4为本发明一示例性实施例示出的触控笔的固件升级方法的流程图;
图5为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图;
图6为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图;
图7为本发明一种实施例的触控笔的解调电路示意图;
图8为本发明一种实施例的触控笔的解调电路测试示意图;
图9为本发明一种实施例的触控笔的解调电路带宽测试示意图;
图10为本发明一示例性实施例示出的终端与触控笔的交互流程图;
图11为本发明一示例性实施例示出的终端的结构示意图;
图12为本发明另一示例性实施例示出的终端的结构示意图;
图13为本发明一示例性实施例示出的触控笔的结构示意图;
图14为本发明另一示例性实施例示出的触控笔的结构示意图;
图15为本发明一示例性实施例示出的触控笔的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明一示例性实施例示出的触控笔的固件升级方法的流程图,如图1所示,本实施例中的触控笔的固件升级方法的执行主体可以为具有触摸屏幕的电子设备,例如,台式PC机、笔记本电脑、平板电脑PAD(portable android device,简称“PAD”)或手机等各种移动或非移动电子设备,这些电子设备可以统称为“终端”。本实施例的触控笔的固件升级方法,具体可以包括:
步骤101、终端获取触控笔的固件升级文件,对固件升级文件进行编码处理。
在本步骤中,终端可以通过无线通讯模式或其他有线连接的连网模式,抑或是可脱离网络的存储设备中获取到用于给触控笔进行固件升级的程序文件,该程序文件可以为与触控笔固件升级程序的格式相匹配的任意格式的程序,例如,后缀名为".bin"的二进制(binary)文件。由于终端与触控笔间的通讯是基于两者的接触,因此,终端若将固件升级文件传递给触控笔,则需要将该固件升级文件转换为与两者间的接触信号的格式相匹配的文件格式,才能够实现两者间固件升级文件的传输。因此,终端可以先 对固件升级文件进行编码处理,以使编号后的文件符合两者间信息的传递格式。
步骤102、终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔。
在本步骤中,终端的触控屏幕与触控笔相接触,通常为与触控笔的笔尖部的感应单元相接触,以使两者间形成信息交互的通道,该通道的信号类型取决于触控屏与触控笔间相互耦合感应的信号类型,例如,若为电容耦合,则两者间建立电容耦合的信息传递通道。终端根据两者间信息交互通道的信号类型,将固件升级文件以符合该通道信号类型的触控信号形式发送给触控笔,以使触控笔接收到该固件升级文件,从而实现固件的升级。
本实施例的触控笔的固件升级方法,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理;终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔,实现对触控笔的固件升级。对应的,触控笔通过与终端的触控屏幕接触以接收触控信号;对触控信号进行解码处理,得到与触控信号对应的固件升级文件;根据固件升级文件对触控笔进行固件升级。基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。
图2为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图,如图2所示,在上一实施例的基础上,本实施例的触控笔的固件升级方法,具体包括:
步骤201、终端获取触控笔的固件升级文件,确定固件升级文件中的各数据位对应的编码。
在本步骤,对于固件升级文件来说,其是由各个数据位组合而成的文件,该数据位可以是二进制格式的,也可以是其他数据格式的,例如,十六进制格式等,无论其每个数据位的数据格式是什么,都需要确定每个数据位对应的编码。通常来说,对于非二进制的数据位,可以先将其转换为二进制的机器码表示形式,再对每个由“0”或“1”标识的数据位进行编码。数据位与编码之间的对应规则可以由本领域技术人员自行确定,例如,终 端将bit“1”编码成“1010”,将bit“0”编码为“0101”,则数据位中的每位“0”和“1”都转换为编码后以4bit位表示的“0”和“1”。
步骤202、终端的触控屏幕与触控笔接触,确定与各编码对应的触控信号波形,并将具有该波形的触控信号发送给触控笔。
在本步骤,终端的触控屏幕与触控笔接触,两者接触后形成了信息交互的通道,该通道中传递的触控信号可以为电容耦合的电信号。终端调制出能够表示固件升级文件的触控信号波形,通过屏与笔的接触电容耦合,笔端接收到该触控信号波形,并对该波形信号进行解调,解调得到固件升级文件。其中,为了能够提高笔端对有用的触控信号波形的识别度,可以根据预设时长,确定每个编码的波形持续时长,形成与各编码对应的触控信号波形。例如(参考图8所示解调后的波形),以步骤201中终端将bit“1”编码成“1010”为例,编码中的每个“0”可以以方波波形中的波谷表示,每个“1”可以以方波波形中的波峰表示,而每个bit位的持续时长为1秒,则对于“1010”的方波,其一共持续4秒,也就是说,通过预设时长可以形成特定格式的方波信号,则当笔端存在其他干扰信号时,其可以很快识别出该具有间隔1s的有规律的方波信号为其固件升级文件的触控信号。
图3为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图,如图3所示,在上述实施例的基础上,进一步地,为了提高固件升级文件的传输效率,保证固件升级文件传输的准确性,可以将固件升级文件拆分为一个个的帧文件,以帧文件的形式进行传输,具体可以包括:
步骤301、终端获取触控笔的固件升级文件,对固件升级文件进行拆分,形成各个帧文件。
在本步骤中,帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识帧数据起始位置的帧头、对于标识帧数据结束位置的帧尾、用于对帧数据进行校验的帧校验码。例如,终端将触控笔的固件升级文件(bin文件)分解成若干帧的帧数据,并且加入帧头和帧尾、校验码等安全信息。校验码可以通过计算帧数据的校验和的方式计算得到,帧头可用于使触控笔对一帧数据的起始位置进行准确识别,当触控笔接收到帧头的编码后,则知道后续接着帧数据,而当识别到帧尾的编码后,则确定该帧数据接收完毕,可以向终端返回一个该帧接收完毕的响应信号,终端接收到该响应信号后,发送下一帧数据;此外,通过在帧文件中加入校验码,使得触控笔可以根据该校验码,对接收到的该帧数据进行验证, 若验证正确,则向终端返回成功接收该帧数据的响应信号,若验证错误,可以返回未成功接收的响应信号,则终端将根据该未成功接收的信息,重新发送该帧文件。
步骤302、确定帧文件中的各数据位对应的编码。
在本步骤中,终端一帧一帧地确定每帧文件中的数据位所对应的编码,当然,也包括增加的帧头、帧尾以及帧校验码等数据位所对应的编码。虽然对每帧进行编码相较于前一个实施例对整个固件升级文件整体的每个数据位进行编码,要增加很多冗余信息(如,帧头、帧尾、校验码),但是采用拆分成帧文件的方式发送整个固件升级文件,有利于实现固件升级文件的准确接收,若数据传递过程中发生错误,则仅重复传递出错的帧文件即可,而不需要将整个固件升级文件进行重新的传输,因此,即使帧文件的形成过程中增加了标识或验证信息,但其传输效率及传输准确性得以提高。
步骤303、终端的触控屏幕与触控笔接触,确定与每帧帧文件对应的触控信号波形,并将具有该波形的各帧文件的触控信号发送给触控笔。
在本步骤中,终端每发送一帧文件对应的触控信号波形,则等待接收触控笔返回的成功接收的响应信号,然后再发送下一帧帧文件的触控信号,直至固件升级文件拆分出的所有帧文件的触控信号全部发送出去。
可选的,在步骤301、终端获取触控笔的固件升级文件之后,终端可以向与其触控屏幕接触的触控笔发送升级同步信号;在接收到触控笔反馈的升级同步响应信号后,对固件升级文件进行编码处理。也就是说,由于本发明中是通过终端与触控笔中的固有硬件结构,在不增加无线模块等硬件的基础上实现终端对触控笔的固件升级,因此,终端与触控笔间的通讯的唯一方式就是两者间的接触而形成的电容耦合,通过电容耦合传递波形信号,因此,两者间的接触若断开,则两者间的通讯将中断,因此,可以通过在终端获取到固件升级文件后,向触控笔发送询问是否可以进行升级的升级同步信号,若触控笔可以进行升级,则向终端反馈升级同步响应信号,并在之后至升级成功期间,始终保持与终端触控屏之间的接触,以保证升级过程的不间断。通常来说,升级文件大小并不大,例如,4k左右,升级可以很快完成。但若在升级过程中,触控笔与屏幕之间的接触意外断 开,则本次升级中止,触控笔上可以配置有指示灯和/或蜂鸣器,指示灯闪烁和/或蜂鸣器发出警示音以提示用户升级失败,请重新升级;此外,终端的显示屏幕上也显示出升级失败的提示信息,提示用户重新操作。
需要说明的是,终端除了可以向触控笔传递用于固件升级的固件升级文件外,根据本发明提供的方法,本领域技术人员可以在不需要付出创造性劳动的基础上,采用本发明提供的终端与触控笔间信息传递的方案,向触控笔传递除了固件升级文件外的其他信息的方案均在本发明的保护范围内。
图4为本发明一示例性实施例示出的触控笔的固件升级方法的流程图,如图4所示,本实施例中的触控笔的固件升级方法的执行主体包括触控笔,尤其适用于未配置无线通讯模块的主动笔;该方法包括但不限定于触控笔,还适用于其他具有与带有触摸屏幕的终端设备,如台式PC机、笔记本电脑、平板电脑PAD或手机等进行触控操作的触屏电子设备。本实施例的触控笔的固件升级方法,具体包括:
步骤401、与终端的触控屏幕接触以接收触控信号。
在本步骤,触控笔通过与终端的触控屏幕相接触,从而通过电容耦合等感应模式接收终端通过其触控屏向触控笔发送的触控信号。该触控信号可以被解调为用于使触控笔进行固件升级的固件升级文件的信息。
步骤402、对触控信号进行解码处理,得到与触控信号对应的固件升级文件。
在本步骤中,触控笔的解调模块通过对触控信号进行解码处理,获取到触控信号中隐含的固件升级文件的信息。具体的,终端的触控屏幕与触控笔接触,两者接触后形成了信息交互的通道,该通道中传递的触控信号可以为电容耦合的电信号。终端侧调制出能够表示固件升级文件的触控信号波形,通过屏与笔的接触电容耦合,笔端接收到该触控信号波形,并对该波形信号进行解调,解调得到固件升级文件。其中,为了能够提高笔端对有用的触控信号波形的识别度,可以根据预设时长,确定每个编码的波形持续时长,形成与各编码对应的触控信号波形。例如,以步骤201中终端将bit“1”编码成“1010”为例,编码中的每个“0”可以以方波波形中的波谷表示,每个“1”可以以方波波形中的波峰表示,而每个bit位的持续时长为 1秒,则对于“1010”的方波,其一共持续4秒,也就是说,通过预设时长可以形成特定格式的方波信号,则当笔端存在其他干扰信号时,其可以很快识别出该具有间隔1s的有规律的方波信号为其固件升级文件的触控信号。
步骤403、根据固件升级文件对触控笔进行固件升级。
在本步骤中,触控笔的解调模块将触控信号中的固件升级文件解调出来后,可以将其存入,例如电可擦可编程只读存储器(Electrically Erasable Programmable read only memory,简称“EEPROM”)的存储器中,并对该触控笔的芯片进行复位(例如,清除boot_flag标志,执行系统软复位)和重启(例如,从EEPROM存储器里面加载代码)等操作,以完成固件的升级过程。
本实施例的触控笔的固件升级方法,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理;终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔,实现对触控笔的固件升级。同样的,基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。
图5为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图,如图5所示,在上述方法实施例的基础上,本实施例的触控笔的固件升级方法包括:
步骤501、与终端的触控屏幕接触以接收触控信号。
步骤502、根据触控信号的波形,确定与波形对应的编码。
在本步骤中,触控信号可以为电容耦合电信号。此外,为了触控笔可以较好地识别出是干扰信号的波形,还是有用的触控信号的波形,可以根据每个编码对应的波形持续时长,识别接收到的波形信号是否为触控信号对应的波形。通常来说,为了能够提高笔端对有用的触控信号波形的识别度,可以根据预设时长,确定每个编码的波形持续时长,形成与各编码对应的触控信号波形。例如(参考图8所示解调后的波形),终端将bit“1”编码成“1010”,编码中的每个“0”可以以方波波形中的波谷表示,每个“1” 可以以方波波形中的波峰表示,而每个bit位的持续时长为1秒,则对于“1010”的方波,其一共持续4秒,也就是说,通过预设时长可以形成特定格式的方波信号,则当笔端存在其他干扰信号时,其可以很快识别出该具有间隔1s的有规律的方波信号为其固件升级文件的触控信号。
步骤503、确定与编码对应的各数据位,生成包含各数据位的固件升级文件。
在本步骤中,触控笔的笔端解码模块可以通过笔头耦合的信号解码出编码对应的各个数据位信息,可以将之前固件升级文件中的最小粒度的数据位bit信息组合成字节byte信息,再根据组合得到的byte组合成数据帧(包含多个byte),所有数据帧接收完毕之后,可以清除boot_flag标志,执行系统软复位,芯片重新从EEPROM存储器里面加载代码,完成固件升级。
步骤504、根据固件升级文件对触控笔进行固件升级。
图6为本发明另一示例性实施例示出的触控笔的固件升级方法的流程图,如图6所示,在上述方法实施例的基础上,进一步地,为了提高固件升级文件的传输效率,保证固件升级文件传输的准确性,可以将固件升级文件拆分为一个个的帧文件,以帧文件的形式进行传输,具体可以包括:
步骤601、与终端的触控屏幕接触,对升级同步信号进行周期性检测。
在本步骤中,触控笔侧可以设置周期性的检测信号,例如,每间隔几十毫秒,执行一次微秒级或几个毫秒的同步信号检测,以感应到终端的触控屏对其发送的升级同步信号。通常来说,在触控笔的工作模式中插入极短时长周期的检测时长,对于使用触控笔的用户来说是察觉不到的。不影响用户的使用体验。该周期性的检测信号可以单独占用一个周期时间段,或者可以与用于对屏幕的噪声信号进行检测的噪声检测信号共用一个周期时间段。所谓噪声信号的检测指的是触控笔周期性地对接收到的屏幕的噪声进行检测,若检测得到的噪声较大,则触控笔可以调整自身与屏幕之间的通讯频率;若对升级同步信号的检测与对噪声信号的检测共用一个周期时间段,由于噪声通常为没有规律的波形信号,而升级同步信号可以采用如前所述的固件升级文件的触控信号的特定波形信号的编码方式(参考步骤402),以有规律性的波形信号标识该升级同步信号,以使触控笔可 以在其他干扰信号同时存在的情况下,很快识别出该具有特定波形的有规律的升级同步信号。
步骤602、若检测到升级同步信号,向终端反馈升级同步响应信号,以使终端根据同步响应信号,向触控笔发送固件升级文件。
在本步骤中,当在检测周期中检测到了终端发出的升级同步信号,则可以向终端反馈升级同步响应信号,同时,在笔端,还可以启动显示功能,如亮起提示用户正在进行固件升级的指示灯,或者,在终端侧的升级应用程序(APP)的界面中显示升级的进程情况。
步骤603、与终端的触控屏幕接触以接收触控信号。
步骤604、根据触控信号的波形,确定与波形对应的编码。
步骤605、确定与编码对应的帧头、帧尾,得到包含各数据位的帧文件。其中,帧文件包含:用于组合形成固件升级文件的帧数据、对于标识帧数据起始位置的帧头、对于标识帧数据结束位置的帧尾。
可选的,帧文件中还可以包括有用于对帧数据进行校验的帧校验码;则触控笔可以根据接收到的帧文件,确定与编码对应的帧校验码,根据帧校验码对帧文件进行校验,校验成功后,接收下一个帧文件。
步骤606、将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,形成固件升级文件。
步骤607、根据固件升级文件对触控笔进行固件升级。
此外,触控笔端完成升级过程的硬件包括图7所示的解调电路,其中该解调电路可以包括:主动前端AFE(Active Front End)电路,由于终端的触控屏通过电容耦合传递给触控笔的触控信号通常较弱,则可以采用该AFE电路对接收到的触控电信号进行信号放大,再将AFE输出的差分信号输入到后续的模/数转换器ADC(Analog-to-Digital Converter)采样电路进行信号采样,最后再经过混频器Mixer电路解码出如图8所示的编码,进而可以根据bit位“0”或“1”所对应的编码,还原得到固件升级文件。其中,图7解调电路中各个元器件的参数值仅供参考并非对本发明方案的限制,图8中以将bit“1”编码成“1010”,设置累加数为200点,通信频率为48kHZ,信号幅度为10mV的时候,解调的效果。从图中可以看出
Noise/Diff<15%,使得编码信号可以清晰地解码出来。图9是解调电路的 带宽测试,当设置通信频率是100kHZ时,累加数200点(94kHz),测得的带宽是BW=2kHz(-3dB),对于近距离的通信是可以满足需求的。上述图8与图9中的参数也仅为示例,并非对本发明技术方案的限制。
图10为本发明一示例性实施例示出的终端与触控笔的交互流程图,如图10所示,终端与触控笔之间的信令交互可以包括:
步骤1001、终端获取固件升级文件;
步骤1002、向触控笔发送升级同步信号;
步骤1003、触控笔周期性地对升级同步信号进行检测;
步骤1004、检测到触控笔发送的升级同步响应信号,并返回升级同步响应信号;
步骤1005、终端侧接收到升级同步响应信号后,将固件升级文件分为若干帧,每一帧加帧头、帧尾以及校验码等信息;
步骤1006、发送一帧帧文件;
步骤1007、触控笔接收帧文件,并将帧数据存储在EEPROM中;
步骤1008、采用帧文件中的校验码对帧数据进行校验,若校验成功,则向终端返回该帧成功接收的反馈消息;
终端接收到该帧成功接收的消息后,发送下一帧的帧文件,重复循环执行上述步骤1006至步骤1008;
步骤1009、触控笔接收完所有帧文件后,清除boot_flag,软复位芯片,重新从EEPROM中加载代码,升级结束。
可选的,终端在发送第一帧数据之前,可以向触控笔发送帧属性文件,该帧属性文件中指明固件升级文件中一共包含的帧数,使得触控笔在接收到该帧数的帧文件后,确认所有帧文件接收完毕,则向终端返回所有帧文件接收完毕的响应消息,以使终端退出该固件升级程序。
图11为本发明一示例性实施例示出的终端的结构示意图,如图11所示,本实施例中的终端,其可以包括但不限于,具有触摸屏幕的电子设备,例如,台式PC机、笔记本电脑、平板电脑PAD(portable android device,简称“PAD”)或手机等电子设备。其具体包括:
获取模块10,用于获取触控笔的固件升级文件;
编码模块11,用于对固件升级文件进行编码处理;
触摸屏幕12,用于与触控笔接触;
编码模块11,还用于产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔。
本实施例中的终端可用于执行上述图1方法实施例的步骤,其实现原理类似,在此不再赘述。
本实施例的终端,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理;终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔,实现对触控笔的固件升级。同样的,触控笔通过与终端的触控屏幕接触以接收触控信号;对触控信号进行解码处理,得到与触控信号对应的固件升级文件;根据固件升级文件对触控笔进行固件升级。基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。
图12为本发明另一示例性实施例示出的终端的结构示意图,如图12所示,在上述实施例的基础上,
可选的,触控信号为电容耦合电信号。
可选的,编码模块11,包括:
确定子模块111,用于确定固件升级文件中的各数据位对应的编码;确定与各编码对应的触控信号波形;
发送子模块112,用于将具有该波形的触控信号发送给触控笔。
可选的,确定子模块111,具体用于根据预设时长,确定每个编码的波形持续时长,形成与各编码对应的触控信号波形。
可选的,该终端还包括:
拆分模块13,用于对固件升级文件进行拆分,形成各个帧文件;
其中,帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识帧数据起始位置的帧头、对于标识帧数据结束位置的帧尾、用于对帧数据进行校验的帧校验码;
确定子模块111,具体用于确定帧文件中的各数据位对应的编码;确定与每帧帧文件对应的触控信号波形;
发送子模块112,具体用于将具有该波形的各帧文件的触控信号发送给触控笔。
可选的,该终端还包括:
发送模块14,用于向与终端的触控屏幕接触的触控笔发送升级同步信号;
编码模块11,具体用于在接收到触控笔反馈的升级同步响应信号后,对固件升级文件进行编码处理。
本实施例中的终端可用于执行上述图2或图3方法实施例的步骤,其实现原理类似,在此不再赘述。
图13为本发明一示例性实施例示出的触控笔的结构示意图,如图13所示,本实施例的触控笔适用于主动笔,尤其适用于未配置无线通讯模块的主动笔;该方法包括但不限定于触控笔,还适用于其他具有与带有触摸屏幕的终端设备,如台式PC机、笔记本电脑、平板电脑PAD或手机等进行触控操作的触屏电子设备。
触屏模块20,用于与终端的触控屏幕接触以接收触控信号;
解码模块21,用于对触控信号进行解码处理,得到与触控信号对应的固件升级文件;
升级模块22,用于根据固件升级文件对触控笔进行固件升级。
本实施例中的终端可用于执行上述图4方法实施例的步骤,其实现原理类似,在此不再赘述。
本实施例的触控笔,终端通过获取触控笔的固件升级文件,对固件升级文件进行编码处理;终端的触控屏幕与触控笔接触,产生与编码处理后的固件升级文件对应的触控信号并发送给触控笔,实现对触控笔的固件升级。同样的,触控笔通过与终端的触控屏幕接触以接收触控信号;对触控信号进行解码处理,得到与触控信号对应的固件升级文件;根据固件升级文件对触控笔进行固件升级。基于上述方法实现了触控笔通过与终端的触摸屏相接触的方式,接收固件升级文件,同时,该固件升级文件经过编解码的处理,以符合终端与触控笔间可传递的触控信号的形式进行传递,实现了对未配置无线模块的触控笔的固件升级。
图14为本发明另一示例性实施例示出的触控笔的结构示意图,如图 14所示,在上述实施例的基础上,
可选的,触控信号为电容耦合电信号。
可选的,解码模块21,包括:
确定子模块211,用于根据触控信号的波形,确定与波形对应的编码;确定与编码对应的各数据位;
生成子模块212,用于生成包含各数据位的固件升级文件。
可选的,还包括:
识别模块23,用于根据每个编码对应的波形持续时长,识别接收到的波形信号是否为触控信号对应的波形。
可选的,确定子模块211,具体用于确定与编码对应的帧头、帧尾,得到包含各数据位的帧文件;其中,所述帧文件包含:用于组合形成固件升级文件的帧数据、对于标识帧数据起始位置的帧头、对于标识帧数据结束位置的帧尾;
还包括:存储模块24,用于将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,生成固件升级文件。
可选的,帧文件还包括:用于对帧数据进行校验的帧校验码;
确定子模块211,还用于确定与编码对应的帧校验码,根据帧校验码对帧文件进行校验,校验成功后,接收下一个帧文件。
可选的,触屏模块20包括:
检测子模块201,用于与终端的触控屏幕接触,对升级同步信号进行周期性检测;
发送子模块202,用于当检测子模块检测到升级同步信号,向终端反馈升级同步响应信号,以使终端根据同步响应信号,向触控笔发送固件升级文件。
本实施例中的终端可用于执行上述图5、图6方法实施例的步骤,其实现原理类似,在此不再赘述。
图15为本发明一示例性实施例示出的触控笔的结构示意图,如图15所示,触控笔包括:触控单元1501、解调器1502、处理器1503;触控单元1501,用于与终端的触控屏幕接触以接收触控信号;解调器1502与触控单元1501连接,用于对触控信号进行解码处理,得到与触控信号对应 的固件升级文件;处理器1503与解调器1502连接,用于接收解调器1502解调出的固件升级文件,根据固件升级文件执行对触控笔的固件升级。
进一步地,触控单元1501包括:电容传感器。
进一步地,解调器1502包括:主动前端AFE电路15021、模数转换ADC电路15022、混频器Mixer电路15023;
AFE电路15021,用于对接收到的触控信号进行信号放大;
ADC电路15022,用于将信号放大后的电压和/或电流触控信号转换为数字触控信号;
Mixer电路15023,用于对ADC电路15022输出的数字的触控信号进行解调,得到解调后的固件升级文件。
有关AFE电路15021的电路示意图可以参考图7所示的解调电路的示意图,在此不再赘述。本实施例中的触控笔可用于执行前述触控笔的方法实施例的步骤,其实现原理类似,在此不再赘述。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (29)

  1. 一种触控笔的固件升级方法,其特征在于,包括:
    终端获取触控笔的固件升级文件,对所述固件升级文件进行编码处理;
    所述终端的触控屏幕与所述触控笔接触,产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔。
  2. 根据权利要求1所述的方法,其特征在于,所述触控信号为电容耦合电信号。
  3. 根据权利要求1或2所述的方法,其特征在于,所述对所述固件升级文件进行编码处理,包括:
    确定所述固件升级文件中的各数据位对应的编码;
    所述产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔,包括:
    确定与各所述编码对应的触控信号波形,并将具有该波形的触控信号发送给所述触控笔。
  4. 根据权利要求3所述的方法,其特征在于,所述确定与各所述编码对应的触控信号波形,包括:
    根据预设时长,确定每个所述编码的波形持续时长,形成与各所述编码对应的触控信号波形。
  5. 根据权利要求3所述的方法,其特征在于,所述对所述固件升级文件进行编码处理之前,还包括:
    对所述固件升级文件进行拆分,形成各个帧文件;
    其中,所述帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾、用于对所述帧数据进行校验的帧校验码;
    所述对所述固件升级文件进行编码处理,包括:
    确定所述帧文件中的各数据位对应的编码;
    所述产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔,包括:
    确定与每帧帧文件对应的触控信号波形,并将具有该波形的各帧文件的触控信号发送给所述触控笔。
  6. 根据权利要求1所述的方法,其特征在于,所述终端获取触控笔的固件升级文件之后,还包括:
    向与所述终端的触控屏幕接触的触控笔发送升级同步信号;
    接收到所述触控笔反馈的升级同步响应信号后,对所述固件升级文件进行编码处理。
  7. 一种触控笔的固件升级方法,其特征在于,包括:
    与终端的触控屏幕接触以接收触控信号;
    对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
    根据所述固件升级文件对触控笔进行固件升级。
  8. 根据权利要求7所述的方法,其特征在于,所述触控信号为电容耦合电信号。
  9. 根据权利要求7所述的方法,其特征在于,所述对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件,包括:
    根据所述触控信号的波形,确定与所述波形对应的编码;
    确定与所述编码对应的各数据位,生成包含所述各数据位的所述固件升级文件。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    根据每个编码对应的波形持续时长,识别接收到的波形信号是否为所述触控信号对应的波形。
  11. 根据权利要求9所述的方法,其特征在于,所述确定与所述编码对应的各数据位,生成包含所述各数据位的所述固件升级文件,包括:
    确定与所述编码对应的帧头、帧尾,得到包含所述各数据位的帧文件;
    其中,所述帧文件包含:用于组合形成固件升级文件的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾;
    将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,生成所述固件升级文件。
  12. 根据权利要求11所述的方法,其特征在于,所述帧文件还包括:用于对所述帧数据进行校验的帧校验码;所述方法还包括:
    确定与所述编码对应的所述帧校验码,根据所述帧校验码对所述帧文 件进行校验,校验成功后,接收下一个帧文件。
  13. 根据权利要求7所述的方法,其特征在于,所述与终端的触控屏幕接触以接收触控信号之前,还包括:
    与终端的触控屏幕接触,对升级同步信号进行周期性检测;
    若检测到所述升级同步信号,向所述终端反馈升级同步响应信号,以使终端根据所述同步响应信号,向所述触控笔发送所述固件升级文件。
  14. 一种终端,其特征在于,包括:
    获取模块,用于获取触控笔的固件升级文件;
    编码模块,用于对所述固件升级文件进行编码处理;
    触摸屏幕,用于与所述触控笔接触;
    所述编码模块,还用于产生与所述编码处理后的固件升级文件对应的触控信号并发送给所述触控笔。
  15. 根据权利要求14所述的终端,其特征在于,所述触控信号为电容耦合电信号。
  16. 根据权利要求14或15所述的终端,其特征在于,所述编码模块,包括:
    确定子模块,用于确定所述固件升级文件中的各数据位对应的编码;确定与各所述编码对应的触控信号波形;
    发送子模块,用于将具有该波形的触控信号发送给所述触控笔。
  17. 根据权利要求16所述的终端,其特征在于,
    所述确定子模块,具体用于根据预设时长,确定每个所述编码的波形持续时长,形成与各所述编码对应的触控信号波形。
  18. 根据权利要求16所述的终端,其特征在于,还包括:
    拆分模块,用于对所述固件升级文件进行拆分,形成各个帧文件;
    其中,所述帧文件包含:以预设数据位长度对固件升级文件进行划分得到的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾、用于对所述帧数据进行校验的帧校验码;
    所述确定子模块,具体用于确定所述帧文件中的各数据位对应的编码;确定与每帧帧文件对应的触控信号波形;
    所述发送子模块,具体用于将具有该波形的各帧文件的触控信号发送 给所述触控笔。
  19. 根据权利要求14所述的终端,其特征在于,还包括:
    发送模块,用于向与所述终端的触控屏幕接触的触控笔发送升级同步信号;
    所述编码模块,具体用于在接收到所述触控笔反馈的升级同步响应信号后,对所述固件升级文件进行编码处理。
  20. 一种触控笔,其特征在于,包括:
    触屏模块,用于与终端的触控屏幕接触以接收触控信号;
    解码模块,用于对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
    升级模块,用于根据所述固件升级文件对触控笔进行固件升级。
  21. 根据权利要求20所述的触控笔,其特征在于,所述触控信号为电容耦合电信号。
  22. 根据权利要求20所述的触控笔,其特征在于,所述解码模块,包括:
    确定子模块,用于根据所述触控信号的波形,确定与所述波形对应的编码;确定与所述编码对应的各数据位;
    生成子模块,用于生成包含所述各数据位的所述固件升级文件。
  23. 根据权利要求22所述的触控笔,其特征在于,还包括:
    识别模块,用于根据每个编码对应的波形持续时长,识别接收到的波形信号是否为所述触控信号对应的波形。
  24. 根据权利要求22所述的触控笔,其特征在于,
    所述确定子模块,具体用于确定与所述编码对应的帧头、帧尾,得到包含所述各数据位的帧文件;其中,所述帧文件包含:用于组合形成固件升级文件的帧数据、对于标识所述帧数据起始位置的帧头、对于标识所述帧数据结束位置的帧尾;
    还包括:存储模块,用于将获取到的每个帧文件存储在存储器中,获取到全部帧文件后,生成所述固件升级文件。
  25. 根据权利要求24所述的触控笔,其特征在于,所述帧文件还包括:用于对所述帧数据进行校验的帧校验码;
    所述确定子模块,还用于确定与所述编码对应的所述帧校验码,根据所述帧校验码对所述帧文件进行校验,校验成功后,接收下一个帧文件。
  26. 根据权利要求20所述的触控笔,其特征在于,
    所述触屏模块包括:
    检测子模块,用于与终端的触控屏幕接触,对升级同步信号进行周期性检测;
    发送子模块,用于当所述检测子模块检测到所述升级同步信号,向所述终端反馈升级同步响应信号,以使终端根据所述同步响应信号,向所述触控笔发送所述固件升级文件。
  27. 一种触控笔,其特征在于,包括:触控单元、解调器、处理器;
    所述触控单元,用于与终端的触控屏幕接触以接收触控信号;
    所述解调器与所述触控单元连接,用于对所述触控信号进行解码处理,得到与所述触控信号对应的固件升级文件;
    所述处理器与所述解调器连接,用于接收所述解调器解调出的所述固件升级文件,根据所述固件升级文件执行对触控笔的固件升级。
  28. 根据权利要求27所述的触控笔,其特征在于,
    所述触控单元包括:电容传感器。
  29. 根据权利要求27或28所述的触控笔,其特征在于,
    所述解调器包括:主动前端电路、模数转换电路、混频器电路;
    所述主动前端电路用于对接收到的所述触控信号进行信号放大;
    所述模数转换电路用于将信号放大后的电压和/或电流触控信号转换为数字触控信号;
    所述混频器电路用于对所述模数转换电路输出的数字的触控信号进行解调,得到解调后的固件升级文件。
PCT/CN2017/109687 2017-11-07 2017-11-07 触控笔的固件升级方法、终端及触控笔 WO2019090466A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780001581.2A CN110352402A (zh) 2017-11-07 2017-11-07 触控笔的固件升级方法、终端及触控笔
PCT/CN2017/109687 WO2019090466A1 (zh) 2017-11-07 2017-11-07 触控笔的固件升级方法、终端及触控笔

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/109687 WO2019090466A1 (zh) 2017-11-07 2017-11-07 触控笔的固件升级方法、终端及触控笔

Publications (1)

Publication Number Publication Date
WO2019090466A1 true WO2019090466A1 (zh) 2019-05-16

Family

ID=66437646

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/109687 WO2019090466A1 (zh) 2017-11-07 2017-11-07 触控笔的固件升级方法、终端及触控笔

Country Status (2)

Country Link
CN (1) CN110352402A (zh)
WO (1) WO2019090466A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562694A (zh) * 2022-02-10 2023-01-03 荣耀终端有限公司 一种手写笔升级方法、控制终端及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203084673U (zh) * 2013-01-23 2013-07-24 成都有形科技有限公司 主动式电容笔
CN104951344A (zh) * 2015-06-19 2015-09-30 北京汉王鹏泰科技有限公司 利用声音信号升级固件的方法及装置
CN104991795A (zh) * 2015-06-19 2015-10-21 北京汉王鹏泰科技有限公司 主动电容笔的固件升级方法及装置
CN206584319U (zh) * 2016-01-29 2017-10-24 谷歌公司 便携式计算装置的铰链内的充电手写笔

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203084673U (zh) * 2013-01-23 2013-07-24 成都有形科技有限公司 主动式电容笔
CN104951344A (zh) * 2015-06-19 2015-09-30 北京汉王鹏泰科技有限公司 利用声音信号升级固件的方法及装置
CN104991795A (zh) * 2015-06-19 2015-10-21 北京汉王鹏泰科技有限公司 主动电容笔的固件升级方法及装置
CN206584319U (zh) * 2016-01-29 2017-10-24 谷歌公司 便携式计算装置的铰链内的充电手写笔

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562694A (zh) * 2022-02-10 2023-01-03 荣耀终端有限公司 一种手写笔升级方法、控制终端及介质

Also Published As

Publication number Publication date
CN110352402A (zh) 2019-10-18

Similar Documents

Publication Publication Date Title
US8108529B1 (en) Encoded acknowledge signal for wireless communication
US7356635B2 (en) Compressed report descriptors for USB devices
WO2019134306A1 (zh) 消息处理方法、装置、终端设备及可读存储介质
CN111290665B (zh) 压力检测的方法、装置、主动笔、触控芯片和电子设备
CN104036628A (zh) 一种基于蓝牙的智能遥控器及其快速配对方法
CN103596017B (zh) 一种视频下载方法及系统
US20210176810A1 (en) Method and device for reconnecting bluetooth communication
WO2020034056A1 (zh) 信号发射方法、信号接收方法及装置
US10754479B2 (en) Touch sensing system and data transmission method of a touch panel
CN111585695B (zh) 实时控制比特率的方法及其电子装置
US11397482B2 (en) Method to be performed by stylus and sensor controller, stylus, and sensor controller
TW201411336A (zh) 偵錯控制系統及其方法
US10176815B1 (en) System for acoustic communication
CN110996019A (zh) 一种基于无线传输的投屏方法、系统及存储介质
US9271099B1 (en) Method and apparatus to use audio port to provide power and data communications for peripheral devices
JP2020035246A (ja) データ通信方法
WO2019090466A1 (zh) 触控笔的固件升级方法、终端及触控笔
CN104951344A (zh) 利用声音信号升级固件的方法及装置
KR20050046379A (ko) 시리얼 통신 프로토콜 중 명령 및 데이터 전송 및 수신 방법
WO2015120758A1 (zh) 一种数据通信方法、终端及信息安全设备
KR101527185B1 (ko) 수동 rfid의 대용량 데이터 전송 방법 및 시스템
CN111865952B (zh) 数据处理方法、装置、存储介质及电子设备
KR20200101012A (ko) 오디오 데이터 처리 방법 및 이를 위한 전자 장치
CN107708183B (zh) 解码算法确定方法、装置、终端及存储介质
CN109063522B (zh) 读卡器的读卡方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17931258

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17931258

Country of ref document: EP

Kind code of ref document: A1