WO2018157431A1 - 单线通信方法及设备 - Google Patents

单线通信方法及设备 Download PDF

Info

Publication number
WO2018157431A1
WO2018157431A1 PCT/CN2017/079141 CN2017079141W WO2018157431A1 WO 2018157431 A1 WO2018157431 A1 WO 2018157431A1 CN 2017079141 W CN2017079141 W CN 2017079141W WO 2018157431 A1 WO2018157431 A1 WO 2018157431A1
Authority
WO
WIPO (PCT)
Prior art keywords
line communication
message
data
peripheral device
receiving end
Prior art date
Application number
PCT/CN2017/079141
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 CN201780047728.1A priority Critical patent/CN109564557B/zh
Publication of WO2018157431A1 publication Critical patent/WO2018157431A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/14Two-way operation using the same type of signal, i.e. duplex

Definitions

  • the present application relates to communication technologies, and in particular, to a single-line communication method and device.
  • the interface multiplexing technology has become the core selling point of the terminal products. Through the interface multiplexing technology, the external pin PIN number of the terminal product can be greatly reduced, and the appearance effect can be improved, and the port cost can be reduced.
  • the prior art does not have a mechanism for implementing two-way communication on a single signal line.
  • the embodiment of the present application provides a single-line communication method and device to implement a single-line communication protocol suitable for interface multiplexing.
  • the present application provides a single-line communication method, including:
  • the sending end sends a single-line communication message to the receiving end.
  • the single-line communication message includes a packet header part and a data part.
  • the header part includes an identifier field, a length field, and a check field, and the identifier field is used to identify a message type corresponding to the single-line communication message, and the length.
  • the field indicates the length of the data portion;
  • the sending end receives the response message sent by the receiving end, and the format of the response message is the same as the format of the single line communication message;
  • the sender and the receiver are connected by a single line.
  • the transmitting end detects the level of the single line through an analog-to-digital conversion detecting pin to determine whether the receiving end is in a connected state;
  • the receiving end detects the level of the single line through an analog-to-digital conversion detecting pin, and determines whether the transmitting end is in a connected state.
  • the single line is provided with an analog switch.
  • the identifier field identifies that the message corresponding to the single-line communication message is a connection request; the response message carries the encrypted data.
  • the sending end after receiving the response message sent by the receiving end, the sending end further includes:
  • the sender decrypts the encrypted data to obtain decrypted data
  • the sending end sends a single-line communication message carrying the decrypted data to the receiving end, so that the receiving end establishes a connection with the sending end according to the decrypted data.
  • the higher-priority end of the receiving end and the transmitting end sends the single-line communication message again at the next moment.
  • the identifier field identifies a message corresponding to the single-line communication message as a command request, and the command request is used to identify the number of single-line communication messages that are sent by the sending end to the receiving end and carry the target data after the command request is identified.
  • the sender is the one with the highest priority in the receiving end and the sending end, and the message corresponding to the single-line communication message sent by the sending end to the receiving end is a command request;
  • the sending end After transmitting the last single-line communication message carrying the target data, the sending end receives the response message sent by the receiving end to the last single-line communication message carrying the target data, and the identifier field and the last bearer in the response message.
  • the identification fields in single-line communication messages with target data are different.
  • the identifier field identifies that the message corresponding to the single-line communication message is a query request, and the query request is used to query the manufacturer identifier or firmware version information of the receiving end;
  • the response message carries the manufacturer identifier or firmware version information of the receiving end.
  • the sending end after receiving the response message sent by the receiving end, the sending end further includes:
  • the sender determines whether the firmware of the receiving end needs to be upgraded according to the manufacturer identifier and/or the firmware version information of the receiving end;
  • the sending end sends a single-line communication message indicating the upgrade prompt to the receiving end;
  • the sending end After receiving the response packet from the receiving end to the upgrade prompt, the sending end sends a single-line communication packet carrying the upgrade data to the receiving end.
  • the data portion if the data portion does not include a payload, the data portion is the default value.
  • the application provides a peripheral device, including: a processor and a communication interface;
  • the processor is configured to control the communication interface to send a single-line communication message to the terminal device, where the single-line communication message includes a packet header portion and a data portion, and the packet header portion includes an identifier field, a length field, and a check field, where the identifier field is used to identify the corresponding one-line communication packet.
  • the message type, the length field indicates the length of the data portion;
  • the communication interface is configured to receive a response message sent by the terminal device, and the format of the response message is the same as the format of the single-line communication message;
  • the peripheral device and the terminal device are connected by a single wire.
  • the single line is provided with an analog switch.
  • the identifier field identifies that the message corresponding to the single-line communication message is a connection request; the response message carries the encrypted data.
  • the processor is further configured to decrypt the encrypted data to obtain the decrypted data, and control the communication interface to send the single-line communication report carrying the decrypted data to the terminal device. For enabling the terminal device to establish a connection with the peripheral device based on the decrypted data.
  • the peripheral device and the terminal device simultaneously transmit single-line communication messages of different message types on a single line, the higher-priority end of the peripheral device and the terminal device transmits the single-line communication message again at the next moment.
  • the identifier field identifies a message corresponding to the single-line communication message as a command request, and the command request is used to identify the number of single-line communication messages that are sent by the communication interface to the terminal device and carry the target data after the command request is identified.
  • the peripheral device is a high-priority end of the peripheral device and the terminal device, and the message corresponding to the single-line communication message sent by the communication interface to the terminal device is a command request;
  • the communication interface After transmitting the last single-line communication message carrying the target data, the communication interface receives the response message sent by the terminal device to the last single-line communication message carrying the target data, and the identifier field and the last bearer in the response message.
  • the identification fields in single-line communication messages with target data are different.
  • the data portion if the data portion does not include a payload, the data portion is the default value.
  • the application provides a terminal device, including: a processor and a communication interface;
  • the processor is configured to control the communication interface to send a single-line communication message to the peripheral device, where the single-line communication message includes a packet header portion and a data portion, and the packet header portion includes an identification field, a length field, and a check field, where the identifier field is used to identify the corresponding one-line communication message.
  • the message type, the length field indicates the length of the data portion;
  • the communication interface is configured to receive a response message sent by the peripheral device, and the format of the response message is the same as the format of the single-line communication message;
  • the peripheral device and the terminal device are connected by a single wire.
  • the processor is further configured to detect the level of the single line through an analog-to-digital conversion detection pin to determine whether the peripheral device is in a connected state.
  • the identifier field identifies that the message corresponding to the single-line communication message is a query request, and the query request is used to query the manufacturer identifier or firmware version information of the peripheral device;
  • the response message carries the manufacturer identifier or firmware version information of the peripheral device.
  • the processor is further configured to determine, according to the manufacturer identifier and/or the firmware version information of the peripheral device, whether the firmware of the peripheral device needs to be upgraded;
  • the processor sends a single-line communication message indicating the upgrade prompt to the peripheral device through the communication interface;
  • the processor controls the communication interface to send a single-line communication message carrying the upgrade data to the peripheral device.
  • the data portion if the data portion does not include a payload, the data portion is the default value.
  • the present application provides a computer readable storage medium, wherein the computer readable storage medium stores instructions that, when run on a computer, cause the computer to perform the methods of the above aspects.
  • the present application provides a computer program product comprising instructions, which, when run on a computer, cause the computer to perform the methods of the various aspects described above.
  • the sending end sends a single-line communication message to the receiving end, and the receiving end feeds back the response message with the same format as the single-line communication message to the transmitting end
  • the single-line communication message includes a packet header part and a data part, and the packet header
  • the part includes an identifier field, a length field, and a check field, where the identifier field is used to identify the message type corresponding to the single-line communication message, and the single-line communication message of the different identifier field can be used for different messages, so that the sender and the receiver are connected by a single line.
  • FIG. 1 is a schematic structural diagram of a system composed of a keyboard and a host in the prior art
  • FIG. 2 is a schematic structural diagram of a keyboard and a host according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a single-line communication packet according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a connection between a keyboard and a host according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of connection between another keyboard and a host according to an embodiment of the present application.
  • FIG. 6 is a signaling diagram of a single-line communication method according to an embodiment of the present application.
  • FIG. 7 is a signaling diagram of another single-line communication method according to an embodiment of the present application.
  • FIG. 8 is a signaling diagram of still another single-line communication method according to an embodiment of the present application.
  • FIG. 9 is a signaling diagram of still another single-line communication method according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a peripheral device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of another terminal device according to an embodiment of the present disclosure.
  • the interface multiplexing technology has become the core selling point of the terminal products.
  • the external pin PIN number of the terminal product can be greatly reduced, and the appearance effect can be improved, and the port cost can be reduced.
  • devices such as mobile terminals, tablet computers, and notebook computers can be connected to a keyboard to facilitate user input and improve input efficiency.
  • Devices such as mobile terminals, tablet computers, and notebook computers are connected to the keyboard through interfaces. If the number of pin PINs on the interface is large, the devices such as mobile terminals, tablet computers, and notebook computers, and the appearance of the keyboard will be reduced.
  • the number of foot PINs is large, the contact points will be relatively small, the PIN spacing will be relatively close, resulting in a decrease in connection reliability. In addition, the large number of pin PINs is not conducive to cost reduction.
  • FIG. 1 is a schematic structural diagram of a system composed of a keyboard and a host in the prior art.
  • the host may be a mobile terminal, a tablet computer, a notebook computer, etc.
  • the keyboard may be a mobile terminal, a tablet computer, or a notebook.
  • An external keyboard such as a computer, the host and the keyboard are connected by physical contacts.
  • the host device is provided with an embedded controller (EC), a system on chip (Soc), a light sensor (Light Sensor), and a Hall sensor (Hall Sensor), wherein the optical sensor passes through an internal integrated circuit bus (Inter -Integrated Circuit (I2C) is connected to the EC.
  • I2C Inter -Integrated Circuit
  • the Hall sensor is connected to the EC through a General Purpose Input/Output (GPIO).
  • GPIO General Purpose Input/Output
  • the EC and Soc are connected by a Low Pin Count (LPC).
  • the keyboard is provided with a touchpad, a keyboard, a light emitting diode (LED) and a backlight.
  • the touchpad is connected to the keyboard's Microcontroller Unit (MCU) through the I2C.
  • MCU Microcontroller Unit
  • the buttons and LEDs are connected to the MCU of the keyboard through the GPIO, and the backlight is connected to the MCU of the keyboard through Pulse Width Modulation (PWM).
  • PWM Pulse Width Modulation
  • the data generated by the touchpad and the keys are processed by the MCU of the keyboard and transmitted to the system chip Soc of the host through a Universal Serial Bus (USB) 2.0.
  • the data generated by the backlight is processed by the MCU of the keyboard and then sent and received by the universal asynchronous transceiver.
  • the Transmitter Universal Asynchronous Receiver/Transmitter, UART
  • UART Universal Asynchronous Receiver/Transmitter
  • the GPIO is used for keyboard connection detection. Normally, USB2.0 has 4 contacts, UART has two contacts, and GPIO has 1 contact. Therefore, as shown in Figure 1, 7 contacts are required between the host and the keyboard. .
  • the structure of the host in FIG. 1 can be improved.
  • an MCU is added on the host side, in order to distinguish the MCU on the keyboard side from the MCU on the host side.
  • the MCU on the host side is recorded as MCU1
  • the MCU on the keyboard side is recorded as MCU2
  • MCU1 and MCU2 will pass.
  • Single-line connection, USB, UART, GPIO and other signals will be transmitted through a single signal line, ie, single-wire transmission, which realizes the interface multiplexing technology, which greatly reduces the number of connecting contacts between the host and the keyboard, and improves the appearance. effect.
  • the embodiment of the present application proposes a single-line communication method, which is applicable not only to the contact connection mode between the host and the keyboard, but also to the contact connection mode of other scenarios.
  • the following specific embodiments are provided in the following application. The following describes the embodiments in combination with specific scenarios:
  • FIG. 3 is a schematic structural diagram of a single-line communication packet according to an embodiment of the present disclosure.
  • the single-line communication message includes a header portion 31 and a data portion 32, wherein the header portion 31 includes an identification field, a length field, and a check field, wherein the identification field is used to identify the message type corresponding to the single-line communication message.
  • the length field indicates the length of the data portion 32.
  • the length of the data portion 32 is the actual length of the payload, optionally, the data portion of a single-line communication message can be carried.
  • the length of the payload is 64 bytes.
  • the check field may be Cyclic Redundancy Check (CRC) data.
  • CRC check data is 16 bits of data
  • the check information 33 may indicate that the CRC is 8 bits high
  • the check information 34 may be Indicates that the CRC is lower 8 bits.
  • the two sides of the single-line communication are the MCU2 on the keyboard side and the MCU1 on the host side
  • the MCU2 on the keyboard side can send the single-line communication message as shown in FIG. 3 to the MCU1 on the host side, on the host side.
  • the MCU1 can also send a single-line communication message as shown in FIG. 3 to the MCU2 on the keyboard side.
  • Table 1 The correspondence between the message type and the identification field corresponding to the single-line communication message can be as shown in Table 1:
  • the sending end sends a single-line communication message to the receiving end, and the receiving end feeds back the response message with the same format as the single-line communication message to the transmitting end, and the single-line communication message includes the packet header part and the data.
  • the packet header portion includes an identifier field, a length field, and a check field, where the identifier field is used to identify the message type corresponding to the single-line communication packet, and the single-line communication packet of the different identifier field can be used for different messages, so that the sender and the receiver are different.
  • the transmitting and receiving parties can send single-line communication messages of different messages to each other through a single line, thereby realizing the mechanism for two-way communication between the transmitting and receiving parties on a single line.
  • the two sides of the single-line communication are the MCU 2 on the keyboard side and the MCU 1 on the host side
  • the sender may be the MCU 2 on the keyboard side or the MCU 1 on the host side
  • MCU2 is the sender, which describes the connection detection of the host to the keyboard and the connection process between the keyboard and the host.
  • the single-wire communication between MCU1 and MCU2 is based on UART.
  • the UART TX/RX can be short-circuited to form a line from the hardware design, and the single-wire communication is based on the UART TX/RX single line.
  • the host may be a personal computer (PC) host, and the host host side MCU1 can use an Analog-to-Digital Converter (ADC) detection pin to detect the level of the single line, when a single line is detected.
  • ADC Analog-to-Digital Converter
  • VCC indicates the input voltage on the host side of the PC
  • R1 indicates the pull-up resistor on the host side of the PC
  • R2 represents the pull-down resistor on the keyboard side.
  • FIG. 6 is a signaling diagram of a single-line communication method according to an embodiment of the present application.
  • the embodiment of the present application takes the keyboard as the transmitting end and the host as the receiving end as an example.
  • the signaling diagram shown in FIG. 6 is applicable to the connection establishment between the keyboard and the host.
  • the host according to FIG. 4 or FIG. 5 The circuit detects that the keyboard is connected to power the keyboard, and then the connection process between the keyboard and the host is as follows:
  • the keyboard sends a connection request to the host.
  • the identifier field 0x11 identifies that the message corresponding to the single-line communication message sent by the keyboard to the host is a connection request, and the connection request indicates that the keyboard request establishes a connection with the host.
  • the keyboard sends a connection request to the host.
  • the connection request may be periodic. For example, after the keyboard sends a connection request to the host, the host does not respond, and the keyboard may send a connection request at a certain time, for example, 5 ms, until the host responds.
  • the host sends a connection response to the keyboard, and the connection response carries the encrypted data.
  • connection response When the host receives the connection request and responds to the connection request, the connection response is sent to the keyboard, and the identifier field of the connection response is the same as the identifier field of the connection request, which is 0x11, indicating that the connection response is a connection request initiated by the host for the keyboard.
  • the response is made, and the connection response has the same format as the one-line communication message, and carries the encrypted data.
  • the encrypted data is carried in the data part of the connection response, and the encrypted data may be a 16-bit advanced encryption standard. (Advanced Encryption Standard, AES) Encrypts data.
  • AES Advanced Encryption Standard
  • the keyboard sends a keyboard decryption data to the host.
  • the keyboard After receiving the connection response of the host, the keyboard parses the encrypted data from the connection response, decrypts the encrypted data, obtains the decrypted data, and sends a single-line communication message carrying the decrypted data to the host, and carries the decryption
  • the identification field of the single-line communication message of the data is 0x12, and the decrypted data is carried in the data part of the single-line communication message.
  • the host responds to the decrypted data after the keyboard is decrypted.
  • the host After receiving the decrypted data after decryption by the keyboard, the host determines whether the decrypted data is correct.
  • One achievable manner is: the host pre-stores the original data before the encrypted data, and the decrypted number after the host receives the decryption of the keyboard. According to the comparison, the decrypted data and the original data are compared. If the decrypted data is consistent with the original data, the decryption of the keyboard is successful, and the host responds to the decrypted data after the keyboard is decrypted, indicating that the host establishes a connection with the keyboard; if the data is decrypted after comparison If the original data is inconsistent, it means that the keyboard decryption is unsuccessful. The host responds to the decrypted data after the keyboard is decrypted, indicating that the host does not establish a connection with the keyboard, and then disconnects and turns off the keyboard power.
  • FIG. 7 is a signaling diagram of another single-line communication method according to an embodiment of the present application.
  • the keyboard is used as the sending end, and the host is the receiving end as an example.
  • the signaling diagram shown in FIG. 7 is applicable to data transmission between the keyboard and the host.
  • the keyboard is required to issue a command request first, and the number of times the command request announces the subsequent delivery of the payload in the same identification field.
  • the precision touchpad (PTP) on the keyboard can support up to five finger touches. When five fingers slide on the precision touchpad at the same time, the keyboard side sends a command request and announces.
  • PTP precision touchpad
  • the keyboard sends a command request to the host.
  • the keyboard Before the keyboard needs to send the data generated by the five fingers sliding on the precision touch panel to the host, the keyboard sends a single-line communication message to the host, and the identification field of the single-line communication message is 0x10. According to Table 1, the identification field 0x10
  • the message corresponding to the single-line communication message sent by the identification keyboard to the host is a command request, and the command requests the number of single-line communication messages that are sent by the keyboard to the host after the command request is sent, and the specific command is
  • the requested data portion is 0x05, indicating that the keyboard then sends five single-line communication messages carrying PTP data to the host.
  • the host sends a response to the command request to the keyboard.
  • the host After receiving the command request sent by the keyboard, the host responds to the command request, and the format of the response is the same as the format of the single-line communication message. Specifically, the identifier field of the response is the same as the identifier field of the command request, and the same is 0x10. Indicates that the response is a response from the host to a command request sent by the keyboard.
  • S703 The keyboard sends the first data of the touchpad to the host.
  • the keyboard sends a single-line communication message carrying the first data of the touch panel to the host.
  • the identifier field 0x01 identifies the message corresponding to the single-line communication message sent by the keyboard to the host as the touchpad data.
  • the data of a touchpad is 9 bytes.
  • the length field of the single-line communication message in S703 is 0x09, 0x09 indicates the decimal number 9, and the length field 0x09 indicates that the data part of the single-line communication message is 9 bytes.
  • the host sends a response to the first data of the touchpad to the keyboard.
  • the data portion of the response sent by the host to the keyboard defaults to 0x55, and the length of 0x55 is 1 byte.
  • the length field of the response is 0x01.
  • S705 The keyboard sends the fifth data of the touchpad to the host.
  • the host sends a response to the fifth data of the touchpad to the keyboard.
  • FIG. 8 is a signaling diagram of still another single-line communication method according to an embodiment of the present application.
  • the keyboard is used as the sending end, and the host is the receiving end as an example.
  • the signaling diagram shown in FIG. 8 is applicable to the conflict between the keyboard and the host. Reason.
  • the keyboard sends a command to the host.
  • the host sends a sleep mode control command to the keyboard, and the keyboard and the host cannot receive the response of the other party.
  • the embodiment of the present application can determine the higher priority end of the host and the keyboard.
  • the amount of data on the keyboard side is larger than the amount of data on the host side, so it can be determined that the priority of the keyboard is higher.
  • the host side enters a wait state, and the keyboard continues at the next moment in which the conflict occurs.
  • the host receives the last data, it is the last one.
  • the response data the response at the highest bit is set in the identifier field is 1, that the host has a message to send to the keyboard after the response.
  • the keyboard sends a command request to the host.
  • the host sends a response to the command request to the keyboard.
  • the keyboard sends the first data of the touchpad to the host.
  • the host sends a response to the first data of the touchpad to the keyboard.
  • the keyboard sends the fifth data of the touchpad to the host.
  • the host sends a response to the fifth data of the touchpad to the keyboard.
  • S801-S806 is the same as S701-S806, and details are not described herein. It should be noted that when the host responds to the last data of the touchpad sent by the keyboard, the highest bit of the identification field is set to 1 in the response, as shown in FIG. 8, the keyboard sends the touchpad to the host. For the data, the identification field of the single-line communication message is 0x01. When the host sends a response to the fifth data of the touchpad to the keyboard, the identification field of the single-line communication message is 0x81, that is, the host sets the highest bit of 0x01 to 1. Get 0x81, indicating that the host has a message to send to the keyboard after the response.
  • the host sends a sleep mode control instruction to the keyboard.
  • the identifier field 0x32 identifies that the message corresponding to the single-line communication message sent by the keyboard to the host is a sleep mode control instruction, and the data portion of the sleep mode control instruction is a sleep mode.
  • the keyboard sends a response to the sleep mode control command to the host.
  • the identification field of the response sent by the keyboard to the host to the sleep mode control instruction is consistent with the identification field of the sleep mode control instruction, both being 0x32, indicating that the response is a response of the keyboard to the sleep mode control command sent by the host.
  • FIG. 9 is a signaling diagram of still another single-line communication method according to an embodiment of the present application.
  • the embodiment of the present application takes the host as the sending end and the keyboard as the receiving end as an example.
  • the signaling diagram shown in FIG. 9 is applicable to the host to keyboard firmware upgrade process.
  • the upgrade function of the keyboard side MCU can be realized by the single line technical solution.
  • the host side queries the manufacturer identifier vender ID and firmware version of the keyboard to determine whether the firmware firmware on the keyboard side needs to be upgraded. If the upgrade is required, the host side sends an upgrade prompt, after receiving the response from the keyboard side.
  • the host starts the upgrade function.
  • the single-transfer payload of the upgrade process supports 64 bytes. If the amount of upgrade data is large, the upgrade can be completed by multiple transmissions.
  • the keyboard is in the process of upgrading. If there are other message requests, all other messages will be discarded.
  • the specific process is as follows in the following steps:
  • the host sends a manufacturer identifier request to the keyboard.
  • the host sends a single-line communication message with the identification field 0x40 to the keyboard, indicating that the host requests to obtain the manufacturer identifier of the keyboard.
  • the keyboard sends a manufacturer identifier response to the host.
  • the keyboard sends a response message with an identifier field of 0x40 to the host, indicating that the response message is a response of the keyboard to the manufacturer identifier request, and the data portion of the response message carries the manufacturer identifier.
  • S903 The host sends a keyboard MCU firmware version request to the keyboard.
  • the host sends a single-line communication message with the identifier field 0x41 to the keyboard, indicating that the host requests to obtain the MCU firmware version of the keyboard.
  • the keyboard sends a keyboard MCU firmware version response to the host.
  • the keyboard sends a response message with the identifier field 0x41 to the host, indicating that the response message is a keyboard response to the keyboard MCU firmware version request, and the data portion of the response message carries the keyboard MCU firmware version.
  • S905 The host notifies the keyboard to enter the firmware upgrade mode.
  • the host sends a single-line communication message with the identifier field 0x24 to the keyboard, indicating that the host notifies the keyboard to enter the firmware upgrade mode.
  • the keyboard sends a keyboard to the host to enter a firmware upgrade mode response.
  • the keyboard sends a response message with an identifier field of 0x24 to the host, indicating that the response message is a response of the keyboard to the keyboard entering the firmware upgrade mode.
  • the host sends a keyboard MCU firmware update command to the keyboard.
  • the host sends a single-line communication packet carrying the upgrade data to the keyboard.
  • the identifier field of the single-line communication packet is 0x20, indicating that the data portion of the single-line communication packet carries the upgrade data.
  • the keyboard sends a keyboard MCU firmware update response to the host.
  • the host sends a keyboard MCU firmware update command to the keyboard.
  • the keyboard sends a keyboard MCU firmware update response to the host.
  • the single-transfer payload of the upgrade process supports 64 bytes. If the amount of upgrade data is large, the upgrade can be completed by multiple transmissions. The keyboard is in the process of upgrading. If there are other message requests, all other messages will be discarded.
  • the host sends a keyboard MCU firmware update completion notification to the keyboard.
  • the keyboard MCU firmware update completion notification is sent to the keyboard.
  • the notification is also transmitted through the single-line communication message.
  • the identifier field of the single-line communication message is 0x21. According to Table 1, the identifier field is 0x21.
  • the single-line communication message indicates that the host sends a keyboard MCU firmware update completion notification to the keyboard.
  • the keyboard sends a response message with an identifier field of 0x21 to the host, indicating that the response message is a response of the keyboard to the completion of the keyboard MCU firmware update.
  • the single-line communication method provided by the embodiment of the present invention implements connection establishment, conflict processing, data transmission, and firmware upgrade between the transmitting end and the receiving end through a single-line communication message, and implements a complete set of interface multiplexing.
  • Single line communication protocol
  • the PTP data format can be as shown in Table 2:
  • the mouse data format can be as shown in Table 3.
  • the data format can feedback the mouse position information in real time:
  • the data format of the keyboard keys can be as shown in Table 4.
  • the data format can simultaneously support the combination of six buttons.
  • the actual application can increase or decrease the number of buttons according to requirements:
  • FIG. 10 is a schematic structural diagram of a peripheral device according to an embodiment of the present application.
  • the peripheral device can be a keyboard, a mouse, a touchpad, and the like.
  • the peripheral device 100 includes a processor 101 and a communication interface 102.
  • the processor 101 is configured to control the communication interface 102 to send a single-line communication message to the terminal device, where the single-line communication message includes a packet header portion and a data portion, and the packet header portion includes an identifier field, a length field, and a check field, where the identifier field is used to identify the single-line communication packet.
  • the identifier field identifies that the message corresponding to the single-line communication message is a connection request; the response message carries the encrypted data.
  • the processor 101 is further configured to decrypt the encrypted data to obtain decrypted data, and control the communication interface 102 to send the single-line communication carrying the decrypted data to the terminal device.
  • the message is such that the terminal device establishes a connection with the peripheral device 100 based on the decrypted data.
  • the peripheral device 100 and the terminal device simultaneously transmit single-line communication messages of different message types on a single line
  • the higher-priority terminal of the peripheral device 100 and the terminal device transmits the single-line communication message again at the next moment.
  • the identifier field identifies the message corresponding to the single-line communication message as a command request, and the command request is used to identify the number of single-line communication messages that are sent by the communication interface 102 to the terminal device and that carry the target data after the command request.
  • the peripheral device 100 is the highest priority end of the peripheral device 100 and the terminal device, and the message corresponding to the single-line communication message sent by the communication interface 102 to the terminal device is a command request; the communication interface 102 sends the last bearer.
  • the response message sent by the terminal device to the last single-line communication message carrying the target data is received, the identification field in the response message, and the last single-line communication message carrying the target data.
  • the identification fields in the text are different.
  • the data portion if the data portion does not include the payload, the data portion is the default value.
  • the peripheral device of the embodiment shown in FIG. 10 can be used to perform the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • the terminal device may be a mobile terminal, a tablet computer, a notebook computer or the like.
  • the terminal device 110 includes a processor 111 and a communication interface 112.
  • the processor 111 is configured to control the communication interface 112 to send a single-line communication message to the peripheral device, where the single-line communication message includes a header portion and a data portion, and the header portion includes an identification field, a length field, and a check field, and the identifier field is used to identify the single-line communication report.
  • the message type corresponding to the text, the length field indicates the length of the data part; the communication interface 112 is used to receive the response message sent by the peripheral device, the format of the response message and the single line communication The format of the message is the same; the peripheral device and the terminal device 110 are connected by a single line.
  • the identifier field identifies that the message corresponding to the single-line communication message is a query request, and the query request is used to query the manufacturer identifier or firmware version information of the peripheral device; the response message carries the manufacturer identifier of the peripheral device or Firmware version information.
  • the processor 111 is further configured to determine, according to the manufacturer identifier and/or the firmware version information of the peripheral device, whether the firmware of the peripheral device needs to be upgraded; The firmware of the peripheral device needs to be upgraded, and the processor 111 sends the upgraded prompt single-line communication message to the peripheral device through the communication interface 112.
  • the communication interface 112 controls the communication interface. 112 sends a single line communication message carrying the upgrade data to the peripheral device.
  • the data portion if the data portion does not include the payload, the data portion is the default value.
  • the terminal device of the embodiment shown in FIG. 11 can be used to perform the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 12 is a schematic structural diagram of another terminal device according to an embodiment of the present disclosure.
  • the terminal device includes a processor 121, a memory 122, and a transceiver 123.
  • the transceiver device 123 can be connected to the peripheral device 13 of the terminal device.
  • the peripheral device 13 can be an input device such as a keyboard, a mouse, or a touchpad.
  • the transceiver device 123 and the peripheral device 13 communicate by the single-wire communication method described in the foregoing method embodiment.
  • the transceiver device 123 can also be connected to the antenna, and the information transmitted on the single line between the transceiver device 123 and the peripheral device 13 is transmitted through the antenna. To the base station.
  • the memory 122 is used to store a program implementing the above method embodiment, and the processor 121 calls the program to perform the operations of the above method embodiments.
  • part or all of the above units may be implemented by being embedded in a chip of the terminal device in the form of an integrated circuit. And they can be implemented separately or integrated. That is, the above units may be configured to implement one or more integrated circuits of the above method, for example, one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (digital singnal processor) , DSP), or one or more Field Programmable Gate Arrays (FPGAs).
  • ASICs Application Specific Integrated Circuits
  • microprocessors digital singnal processor
  • FPGAs Field Programmable Gate Arrays

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)

