WO2020034908A1 - Method for communication between remote control and mobile terminal, device, and remote control - Google Patents

Method for communication between remote control and mobile terminal, device, and remote control Download PDF

Info

Publication number
WO2020034908A1
WO2020034908A1 PCT/CN2019/100040 CN2019100040W WO2020034908A1 WO 2020034908 A1 WO2020034908 A1 WO 2020034908A1 CN 2019100040 W CN2019100040 W CN 2019100040W WO 2020034908 A1 WO2020034908 A1 WO 2020034908A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
usb
remote controller
connection mode
usb interface
Prior art date
Application number
PCT/CN2019/100040
Other languages
French (fr)
Chinese (zh)
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 深圳市道通智能航空技术有限公司
Publication of WO2020034908A1 publication Critical patent/WO2020034908A1/en

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
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • 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
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Definitions

  • Embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, device, and remote controller for communication between a remote controller and a mobile terminal.
  • smart terminals such as drones, smart homes, smart home appliances, and robots have been widely used.
  • smart terminals such as drones
  • they are usually equipped with corresponding remote controls to control them.
  • the remote control can also be connected to a mobile terminal (such as a mobile phone, a tablet computer, etc.) through its USB interface, and interact with an application (APP) in the mobile terminal. So that the user can control the smart terminal or obtain the data collected by the smart terminal through the mobile terminal.
  • APP application
  • the inventors found that at present, when various mobile terminals (especially mobile terminals running the Android system) access the remote control via USB, incompatibility issues often occur, affecting the user experience.
  • the embodiments of the present invention provide a method, device and remote controller for communication between a remote controller and a mobile terminal, which can solve the problem of poor compatibility when the remote controller and the mobile terminal are connected via USB communication.
  • an embodiment of the present invention provides a communication method between a remote controller and a mobile terminal, which is applied to the remote controller.
  • the remote controller is provided with a USB interface for connecting the mobile terminal.
  • the method includes:
  • determining the system type of the mobile terminal includes:
  • the system type includes an Android system and an IOS system; wherein,
  • the USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
  • the USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
  • the method further includes:
  • the default state of the remote controller when the USB interface is powered on is preset, wherein the default state includes that the USB connection mode is the direct connection mode, and the remote controller is in a USB host mode.
  • the method when determining that the system type of the mobile terminal is an IOS system, after the step of selecting a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, the method further includes:
  • the method further includes:
  • an embodiment of the present invention provides a communication device between a remote controller and a mobile terminal, which runs on the remote controller.
  • the remote controller is provided with a USB interface for connecting the mobile terminal.
  • the device includes:
  • a system type determining unit configured to determine a system type of the mobile terminal when it is detected that a mobile terminal accesses the USB interface
  • the communication unit is configured to select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
  • system type determining unit is specifically configured to:
  • the system type includes an Android system and an IOS system; wherein,
  • the USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
  • the USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
  • the apparatus further includes:
  • the preset unit is configured to preset a default state of the remote controller when the USB interface is powered on, wherein the default state includes: the USB connection mode is the direct connection mode, and the remote controller is in USB host mode.
  • the apparatus further includes:
  • a switching unit configured to switch the remote controller to a USB slave mode when it is determined that the system type of the mobile terminal is an IOS system.
  • the apparatus further includes:
  • the restoration unit is configured to restore the remote controller to the default state when it is detected that the mobile terminal unplugs the USB interface.
  • an embodiment of the present invention provides a remote controller, including:
  • At least one processor At least one processor
  • a memory connected in communication with the at least one processor
  • the memory stores instructions executable by the at least one processor
  • the at least one processor is configured to execute the instructions to implement the method as described above.
  • an embodiment of the present invention provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a remote controller to execute The method described above.
  • the communication method, device, and remote controller for the remote control and the mobile terminal provided by the embodiments of the present invention detect that a mobile terminal is connected to the USB interface of the remote control In this case, first determine the system type of the mobile terminal, and then select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal. It can provide different USB connection modes for mobile terminals of different system types and adaptively dock each This kind of mobile terminal improves the compatibility of the remote control when connecting various mobile terminals based on USB.
  • FIG. 1 is a schematic diagram of an application environment of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a communication device between a remote controller and a mobile terminal according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a hardware structure of a remote controller according to an embodiment of the present invention.
  • smart terminals such as drones, smart homes, smart home appliances, and robots have been widely used.
  • smart terminals such as drones
  • they are usually equipped with corresponding remote controls to control them.
  • the remote control can also be connected to a mobile terminal (such as a mobile phone, a tablet computer, etc.) through its USB interface, and interact with an application (APP) in the mobile terminal. So that the user can control the smart terminal or obtain the data collected by the smart terminal through the mobile terminal.
  • APP application
  • the module used to communicate with the mobile terminal (such as the image transmission module of the drone) is directly connected to the mobile terminal through the USB interface, but the USB protocol does not have an absolute standard, and there are large differences between various remote control types or brands.
  • each mobile terminal, especially the mobile terminal of the Android system focuses on the USB connection of mainstream USB devices, and it is difficult to take into account various other types of USB devices.
  • the USB connection methods used by mobile terminals of different system types are not the same, and there is often a problem of losing sight of each other.
  • embodiments of the present invention provide a communication method between a remote controller and a mobile terminal, a communication device between a remote controller and a mobile terminal, and a remote controller.
  • the communication method between the remote controller and the mobile terminal provided by the embodiment of the present invention can be executed by any type of remote controller (where the remote controller is provided with a USB interface for connecting the mobile terminal).
  • Method for selecting a suitable USB connection mode for the system type to achieve communication between the mobile terminal and the mobile terminal Specifically, when the remote control detects that a mobile terminal is connected to its USB interface, first determine the system type of the mobile terminal, and then select The USB connection mode corresponding to the system type establishes a communication connection with the mobile terminal, and can provide different USB connection modes for mobile terminals of different system types, adaptively dock various mobile terminals, and enhance the remote control to connect various mobile terminals based on USB. Compatibility.
  • the communication device between the remote controller and the mobile terminal provided in the embodiment of the present invention is a virtual device composed of a software program that can implement the communication method between the remote controller and the mobile terminal provided by the embodiment of the present invention.
  • the communication method between the remote controller and the mobile terminal is based on the same inventive concept, and has the same technical features and beneficial effects.
  • the remote controller may be of any type, and has a certain logic operation capability, and provides one or more electronic devices capable of satisfying a user's intention.
  • it can be an electronic device that is external to a certain smart terminal (such as a drone, smart car, or unmanned ship that is usually in a moving state) (that is, it exists independently of the smart terminal) );
  • it can also be a functional component built into a smart terminal (such as a smart home, smart home appliance, etc.) (that is, it is integrated with the smart terminal); as long as it can communicate with the corresponding smart terminal's
  • the control unit communicates and can communicate with the mobile terminal through a USB interface, which is not specifically limited in the embodiment of the present invention.
  • FIG. 1 is a schematic diagram of an application environment of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention.
  • the application environment includes: a smart terminal 10, a remote controller 20, a first mobile terminal 30, and a second mobile terminal 40.
  • the smart terminal 10 may be any type of electronic device, such as an unmanned aerial vehicle, an unmanned ship, a smart car, a smart home, a smart home appliance, a robot, or the like.
  • the smart terminal 10 may communicate with the remote controller 20 through its internal communication module 11 (for example, an image transmission module of a drone), and transmit the collected data to the remote controller 20, and / or receive A control signal sent by the remote controller 20.
  • the remote controller 20 may be any electronic device capable of controlling the smart terminal 10, and a control unit 21 (which may specifically be an MCU, a video transmission module, etc.) and a USB interface 22 connected to the control unit 21 may be provided therein. .
  • the control unit 21 can communicate with the communication module 11 of the smart terminal 10, and the USB interface 22 is used to connect the control unit 21 to an external mobile terminal (for example, the first mobile terminal 30). Or the second mobile terminal 40), so that the external mobile terminal can obtain the data collected by the smart terminal 10 through the control unit 21, and / or send a control instruction to the communication module 11 of the smart terminal 10.
  • the remote controller 20 further includes a selection circuit 23, a first connection circuit 24, and A second connection circuit 25, and the control unit 21 connects the first connection circuit 24 and the second connection circuit 25 through the selection circuit 23, and further connects the first connection circuit 24 or the second connection circuit through the selection circuit 23. 25 is connected to the USB interface 22. Therefore, in this embodiment, by controlling the selection circuit 23, the control unit 21 may be connected to the USB interface 22 through the first connection circuit 24 to form a "first connection mode", or the The control unit 21 may also be connected to the USB interface 22 through the second connection circuit 25 to form a “second connection mode”.
  • the first connection circuit 24 and the second connection circuit 25 may be designed according to the characteristics of mobile terminals of different system types (the mainstream Android system and IOS system will be described in detail in this specification later).
  • the first mobile terminal 30 and the second mobile terminal 40 may be any type of mobile electronic device, such as a smart phone, a tablet computer, etc., and the user may interact with one or more users through any suitable type. Devices (such as keyboards, touch screens, audio capture devices, etc.) interact with them to enter instructions or control them to perform one or more operations.
  • the first mobile terminal 30 and the second mobile terminal 40 may run any type of system, such as an Android system, an IOS system, a Windows system, a Linux system, and the like.
  • a user can interact with the remote controller 20 or the smart terminal 10 based on the APP.
  • the remote control 20 when the remote control 20 detects that a mobile terminal is connected to its USB interface 22, it may first determine the system type of the mobile terminal, and then select a USB connection mode (or, correspondingly, corresponding to the system type) USB connection circuit) establishes a communication connection with the mobile terminal.
  • a USB connection mode or, correspondingly, corresponding to the system type
  • the system type of the first mobile terminal 30 is an Android system
  • the system type of the second mobile terminal 40 is an IOS system
  • the USB connection mode corresponding to the Android system is “the first A connection mode "; the USB connection mode corresponding to the IOS system is a" second connection mode ".
  • the control unit 21 (Ie, the first connection mode) establishing a communication connection between the control unit 21 and the first mobile terminal 30 (specifically, the control unit 21 sends a first control instruction to the selection circuit 23 so that the selection circuit 23 communicates with the control unit 21 and the first connection circuit 24, and at the same time, the connection between the control unit 21 and the second connection circuit 25 is disconnected).
  • the system type of the second mobile terminal 40 can also be determined by the control unit 21 in the remote control 20 as an IOS system, and then the USB corresponding to the IOS system can be selected.
  • connection mode (that is, the second connection mode) establishes a communication connection between the control unit 21 and the second mobile terminal 40 (specifically, the control unit 21 sends a second control instruction to the selection circuit 23 so that the selection circuit 23 communicates with the The control unit 21 and the second connection circuit 25, meanwhile, disconnect the connection between the control unit 21 and the first connection circuit 24).
  • the communication method and related device of the remote controller and the mobile terminal provided by the embodiment of the present invention can be further extended to other suitable implementation environments, and is not limited to the implementation environment shown in FIG. 1.
  • FIG. 1 only one smart terminal 10, one remote control 20, and two mobile terminals (first mobile terminal 30 and second mobile terminal 40) are shown in FIG. 1, those skilled in the art can understand that in practical applications In the process, the application environment may further include more or fewer smart terminals 10 and / or mobile terminals.
  • the selection circuit 23 and the A third connection circuit, a fourth connection circuit, a fifth connection circuit, and the like may also be provided between the USB interfaces 22.
  • FIG. 2 is a schematic flowchart of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention.
  • the method can be executed by any type of remote controller, and the remote controller is provided with a USB interface for connecting the mobile terminal.
  • the method may include, but is not limited to, the following steps:
  • Step 110 When it is detected that the mobile terminal is connected to the USB interface of the remote controller, determine the system type of the mobile terminal.
  • the "mobile terminal” may be any type of removable electronic equipment, such as a mobile phone, a tablet computer, etc .
  • the “system type” is the type of the operating system of the mobile terminal, which may include but Not limited to: Android system, IOS system, Windows system, Linux system, etc.
  • USB debugging process when two USB devices (such as a remote control and a mobile terminal) establish a connection, so that two connected USB devices pass the obtained Give information to understand what kind of device the other party is, how to communicate, etc. Therefore, when the remote control detects that an electronic device (which may be a mobile terminal or a non-mobile terminal such as a computer or server) is connected to its USB interface, it may first obtain an enumeration of the electronic device through the USB interface.
  • an electronic device which may be a mobile terminal or a non-mobile terminal such as a computer or server
  • the electronic device belongs to a mobile terminal based on the product identification PID, and if so, it indicates that there is a mobile terminal currently Connect its USB interface, at this time, you can further determine the system type of the electronic device; if not, it means that the electronic device currently connected to the USB interface is another type of electronic device. At this time, based on the properties of the USB interface / Function to respond accordingly. For example, if the USB interface is only used to connect to a mobile terminal, it may not respond to the connected electronic device, or remind the user of the connected electronic device by issuing a prompt tone and presenting a prompt subtitle. The type is incorrect, which is not specifically limited in the embodiment of the present invention.
  • the mobile terminal is marked with a Vendor ID (VID) corresponding to its system type in its USB device descriptor, for example, the VID of all mobile terminals in the IOS system is an Apple logo (eg, 0x05ac), The manufacturer's logo for all Android-based mobile terminals is the Google logo (for example, 0x18D1). Therefore, the specific implementation of "determining the system type of the mobile terminal" may be: further obtaining a USB device descriptor of the mobile terminal based on the obtained enumeration information, and then extracting the mobile from the obtained USB device descriptor The VID of the system of the terminal, and then the system type of the mobile terminal can be determined based on the VID.
  • VID Vendor ID
  • Step 120 Select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
  • the "USB connection mode" is the USB connection mode between the remote control and the mobile terminal.
  • the remote control may internally set different USB connection methods corresponding to different system types of mobile terminals.
  • the remote control is based on the characteristics of the mobile terminal of the Android system and the mobile terminal of the IOS system.
  • the USB connection mode is described as an example in detail.
  • a “HUB connection mode” can be set for the mobile terminal of the Android system, and the mobile terminal of the Android system is connected by a USB HUB transfer method.
  • one of the connection circuits for example, the first connection circuit 24
  • USB HUB will also provide its enumeration information, which will cause interference to the enumeration process. , So that it cannot pass the IOS certification review, and thus cannot establish a USB communication connection.
  • a "direct connection mode" can be set for the mobile terminal of the IOS system, and the control unit of the remote controller is directly connected to the USB interface.
  • another connection circuit for example, the second connection circuit 25
  • the control unit 21 is directly connected to the USB interface 22 through the selection circuit 23.
  • the remote control may select a corresponding USB connection mode based on the determined system type to establish a communication connection with the mobile terminal. For example, when it is determined that the system type of the mobile terminal connected to the USB interface is Android system, the remote control may select a HUB connection mode to establish a communication connection with the mobile terminal (specifically, establish a remote control (control unit) through the USB HUB and the USB interface).
  • a communication connection with the mobile terminal when it is determined that the system type of the mobile terminal connected to the USB interface is an IOS system, the remote control may select a direct connection mode to establish a communication connection with the mobile terminal (specifically, directly via USB The interface establishes a communication connection between a remote controller (control unit) and the mobile terminal).
  • the remote control may select a direct connection mode to establish a communication connection with the mobile terminal (specifically, directly via USB
  • the interface establishes a communication connection between a remote controller (control unit) and the mobile terminal).
  • a default state of the remote controller when the USB interface is powered on can also be preset.
  • the default state includes the default USB connection mode of the remote control and the USB master / slave mode of the remote control.
  • the default USB connection mode of the remote control can be preset to the above-mentioned "direct connection mode".
  • the mobile terminal of the Android system is always a USB access device (that is, always in a USB slave mode)
  • it can be preset that the remote controller is in a USB host mode when the USB interface is powered on.
  • the control unit of the remote controller notifies the selection circuit to switch to the HUB connection mode, and at the same time, keeps the remote controller in the USB host mode and the mobile terminal in the USB slave
  • the control unit of the remote controller notifies the selection circuit to keep the direct connection mode unchanged.
  • the The remote control switches from USB host mode to USB slave mode.
  • the remote controller when it is detected that the mobile terminal is unplugged from the USB interface, the remote controller is restored to the above-mentioned default state (that is, the default USB connection).
  • the mode is direct connection mode, and the remote control is in USB host mode).
  • the embodiment of the present invention has the beneficial effect that the method for communicating between the remote control and the mobile terminal provided by the embodiment of the present invention first determines the system of the mobile terminal when it is detected that the mobile terminal accesses the remote control's USB interface. Type, and then select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, which can provide different USB connection modes for mobile terminals of different system types, adaptively dock various mobile terminals, and improve remote control based on Compatibility when USB is connected to various mobile terminals.
  • FIG. 3 is a schematic structural diagram of a communication device between a remote controller and a mobile terminal according to an embodiment of the present invention.
  • the device 300 can run on any type of remote controller and can implement the communication method between the remote controller and the mobile terminal provided by the foregoing embodiment. .
  • the apparatus 300 includes: a system type determination unit 301 and a communication unit 302.
  • the system type determining unit 301 determines a system type of the mobile terminal when detecting that a mobile terminal accesses the USB interface; and the communication unit 302 is configured to select a USB connection mode corresponding to the system type. Establish a communication connection with the mobile terminal.
  • the system type of the mobile terminal may be first determined by the system type determination unit 301; then, the communication unit 302 may select a corresponding system type.
  • the system type includes an Android system and an IOS system.
  • the USB connection mode corresponding to the Android system is a HUB connection mode
  • the USB connection mode corresponding to the IOS system is a direct connection mode
  • the HUB connection mode is specifically to establish the remote controller and all the devices through the USB HUB and the USB interface.
  • the direct connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
  • the system type determining unit 301 is specifically configured to: when it is detected that a mobile terminal accesses the USB interface, obtain a USB device descriptor of the mobile terminal; and describe from the USB device The manufacturer's identification of the system of the mobile terminal is obtained in the character; the system type of the mobile terminal is determined according to the manufacturer's identification.
  • the apparatus 300 further includes: a preset unit 303.
  • the preset unit 303 is configured to preset a default state of the remote controller when the USB interface is powered on, wherein the default state includes: the USB connection mode is the direct connection mode, and the remote control The device is in USB host mode.
  • the apparatus 300 further includes: a switching unit 304, configured to switch the remote controller to a USB slave mode when it is determined that the system type of the mobile terminal is an IOS system.
  • the apparatus 300 further includes: a restoration unit 305, configured to restore the remote controller to the default state when it is detected that the mobile terminal is unplugged from the USB interface.
  • the embodiment of the present invention has the beneficial effect that the communication device between the remote control and the mobile terminal provided by the embodiment of the present invention is first determined by the system type when a mobile terminal is connected to the USB interface of the remote control.
  • the determining unit 301 determines the system type of the mobile terminal, and then uses the communication unit 302 to select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, and can provide different USB connection modes for mobile terminals of different system types.
  • Self-adaptive docking with various mobile terminals to improve the compatibility of the remote control when connecting various mobile terminals based on USB.
  • FIG. 4 is a schematic structural diagram of a remote controller according to an embodiment of the present invention.
  • the remote controller 400 may be any type of electronic device, and includes a USB interface for connecting a mobile terminal, and can execute the remote controller provided by the foregoing method embodiment.
  • the remote controller 400 includes:
  • One processor 401 is taken as an example in FIG. 4.
  • the processor 401 and the memory 402 may be connected through a bus or in other manners. In FIG. 4, the connection through the bus is taken as an example.
  • the memory 402 is a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules.
  • the remote controller in the embodiment of the present invention corresponds to a communication method of a mobile terminal.
  • Program instructions / modules for example, the system type determination unit 301, the communication unit 302, the preset unit 303, the switching unit 304, and the restoration unit 305 shown in FIG. 3).
  • the processor 401 executes various functional applications and data processing of the communication device 300 of the remote controller and the mobile terminal by running the non-transitory software programs, instructions, and modules stored in the memory 402, that is, the implementation of any of the foregoing method embodiments Communication method between remote controller and mobile terminal.
  • the memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required for at least one function; the storage data area may store the data created according to the use of the remote control and the communication device 300 of the mobile terminal. Data, etc.
  • the memory 402 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage device.
  • the memory 402 may optionally include a memory remotely set relative to the processor 401, and these remote memories may be connected to the processor 401 through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the one or more modules are stored in the memory 402, and when executed by the one or more processors 401, perform the communication method between the remote controller and the mobile terminal in any of the above method embodiments, for example, execute the above
  • the described method steps 110 to 120 in FIG. 2 implement the functions of units 301-305 in FIG.
  • An embodiment of the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as , Executed by a processor 401 in FIG. 4, may cause the one or more processors to execute the communication method between the remote controller and the mobile terminal in any of the foregoing method embodiments, for example, perform the method steps in FIG. 2 described above 110 to 120, the functions of units 301-305 in FIG. 3 are implemented.
  • the embodiments can be implemented by means of software plus a general hardware platform, and of course, also by hardware.
  • a person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be completed by using a computer program in a computer program product to instruct related hardware.
  • the computer program can be stored in a non-transitory computer.
  • the computer program includes program instructions, and when the program instructions are executed by a remote controller, the remote controller can be caused to execute the processes of the foregoing method embodiments.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
  • the above products can execute a communication method between a remote controller and a mobile terminal provided by an embodiment of the present invention, and are provided with a method for executing a communication method between a remote controller and a mobile terminal Functional modules and beneficial effects.
  • a communication method between a remote controller and a mobile terminal provided in this embodiment of the present invention.