Abstract

本申请实施例提供一种单线通信方法及设备,该方法包括:发送端向接收端发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;发送端接收接收端发送的响应报文,响应报文的格式和单线通信报文的格式相同;其中,发送端和接收端通过单线连接。本申请实施例通过发送端向接收端发送单线通信报文,接收端向发送端反馈与单线通信报文格式相同的响应报文,单线通信报文可对应不同消息,使得发送端和接收端通过单线连接时,收发双方可通过单线向对方发送不同消息的单线通信报文,从而实现了收发双方在单线上进行双向通信的机制。

Description

单线通信方法及设备 技术领域
本申请涉及通信技术,尤其涉及一种单线通信方法及设备。
背景技术
随着工艺水平和审美要求的提升,终端产品朝着轻薄、便携的方向发展,同时对终端产品的接口的要求也越来越高,接口复用技术成为终端产品的核心卖点。通过接口复用技术,可以大大减少终端产品外部引脚PIN数,同时可提升外观效果,并降低端口成本。
但是,现有技术并没有在单根信号线上实现双向通信的机制。
申请内容
本申请实施例提供一种单线通信方法及设备,以实现适用于接口复用的单线通信协议。
第一方面,本申请提供一种单线通信方法,包括:
发送端向接收端发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;
发送端接收接收端发送的响应报文,响应报文的格式和单线通信报文的格式相同;
其中,发送端和接收端通过单线连接。
在一种可能的设计中,该发送端通过模数转换检测管脚检测该单线的电平,确定该接收端是否处于连接状态;或者,
该接收端通过模数转换检测管脚检测该单线的电平,确定该发送端是否处于连接状态。
在一种可能的设计中,该单线上设置有模拟开关。在一种可能的设计中,标识字段标识单线通信报文对应的消息为连接请求;响应报文携带有加密数据。
在一种可能的设计中,发送端接收接收端发送的响应报文之后,还包括:
发送端对加密数据进行解密得到解密数据;
发送端向接收端发送承载有解密数据的单线通信报文,以使接收端根据解密数据与发送端建立连接。
在一种可能的设计中,若接收端和发送端同时在单线上发送不同消息类型的单线通信报文,则接收端和发送端中优先级高的一端在下一时刻再次发送单线通信报文。
在一种可能的设计中,标识字段标识单线通信报文对应的消息为命令请求,命令请求用于标识命令请求之后、发送端向接收端发送的承载有目标数据的单线通信报文的个数。
在一种可能的设计中,发送端为接收端和发送端中优先级高的一端,发送端向接收端发送的单线通信报文对应的消息为命令请求;
发送端发送最后一个承载有目标数据的单线通信报文之后,接收到接收端发送的对最后一个承载有目标数据的单线通信报文的响应报文,响应报文中的标识字段和最后一个承载有目标数据的单线通信报文中的标识字段不同。
在一种可能的设计中,标识字段标识单线通信报文对应的消息为查询请求,查询请求用于查询接收端的制造商标识符或固件版本信息;
响应报文承载有接收端的制造商标识符或固件版本信息。
在一种可能的设计中,发送端接收接收端发送的响应报文之后,还包括:
发送端根据接收端的制造商标识符和/或固件版本信息,确定接收端的固件是否需要升级;
若接收端的固件需要升级,则发送端向接收端发送升级提示的单线通信报文;
发送端在接收到接收端对升级提示的响应报文后,向接收端发送承载有升级数据的单线通信报文。
在一种可能的设计中,若数据部分不包括有效载荷,则数据部分为默认值。
第二方面,本申请提供一种外围设备,包括:处理器和通信接口;
处理器用于控制通信接口向终端设备发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;
通信接口用于接收终端设备发送的响应报文,响应报文的格式和单线通信报文的格式相同;
外围设备和终端设备通过单线连接。
在一种可能的设计中,该单线上设置有模拟开关。
在一种可能的设计中,标识字段标识单线通信报文对应的消息为连接请求;响应报文携带有加密数据。
在一种可能的设计中,通信接口接收终端设备发送的响应报文之后,处理器还用于对加密数据进行解密得到解密数据,并控制通信接口向终端设备发送承载有解密数据的单线通信报文,以使终端设备根据解密数据与外围设备建立连接。
在一种可能的设计中,若外围设备和终端设备同时在单线上发送不同消息类型的单线通信报文,则外围设备和终端设备中优先级高的一端在下一时刻再次发送单线通信报文。
在一种可能的设计中,标识字段标识单线通信报文对应的消息为命令请求,命令请求用于标识命令请求之后、通信接口向终端设备发送的承载有目标数据的单线通信报文的个数。
在一种可能的设计中,外围设备为外围设备和终端设备中优先级高的一端,通信接口向终端设备发送的单线通信报文对应的消息为命令请求;
通信接口发送最后一个承载有目标数据的单线通信报文之后,接收到终端设备发送的对最后一个承载有目标数据的单线通信报文的响应报文,响应报文中的标识字段和最后一个承载有目标数据的单线通信报文中的标识字段不同。
在一种可能的设计中,若数据部分不包括有效载荷,则数据部分为默认值。
第三方面,本申请提供一种终端设备,包括:处理器和通信接口;
处理器用于控制通信接口向外围设备发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;
通信接口用于接收外围设备发送的响应报文,响应报文的格式和单线通信报文的格式相同;
外围设备和终端设备通过单线连接。
在一种可能的设计中,该处理器还用于通过模数转换检测管脚检测该单线的电平,确定该外围设备是否处于连接状态。
在一种可能的设计中,标识字段标识单线通信报文对应的消息为查询请求,查询请求用于查询外围设备的制造商标识符或固件版本信息;
响应报文承载有外围设备的制造商标识符或固件版本信息。
在一种可能的设计中,通信接口接收外围设备发送的响应报文之后,处理器还用于根据外围设备的制造商标识符和/或固件版本信息,确定外围设备的固件是否需要升级;
若外围设备的固件需要升级,则处理器通过通信接口向外围设备发送升级提示的单线通信报文;
通信接口在接收到外围设备对升级提示的响应报文后,处理器控制通信接口向外围设备发送承载有升级数据的单线通信报文。
在一种可能的设计中,若数据部分不包括有效载荷,则数据部分为默认值。
第四方面,本申请提供一种计算机可读存储介质,其特征在于,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面的方法。
第五方面,本申请提供一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行上述各方面的方法。
可见,在以上各个方面,通过发送端向接收端发送单线通信报文,接收端向发送端反馈与单线通信报文格式相同的响应报文,该单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识该单线通信报文对应的消息类型,不同标识字段的单线通信报文可对于不同的消息,使得发送端和接收端通过单线连接时,收发双方可通过单线向对方发送不同消息的单线通信报文,从而实现了收发双方在单线上进行双向通信的机制。
附图说明
图1为现有技术中的一种键盘和主机构成的系统的结构示意图;
图2为本申请实施例提供的一种键盘和主机的结构示意图;
图3为本申请实施例提供的一种单线通信报文的结构示意图;
图4为本申请实施例提供的一种键盘和主机的连接示意图;
图5为本申请实施例提供的另一种键盘和主机的连接示意图;
图6为本申请实施例提供的一种单线通信方法的信令图;
图7为本申请实施例提供的另一种单线通信方法的信令图;
图8为本申请实施例提供的再一种单线通信方法的信令图;
图9为本申请实施例提供的又一种单线通信方法的信令图;
图10为本申请实施例提供的一种外围设备的结构示意图;
图11为本申请实施例提供的一种终端设备的结构示意图;
图12为本申请实施例提供的另一种终端设备的结构示意图。
具体实施方式
随着工艺水平和审美要求的提升,终端产品朝着轻薄、便携的方向发展,同时对终端产品的接口的要求也越来越高,接口复用技术成为终端产品的核心卖点。通过接口复用技术,可以大大减少终端产品外部引脚PIN数,同时可提升外观效果,并降低端口成本。例如,移动终端、平板电脑、笔记本电脑等设备可以外接一个键盘,方便用户输入,提高输入效率。移动终端、平板电脑、笔记本电脑等设备通过接口与键盘连接,如果接口的引脚PIN的数量较多,将会降低移动终端、平板电脑、笔记本电脑等设备,以及键盘的外观效果,另外,引脚PIN的数量较多,接触点会比较小,PIN间距会比较近,导致连接可靠性下降,此外,引脚PIN的数量较多也不利于降低成本。
图1为现有技术中的一种键盘和主机构成的系统的结构示意图,如图1所示,主机可以是移动终端、平板电脑、笔记本电脑等设备,键盘可以是移动终端、平板电脑、笔记本电脑等设备外接的键盘,主机和键盘通过实体触点连接。
主机设置有嵌入式控制器(Embedded Controller,EC)、系统芯片(System on Chip,Soc)、光传感器(Light Sensor)、霍尔传感器(Hall Sensor),其中,光传感器通过内部集成电路总线(Inter-Integrated Circuit,I2C)与EC连接,霍尔传感器通过通用输入输出管脚(General Purpose Input/Output,GPIO)与EC连接,EC和Soc通过低引脚数总线(Low Pin Count,LPC)连接。键盘设置有触控板(touchpad)、按键(keyboard)、发光二极管(Light Emitting Diode,LED)和背光灯(backlight),触控板通过I2C与键盘的微控制单元(Microcontroller Unit,MCU)连接,按键和发光二极管通过GPIO与键盘的MCU连接,背光灯通过脉冲宽度调制(Pulse Width Modulation,PWM)与键盘的MCU连接。触控板和按键产生的数据经过键盘的MCU处理后通过通用串行总线(Universal Serial Bus,USB)2.0传输给主机的系统芯片Soc,背光灯产生的数据经过键盘的MCU处理后通过通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)传输给主机的嵌入式控制器EC,另外,GPIO用于键盘连接检测。通常情况下,USB2.0对应有4个触点,UART对应有两个触点,GPIO对应有1个触点,因此,如图1所示,主机和键盘之间需要7个触点进行连接。
为了降低主机和键盘之间连接触点的个数,可针对图1中主机的结构进行改进,如图2所示,在主机侧增加一个MCU,为了区分键盘侧的MCU和主机侧的MCU,本申请实施例将主机侧的MCU记为MCU1,将键盘侧的MCU记为MCU2,MCU1和MCU2将通过 单线进行连接,USB、UART、GPIO等多组信号将通过一根信号线即单线传输,实现了接口复用技术,从而大大减小了主机和键盘之间连接触点的个数,提升了外观效果。但是,对于MCU1和MCU2如何通过单线进行通信,并没有一套完整的通信协议。为了解决该问题,本申请实施例提出了一种单线通信方法,该方法不仅适用于主机和键盘之间的触点连接方式,还适用于其他场景的触点连接方式。本申请具体提供了如下几种实施例,下面结合具体场景对实施例进行说明:
图3为本申请实施例提供的一种单线通信报文的结构示意图。如图3所示,单线通信报文包括包头部分31和数据部分32,其中,包头部分31包括标识字段、长度字段和校验字段,其中,标识字段用于标识单线通信报文对应的消息类型;长度字段表示数据部分32的长度,当数据部分32承载的是有效载荷(payload)时,数据部分32的长度为payload的实际长度,可选地,一个单线通信报文的数据部分可承载的payload的长度为64bytes,当数据部分32承载的不是有效载荷,例如,单线通信报文是请求报文或响应报文时,数据部分32默认为0x55。校验字段可以是循环冗余校验(Cyclic Redundancy Check,CRC)数据,可选地,CRC校验数据为16位的数据,则校验信息33可表示CRC高8位,校验信息34可表示CRC低8位。以图2所示的场景为例,单线通信的双方为键盘侧的MCU2和主机侧的MCU1,键盘侧的MCU2可以向主机侧的MCU1发送如图3所示的单线通信报文,主机侧的MCU1也可以向键盘侧的MCU2发送如图3所示的单线通信报文,其中,单线通信报文对应的消息类型和标识字段的对应关系具体可如表1所示:
表1
Figure PCTCN2017079141-appb-000001
Figure PCTCN2017079141-appb-000002
本申请实施例提供的单线通信方法,通过发送端向接收端发送单线通信报文,接收端向发送端反馈与单线通信报文格式相同的响应报文,该单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识该单线通信报文对应的消息类型,不同标识字段的单线通信报文可对于不同的消息,使得发送端和接收端通过单线连接时,收发双方可通过单线向对方发送不同消息的单线通信报文,从而实现了收发双方在单线上进行双向通信的机制。
以图2所示的场景为例,单线通信的双方为键盘侧的MCU2和主机侧的MCU1,发送端可以是键盘侧的MCU2,也可以是主机侧的MCU1,本申请实施例以键盘侧的MCU2为发送端,介绍主机对键盘的连接检测,以及键盘与主机的连接过程。
如图4所示,MCU1和MCU2之间的单线通信是基于UART实现的,具体的,从硬件设计上可将UART的TX/RX短接形成一根线,单线通信基于UART TX/RX单线,主机具体可以是个人计算机(Personal Computer,PC)主机,PC主机侧MCU1可使用1个支持模数转换(Analog-to-Digital Converter,ADC)检测管脚来检测单线的电平,当检测到单线电平为单线默认电平即VCC*R2/(R1+R2)时,PC主机即检测到键盘有接入,其中,VCC表示PC主机侧的输入电压,R1表示PC主机侧的上拉电阻,R2表示键盘侧的下拉电阻。PC主机检测到键盘有接入后,再给键盘供电,需要注意的是单线默认电平需要满足通信要求,为了防止键盘侧未上电的情况下MCU2单线通信管脚漏电,可以用一个模拟开关隔离,保证键盘未上电的情况下MCU2管脚不带电,图5为在图4的基础上进行改进后的电路图,如图5所示,键盘侧增加了一个模拟开关,起到隔离的作用,防止键盘侧未上电的情况下MCU2单线通信管脚漏电。
图6为本申请实施例提供的一种单线通信方法的信令图。本申请实施例以键盘为发送端,主机为接收端为例,如图6所示的信令图适用于键盘和主机之间的连接建立,具体地,主机根据图4或图5所示的电路,检测到键盘接入后会给键盘供电,之后键盘与主机的连接过程如图6所示的如下步骤:
S601、键盘向主机发送连接请求。
根据表1可知,标识字段0x11标识键盘向主机发送的单线通信报文对应的消息为连接请求,该连接请求表示键盘请求与主机建立连接。
S602、键盘向主机发送连接请求。
该连接请求可以是周期性的,例如,键盘向主机发送一个连接请求后,主机没有响应,则键盘可以每隔一定时间例如5ms发送一次连接请求,直到主机作出响应。
S603、主机向键盘发送连接响应,连接响应携带加密数据。
当主机接收到连接请求,并对连接请求进行响应时,向键盘发送连接响应,连接响应的标识字段和连接请求的标识字段一致,均为0x11,表示该连接响应是主机针对键盘发起的连接请求作出的响应,且该连接响应具有与单线通信报文相同的格式,其中携带有加密数据,具体的,该加密数据承载在连接响应的数据部分,该加密数据具体可以是16位的高级加密标准(Advanced Encryption Standard,AES)加密数据。
S604、键盘向主机发送键盘解密数据。
键盘接收到主机的连接响应后,从该连接响应中解析出加密数据,并对该加密数据进行解密,得到解密数据,并向主机发送承载有该解密数据的单线通信报文,承载有该解密数据的单线通信报文的标识字段为0x12,该解密数据承载在单线通信报文的数据部分。
S605、主机对键盘解密后的解密数据进行响应。
主机接收到键盘解密后的解密数据后,确定该解密数据是否正确,一种可实现的方式是:主机预先存储有加密数据之前的原数据,当主机接收到键盘解密后的解密数 据后,对比该解密数据和原数据,若对比后解密数据和原数据一致,则表示键盘解密成功,主机对键盘解密后的解密数据进行响应,表示主机与键盘建立连接;若对比后解密数据和原数据不一致,则表示键盘解密不成功,主机对键盘解密后的解密数据进行响应,表示主机不与键盘建立连接,后续断开连接并关闭键盘电源。
图7为本申请实施例提供的另一种单线通信方法的信令图。本申请实施例以键盘为发送端,主机为接收端为例,如图7所示的信令图适用于键盘和主机之间的数据传送,当同一个标识字段有多个payload需要传送时,需要键盘先发一个命令请求,命令请求中宣告随后同一个标识字段传送payload的次数。以键盘使用为例,键盘上的精密触控板(Precision touchpad,PTP)最多可支持五根手指触控,当五根手指同时在精密触控板上滑动时,键盘侧会发命令请求并宣告PTP生成的payload的数量,随后会传送五根手指在精密触控板上滑动产生的数据。数据传送过程,任何一方发送数据后,另一方必须有一个回应消息,所有的消息都自带16位的CRC校验数据。具体过程如图7所示的如下步骤:
S701、键盘向主机发送命令请求。
当键盘需要向主机发送五根手指分别在精密触控板上滑动产生的数据之前,键盘向主机发送单线通信报文,该单线通信报文的标识字段为0x10,根据表1可知,标识字段0x10标识键盘向主机发送的单线通信报文对应的消息为命令请求,该命令请求用于标识该命令请求之后、键盘向主机发送的承载有PTP数据的单线通信报文的个数,具体的,命令请求的数据部分为0x05,表示随后键盘向主机发送5个承载有PTP数据的单线通信报文。
S702、主机向键盘发送对命令请求的响应。
主机接收到键盘发送的命令请求后,对该命令请求作出响应,该响应的格式和单线通信报文的格式一致,具体地,该响应的标识字段和命令请求的标识字段一致,同为0x10,表示该响应是主机对键盘发送的命令请求作出的响应。
S703、键盘向主机发送触控板第1个数据。
键盘向主机发送承载有触控板第1个数据的单线通信报文,根据表1可知,标识字段0x01标识键盘向主机发送的单线通信报文对应的消息为触控板数据,可选地,一个触控板数据为9bytes,S703中的单线通信报文的长度字段为0x09,0x09表示十进制数9,长度字段0x09表示单线通信报文的数据部分为9个byte。
S704、主机向键盘发送对触控板第1个数据的响应。
在本申请实施例中,主机向键盘发送的响应的数据部分默认为0x55,0x55的长度为1个byte,相应的,响应的长度字段为0x01。同理于步骤S703和S704,键盘依次发送后续的触控板的4个数据。
S705、键盘向主机发送触控板第5个数据。
S706、主机向键盘发送对触控板第5个数据的响应。
图8为本申请实施例提供的再一种单线通信方法的信令图。本申请实施例以键盘为发送端,主机为接收端为例,如图8所示的信令图适用于键盘和主机之间的冲突处 理。当主机和键盘两边正好同时发送不同消息类型的单线通信报文时,不同消息类型的单线通信报文将在主机和键盘之间的单线上产生冲突,如图8所示,键盘向主机发送命令请求的同时,主机向键盘发送睡眠模式控制指令,则键盘和主机均无法正常接收到对方的响应,为了解决该问题,本申请实施例可确定出主机和键盘中优先级较高的一端,由于键盘侧的数据量相对于主机侧的数据量更大,因此可确定键盘的优先级更高,当键盘发出的命令请求没有回应时,主机侧进入等待状态,键盘在产生冲突的下一时刻继续发送该命令请求,并在该命令请求之后依次发送键盘预发送的触控板生成的5个数据,由于键盘向主机发送的命令请求的数据部分标识了后续发送的数据的个数,则主机可监测键盘已发送的数据的个数,当主机接收到最后一个数据时,在对最后一个数据进行响应时,在该响应中将标识字段的最高位设置为1,表示主机在该响应之后有消息要发送给键盘。具体过程如图8所示的如下步骤:
S801、键盘向主机发送命令请求。
S802、主机向键盘发送对命令请求的响应。
S803、键盘向主机发送触控板第1个数据。
S804、主机向键盘发送对触控板第1个数据的响应。
S805、键盘向主机发送触控板第5个数据。
S806、主机向键盘发送对触控板第5个数据的响应。
S801-S806与S701-S806一致,具体不再赘述。需要说明的是,主机在对键盘发送的触控板最后一个数据进行响应时,在该响应中将标识字段的最高位设置为1,如图8所示,键盘向主机发送触控板第5个数据时,单线通信报文的标识字段为0x01,主机向键盘发送对触控板第5个数据的响应时,单线通信报文的标识字段为0x81,即主机将0x01的最高位设置为1得到0x81,表示主机在该响应之后有消息要发送给键盘。
S807、主机向键盘发送睡眠模式控制指令。
根据表1可知,标识字段0x32标识键盘向主机发送的单线通信报文对应的消息为睡眠模式控制指令,该睡眠模式控制指令的数据部分为睡眠模式。
S808、键盘向主机发送对睡眠模式控制指令的响应。
键盘向主机发送的对睡眠模式控制指令的响应的标识字段与睡眠模式控制指令的标识字段一致,均为0x32,表示该响应是键盘对主机发送的睡眠模式控制指令的响应。
图9为本申请实施例提供的又一种单线通信方法的信令图。本申请实施例以主机为发送端,键盘为接收端为例,如图9所示的信令图适用于主机对键盘固件的升级过程。通过单线技术方案,可实现键盘侧MCU的升级功能。对于升级过程,首先主机侧查询键盘的制造商标识符vender ID及固件版本,以此判断键盘侧固件firmware是否需要升级,如果需要升级,主机侧会发送升级提示,在收到键盘侧的回应后,主机启动升级功能。升级过程单次传送的payload支持64个byte,如果升级数据量较大,可通过多次传送的方式完成升级。键盘在升级过程,如果有其他消息请求,那么其他的所有消息都会被丢弃。具体过程如图9所示的如下步骤:
S901、主机向键盘发送制造商标识符请求。
主机向键盘发送标识字段为0x40的单线通信报文,表示主机请求获取键盘的制造商标识符。
S902、键盘向主机发送制造商标识符响应。
键盘向主机发送标识字段为0x40的响应报文,表示该响应报文是键盘对制造商标识符请求的响应,该响应报文的数据部分承载有制造商标识符。
S903、主机向键盘发送键盘MCU固件版本请求。
主机向键盘发送标识字段为0x41的单线通信报文,表示主机请求获取键盘的MCU固件版本。
S904、键盘向主机发送键盘MCU固件版本响应。
键盘向主机发送标识字段为0x41的响应报文,表示该响应报文是键盘对键盘MCU固件版本请求的响应,该响应报文的数据部分承载有键盘MCU固件版本。
S905、主机通知键盘进入固件升级模式。
主机向键盘发送标识字段为0x24的单线通信报文,表示主机通知键盘进入固件升级模式。
S906、键盘向主机发送键盘进入固件升级模式响应。
键盘向主机发送标识字段为0x24的响应报文,表示该响应报文是键盘对键盘进入固件升级模式的响应。
S907、主机向键盘发送键盘MCU固件更新指令。
主机向键盘发送承载有升级数据的单线通信报文,该单线通信报文的标识字段为0x20,表示该单线通信报文的数据部分承载的是升级数据。
S908、键盘向主机发送键盘MCU固件更新响应。
S909、主机向键盘发送键盘MCU固件更新指令。
S910、键盘向主机发送键盘MCU固件更新响应。
升级过程单次传送的payload支持64个byte,如果升级数据量较大,可通过多次传送的方式完成升级。键盘在升级过程,如果有其他消息请求,那么其他的所有消息都会被丢弃。
S911、主机向键盘发送键盘MCU固件更新完成通知。
当主机将升级数据发送完成后,向键盘发送键盘MCU固件更新完成通知,该通知也是通过单线通信报文传输的,该单线通信报文的标识字段为0x21,根据表1可知,标识字段为0x21的单线通信报文表示主机向键盘发送键盘MCU固件更新完成通知。
S912、键盘向主机发送键盘MCU固件更新完成响应。
键盘向主机发送标识字段为0x21的响应报文,表示该响应报文是键盘对键盘MCU固件更新完成的响应。
本申请实施例提供的单线通信方法,通过单线通信报文实现了发送端和接收端之间的连接建立、冲突处理、数据传输、以及固件升级,实现了一套完整的适用于接口复用的单线通信协议。
在上述实施例的基础上,PTP数据格式可如表2所示:
表2
Figure PCTCN2017079141-appb-000003
鼠标数据格式可如表3所示,该数据格式可实时反馈鼠标的位置信息:
表3
Figure PCTCN2017079141-appb-000004
键盘按键数据格式可如表4所示,该数据格式可同时支持6个按键的组合功能,实际应用根据需求增减按键数:
表4
Figure PCTCN2017079141-appb-000005
Figure PCTCN2017079141-appb-000006
图10为本申请实施例提供的一种外围设备的结构示意图。该外围设备可以是键盘、鼠标、触控板等设备。如图10所示,该外围设备100包括:处理器101和通信接口102。处理器101用于控制通信接口102向终端设备发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;通信接口102用于接收终端设备发送的响应报文,响应报文的格式和单线通信报文的格式相同;外围设备100和终端设备通过单线连接。
在图10中,进一步地,标识字段标识单线通信报文对应的消息为连接请求;响应报文携带有加密数据。
在上述实施例中,通信接口102接收终端设备发送的响应报文之后,处理器101还用于对加密数据进行解密得到解密数据,并控制通信接口102向终端设备发送承载有解密数据的单线通信报文,以使终端设备根据解密数据与外围设备100建立连接。
在上述实施例中,若外围设备100和终端设备同时在单线上发送不同消息类型的单线通信报文,则外围设备100和终端设备中优先级高的一端在下一时刻再次发送单线通信报文。
在上述实施例中,标识字段标识单线通信报文对应的消息为命令请求,命令请求用于标识命令请求之后、通信接口102向终端设备发送的承载有目标数据的单线通信报文的个数。
在上述实施例中,外围设备100为外围设备100和终端设备中优先级高的一端,通信接口102向终端设备发送的单线通信报文对应的消息为命令请求;通信接口102发送最后一个承载有目标数据的单线通信报文之后,接收到终端设备发送的对最后一个承载有目标数据的单线通信报文的响应报文,响应报文中的标识字段和最后一个承载有目标数据的单线通信报文中的标识字段不同。
在上述实施例中,若数据部分不包括有效载荷,则数据部分为默认值。
图10所示实施例的外围设备可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图11为本申请实施例提供的一种终端设备的结构示意图。该终端设备可以是移动终端、平板电脑、笔记本电脑等设备。如图11所示,该终端设备110包括:处理器111和通信接口112。处理器111用于控制通信接口112向外围设备发送单线通信报文,单线通信报文包括包头部分和数据部分,包头部分包括标识字段、长度字段和校验字段,标识字段用于标识单线通信报文对应的消息类型,长度字段表示数据部分的长度;通信接口112用于接收外围设备发送的响应报文,响应报文的格式和单线通信 报文的格式相同;外围设备和终端设备110通过单线连接。
在上述实施例中,标识字段标识单线通信报文对应的消息为查询请求,查询请求用于查询外围设备的制造商标识符或固件版本信息;响应报文承载有外围设备的制造商标识符或固件版本信息。
在上述实施例中,通信接口112接收外围设备发送的响应报文之后,处理器111还用于根据外围设备的制造商标识符和/或固件版本信息,确定外围设备的固件是否需要升级;若外围设备的固件需要升级,则处理器111通过通信接口112向外围设备发送升级提示的单线通信报文;通信接口112在接收到外围设备对升级提示的响应报文后,处理器111控制通信接口112向外围设备发送承载有升级数据的单线通信报文。
在上述实施例中,若数据部分不包括有效载荷,则数据部分为默认值。
图11所示实施例的终端设备可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图12为本申请实施例提供的另一种终端设备的结构示意图。如图12所示,该终端设备包括:处理器121、存储器122、收发装置123。收发装置123可以与该终端设备的外围设备13连接,外围设备13可以是键盘、鼠标、触控板等输入设备。收发装置123和外围设备13通过上述方法实施例所述的单线通信方法进行通信,另外,收发装置123还可以与天线连接,将收发装置123和外围设备13之间单线上传输的信息通过天线发送给基站。
该存储器122用于存储实现以上方法实施例的程序,处理器121调用该程序,执行以上方法实施例的操作。
或者,以上各个单元的部分或全部也可以通过集成电路的形式内嵌于该终端设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些单元可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。

Claims (26)

  1. 一种单线通信方法,其特征在于,包括:
    发送端向接收端发送单线通信报文,所述单线通信报文包括包头部分和数据部分,所述包头部分包括标识字段、长度字段和校验字段,所述标识字段用于标识所述单线通信报文对应的消息类型,所述长度字段表示所述数据部分的长度;
    所述发送端接收所述接收端发送的响应报文,所述响应报文的格式和所述单线通信报文的格式相同;
    其中,所述发送端和所述接收端通过单线连接。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    所述发送端通过模数转换检测管脚检测所述单线的电平,确定所述接收端是否处于连接状态;或者,
    所述接收端通过模数转换检测管脚检测所述单线的电平,确定所述发送端是否处于连接状态。
  3. 根据权利要求2所述的方法,其特征在于,所述单线上设置有模拟开关。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述标识字段标识所述单线通信报文对应的消息为连接请求;
    所述响应报文携带有加密数据。
  5. 根据权利要求4所述的方法,其特征在于,所述发送端接收所述接收端发送的响应报文之后,还包括:
    所述发送端对所述加密数据进行解密得到解密数据;
    所述发送端向所述接收端发送承载有所述解密数据的单线通信报文,以使所述接收端根据所述解密数据与所述发送端建立连接。
  6. 根据权利要求1所述的方法,其特征在于,若所述接收端和所述发送端同时在所述单线上发送不同消息类型的单线通信报文,则所述接收端和所述发送端中优先级高的一端在下一时刻再次发送所述单线通信报文。
  7. 根据权利要求1或6所述的方法,其特征在于,所述标识字段标识所述单线通信报文对应的消息为命令请求,所述命令请求用于标识所述命令请求之后、所述发送端向所述接收端发送的承载有目标数据的单线通信报文的个数。
  8. 根据权利要求7所述的方法,其特征在于,所述发送端为所述接收端和所述发送端中优先级高的一端,所述发送端向所述接收端发送的所述单线通信报文对应的消息为所述命令请求;
    所述发送端发送最后一个承载有目标数据的单线通信报文之后,接收到所述接收端发送的对所述最后一个承载有目标数据的单线通信报文的响应报文,所述响应报文中的标识字段和所述最后一个承载有目标数据的单线通信报文中的标识字段不同。
  9. 根据权利要求1所述的方法,其特征在于,所述标识字段标识所述单线通信报文对应的消息为查询请求,所述查询请求用于查询所述接收端的制造商标识符或固件版本信息;
    所述响应报文承载有所述接收端的制造商标识符或固件版本信息。
  10. 根据权利要求9所述的方法,其特征在于,所述发送端接收所述接收端发送的响应报文之后,还包括:
    所述发送端根据所述接收端的制造商标识符和/或固件版本信息,确定所述接收端的固件是否需要升级;
    若所述接收端的固件需要升级,则所述发送端向所述接收端发送升级提示的单线通信报文;
    所述发送端在接收到所述接收端对所述升级提示的响应报文后,向所述接收端发送承载有升级数据的单线通信报文。
  11. 根据权利要求1所述的方法,其特征在于,若所述数据部分不包括有效载荷,则所述数据部分为默认值。
  12. 一种外围设备,其特征在于,包括:处理器和通信接口;
    所述处理器用于控制所述通信接口向终端设备发送单线通信报文,所述单线通信报文包括包头部分和数据部分,所述包头部分包括标识字段、长度字段和校验字段,所述标识字段用于标识所述单线通信报文对应的消息类型,所述长度字段表示所述数据部分的长度;
    所述通信接口用于接收所述终端设备发送的响应报文,所述响应报文的格式和所述单线通信报文的格式相同;
    所述外围设备和所述终端设备通过单线连接。
  13. 根据权利要求12所述的方法,其特征在于,所述单线上设置有模拟开关。
  14. 根据权利要求12或13所述的外围设备,其特征在于,所述标识字段标识所述单线通信报文对应的消息为连接请求;
    所述响应报文携带有加密数据。
  15. 根据权利要求14所述的外围设备,其特征在于,所述通信接口接收所述终端设备发送的响应报文之后,所述处理器还用于对所述加密数据进行解密得到解密数据,并控制所述通信接口向所述终端设备发送承载有所述解密数据的单线通信报文,以使所述终端设备根据所述解密数据与所述外围设备建立连接。
  16. 根据权利要求12所述的外围设备,其特征在于,若所述外围设备和所述终端设备同时在所述单线上发送不同消息类型的单线通信报文,则所述外围设备和所述终端设备中优先级高的一端在下一时刻再次发送所述单线通信报文。
  17. 根据权利要求12或16所述的外围设备,其特征在于,所述标识字段标识所述单线通信报文对应的消息为命令请求,所述命令请求用于标识所述命令请求之后、所述通信接口向所述终端设备发送的承载有目标数据的单线通信报文的个数。
  18. 根据权利要求17所述的外围设备,其特征在于,所述外围设备为所述外围设备和所述终端设备中优先级高的一端,所述通信接口向所述终端设备发送的所述单线通信报文对应的消息为所述命令请求;
    所述通信接口发送最后一个承载有目标数据的单线通信报文之后,接收到所述终端设备发送的对所述最后一个承载有目标数据的单线通信报文的响应报文,所述响应报文中的标识字段和所述最后一个承载有目标数据的单线通信报文中的标识字段不同。
  19. 根据权利要求12所述的外围设备,其特征在于,若所述数据部分不包括有效载荷,则所述数据部分为默认值。
  20. 一种终端设备,其特征在于,包括:处理器和通信接口;
    所述处理器用于控制所述通信接口向外围设备发送单线通信报文,所述单线通信报文包括包头部分和数据部分,所述包头部分包括标识字段、长度字段和校验字段,所述标识字段用于标识所述单线通信报文对应的消息类型,所述长度字段表示所述数据部分的长度;
    所述通信接口用于接收所述外围设备发送的响应报文,所述响应报文的格式和所述单线通信报文的格式相同;
    所述外围设备和所述终端设备通过单线连接。
  21. 根据权利要求20所述的终端设备,其特征在于,所述处理器还用于通过模数转换检测管脚检测所述单线的电平,确定所述外围设备是否处于连接状态。
  22. 根据权利要求20或21所述的终端设备,其特征在于,所述标识字段标识所述单线通信报文对应的消息为查询请求,所述查询请求用于查询所述外围设备的制造商标识符或固件版本信息;
    所述响应报文承载有所述外围设备的制造商标识符或固件版本信息。
  23. 根据权利要求22所述的终端设备,其特征在于,所述通信接口接收所述外围设备发送的响应报文之后,所述处理器还用于根据所述外围设备的制造商标识符和/或固件版本信息,确定所述外围设备的固件是否需要升级;
    若所述外围设备的固件需要升级,则所述处理器通过所述通信接口向所述外围设备发送升级提示的单线通信报文;
    所述通信接口在接收到所述外围设备对所述升级提示的响应报文后,所述处理器控制所述通信接口向所述外围设备发送承载有升级数据的单线通信报文。
  24. 根据权利要求20所述的终端设备,其特征在于,若所述数据部分不包括有效载荷,则所述数据部分为默认值。
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-11任一项所述的方法。
  26. 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行如权利要求1-11任一项所述的方法。