Abstract

A method for communication between a remote control and a mobile terminal, a device, and a remote control, pertaining to the technical field of communications. The method is applicable to a remote control provided with a USB interface for connecting to a mobile terminal, and comprises: upon detecting connection of a mobile terminal to the USB interface, determining a system type of the mobile terminal (110); and selecting a USB connection mode corresponding to the system type to establish a communication connection to the mobile terminal (120). The method provides different USB connection modes to mobile terminals having different system types, and adapts to various mobile terminals upon connection thereof, thereby improving compatibility of a remote control connecting to mobile terminals on the basis of a USB interface.

Description

一种遥控器与移动终端的通信方法、装置和遥控器Communication method and device between remote controller and mobile terminal and remote controller
相关申请的交叉引用Cross-reference to related applications
本申请要求申请号为201810927659X,申请日为2018年8月15日申请的中国专利申请的优先权,其全部内容通过引用结合于本文。This application claims priority from a Chinese patent application filed on August 15, 2018, with application number 201810927659X, the filing date of which is incorporated herein by reference.
技术领域Technical field
本发明实施例涉及通信技术领域,尤其涉及一种遥控器与移动终端的通信方法、装置和遥控器。Embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, device, and remote controller for communication between a remote controller and a mobile terminal.
背景技术Background technique
近年来,无人机、智能家居、智能家电、机器人等智能终端得到广泛的应用。对于一些智能终端来说,比如,无人机,通常配备有对应的遥控器以实现对其的控制。一般地,所述遥控器除了能够与智能终端进行通信之外,还可以通过其USB接口连接到移动终端(比如,手机、平板电脑等),并与移动终端中的应用程序(APP)进行交互,以便用户通过移动终端对该智能终端进行控制或者获取该智能终端采集到的数据。In recent years, smart terminals such as drones, smart homes, smart home appliances, and robots have been widely used. For some smart terminals, such as drones, they are usually equipped with corresponding remote controls to control them. Generally, in addition to being able to communicate with a smart terminal, the remote control can also be connected to a mobile terminal (such as a mobile phone, a tablet computer, etc.) through its USB interface, and interact with an application (APP) in the mobile terminal. So that the user can control the smart terminal or obtain the data collected by the smart terminal through the mobile terminal.
在实现本发明的过程中,发明人发现:当前,各种移动终端(尤其是运行Android系统的移动终端)通过USB接入遥控器时,常常会出现不兼容的问题,影响用户体验。In the process of implementing the present invention, the inventors found that at present, when various mobile terminals (especially mobile terminals running the Android system) access the remote control via USB, incompatibility issues often occur, affecting the user experience.
发明内容Summary of the Invention
基于现有技术的情况,本发明实施例提供了一种遥控器与移动终 端的通信方法、装置和遥控器,能够解决遥控器与移动终端通过USB通信连接时兼容性差的问题。Based on the situation of the prior art, the embodiments of the present invention provide a method, device and remote controller for communication between a remote controller and a mobile terminal, which can solve the problem of poor compatibility when the remote controller and the mobile terminal are connected via USB communication.
具体地,本发明实施例提供了如下技术方案:Specifically, the embodiments of the present invention provide the following technical solutions:
第一方面,本发明实施例提供了一种遥控器与移动终端的通信方法,应用于遥控器,所述遥控器设置有用于连接移动终端的USB接口,所述方法包括:In a first aspect, an embodiment of the present invention provides a communication method between a remote controller and a mobile terminal, which is applied to the remote controller. The remote controller is provided with a USB interface for connecting the mobile terminal. The method includes:
当检测到有移动终端接入所述USB接口时,确定所述移动终端的系统类型;Determining the system type of the mobile terminal when a mobile terminal is detected to be connected to the USB interface;
选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。Selecting a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
可选地,所述确定所述移动终端的系统类型包括:Optionally, determining the system type of the mobile terminal includes:
获取所述移动终端的USB设备描述符;Obtaining a USB device descriptor of the mobile terminal;
从所述USB设备描述符中获取所述移动终端的系统的厂家标识;Obtaining the manufacturer identification of the system of the mobile terminal from the USB device descriptor;
根据所述厂家标识确定所述移动终端的系统类型。Determining a system type of the mobile terminal according to the manufacturer identification.
可选地,所述系统类型包括Android系统和IOS系统;其中,Optionally, the system type includes an Android system and an IOS system; wherein,
所述Android系统对应的USB连接模式为HUB连接模式,所述HUB连接模式具体为通过USB HUB和所述USB接口建立所述遥控器与所述移动终端之间的通信连接;The USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
所述IOS系统对应的USB连接模式为直接连接模式,所述直接连接模式具体为直接通过所述USB接口建立所述遥控器与所述移动终端之间的通信连接。The USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
可选地,所述方法还包括:Optionally, the method further includes:
预设所述USB接口上电时所述遥控器的默认状态,其中,所述默认状态包括:所述USB连接模式为所述直接连接模式,并且,所述遥控器处于USB主机模式。The default state of the remote controller when the USB interface is powered on is preset, wherein the default state includes that the USB connection mode is the direct connection mode, and the remote controller is in a USB host mode.
可选地,当确定所述移动终端的系统类型为IOS系统时,所述选 择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接的步骤之后,还包括:Optionally, when determining that the system type of the mobile terminal is an IOS system, after the step of selecting a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, the method further includes:
将所述遥控器切换为USB从机模式。Switching the remote controller to a USB slave mode.
可选地,所述方法还包括:Optionally, the method further includes:
当检测到所述移动终端拔出所述USB接口时,将所述遥控器恢复到所述默认状态。When it is detected that the mobile terminal is unplugged from the USB interface, the remote controller is restored to the default state.
第二方面,本发明实施例提供了一种遥控器与移动终端的通信装置,运行于遥控器,所述遥控器设置有用于连接移动终端的USB接口,所述装置包括:In a second aspect, an embodiment of the present invention provides a communication device between a remote controller and a mobile terminal, which runs on the remote controller. The remote controller is provided with a USB interface for connecting the mobile terminal. The device includes:
系统类型确定单元,用于当检测到有移动终端接入所述USB接口时,确定所述移动终端的系统类型;A system type determining unit, configured to determine a system type of the mobile terminal when it is detected that a mobile terminal accesses the USB interface;
通信单元,用于选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。The communication unit is configured to select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
可选地,所述系统类型确定单元具体用于:Optionally, the system type determining unit is specifically configured to:
当检测到有移动终端接入所述USB接口时,获取所述移动终端的USB设备描述符;When it is detected that a mobile terminal accesses the USB interface, obtaining a USB device descriptor of the mobile terminal;
从所述USB设备描述符中获取所述移动终端的系统的厂家标识;Obtaining the manufacturer identification of the system of the mobile terminal from the USB device descriptor;
根据所述厂家标识确定所述移动终端的系统类型。Determining a system type of the mobile terminal according to the manufacturer identification.
可选地,所述系统类型包括Android系统和IOS系统;其中,Optionally, the system type includes an Android system and an IOS system; wherein,
所述Android系统对应的USB连接模式为HUB连接模式,所述HUB连接模式具体为通过USB HUB和所述USB接口建立所述遥控器与所述移动终端之间的通信连接;The USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
所述IOS系统对应的USB连接模式为直接连接模式,所述直接连接模式具体为直接通过所述USB接口建立所述遥控器与所述移动终端之间的通信连接。The USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
可选地,所述装置还包括:Optionally, the apparatus further includes:
预设单元,用于预设所述USB接口上电时所述遥控器的默认状态,其中,所述默认状态包括:所述USB连接模式为所述直接连接模式,并且,所述遥控器处于USB主机模式。The preset unit is configured to preset a default state of the remote controller when the USB interface is powered on, wherein the default state includes: the USB connection mode is the direct connection mode, and the remote controller is in USB host mode.
可选地,所述装置还包括:Optionally, the apparatus further includes:
切换单元,用于当确定所述移动终端的系统类型为IOS系统时,将所述遥控器切换为USB从机模式。A switching unit, configured to switch the remote controller to a USB slave mode when it is determined that the system type of the mobile terminal is an IOS system.
可选地,所述装置还包括:Optionally, the apparatus further includes:
恢复单元,用于当检测到所述移动终端拔出所述USB接口时,将所遥控器恢复到所述默认状态。The restoration unit is configured to restore the remote controller to the default state when it is detected that the mobile terminal unplugs the USB interface.
第三方面,本发明实施例提供了一种遥控器,包括:According to a third aspect, an embodiment of the present invention provides a remote controller, including:
至少一个处理器;以及,At least one processor; and
与所述至少一个处理器通信连接的存储器;A memory connected in communication with the at least one processor;
其中,所述存储器存储有可被所述至少一个处理器执行的指令;Wherein, the memory stores instructions executable by the at least one processor;
所述至少一个处理器用于执行所述指令,以实现如上所述的方法。The at least one processor is configured to execute the instructions to implement the method as described above.
第四方面,本发明实施例提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使遥控器执行如上所述的方法。In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a remote controller to execute The method described above.
区别于现有技术的情况,本发明实施例的有益效果在于:本发明实施例提供的遥控器与移动终端的通信方法、装置和遥控器,在检测到有移动终端接入遥控器的USB接口时,首先确定移动终端的系统类型,进而选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接,能够针对不同系统类型的移动终端提供不同的USB 连接模式,自适应对接各种移动终端,提升遥控器基于USB连接各种移动终端时的兼容性。Different from the situation in the prior art, the beneficial effects of the embodiments of the present invention are as follows: The communication method, device, and remote controller for the remote control and the mobile terminal provided by the embodiments of the present invention detect that a mobile terminal is connected to the USB interface of the remote control In this case, first determine the system type of the mobile terminal, and then select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal. It can provide different USB connection modes for mobile terminals of different system types and adaptively dock each This kind of mobile terminal improves the compatibility of the remote control when connecting various mobile terminals based on USB.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍。显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solution of the embodiment of the present invention more clearly, the accompanying drawings used in the embodiment of the present invention will be briefly introduced below. Obviously, the drawings described below are just some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
图1是本发明实施例提供的遥控器与移动终端的通信方法的其中一种应用环境示意图;1 is a schematic diagram of an application environment of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention;
图2是本发明实施例提供的一种遥控器与移动终端的通信方法的流程示意图;2 is a schematic flowchart of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention;
图3是本发明实施例提供的一种遥控器与移动终端的通信装置的结构示意图;3 is a schematic structural diagram of a communication device between a remote controller and a mobile terminal according to an embodiment of the present invention;
图4是本发明实施例提供的一种遥控器的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of a remote controller according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
需要说明的是,如果不冲突,本发明实施例中的各个特征可以相互结合,均在本发明的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。It should be noted that, if there is no conflict, various features in the embodiments of the present invention may be combined with each other, and all fall within the protection scope of the present invention. In addition, although the functional module is divided in the device schematic diagram and the logical sequence is shown in the flowchart, in some cases, it may be different from the module division in the device or the sequence shown in the flowchart may be performed. Or described steps.
近年来,无人机、智能家居、智能家电、机器人等智能终端得到 广泛的应用。对于一些智能终端来说,比如,无人机,通常配备有对应的遥控器以实现对其的控制。一般地,所述遥控器除了能够与智能终端进行通信之外,还可以通过其USB接口连接到移动终端(比如,手机、平板电脑等),并与移动终端中的应用程序(APP)进行交互,以便用户通过移动终端对该智能终端进行控制或者获取该智能终端采集到的数据。In recent years, smart terminals such as drones, smart homes, smart home appliances, and robots have been widely used. For some smart terminals, such as drones, they are usually equipped with corresponding remote controls to control them. Generally, in addition to being able to communicate with a smart terminal, the remote control can also be connected to a mobile terminal (such as a mobile phone, a tablet computer, etc.) through its USB interface, and interact with an application (APP) in the mobile terminal. So that the user can control the smart terminal or obtain the data collected by the smart terminal through the mobile terminal.
然而,随着智能终端的种类/品牌的不断增加,其对应的遥控器也各式各样,当将某一移动终端通过USB连接至某一遥控器时,常常会出现无法兼容的情况。However, as the types / brands of smart terminals continue to increase, the corresponding remote controllers are also various. When a mobile terminal is connected to a remote controller via USB, incompatibility often occurs.
针对上述问题,发明人在研究中发现,遥控器通过其USB接口对接各类移动终端时,常常会遇到各种兼容性的问题的主要原因在于:当前市面上几乎全部都是将遥控器内用于与移动终端通信的模块(比如,无人机的图传模块)直接通过USB接口连接至移动终端,但USB协议没有一个绝对的标准,各种遥控器类型或者品牌之间差异比较大,而各个移动终端,尤其是Android系统的移动终端,对于USB连接重点关注的是主流的USB设备,很难兼顾到其他各种类型的USB设备。并且,不同系统类型的移动终端所适应的USB连接方式也不一样,常常存在顾此失彼的问题。In response to the above problems, the inventors found in the research that when the remote control is connected to various types of mobile terminals through its USB interface, the main reason for encountering various compatibility problems is that almost all of the current marketplaces incorporate the remote control into the remote control. The module used to communicate with the mobile terminal (such as the image transmission module of the drone) is directly connected to the mobile terminal through the USB interface, but the USB protocol does not have an absolute standard, and there are large differences between various remote control types or brands. And each mobile terminal, especially the mobile terminal of the Android system, focuses on the USB connection of mainstream USB devices, and it is difficult to take into account various other types of USB devices. In addition, the USB connection methods used by mobile terminals of different system types are not the same, and there is often a problem of losing sight of each other.
基于此,本发明实施例提供了一种遥控器与移动终端的通信方法、一种遥控器与移动终端的通信装置和一种遥控器。Based on this, embodiments of the present invention provide a communication method between a remote controller and a mobile terminal, a communication device between a remote controller and a mobile terminal, and a remote controller.
其中,本发明实施例提供的遥控器与移动终端的通信方法可由任意类型的遥控器(其中,所述遥控器设置有用于连接移动终端的USB接口)执行,是一种遥控器基于移动终端的系统类型选择合适的USB连接模式以实现其与移动终端之间的通信的方法,具体为:当遥控器检测到有移动终端接入其USB接口时,首先确定该移动终端的系统类型,然后选择与该系统类型对应的USB连接模式与该移动终端建 立通信连接,能够针对不同系统类型的移动终端提供不同的USB连接模式,自适应对接各种移动终端,提升遥控器基于USB连接各种移动终端时的兼容性。The communication method between the remote controller and the mobile terminal provided by the embodiment of the present invention can be executed by any type of remote controller (where the remote controller is provided with a USB interface for connecting the mobile terminal). Method for selecting a suitable USB connection mode for the system type to achieve communication between the mobile terminal and the mobile terminal. Specifically, when the remote control detects that a mobile terminal is connected to its USB interface, first determine the system type of the mobile terminal, and then select The USB connection mode corresponding to the system type establishes a communication connection with the mobile terminal, and can provide different USB connection modes for mobile terminals of different system types, adaptively dock various mobile terminals, and enhance the remote control to connect various mobile terminals based on USB. Compatibility.
其中,本发明实施例提供的遥控器与移动终端的通信装置是由软件程序构成的能够实现本发明实施例提供的遥控器与移动终端的通信方法的虚拟装置,其与本发明实施例提供的遥控器与移动终端的通信方法基于相同的发明构思,具有相同的技术特征以及有益效果。The communication device between the remote controller and the mobile terminal provided in the embodiment of the present invention is a virtual device composed of a software program that can implement the communication method between the remote controller and the mobile terminal provided by the embodiment of the present invention. The communication method between the remote controller and the mobile terminal is based on the same inventive concept, and has the same technical features and beneficial effects.
其中,所述遥控器可以是任意类型的,具有一定逻辑运算能力,提供一个或者多个能够满足用户意图的功能的电子设备。在实际应用中,其可以为外置于某一智能终端(比如,无人机、智能车、无人船等通常处于运动状态的智能终端)的电子设备(即,其与智能终端相互独立存在);或者,其也可以为内置于某一智能终端(比如,智能家居、智能家电等)的一个功能部件(即,其与智能终端为一体式结构);只要其能够与对应的智能终端的控制单元进行通信,并且,能够通过USB接口与移动终端通信连接即可,本发明实施例对此不作具体限定。The remote controller may be of any type, and has a certain logic operation capability, and provides one or more electronic devices capable of satisfying a user's intention. In practical applications, it can be an electronic device that is external to a certain smart terminal (such as a drone, smart car, or unmanned ship that is usually in a moving state) (that is, it exists independently of the smart terminal) ); Or, it can also be a functional component built into a smart terminal (such as a smart home, smart home appliance, etc.) (that is, it is integrated with the smart terminal); as long as it can communicate with the corresponding smart terminal's The control unit communicates and can communicate with the mobile terminal through a USB interface, which is not specifically limited in the embodiment of the present invention.
下面结合附图,对本发明实施例作进一步阐述。The embodiments of the present invention will be further described below with reference to the accompanying drawings.
图1是本发明实施例提供的遥控器与移动终端的通信方法的其中一种应用环境的示意图。FIG. 1 is a schematic diagram of an application environment of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention.
如图1所示,该应用环境中包括:智能终端10、遥控器20、第一移动终端30以及第二移动终端40。As shown in FIG. 1, the application environment includes: a smart terminal 10, a remote controller 20, a first mobile terminal 30, and a second mobile terminal 40.
其中,所述智能终端10可以是任意类型的电子设备,比如,无人机、无人船、智能车、智能家居、智能家电、机器人等等。所述智能终端10可以通过其内部的通信模块11(比如,无人机的图传模块)与所述遥控器20进行通信,将其采集到的数据传输给遥控器20,和/或,接收遥控器20发送的控制信号。The smart terminal 10 may be any type of electronic device, such as an unmanned aerial vehicle, an unmanned ship, a smart car, a smart home, a smart home appliance, a robot, or the like. The smart terminal 10 may communicate with the remote controller 20 through its internal communication module 11 (for example, an image transmission module of a drone), and transmit the collected data to the remote controller 20, and / or receive A control signal sent by the remote controller 20.
所述遥控器20可以为任意能够控制所述智能终端10的电子设备,其内可设置有控制单元21(其具体可以为MCU、图传模块等)以及与该控制单元21连接的USB接口22。其中,所述控制单元21能够与所述智能终端10的通信模块11进行通信,所述USB接口22用于将所述控制单元21连接至外接的移动终端(比如,所述第一移动终端30或第二移动终端40),以使外接的移动终端可以通过所述控制单元21获取所述智能终端10采集到的数据,和/或,向所述智能终端10的通信模块11发送控制指令。The remote controller 20 may be any electronic device capable of controlling the smart terminal 10, and a control unit 21 (which may specifically be an MCU, a video transmission module, etc.) and a USB interface 22 connected to the control unit 21 may be provided therein. . The control unit 21 can communicate with the communication module 11 of the smart terminal 10, and the USB interface 22 is used to connect the control unit 21 to an external mobile terminal (for example, the first mobile terminal 30). Or the second mobile terminal 40), so that the external mobile terminal can obtain the data collected by the smart terminal 10 through the control unit 21, and / or send a control instruction to the communication module 11 of the smart terminal 10.
特别地,为了能够以不同的USB连接模式建立所述控制单元21与移动终端之间的通信连接,在其中一个实施例中,所述遥控器20还包括选择电路23、第一连接电路24和第二连接电路25,所述控制单元21通过所述选择电路23连接所述第一连接电路24和所述第二连接电路25,进而通过所述第一连接电路24或所述第二连接电路25连接至所述USB接口22。从而,在该实施例中,通过控制所述选择电路23,所述控制单元21可以通过所述第一连接电路24连接至所述USB接口22以形成“第一连接模式”,或者,所述控制单元21也可以通过所述第二连接电路25连接至所述USB接口22以形成“第二连接模式”。其中,所述第一连接电路24和所述第二连接电路25可分别针对不同系统类型的移动终端的特性进行设计(本说明书后续将以主流的Android系统和IOS系统为例进行详细说明)。Particularly, in order to be able to establish a communication connection between the control unit 21 and a mobile terminal in different USB connection modes, in one embodiment, the remote controller 20 further includes a selection circuit 23, a first connection circuit 24, and A second connection circuit 25, and the control unit 21 connects the first connection circuit 24 and the second connection circuit 25 through the selection circuit 23, and further connects the first connection circuit 24 or the second connection circuit through the selection circuit 23. 25 is connected to the USB interface 22. Therefore, in this embodiment, by controlling the selection circuit 23, the control unit 21 may be connected to the USB interface 22 through the first connection circuit 24 to form a "first connection mode", or the The control unit 21 may also be connected to the USB interface 22 through the second connection circuit 25 to form a “second connection mode”. The first connection circuit 24 and the second connection circuit 25 may be designed according to the characteristics of mobile terminals of different system types (the mainstream Android system and IOS system will be described in detail in this specification later).
所述第一移动终端30和所述第二移动终端40均可以为任意类型的移动电子设备,比如,智能手机、平板电脑等,用户可以通过任何合适的类型的,一种或者多种用户交互设备(比如键盘、触摸屏、音频采集装置等)与其进行交互,输入指令或者控制其执行一种或者多种操作。此外,所述第一移动终端30和所述第二移动终端40上可以运行有任意类型的系统,比如,Android系统、IOS系统、Windows系统、Linux系统等,在其运行系统中可加载有能够与所述遥控器20交互的APP,用户可基于该APP与遥控器20或者智能终端10进行交互。The first mobile terminal 30 and the second mobile terminal 40 may be any type of mobile electronic device, such as a smart phone, a tablet computer, etc., and the user may interact with one or more users through any suitable type. Devices (such as keyboards, touch screens, audio capture devices, etc.) interact with them to enter instructions or control them to perform one or more operations. In addition, the first mobile terminal 30 and the second mobile terminal 40 may run any type of system, such as an Android system, an IOS system, a Windows system, a Linux system, and the like. For an APP that interacts with the remote controller 20, a user can interact with the remote controller 20 or the smart terminal 10 based on the APP.
在实际应用中,当遥控器20检测到有移动终端接入其USB接口 22时,可以首先确定该移动终端的系统类型,然后再选择与该系统类型对应的USB连接模式(或者说,对应的USB连接电路)与该移动终端建立通信连接。In practical applications, when the remote control 20 detects that a mobile terminal is connected to its USB interface 22, it may first determine the system type of the mobile terminal, and then select a USB connection mode (or, correspondingly, corresponding to the system type) USB connection circuit) establishes a communication connection with the mobile terminal.
举例来说,假设所述第一移动终端30的系统类型为Android系统,所述第二移动终端40的系统类型为IOS系统,并且,设定:所述Android系统对应的USB连接模式为“第一连接模式”;所述IOS系统对应的USB连接模式为“第二连接模式”。那么,当将第一移动终端30接入USB接口22时,可以首先通过遥控器20中的控制单元21确定第一移动终端30的系统类型为Android系统,然后再选择Android系统对应的USB连接模式(即,第一连接模式)建立控制单元21与第一移动终端30之间的通信连接(具体为,控制单元21向选择电路23发送第一控制指令,以使选择电路23连通所述控制单元21和所述第一连接电路24,同时,断开所述控制单元21与第二连接电路25之间的连接)。同理,当将第二移动终端40接入USB接口22时,也可以首先通过遥控器20中的控制单元21确定第二移动终端40的系统类型为IOS系统,然后再选择IOS系统对应的USB连接模式(即,第二连接模式)建立控制单元21与第二移动终端40之间的通信连接(具体为,控制单元21向选择电路23发送第二控制指令,以使选择电路23连通所述控制单元21和所述第二连接电路25,同时,断开所述控制单元21与所述第一连接电路24之间的连接)。For example, assuming that the system type of the first mobile terminal 30 is an Android system, and the system type of the second mobile terminal 40 is an IOS system, and it is set that the USB connection mode corresponding to the Android system is “the first A connection mode "; the USB connection mode corresponding to the IOS system is a" second connection mode ". Then, when the first mobile terminal 30 is connected to the USB interface 22, the system type of the first mobile terminal 30 can be determined by the control unit 21 in the remote control 20 as the Android system, and then the USB connection mode corresponding to the Android system can be selected. (Ie, the first connection mode) establishing a communication connection between the control unit 21 and the first mobile terminal 30 (specifically, the control unit 21 sends a first control instruction to the selection circuit 23 so that the selection circuit 23 communicates with the control unit 21 and the first connection circuit 24, and at the same time, the connection between the control unit 21 and the second connection circuit 25 is disconnected). Similarly, when the second mobile terminal 40 is connected to the USB interface 22, the system type of the second mobile terminal 40 can also be determined by the control unit 21 in the remote control 20 as an IOS system, and then the USB corresponding to the IOS system can be selected. The connection mode (that is, the second connection mode) establishes a communication connection between the control unit 21 and the second mobile terminal 40 (specifically, the control unit 21 sends a second control instruction to the selection circuit 23 so that the selection circuit 23 communicates with the The control unit 21 and the second connection circuit 25, meanwhile, disconnect the connection between the control unit 21 and the first connection circuit 24).
其中,需要说明的是,本发明实施例提供的遥控器与移动终端的通信方法和相关装置还可以进一步的拓展到其他合适的实施环境中,而不限于图1中所示的实施环境。虽然图1中仅显示了1个智能终端10、1个遥控器20和2个移动终端(第一移动终端30和第二移动终端40),但本领域技术人员可以理解的是,在实际应用过程中,该应用环境还可以包括更多或者更少的智能终端10和/或移动终端。并且,应当理解的是,在本实施例中,仅以两种USB连接模式为例进行说明,在其他的一些实施例中,为了能够形成更多的USB连接模式,所述选择电路23与所述USB接口22之间还可以设置有第三连接电 路、第四连接电路、第五连接电路等等。It should be noted that the communication method and related device of the remote controller and the mobile terminal provided by the embodiment of the present invention can be further extended to other suitable implementation environments, and is not limited to the implementation environment shown in FIG. 1. Although only one smart terminal 10, one remote control 20, and two mobile terminals (first mobile terminal 30 and second mobile terminal 40) are shown in FIG. 1, those skilled in the art can understand that in practical applications In the process, the application environment may further include more or fewer smart terminals 10 and / or mobile terminals. And, it should be understood that, in this embodiment, only two USB connection modes are used as an example for description. In other embodiments, in order to be able to form more USB connection modes, the selection circuit 23 and the A third connection circuit, a fourth connection circuit, a fifth connection circuit, and the like may also be provided between the USB interfaces 22.
图2是本发明实施例提供的一种遥控器与移动终端的通信方法的流程示意图,该方法可以由任意类型的遥控器执行,所述遥控器设置有用于连接移动终端的USB接口。FIG. 2 is a schematic flowchart of a communication method between a remote controller and a mobile terminal according to an embodiment of the present invention. The method can be executed by any type of remote controller, and the remote controller is provided with a USB interface for connecting the mobile terminal.
具体地,请参阅图2,该方法可以包括但不限于如下步骤:Specifically, referring to FIG. 2, the method may include, but is not limited to, the following steps:
步骤110:当检测到有移动终端接入遥控器的USB接口时,确定所述移动终端的系统类型。Step 110: When it is detected that the mobile terminal is connected to the USB interface of the remote controller, determine the system type of the mobile terminal.
在本实施例中,所述“移动终端”可以为任意类型的可移动电子设备,比如,手机、平板电脑等;所述“系统类型”即该移动终端的运行系统的类型,其可以包括但不限于:Android系统、IOS系统、Windows系统、Linux系统等。In this embodiment, the "mobile terminal" may be any type of removable electronic equipment, such as a mobile phone, a tablet computer, etc .; the "system type" is the type of the operating system of the mobile terminal, which may include but Not limited to: Android system, IOS system, Windows system, Linux system, etc.
在实际应用中,两个USB设备(比如,遥控器和移动终端)建立连接时一般存在一个枚举过程(或者说,USB调试过程),以使相互连接的两个USB设备通过获取到的枚举信息了解对方是什么样的设备,如何进行通信等。从而,当遥控器检测到某一电子设备(其可以是移动终端,也可以是电脑、服务器等非移动终端)接入到其USB接口时,可以首先通过该USB接口获取该电子设备的枚举信息,并从获取到的枚举信息中提取出该电子设备的产品标识(Product ID,PID),然后基于该产品标识PID判断该电子设备是否属于移动终端,如果是,则说明当前有移动终端接入其USB接口,此时,可以进一步确定该电子设备的系统类型;如果不是,则说明当前接入该USB接口的电子设备为其他类型的电子设备,此时,可以基于该USB接口的属性/功能作出相应的响应,比如,如果该USB接口仅用于连接移动终端,则可以对接入的电子设备不作响应,或者,通过发出提示音、呈现提示字幕等方式提醒用户接入的电子设备的类型有误,本发明实施例对此不作具体限定。In practical applications, there is usually an enumeration process (or USB debugging process) when two USB devices (such as a remote control and a mobile terminal) establish a connection, so that two connected USB devices pass the obtained Give information to understand what kind of device the other party is, how to communicate, etc. Therefore, when the remote control detects that an electronic device (which may be a mobile terminal or a non-mobile terminal such as a computer or server) is connected to its USB interface, it may first obtain an enumeration of the electronic device through the USB interface. Information, and extract the product ID (PID) of the electronic device from the obtained enumeration information, and then determine whether the electronic device belongs to a mobile terminal based on the product identification PID, and if so, it indicates that there is a mobile terminal currently Connect its USB interface, at this time, you can further determine the system type of the electronic device; if not, it means that the electronic device currently connected to the USB interface is another type of electronic device. At this time, based on the properties of the USB interface / Function to respond accordingly. For example, if the USB interface is only used to connect to a mobile terminal, it may not respond to the connected electronic device, or remind the user of the connected electronic device by issuing a prompt tone and presenting a prompt subtitle. The type is incorrect, which is not specifically limited in the embodiment of the present invention.
又,由于移动终端在其USB设备描述符中都标记有一与其系统类型对应的厂家标识(Vendor ID,VID),比如,所有IOS系统的移动终端的VID均为Apple的标识(比如,0x05ac),而所有Android系统的移动终端的厂家标识均为Google的标识(比如,0x18D1)。因此,“确定该移动终端的系统类型”的具体实施方式可以为:进一步基于获取到的枚举信息获取该移动终端的USB设备描述符,然后从获取到的USB设备描述符中提取出该移动终端的系统的VID,进而基于该VID即可确定移动终端的系统类型,比如,如果获取到的VID=0x05ac,则可确定该移动终端的系统类型为IOS系统;如果获取到的VID=0x18D1,则可确定该移动终端的系统类型为Android系统。In addition, since the mobile terminal is marked with a Vendor ID (VID) corresponding to its system type in its USB device descriptor, for example, the VID of all mobile terminals in the IOS system is an Apple logo (eg, 0x05ac), The manufacturer's logo for all Android-based mobile terminals is the Google logo (for example, 0x18D1). Therefore, the specific implementation of "determining the system type of the mobile terminal" may be: further obtaining a USB device descriptor of the mobile terminal based on the obtained enumeration information, and then extracting the mobile from the obtained USB device descriptor The VID of the system of the terminal, and then the system type of the mobile terminal can be determined based on the VID. For example, if the acquired VID = 0x05ac, the system type of the mobile terminal can be determined to be an IOS system; if the acquired VID = 0x18D1, It can be determined that the system type of the mobile terminal is an Android system.
步骤120:选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。Step 120: Select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
在本实施例中,所述“USB连接模式”即遥控器与移动终端的USB连接方式。在实际应用中,为了提升遥控器与各种系统类型的移动终端进行USB连接时的兼容性,遥控器内部可以对应不同的系统类型的移动终端设置不同的USB连接方式。In this embodiment, the "USB connection mode" is the USB connection mode between the remote control and the mobile terminal. In practical applications, in order to improve the compatibility of the remote control with various system types of mobile terminals during USB connection, the remote control may internally set different USB connection methods corresponding to different system types of mobile terminals.
一般地,在市面上的移动终端的运行系统大多为Android系统或IOS系统,因此,在本实施例中,以遥控器分别基于Android系统的移动终端和IOS系统的移动终端的特性设置两种不同的USB连接模式为例进行详细说明。Generally, the operating systems of mobile terminals on the market are mostly Android systems or IOS systems. Therefore, in this embodiment, the remote control is based on the characteristics of the mobile terminal of the Android system and the mobile terminal of the IOS system. The USB connection mode is described as an example in detail.
其中,Android系统的移动终端大多重点关注主流的USB协议,很难兼顾到其他类型的USB协议,而主流USB集线器(即,USB HUB)的兼容性一般较好。因此,在本实施例中,可以针对Android系统的移动终端设置“HUB连接模式”,采用通过USB HUB中转的方式来对接Android系统的移动终端。比如,可以在如图1所示的应用环境中,将其中一个连接电路(比如,第一连接电路24)设置为USB HUB电路。Among them, the mobile terminals of the Android system mostly focus on the mainstream USB protocol, and it is difficult to take into account other types of USB protocols, and the compatibility of mainstream USB hubs (ie, USB HUB) is generally good. Therefore, in this embodiment, a “HUB connection mode” can be set for the mobile terminal of the Android system, and the mobile terminal of the Android system is connected by a USB HUB transfer method. For example, in the application environment shown in FIG. 1, one of the connection circuits (for example, the first connection circuit 24) can be set as a USB HUB circuit.
又,由于IOS系统的移动终端在进行USB连接时,会对其所连接的USB设备进行认证审查,若同样采用通过USB HUB中转的方式来对接IOS系统的移动终端,则,当IOS系统的移动终端接入遥控器的USB接口时,在遥控器中,除了控制单元自身按照IOS协议要求提供其枚举信息之外,USB HUB也会提供其枚举信息,这就会对枚举过程造成干扰,从而无法通过IOS的认证审查,进而无法建立USB通信连接。基于此,在本实施中,可以针对IOS系统的移动终端设置“直接连接模式”,直接将遥控器的控制单元连接至USB接口。比如,在如图1所示的应用环境中,将另一个连接电路(比如,第二连接电路25)设置为直接连接,即,控制单元21通过选择电路23直接连接至USB接口22。In addition, since the mobile terminal of the IOS system performs USB connection authentication, the connected USB device is subject to certification review. If the mobile terminal of the IOS system is also connected through the USB HUB transfer method, when the IOS system moves, When the terminal accesses the USB interface of the remote control, in the remote control, in addition to the control unit itself providing its enumeration information in accordance with the IOS protocol requirements, USB HUB will also provide its enumeration information, which will cause interference to the enumeration process. , So that it cannot pass the IOS certification review, and thus cannot establish a USB communication connection. Based on this, in this implementation, a "direct connection mode" can be set for the mobile terminal of the IOS system, and the control unit of the remote controller is directly connected to the USB interface. For example, in the application environment shown in FIG. 1, another connection circuit (for example, the second connection circuit 25) is set to be directly connected, that is, the control unit 21 is directly connected to the USB interface 22 through the selection circuit 23.
如此,即可在遥控器中形成两种不同的USB连接模式:“HUB连接模式”和“直接连接模式”。在实际应用时,遥控器可基于所确定的系统类型选择对应的USB连接模式与移动终端建立通信连接。比如,当确定接入USB接口的移动终端的系统类型为Android系统时,遥控器可以选择HUB连接模式与该移动终端建立通信连接(具体为,通过USB HUB和USB接口建立遥控器(控制单元)与所述移动终端之间的通信连接);当确定接入USB接口的移动终端的系统类型为IOS系统时,遥控器可以选择直接连接模式与该移动终端建立通信连接(具体为,直接通过USB接口建立遥控器(控制单元)与所述移动终端之间的通信连接)。In this way, two different USB connection modes can be formed in the remote control: "HUB connection mode" and "direct connection mode". In practical applications, the remote control may select a corresponding USB connection mode based on the determined system type to establish a communication connection with the mobile terminal. For example, when it is determined that the system type of the mobile terminal connected to the USB interface is Android system, the remote control may select a HUB connection mode to establish a communication connection with the mobile terminal (specifically, establish a remote control (control unit) through the USB HUB and the USB interface). A communication connection with the mobile terminal); when it is determined that the system type of the mobile terminal connected to the USB interface is an IOS system, the remote control may select a direct connection mode to establish a communication connection with the mobile terminal (specifically, directly via USB The interface establishes a communication connection between a remote controller (control unit) and the mobile terminal).
进一步地,为了使得遥控器尽可能地满足Android系统和IOS系统的USB连接要求,提升USB连接效率,在一些实施例中,还可以预设USB接口上电时该遥控器的默认状态,所述默认状态包括遥控器的默认USB连接模式和遥控器的USB主/从机模式。其中,为了在IOS系统的移动终端接入USB接口时,避免USB HUB对IOS系统的认证审查过程造成干扰,可以预设遥控器的默认USB连接模式为上述“直接连接模式”。并且,由于Android系统的移动终端始终为USB访问设备(即,始终为USB从机模式),从而,可以预设USB接口上电时遥控器处于USB主机模式。Further, in order to make the remote controller meet the USB connection requirements of the Android system and the IOS system as much as possible and improve the USB connection efficiency, in some embodiments, a default state of the remote controller when the USB interface is powered on can also be preset. The default state includes the default USB connection mode of the remote control and the USB master / slave mode of the remote control. Among them, in order to prevent the USB HUB from interfering with the authentication review process of the IOS system when the mobile terminal of the IOS system is connected to the USB interface, the default USB connection mode of the remote control can be preset to the above-mentioned "direct connection mode". In addition, since the mobile terminal of the Android system is always a USB access device (that is, always in a USB slave mode), it can be preset that the remote controller is in a USB host mode when the USB interface is powered on.
基于此,当确定接入USB接口的移动终端的系统类型为Android系统时,遥控器的控制单元通知选择电路切换到HUB连接模式,同时,保持遥控器处于USB主机模式,移动终端处于USB从机模式不变;而当确定接入USB接口的移动终端的系统类型为IOS系统时,遥控器的控制单元则通知选择电路保持直接连接模式不变,同时,响应于IOS的native transmit传输协议,将遥控器从USB主机模式切换为USB从机模式。Based on this, when it is determined that the system type of the mobile terminal connected to the USB interface is Android system, the control unit of the remote controller notifies the selection circuit to switch to the HUB connection mode, and at the same time, keeps the remote controller in the USB host mode and the mobile terminal in the USB slave When the system type of the mobile terminal connected to the USB interface is determined to be an IOS system, the control unit of the remote controller notifies the selection circuit to keep the direct connection mode unchanged. At the same time, in response to the native transmission protocol of the IOS, the The remote control switches from USB host mode to USB slave mode.
再者,为了能够实现重复多次的USB连接,在又一些实施例中,当检测到该移动终端拔出所述USB接口时,将所述遥控器恢复到上述默认状态(即,默认USB连接模式为直接连接模式,并且,遥控器处于USB主机模式)。Furthermore, in order to enable the USB connection to be repeated multiple times, in some other embodiments, when it is detected that the mobile terminal is unplugged from the USB interface, the remote controller is restored to the above-mentioned default state (that is, the default USB connection). The mode is direct connection mode, and the remote control is in USB host mode).
通过上述技术方案,本发明实施例的有益效果在于:本发明实施例提供的遥控器与移动终端的通信方法通过在检测到有移动终端接入遥控器的USB接口时,首先确定移动终端的系统类型,进而选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接,能够针对不同系统类型的移动终端提供不同的USB连接模式,自适应对接各种移动终端,提升遥控器基于USB连接各种移动终端时的兼容性。Through the above technical solution, the embodiment of the present invention has the beneficial effect that the method for communicating between the remote control and the mobile terminal provided by the embodiment of the present invention first determines the system of the mobile terminal when it is detected that the mobile terminal accesses the remote control's USB interface. Type, and then select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, which can provide different USB connection modes for mobile terminals of different system types, adaptively dock various mobile terminals, and improve remote control based on Compatibility when USB is connected to various mobile terminals.
图3是本发明实施例提供的一种遥控器与移动终端的通信装置的结构示意图,该装置300可以运行于任意类型的遥控器,能够实现上述实施例提供的遥控器与移动终端的通信方法。FIG. 3 is a schematic structural diagram of a communication device between a remote controller and a mobile terminal according to an embodiment of the present invention. The device 300 can run on any type of remote controller and can implement the communication method between the remote controller and the mobile terminal provided by the foregoing embodiment. .
具体地,请参阅图3,该装置300包括:系统类型确定单元301和通信单元302。Specifically, referring to FIG. 3, the apparatus 300 includes: a system type determination unit 301 and a communication unit 302.
其中,所述系统类型确定单元301当检测到有移动终端接入所述USB接口时,确定所述移动终端的系统类型;所述通信单元302用于选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。Wherein, the system type determining unit 301 determines a system type of the mobile terminal when detecting that a mobile terminal accesses the USB interface; and the communication unit 302 is configured to select a USB connection mode corresponding to the system type. Establish a communication connection with the mobile terminal.
在本实施例中,当检测到有移动终端接入所述USB接口时,可 以首先通过系统类型确定单元301确定所述移动终端的系统类型;然后再由通信单元302选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。其中,所述系统类型包括Android系统和IOS系统。所述Android系统对应的USB连接模式为HUB连接模式,所述IOS系统对应的USB连接模式为直接连接模式;所述HUB连接模式具体为通过USB HUB和所述USB接口建立所述遥控器与所述移动终端之间的通信连接,所述直接连接模式具体为直接通过所述USB接口建立所述遥控器与所述移动终端之间的通信连接。In this embodiment, when it is detected that a mobile terminal is connected to the USB interface, the system type of the mobile terminal may be first determined by the system type determination unit 301; then, the communication unit 302 may select a corresponding system type. A USB connection mode to establish a communication connection with the mobile terminal. The system type includes an Android system and an IOS system. The USB connection mode corresponding to the Android system is a HUB connection mode, and the USB connection mode corresponding to the IOS system is a direct connection mode; the HUB connection mode is specifically to establish the remote controller and all the devices through the USB HUB and the USB interface. For the communication connection between the mobile terminals, the direct connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
其中,在一些实施例中,所述系统类型确定单元301具体用于:当检测到有移动终端接入所述USB接口时,获取所述移动终端的USB设备描述符;从所述USB设备描述符中获取所述移动终端的系统的厂家标识;根据所述厂家标识确定所述移动终端的系统类型。Wherein, in some embodiments, the system type determining unit 301 is specifically configured to: when it is detected that a mobile terminal accesses the USB interface, obtain a USB device descriptor of the mobile terminal; and describe from the USB device The manufacturer's identification of the system of the mobile terminal is obtained in the character; the system type of the mobile terminal is determined according to the manufacturer's identification.
在另一些实施例中,所述装置300还包括:预设单元303。In other embodiments, the apparatus 300 further includes: a preset unit 303.
所述预设单元303用于预设所述USB接口上电时所述遥控器的默认状态,其中,所述默认状态包括:所述USB连接模式为所述直接连接模式,并且,所述遥控器处于USB主机模式。The preset unit 303 is configured to preset a default state of the remote controller when the USB interface is powered on, wherein the default state includes: the USB connection mode is the direct connection mode, and the remote control The device is in USB host mode.
基于此,在又一些实施例中,所述装置300还包括:切换单元304,其用于当确定所述移动终端的系统类型为IOS系统时,将所述遥控器切换为USB从机模式。Based on this, in still other embodiments, the apparatus 300 further includes: a switching unit 304, configured to switch the remote controller to a USB slave mode when it is determined that the system type of the mobile terminal is an IOS system.
在再一些实施例中,所述装置300还包括:恢复单元305,其用于当检测到所述移动终端拔出所述USB接口时,将所遥控器恢复到所述默认状态。In still other embodiments, the apparatus 300 further includes: a restoration unit 305, configured to restore the remote controller to the default state when it is detected that the mobile terminal is unplugged from the USB interface.
需要说明的是,由于所述遥控器与移动终端的通信装置与上述实施例中的遥控器与移动终端的通信方法基于相同的发明构思,因此,上述方法实施例的相应内容同样适用于装置实施例,此处不再详述。It should be noted that, because the communication device between the remote controller and the mobile terminal and the communication method between the remote controller and the mobile terminal in the foregoing embodiment are based on the same inventive concept, the corresponding content of the foregoing method embodiment is also applicable to device implementation For example, it will not be described in detail here.
通过上述技术方案可知,本发明实施例的有益效果在于:本发明实施例提供的遥控器与移动终端的通信装置,通过在检测到有移动终端接入遥控器的USB接口时,首先由系统类型确定单元301确定移 动终端的系统类型,进而利用通信单元302选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接,能够针对不同系统类型的移动终端提供不同的USB连接模式,自适应对接各种移动终端,提升遥控器基于USB连接各种移动终端时的兼容性。It can be known from the foregoing technical solutions that the embodiment of the present invention has the beneficial effect that the communication device between the remote control and the mobile terminal provided by the embodiment of the present invention is first determined by the system type when a mobile terminal is connected to the USB interface of the remote control. The determining unit 301 determines the system type of the mobile terminal, and then uses the communication unit 302 to select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal, and can provide different USB connection modes for mobile terminals of different system types. Self-adaptive docking with various mobile terminals to improve the compatibility of the remote control when connecting various mobile terminals based on USB.
图4是本发明实施例提供的一种遥控器的结构示意图,该遥控器400可以是任意类型的电子设备,其包括用于连接移动终端的USB接口,能够执行上述方法实施例提供的遥控器与移动终端的通信方法,或者,运行上述装置实施例提供的遥控器与移动终端的通信装置。FIG. 4 is a schematic structural diagram of a remote controller according to an embodiment of the present invention. The remote controller 400 may be any type of electronic device, and includes a USB interface for connecting a mobile terminal, and can execute the remote controller provided by the foregoing method embodiment. A communication method with a mobile terminal, or running a communication device between a remote controller and a mobile terminal provided by the foregoing device embodiment.
具体地,请参阅图4,该遥控器400包括:Specifically, referring to FIG. 4, the remote controller 400 includes:
一个或多个处理器401以及存储器402,图4中以一个处理器401为例。One or more processors 401 and a memory 402. One processor 401 is taken as an example in FIG. 4.
处理器401和存储器402可以通过总线或者其他方式连接,图4中以通过总线连接为例。The processor 401 and the memory 402 may be connected through a bus or in other manners. In FIG. 4, the connection through the bus is taken as an example.
存储器402作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态性计算机可执行程序以及模块,如本发明实施例中的遥控器与移动终端的通信方法对应的程序指令/模块(例如,附图3所示的系统类型确定单元301、通信单元302、预设单元303、切换单元304以及恢复单元305)。处理器401通过运行存储在存储器402中的非暂态软件程序、指令以及模块,从而执行遥控器与移动终端的通信装置300的各种功能应用以及数据处理,即实现上述任一方法实施例的遥控器与移动终端的通信方法。The memory 402 is a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The remote controller in the embodiment of the present invention corresponds to a communication method of a mobile terminal. Program instructions / modules (for example, the system type determination unit 301, the communication unit 302, the preset unit 303, the switching unit 304, and the restoration unit 305 shown in FIG. 3). The processor 401 executes various functional applications and data processing of the communication device 300 of the remote controller and the mobile terminal by running the non-transitory software programs, instructions, and modules stored in the memory 402, that is, the implementation of any of the foregoing method embodiments Communication method between remote controller and mobile terminal.
存储器402可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据遥控器与移动终端的通信装置300的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器402可选包括相对于处理器401远程设置的存储器,这些远程存储器可以通过网络连接至处理器401。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required for at least one function; the storage data area may store the data created according to the use of the remote control and the communication device 300 of the mobile terminal. Data, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely set relative to the processor 401, and these remote memories may be connected to the processor 401 through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
所述一个或者多个模块存储在所述存储器402中,当被所述一个或者多个处理器401执行时,执行上述任意方法实施例中的遥控器与移动终端的通信方法,例如,执行以上描述的图2中的方法步骤110至120,实现图3中的单元301-305的功能。The one or more modules are stored in the memory 402, and when executed by the one or more processors 401, perform the communication method between the remote controller and the mobile terminal in any of the above method embodiments, for example, execute the above The described method steps 110 to 120 in FIG. 2 implement the functions of units 301-305 in FIG.
本发明实施例还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如,被图4中的一个处理器401执行,可使得上述一个或多个处理器执行上述任意方法实施例中的遥控器与移动终端的通信方法,例如,执行以上描述的图2中的方法步骤110至120,实现图3中的单元301-305的功能。An embodiment of the present invention further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as , Executed by a processor 401 in FIG. 4, may cause the one or more processors to execute the communication method between the remote controller and the mobile terminal in any of the foregoing method embodiments, for example, perform the method steps in FIG. 2 described above 110 to 120, the functions of units 301-305 in FIG. 3 are implemented.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, may be located One place, or it can be distributed across multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the objective of the solution of this embodiment.
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序产品中的计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非暂态计算机可读取存储介质中,该计算机程序包括程序指令,当所述程序指令被遥控器执行时,可使所述遥控器执行上述各方法实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Through the description of the above embodiments, a person of ordinary skill in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course, also by hardware. A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be completed by using a computer program in a computer program product to instruct related hardware. The computer program can be stored in a non-transitory computer. In the read storage medium, the computer program includes program instructions, and when the program instructions are executed by a remote controller, the remote controller can be caused to execute the processes of the foregoing method embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
上述产品(包括:遥控器、非暂态计算机可读存储介质以及计算机程序产品)可执行本发明实施例所提供的遥控器与移动终端的通信方法,具备执行遥控器与移动终端的通信方法相应的功能模块和有益 效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的遥控器与移动终端的通信方法。The above products (including: a remote controller, a non-transitory computer-readable storage medium, and a computer program product) can execute a communication method between a remote controller and a mobile terminal provided by an embodiment of the present invention, and are provided with a method for executing a communication method between a remote controller and a mobile terminal Functional modules and beneficial effects. For technical details not described in detail in this embodiment, reference may be made to a communication method between a remote controller and a mobile terminal provided in this embodiment of the present invention.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to describe the technical solution of the present invention, but not limited thereto. Under the idea of the present invention, the technical features in the above embodiments or different embodiments can also be combined. The steps can be implemented in any order and there are many other variations of the different aspects of the invention as described above, for the sake of brevity they are not provided in the details; although the invention has been described in detail with reference to the foregoing embodiments, it is common in the art The skilled person should understand that they can still modify the technical solutions described in the foregoing embodiments, or equivalently replace some of the technical features; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the implementation of the present invention. Examples of technical solutions.

Claims (14)

  1. 一种遥控器与移动终端的通信方法,应用于遥控器,所述遥控器设置有用于连接移动终端的USB接口,其特征在于,包括:A communication method between a remote controller and a mobile terminal is applied to the remote controller. The remote controller is provided with a USB interface for connecting the mobile terminal, and is characterized by comprising:
    当检测到有移动终端接入所述USB接口时,确定所述移动终端的系统类型;Determining the system type of the mobile terminal when a mobile terminal is detected to be connected to the USB interface;
    选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。Selecting a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述移动终端的系统类型包括:The method according to claim 1, wherein the determining a system type of the mobile terminal comprises:
    获取所述移动终端的USB设备描述符;Obtaining a USB device descriptor of the mobile terminal;
    从所述USB设备描述符中获取所述移动终端的系统的厂家标识;Obtaining the manufacturer identification of the system of the mobile terminal from the USB device descriptor;
    根据所述厂家标识确定所述移动终端的系统类型。Determining a system type of the mobile terminal according to the manufacturer identification.
  3. 根据权利要求1或2所述的方法,其特征在于,所述系统类型包括Android系统和IOS系统;其中,The method according to claim 1 or 2, wherein the system types include an Android system and an IOS system; wherein,
    所述Android系统对应的USB连接模式为HUB连接模式,所述HUB连接模式具体为通过USB HUB和所述USB接口建立所述遥控器与所述移动终端之间的通信连接;The USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
    所述IOS系统对应的USB连接模式为直接连接模式,所述直接连接模式具体为直接通过所述USB接口建立所述遥控器与所述移动终端之间的通信连接。The USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, further comprising:
    预设所述USB接口上电时所述遥控器的默认状态,其中,所述 默认状态包括:所述USB连接模式为所述直接连接模式,并且,所述遥控器处于USB主机模式。The default state of the remote controller when the USB interface is powered on is preset, wherein the default state includes that the USB connection mode is the direct connection mode, and the remote controller is in a USB host mode.
  5. 根据权利要求4所述的方法,其特征在于,当确定所述移动终端的系统类型为IOS系统时,所述选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接的步骤之后,还包括:The method according to claim 4, characterized in that when determining that the system type of the mobile terminal is an IOS system, the step of selecting a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal After that, it also includes:
    将所述遥控器切换为USB从机模式。Switching the remote controller to a USB slave mode.
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:The method according to claim 4 or 5, further comprising:
    当检测到所述移动终端拔出所述USB接口时,将所述遥控器恢复到所述默认状态。When it is detected that the mobile terminal is unplugged from the USB interface, the remote controller is restored to the default state.
  7. 一种遥控器与移动终端的通信装置,运行于遥控器,所述遥控器设置有用于连接移动终端的USB接口,其特征在于,包括:A communication device between a remote controller and a mobile terminal runs on the remote controller. The remote controller is provided with a USB interface for connecting the mobile terminal, and is characterized in that it includes:
    系统类型确定单元,用于当检测到有移动终端接入所述USB接口时,确定所述移动终端的系统类型;A system type determining unit, configured to determine a system type of the mobile terminal when it is detected that a mobile terminal accesses the USB interface;
    通信单元,用于选择与所述系统类型对应的USB连接模式与所述移动终端建立通信连接。The communication unit is configured to select a USB connection mode corresponding to the system type to establish a communication connection with the mobile terminal.
  8. 根据权利要求7所述的装置,其特征在于,所述系统类型确定单元具体用于:The apparatus according to claim 7, wherein the system type determining unit is specifically configured to:
    当检测到有移动终端接入所述USB接口时,获取所述移动终端的USB设备描述符;When it is detected that a mobile terminal accesses the USB interface, obtaining a USB device descriptor of the mobile terminal;
    从所述USB设备描述符中获取所述移动终端的系统的厂家标识;Obtaining the manufacturer identification of the system of the mobile terminal from the USB device descriptor;
    根据所述厂家标识确定所述移动终端的系统类型。Determining a system type of the mobile terminal according to the manufacturer identification.
  9. 根据权利要求7或8所述的装置,其特征在于,所述系统类型包括Android系统和IOS系统;其中,The device according to claim 7 or 8, wherein the system type comprises an Android system and an IOS system; wherein,
    所述Android系统对应的USB连接模式为HUB连接模式,所述HUB连接模式具体为通过USB HUB和所述USB接口建立所述遥控器与所述移动终端之间的通信连接;The USB connection mode corresponding to the Android system is a HUB connection mode, and the HUB connection mode is specifically to establish a communication connection between the remote controller and the mobile terminal through the USB HUB and the USB interface;
    所述IOS系统对应的USB连接模式为直接连接模式,所述直接连接模式具体为直接通过所述USB接口建立所述遥控器与所述移动终端之间的通信连接。The USB connection mode corresponding to the IOS system is a direct connection mode, and the direct connection mode specifically is to establish a communication connection between the remote controller and the mobile terminal directly through the USB interface.
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 9, further comprising:
    预设单元,用于预设所述USB接口上电时所述遥控器的默认状态,其中,所述默认状态包括:所述USB连接模式为所述直接连接模式,并且,所述遥控器处于USB主机模式。The preset unit is configured to preset a default state of the remote controller when the USB interface is powered on, wherein the default state includes: the USB connection mode is the direct connection mode, and the remote controller is in USB host mode.
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 10, further comprising:
    切换单元,用于当确定所述移动终端的系统类型为IOS系统时,将所述遥控器切换为USB从机模式。A switching unit, configured to switch the remote controller to a USB slave mode when it is determined that the system type of the mobile terminal is an IOS system.
  12. 根据权利要求10或11所述的装置,其特征在于,所述装置还包括:The device according to claim 10 or 11, wherein the device further comprises:
    恢复单元,用于当检测到所述移动终端拔出所述USB接口时,将所遥控器恢复到所述默认状态。The restoration unit is configured to restore the remote controller to the default state when it is detected that the mobile terminal unplugs the USB interface.
  13. 一种遥控器,其特征在于,包括:A remote control, comprising:
    至少一个处理器;以及,At least one processor; and
    与所述至少一个处理器通信连接的存储器;A memory connected in communication with the at least one processor;
    其中,所述存储器存储有可被所述至少一个处理器执行的指令;Wherein, the memory stores instructions executable by the at least one processor;
    所述至少一个处理器用于执行所述指令,以实现如权利要求1-6任一项所述的方法。The at least one processor is configured to execute the instructions to implement the method according to any one of claims 1-6.
  14. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使遥控器执行如权利要求1-6任一项所述的方法。A non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a remote controller execute The method of any one.