PCT/CN2017/079141 2017-03-01 2017-03-31 单线通信方法及设备 WO2018157431A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780047728.1A CN109564557B (zh) 2017-03-01 2017-03-31 单线通信方法及设备

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710118347 2017-03-01
CN201710118347.X 2017-03-01

Publications (1)

Publication Number Publication Date
WO2018157431A1 true WO2018157431A1 (zh) 2018-09-07

Family

ID=63370591

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079141 WO2018157431A1 (zh) 2017-03-01 2017-03-31 单线通信方法及设备

Country Status (2)

Country Link
CN (1) CN109564557B (zh)
WO (1) WO2018157431A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737622A (zh) * 2019-10-15 2020-01-31 上海智汇电器有限公司 一种单线双向通讯充电方法
CN116028391A (zh) * 2022-07-15 2023-04-28 荣耀终端有限公司 电子设备、外围设备及单线通信系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110176945A (zh) * 2019-05-15 2019-08-27 金华市西祠安防科技有限公司 一种新型单线通讯系统方式
CN111163162A (zh) * 2019-12-27 2020-05-15 歌尔股份有限公司 一种单线通信方法及系统
CN111951744B (zh) * 2020-06-30 2021-11-30 上海美仁半导体有限公司 一种接口转接电路、芯片以及家用电器
CN115426112A (zh) * 2021-05-16 2022-12-02 武汉领普科技有限公司 自发电开关的处理方法
CN114817097A (zh) * 2022-05-09 2022-07-29 深圳市科创奇科技有限公司 一种单线通讯方法、系统、装置及存储介质
CN115051889A (zh) * 2022-06-24 2022-09-13 深圳市道通科技股份有限公司 一种单线通信系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928845A (zh) * 2005-09-09 2007-03-14 上海采微电子科技有限公司 用于片上系统的单线调试接口协议
CN101196741A (zh) * 2007-12-06 2008-06-11 上海交通大学 可重构控制器的单线双向通信方法
CN102708087A (zh) * 2011-03-28 2012-10-03 上海朝为电子科技有限公司 一种用于片上系统的单线调试接口协议
CN104460406A (zh) * 2014-10-13 2015-03-25 深圳市江波龙电子有限公司 单线通信的方法及基于单线通信的单片机固件升级方法
CN105305536A (zh) * 2015-09-28 2016-02-03 欣旺达电子股份有限公司 电池管理系统单线通信方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420444B (zh) * 2011-09-15 2014-06-11 凹凸电子(武汉)有限公司 单线通信系统和单线通信实现方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928845A (zh) * 2005-09-09 2007-03-14 上海采微电子科技有限公司 用于片上系统的单线调试接口协议
CN101196741A (zh) * 2007-12-06 2008-06-11 上海交通大学 可重构控制器的单线双向通信方法
CN102708087A (zh) * 2011-03-28 2012-10-03 上海朝为电子科技有限公司 一种用于片上系统的单线调试接口协议
CN104460406A (zh) * 2014-10-13 2015-03-25 深圳市江波龙电子有限公司 单线通信的方法及基于单线通信的单片机固件升级方法
CN105305536A (zh) * 2015-09-28 2016-02-03 欣旺达电子股份有限公司 电池管理系统单线通信方法和装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737622A (zh) * 2019-10-15 2020-01-31 上海智汇电器有限公司 一种单线双向通讯充电方法
CN110737622B (zh) * 2019-10-15 2021-05-07 上海智汇电器有限公司 一种单线双向通讯充电方法
CN116028391A (zh) * 2022-07-15 2023-04-28 荣耀终端有限公司 电子设备、外围设备及单线通信系统
CN116028391B (zh) * 2022-07-15 2024-03-22 荣耀终端有限公司 电子设备、外围设备及单线通信系统