PCT/CN2019/100040 2018-08-15 2019-08-09 Method for communication between remote control and mobile terminal, device, and remote control WO2020034908A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810927659.X 2018-08-15
CN201810927659.XA CN109062842B (en) 2018-08-15 2018-08-15 Communication method and device for remote controller and mobile terminal and remote controller

Publications (1)

Publication Number Publication Date
WO2020034908A1 true WO2020034908A1 (en) 2020-02-20

Family

ID=64686076

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/100040 WO2020034908A1 (en) 2018-08-15 2019-08-09 Method for communication between remote control and mobile terminal, device, and remote control

Country Status (2)

Country Link
CN (1) CN109062842B (en)
WO (1) WO2020034908A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062842B (en) * 2018-08-15 2020-10-23 深圳市道通智能航空技术有限公司 Communication method and device for remote controller and mobile terminal and remote controller
CN111090608B (en) * 2019-12-26 2021-07-09 深圳市优博讯科技股份有限公司 Data transmission method and system based on USB device
CN112000374B (en) * 2020-07-13 2024-01-02 深圳市智微智能软件开发有限公司 USB touch screen replacement method, device, equipment and medium applied to android system
CN112509608B (en) * 2020-11-25 2022-03-08 广州朗国电子科技股份有限公司 Method and device for recording sound along with channel of USB (Universal Serial bus) equipment and storage medium
CN114036093A (en) * 2021-10-11 2022-02-11 北京小米移动软件有限公司 Adapter sub-board

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9164506B1 (en) * 2014-07-30 2015-10-20 SZ DJI Technology Co., Ltd Systems and methods for target tracking
CN106852188A (en) * 2016-10-31 2017-06-13 深圳市大疆创新科技有限公司 Data interactive method and universal serial bus device based on USB
CN207098699U (en) * 2017-08-11 2018-03-13 昊翔电能运动科技(昆山)有限公司 The interface current-limiting circuit of compatible apple and Android system
CN107926075A (en) * 2015-08-14 2018-04-17 深圳市大疆创新科技有限公司 The system and method for supporting the data communication under isomerous environment
CN109062842A (en) * 2018-08-15 2018-12-21 深圳市道通智能航空技术有限公司 A kind of communication means, device and the remote controler of remote controler and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205693817U (en) * 2016-06-08 2016-11-16 南京创维信息技术研究院有限公司 Touch screen remote controller and television system thereof
US10152448B2 (en) * 2016-11-29 2018-12-11 Nxp B.V. Resistor module of a USB interface device and a method of operating a resistor module of a USB interface device
CN107678996A (en) * 2017-09-26 2018-02-09 深圳市汉普电子技术开发有限公司 Determination method, USB device and the storage medium of USB mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9164506B1 (en) * 2014-07-30 2015-10-20 SZ DJI Technology Co., Ltd Systems and methods for target tracking
CN107926075A (en) * 2015-08-14 2018-04-17 深圳市大疆创新科技有限公司 The system and method for supporting the data communication under isomerous environment
CN106852188A (en) * 2016-10-31 2017-06-13 深圳市大疆创新科技有限公司 Data interactive method and universal serial bus device based on USB
CN207098699U (en) * 2017-08-11 2018-03-13 昊翔电能运动科技(昆山)有限公司 The interface current-limiting circuit of compatible apple and Android system
CN109062842A (en) * 2018-08-15 2018-12-21 深圳市道通智能航空技术有限公司 A kind of communication means, device and the remote controler of remote controler and mobile terminal

Also Published As

Publication number Publication date
CN109062842A (en) 2018-12-21
CN109062842B (en) 2020-10-23

Similar Documents

Publication Publication Date Title
WO2020034908A1 (en) Method for communication between remote control and mobile terminal, device, and remote control
US8843664B2 (en) Re-enumeration of USB 3.0 compatible devices
US10721309B2 (en) System and method for supporting data communication in a heterogeneous environment
US9256561B2 (en) Communication control apparatus and method of controlling the same
US10025351B2 (en) System for controlling peripherals connected to a docking station
US10380049B2 (en) Multi-host supported universal serial bus hub and automobile head unit using the same
US11350264B2 (en) Method and apparatus for establishing device connection
US20210149831A1 (en) Smart tablet, channel switching method, and computer readable storage medium
KR20200011869A (en) Method and Apparatus for Establishing Device Connection
US10042800B2 (en) Active USB device and switching method for operating mode thereof
GB2526695A (en) Smart pen pairing and connection
WO2019042421A1 (en) Method, apparatus and device for rate adjustment of usb data transmission, and storage medium
US20160285949A1 (en) Wireless login-based remote control method and device
CN104599473A (en) Switching method and switching device of wireless communication mode
CN103559149A (en) Method and system for working mode switchover of universal serial bus on-the-go (USB OTG) dual-role devices
US20080104284A1 (en) Device switching methods and computer systems
WO2017049973A1 (en) Data transmission control method, host device, usb device and system
TW202046128A (en) Mode switching system and mode switching method using the same
CN109976694B (en) Data transmission device, terminal, method and processor system
EP3433702B1 (en) Computing devices with hot swapping prediction circuits
CN108231131B (en) eMMC test method and device
EP3413205A1 (en) Re-enumeration of usb 3.0 compatible devices
US10542120B2 (en) Wirelessly providing operating system specific features
WO2017075997A1 (en) Method and apparatus for starting android debug bridge, and terminal
CN112731875B (en) Target device control method and device, nonvolatile storage medium and processor

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

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

Country of ref document: EP

Kind code of ref document: A1