Also Published As

Publication number Publication date
CN109564557B (zh) 2021-01-29
CN109564557A (zh) 2019-04-02

Similar Documents

Publication Publication Date Title
WO2018157431A1 (zh) 单线通信方法及设备
US20170286360A1 (en) Usb interface using repeaters with guest protocol support
JP6571341B2 (ja) オーディオ使用のための電力供給の方法、デバイス及びプログラム
CN105700732B (zh) 用于传输触摸传感器信息的装置、系统和方法
JP5988449B2 (ja) 通信制御ピンを介したシリアル通信
KR20160077189A (ko) 다수의 슬레이브 디바이스 식별자들을 갖는 카메라 제어 슬레이브 디바이스들
JP2017528830A (ja) 修正型uartインターフェースを有する可変フレーム長仮想gpio
US20140068342A1 (en) Wireless Debugging and Updating of Firmware
WO2022161244A1 (zh) 多主机仲裁方法、装置和可读存储介质
WO2023124942A1 (zh) 一种双总线接口的嵌入式控制电路、芯片和电子设备
US10585834B2 (en) I2C device extender for inter-board communication over a single-channel bidirectional link
CN106532382A (zh) 一种USB Type‑C转接器及其实现方法
WO2017049556A1 (zh) 数据传输方法和移动终端
WO2016011926A1 (zh) 一种信息传输方法、装置和移动终端、存储介质
WO2006039056A1 (en) Transfer acknowledgement for a mobile scalable link (msl) architecture
WO2018196223A1 (zh) 一种数据处理方法及相关设备
US10042802B2 (en) Inter-device digital audio
CN112003928B (zh) 多功能屏幕同步控制方法、装置及设备
CN104618436B (zh) 一种手机与电脑同步的控制系统
KR20070058559A (ko) 이동 가변성 링크(msl) 구조를 위한 추가 채널 제공 방법 및 장치
US10372645B2 (en) Universal serial bus type C transmission line and transmission device
US10983586B2 (en) Power management system and power management method
WO2022170861A1 (zh) 电子设备的数据传输方法、电子设备及接口电路
CN216527162U (zh) 传屏器
CN101547017A (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: 17898763

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: 17898763

Country of ref document: EP

Kind code of ref document: A1