[go: up one dir, main page]

WO2015051742A1 - Method and device for automatically implementing wireless connection between devices - Google Patents

Method and device for automatically implementing wireless connection between devices Download PDF

Info

Publication number
WO2015051742A1
WO2015051742A1 PCT/CN2014/088175 CN2014088175W WO2015051742A1 WO 2015051742 A1 WO2015051742 A1 WO 2015051742A1 CN 2014088175 W CN2014088175 W CN 2014088175W WO 2015051742 A1 WO2015051742 A1 WO 2015051742A1
Authority
WO
WIPO (PCT)
Prior art keywords
level
slave device
master device
usb interface
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2014/088175
Other languages
French (fr)
Chinese (zh)
Inventor
李得亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Device Co Ltd
Original Assignee
Huawei Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Publication of WO2015051742A1 publication Critical patent/WO2015051742A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/40Monitoring; Testing of relay systems
    • H04B17/401Monitoring; Testing of relay systems with selective localization
    • H04B17/406Monitoring; Testing of relay systems with selective localization using coded addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/26Network addressing or numbering for mobility support

Definitions

  • a user can make a call using a Bluetooth headset, so that it is not necessary to hold the phone for a call.
  • connection process between mobile phones for wireless data transmission via Bluetooth can include the following steps:
  • Embodiments of the present invention provide a method and a device for automatically implementing a wireless connection between devices, which can implement automatic pairing of terminal devices during wireless data transmission between terminal devices.
  • the master device detects the level of its own USB interface
  • the master device obtains that the slave device is disconnected from the master device by using the following manner:
  • the first level is opposite to the level of the second level.
  • the master device turns on its own wireless control switch, and performs pairing with the slave device through the read identity of the slave device to implement a wireless connection.
  • the slave device acquires that the slave device is disconnected from the master device.
  • connection state obtaining module is configured to acquire a connection state between the master device and the slave device
  • the pairing module is configured to: when the connection state acquisition module acquires that the slave device is disconnected from the master device by a connection, the identity of the slave device that is read is paired with the slave device to Implement a wireless connection.
  • the disconnection determining submodule is configured to: when the first USB interface level detecting submodule acquires the level of the USB interface from the first level to a second level, and the USB interface When the level is the second level and remains for the second predetermined time period, it is determined that the slave device is disconnected from the master device by the connection;
  • connection state obtaining module determines that the slave device is disconnected from the master device by the connection, turns on the wireless control switch of the slave device, and performs pairing with the slave device by using the read identity of the slave device. To achieve a wireless connection.
  • the obtaining module is configured to acquire a connection state between the slave device and the master device;
  • the master device when the master device detects that there is a slave device connected, it indicates that the slave device requests the pairing, and then reads the identity of the slave device. When it is detected that the slave device is disconnected, the slave device has been unplugged, and the master device is paired with the slave device through the identity of the slave device that has been read to implement a wireless connection.
  • the master device can automatically complete the wireless connection with the slave device by detecting the connection state of the slave device with itself. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's multi-step operation on the master device and the slave device, and the user only needs to perform the plug-in operation of the slave device and the master device at one time, and the operation is convenient and simple.
  • FIG. 1 is a flow chart of a second embodiment of a method provided by the present invention.
  • Embodiment 1 of a main device provided by the present invention is a schematic diagram of Embodiment 1 of a main device provided by the present invention.
  • FIG. 5a is a schematic diagram of a first embodiment of a slave device provided by the present invention.
  • Embodiment 7 is a schematic diagram of Embodiment 1 of a system for automatically implementing wireless connection between devices provided by the present invention
  • Embodiment 1 a flowchart of Embodiment 1 of a method for automatically implementing a wireless connection between devices provided by the present invention is shown.
  • S101a when the master device acquires the slave device to connect with the master device, the master device reads the identity identifier of the slave device.
  • the master device When the master device detects a level jump and the jump becomes the second level for a second predetermined period of time, it indicates that the slave device is disconnected from the master device by the connection.
  • the Bluetooth switch or the WIFI switch is only turned on when the master device needs to detect the level jump and the jump to the second level for the second predetermined time period.
  • the master device does not simply detect that the USB interface is at the second level. Turn on the Bluetooth switch or WIFI switch straight. For example, the USB interface of the master device may remain at the second level when not accessed from the device. However, in this case, the master device does not turn on the Bluetooth switch or the WIFI switch.
  • the slave device to which the master device USB interface is plugged in has been unplugged.
  • the master device needs to turn on the Bluetooth switch or the WIFI switch to complete the pairing with the slave device.
  • the master device only needs to detect the level of its own USB interface, and can determine whether there is a slave device plugged in. When it is determined that there is a slave device plugged in, , indicating that the slave device is requesting pairing, then reading and storing the identity of the slave device completes the pre-pairing. When it is detected that the level of the USB interface changes to another level and remains for a predetermined time, the slave device has been unplugged, and the master device turns on its own Bluetooth switch or WIFI switch to automatically complete the pairing.
  • the method provided by the present application can automatically complete the Bluetooth pairing or WIFI pairing with the slave device by detecting the level change of the USB interface of the master device. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's operation, and the user only needs to insert and remove the slave device and the master device at one time, which is convenient and simple.
  • FIG. 3a the figure is a flowchart of Embodiment 4 of a method provided by the present invention.
  • the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.
  • the predetermined level is a level state in which the USB interface of the slave device is not plugged together with the master device. That is, the slave device detects the level of its own USB interface. When it is at a predetermined level, it indicates that the slave device has been unplugged from the master device, and the slave device turns on its own Bluetooth switch or WIFI switch.
  • the slave device only needs to detect the level of its own USB interface to a predetermined level and maintain the third predetermined time period, and turn on its own Bluetooth switch or WIFI switch.
  • the connection state obtaining module 401a is configured to acquire a connection state between the master device and the slave device.
  • connection state obtaining module 401a further includes: a disconnection determining submodule 401a3;
  • the level of the USB interface changes from the first level to the second level, the second level is the high level, and the high level remains for the second predetermined period of time, indicating the slave device that is plugged into the USB interface. Has been pulled out. Next, you need to turn on the Bluetooth switch or WIFI switch to complete the pairing with the slave device.
  • first predetermined time period and the second predetermined time period are both predetermined time periods, and the two may be equal or not equal.
  • the main device for automatically implementing the wireless connection only needs to detect the level of its own USB interface, and can determine whether there is a slave device.
  • the slave device is described.
  • the identity of the slave device is read and stored to complete the pre-pairing.
  • the device provided by the present application can automatically complete the Bluetooth pairing or WIFI pairing with the slave device by detecting the level change of the USB itself. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's operation, and the user only needs to insert and remove the slave device and the master device at one time, which is convenient and simple.
  • the data device needs to be plugged together with the slave device, and then pulled out, and the master device detects the change of the level of the USB interface of the device in the process of plugging and unplugging;
  • the line only transmits the signal, does not transmit current, and recognizes a level change, so it is different from the power line.
  • the master device and the slave device can be directly plugged together without any data lines, and the interfaces of the two are matched to each other.
  • the slave device that automatically implements the wireless connection includes: an obtaining module 501a and a wireless control switch opening module 501b;
  • the obtaining module 501a includes: a second USB interface level detecting submodule 501a1 and a second connection determining submodule 501a2;
  • the third predetermined time period may be the same as the first predetermined time period and the second predetermined time period, or may be different.
  • the system for automatically implementing wireless connection between the devices provided in this embodiment includes: a master device 700 and a slave device 800;
  • the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.
  • first predetermined time period and the second predetermined time period are both predetermined time periods, and the two may be equal or not equal.
  • the third predetermined time period may be the same as the first predetermined time period and the second predetermined time period, or may be different.
  • the predetermined level is a level state in which the USB interface of the slave device is not plugged together with the master device. That is, after the slave device has been unplugged from the master device, the slave device detects the level of its own USB interface. When it is at a predetermined level, it indicates that the pre-pairing is completed, and turns on its own Bluetooth switch or WIFI switch.
  • the slave device does not need to read and store the MAC code and the serial number of the master device, that is, the slave device does not need to authenticate the master device.
  • the slave device only needs to detect the level of its own USB interface to a predetermined level and maintain the third predetermined time period, and turn on its own Bluetooth switch or WIFI switch.
  • the system for automatically implementing the wireless connection between the devices provided in this embodiment further includes: a data line 900;
  • the slave device 800 is plugged into the master device 700 through the data line 900. Then, the main device 700 detects the change of the level of its own USB interface during the process of plugging and unplugging;
  • the data line may not be needed, but the master device and the slave device are directly plugged together, and the interfaces of the master device and the slave device are matched with each other.
  • the master device 700 is further configured to detect that the level of the USB interface is the first level and maintain the predetermined time period, the slave device connected to the master device through the USB interface cannot be read. Identity, then abandon the pairing with the slave device.
  • the processor 1000a reads the digital sequence in the slave device through the USB interface 1000f to determine whether the slave device is connected to the master device.
  • the processor 1000a reads the digital sequence through the USB interface 1000f, it indicates that the slave device is connected to the master device, and when the digital sequence is not read, the slave device is disconnected from the master device.
  • the display unit 1000c can be used to display information input by the user or information provided to the user and various menus of the mobile phone 1000.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

A method and device for automatically implementing a wireless connection between devices are disclosed, said method comprising: when a primary device detects a connection between said primary device and a secondary device, the primary device obtains the identifier of the secondary device; when the primary device detects a change from connection to disconnection between said primary device and the secondary device, the primary device pairs itself to the secondary device using the obtained identifier so as to implement a wireless connection. When a primary device detects a connection with a secondary device, meaning a secondary device is making a pairing request, the primary device obtains the identifier of the secondary device. By detecting the connection state between a secondary device and a primary device, said primary device may automatically establish a wireless connection with the secondary device. Unlike in the prior art, with the present invention users need not take multiple steps to achieve pairing. Primary device and secondary device users therefore need only plug a secondary device into a primary device once, and may skip multiple other operations, making the process simple and convenient.

Description

一种设备之间自动实现无线连接的方法及设备Method and device for automatically implementing wireless connection between devices

本申请要求于2013年10月10日提交中国专利局、申请号为201310469845.0、发明名称为“一种设备之间自动实现无线连接的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201310469845.0, entitled "Method and Apparatus for Automatically Implementing Wireless Connection Between Devices" on October 10, 2013, the entire contents of which are hereby incorporated by reference. The citations are incorporated herein by reference.

技术领域Technical field

本发明涉及无线连接技术领域,特别涉及一种设备之间自动实现无线连接的方法及设备。The present invention relates to the field of wireless connection technologies, and in particular, to a method and device for automatically implementing a wireless connection between devices.

背景技术Background technique

当前大屏幕手机成为发展趋势,使用者越来越希望释放自己的双手。例如,使用者使用蓝牙耳机可以接打电话,从而不必手持手机进行通话。Currently, large-screen mobile phones have become a trend, and users are increasingly hoping to release their hands. For example, a user can make a call using a Bluetooth headset, so that it is not necessary to hold the phone for a call.

目前,手机之间通过蓝牙进行无线数据传输时的连接过程可以包括以下几个步骤:Currently, the connection process between mobile phones for wireless data transmission via Bluetooth can include the following steps:

第一步:发送方和接收方均要打开手机上的蓝牙;The first step: both the sender and the receiver must open the Bluetooth on the phone;

第二步:设置蓝牙为对方可以发现;Step 2: Set Bluetooth to be found by the other party;

第三步:发送方和接收方打开蓝牙搜索功能,搜索到对方;The third step: the sender and the receiver open the Bluetooth search function and search for the other party;

第四步:选择蓝牙配对,并输入密码;完成配对。Step 4: Select Bluetooth pairing and enter your password; complete pairing.

由此可见,现有技术中,手机之间通过蓝牙进行无线数据传输时需要用户操作手机进行蓝牙配对的设置,手机之间不能自动完成蓝牙的配对。It can be seen that in the prior art, when the mobile phone performs wireless data transmission via Bluetooth, the user needs to operate the mobile phone to perform Bluetooth pairing setting, and the Bluetooth pairing cannot be automatically completed between the mobile phones.

目前,以蓝牙耳机、手机、电脑等为例的终端设备之间传输数据时,蓝牙和WIFI等近距离无线传输的应用非常普遍。但是现有技术中手机等终端设备进行无线数据传输时无法完成自动配对。At present, when transmitting data between terminal devices such as Bluetooth headsets, mobile phones, computers, etc., applications of short-range wireless transmission such as Bluetooth and WIFI are very common. However, in the prior art, the terminal device such as a mobile phone cannot perform automatic pairing when performing wireless data transmission.

发明内容Summary of the invention

本发明实施例提供一种设备之间自动实现无线连接的方法及设备,能够在终端设备之间进行无线数据传输时实现终端设备的自动配对。Embodiments of the present invention provide a method and a device for automatically implementing a wireless connection between devices, which can implement automatic pairing of terminal devices during wireless data transmission between terminal devices.

第一方面,提供一种设备之间自动实现无线连接的方法,包括: In a first aspect, a method for automatically implementing a wireless connection between devices is provided, including:

当主设备获取到从设备与所述主设备相连接时,所述主设备读取所述从设备的身份标识;When the master device acquires the slave device to connect with the master device, the master device reads the identity identifier of the slave device;

当所述主设备获取到所述从设备与所述主设备由连接变为断开时,所述主设备通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。When the master device acquires that the slave device is disconnected from the master device by the connection, the master device pairs with the slave device by using the read identity of the slave device to implement a wireless connection.

在第一方面的第一种可能的实现方式中,所述主设备通过以下方式获取到所述从设备与所述主设备相连接:In a first possible implementation manner of the first aspect, the master device obtains, by using the following manner, that the slave device is connected to the master device:

所述主设备检测自身USB接口的电平;The master device detects the level of its own USB interface;

当所述USB接口的电平为第一电平并保持第一预定时间段时,所述主设备获取到所述从设备与所述主设备相连接。When the level of the USB interface is at a first level and is maintained for a first predetermined period of time, the master device acquires that the slave device is connected to the master device.

结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述主设备通过以下方式获取到所述从设备与所述主设备由连接变为断开:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the master device obtains that the slave device is disconnected from the master device by using the following manner:

当所述USB接口的电平由所述第一电平变为第二电平,且所述USB接口的电平为第二电平后保持第二预定时间段时,所述主设备获取到所述从设备与所述主设备由连接变为断开;When the level of the USB interface is changed from the first level to the second level, and the level of the USB interface is the second level, and the second predetermined time period is maintained, the master device acquires The slave device is disconnected from the master device by a connection;

所述第一电平与第二电平的电平状态相反。The first level is opposite to the level of the second level.

结合第一方面及上述任一种可能的实现方式,在第三种可能的实现方式中,所述主设备通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接,包括:With reference to the first aspect and any one of the foregoing possible implementation manners, in a third possible implementation manner, the master device is paired with the slave device by using the read identity of the slave device to implement a wireless connection, include:

所述主设备打开自身的无线控制开关,并通过读取到的所述从设备的身份标识进行与所述从设备配对以实现无线连接。The master device turns on its own wireless control switch, and performs pairing with the slave device through the read identity of the slave device to implement a wireless connection.

第二方面,提供一种设备之间自动实现无线连接的方法,包括:In a second aspect, a method for automatically implementing a wireless connection between devices is provided, including:

从设备获取所述从设备是否与主设备断开连接;Obtaining, from the device, whether the slave device is disconnected from the master device;

如果是,所述从设备打开自身的无线控制开关以实现与主设备的无线连接。If so, the slave device turns on its own wireless control switch to enable a wireless connection with the master device.

在第二方面的第一种可能的实现方式中,所述从设备通过以下方式获取所述从设备是否与主设备断开连接:In a first possible implementation manner of the second aspect, the slave device obtains whether the slave device is disconnected from the master device by:

所述从设备检测自身USB接口的电平;The slave device detects a level of its own USB interface;

当所述USB接口的电平为预定电平并保持第三预定时间段时,所述从设备获取到所述从设备与所述主设备断开连接。 When the level of the USB interface is a predetermined level and is maintained for a third predetermined period of time, the slave device acquires that the slave device is disconnected from the master device.

第三方面,提供一种自动实现无线连接的主设备,包括:连接状态获取模块、读取模块和配对模块;A third aspect provides a master device that automatically implements a wireless connection, including: a connection state obtaining module, a reading module, and a pairing module;

所述连接状态获取模块,用于获取主设备与从设备的连接状态;The connection state obtaining module is configured to acquire a connection state between the master device and the slave device;

所述读取模块,用于当所述连接状态获取模块获取所述主设备与从设备相连接时,读取所述从设备的身份标识;The reading module is configured to read an identity identifier of the slave device when the connection state acquiring module acquires that the master device is connected to the slave device;

所述配对模块,用于当所述连接状态获取模块获取所述从设备与所述主设备由连接变为断开时,通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。The pairing module is configured to: when the connection state acquisition module acquires that the slave device is disconnected from the master device by a connection, the identity of the slave device that is read is paired with the slave device to Implement a wireless connection.

在第三方面的第一种可能的实现方式中,所述连接状态获取模块包括:第一USB接口电平检测子模块和第一连接确定子模块;In a first possible implementation manner of the third aspect, the connection state acquiring module includes: a first USB interface level detecting submodule and a first connection determining submodule;

所述第一USB接口电平检测子模块,用于检测主设备USB接口的电平;The first USB interface level detecting submodule is configured to detect a level of a USB interface of the main device;

所述第一连接确定子模块,用于当所述第一USB接口电平检测子模块获取所述USB接口的电平为第一电平并保持第一预定时间段时,确定所述从设备与主设备相连接。The first connection determining submodule, configured to determine the slave device when the first USB interface level detecting submodule acquires the level of the USB interface to a first level and maintains a first predetermined time period Connect to the main unit.

结合第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述连接状态获取模块还包括:断开确定子模块;With the first possible implementation of the third aspect, in a second possible implementation, the connection state obtaining module further includes: a disconnect determination submodule;

所述断开确定子模块,用于当所述第一USB接口电平检测子模块获取所述USB接口的电平由所述第一电平变为第二电平,且所述USB接口的电平为第二电平后保持第二预定时间段时,确定所述从设备与主设备由连接变为断开;The disconnection determining submodule is configured to: when the first USB interface level detecting submodule acquires the level of the USB interface from the first level to a second level, and the USB interface When the level is the second level and remains for the second predetermined time period, it is determined that the slave device is disconnected from the master device by the connection;

所述第一电平与第二电平的电平状态相反。The first level is opposite to the level of the second level.

结合第三方面及上述任一种可能的实现方式,在第三种可能的实现方式中,所述配对模块具体用于:With reference to the third aspect and any of the foregoing possible implementation manners, in a third possible implementation manner, the pairing module is specifically configured to:

当所述连接状态获取模块确定所述从设备与主设备由连接变为断开时,打开自身的无线控制开关,并通过读取到的所述从设备的身份标识进行与所述从设备配对以实现无线连接。When the connection state obtaining module determines that the slave device is disconnected from the master device by the connection, turns on the wireless control switch of the slave device, and performs pairing with the slave device by using the read identity of the slave device. To achieve a wireless connection.

第四方面,提供一种自动实现无线连接的从设备,包括:获取模块和无线控制开关打开模块;A fourth aspect provides a slave device that automatically implements a wireless connection, including: an acquisition module and a wireless control switch opening module;

所述获取模块,用于获取从设备与主设备的连接状态;The obtaining module is configured to acquire a connection state between the slave device and the master device;

所述无线控制开关打开模块,用于当所述获取模块获取到从设备与主设备断开连接时,打开自身的无线控制开关以实现与主设备的无线连接。 The wireless control switch opening module is configured to open a wireless control switch of the wireless device to implement wireless connection with the master device when the acquiring module acquires that the slave device is disconnected from the master device.

在第四方面的第一种可能的实现方式中,所述获取模块包括:第二USB接口电平检测子模块和第二连接确定子模块;In a first possible implementation manner of the fourth aspect, the acquiring module includes: a second USB interface level detecting submodule and a second connection determining submodule;

所述第二USB接口电平检测子模块,用于检测从设备USB接口的电平;The second USB interface level detecting submodule is configured to detect a level of the slave device USB interface;

所述第二连接确定子模块,用于当所述第二USB接口电平检测子模块所述USB接口的电平为预定电平并保持第三预定时间段时,确定所述从设备与所述主设备断开连接。The second connection determining submodule is configured to determine the slave device and the device when the level of the USB interface of the second USB interface level detecting submodule is a predetermined level and is maintained for a third predetermined time period The master device is disconnected.

以上技术方案,当主设备检测到有从设备相连接时,说明从设备在请求配对,则读取从设备的身份标识。当检测到从设备断开连接时,说明从设备已经拔下,此时主设备通过已经读取的从设备的身份标识与从设备配对以实现无线连接。显然,本申请提供的方法,主设备通过检测从设备与自身的连接状态,便可以自动完成与从设备的无线连接。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者在主设备和从设备上的多步操作,使用者仅需要将从设备与主设备进行一次插拔即可,操作方便简单。In the above technical solution, when the master device detects that there is a slave device connected, it indicates that the slave device requests the pairing, and then reads the identity of the slave device. When it is detected that the slave device is disconnected, the slave device has been unplugged, and the master device is paired with the slave device through the identity of the slave device that has been read to implement a wireless connection. Obviously, in the method provided by the present application, the master device can automatically complete the wireless connection with the slave device by detecting the connection state of the slave device with itself. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's multi-step operation on the master device and the slave device, and the user only needs to perform the plug-in operation of the slave device and the master device at one time, and the operation is convenient and simple.

附图说明DRAWINGS

图1a是本发明提供的设备直接自动实现无线连接的方法实施例一流程图;1a is a flowchart of Embodiment 1 of a method for automatically implementing wireless connection by a device provided by the present invention;

图1是本发明提供的方法实施例二流程图;1 is a flow chart of a second embodiment of a method provided by the present invention;

图2是本发明提供的方法实施例三流程图;2 is a flow chart of a third embodiment of the method provided by the present invention;

图3a是本发明提供的方法实施例四流程图;Figure 3a is a flow chart of Embodiment 4 of the method provided by the present invention;

图3是本发明提供的方法实施例五流程图;3 is a flow chart of Embodiment 5 of the method provided by the present invention;

图4a是本发明提供的主设备实施例一示意图;4a is a schematic diagram of Embodiment 1 of a main device provided by the present invention;

图4是本发明提供的自动实现无线连接的主设备实施例二示意图;4 is a schematic diagram of Embodiment 2 of a master device for automatically implementing a wireless connection provided by the present invention;

图5是本发明提供的主设备实施例三示意图;FIG. 5 is a schematic diagram of Embodiment 3 of a main device provided by the present invention; FIG.

图5a是本发明提供的从设备实施例一示意图;FIG. 5a is a schematic diagram of a first embodiment of a slave device provided by the present invention; FIG.

图6是本发明提供的从设备实施例二示意图;6 is a schematic diagram of a second embodiment of a slave device provided by the present invention;

图7是本发明提供的设备之间自动实现无线连接的系统实施例一示意图;7 is a schematic diagram of Embodiment 1 of a system for automatically implementing wireless connection between devices provided by the present invention;

图8是本发明提供的系统实施例二示意图; Figure 8 is a schematic diagram of a second embodiment of the system provided by the present invention;

图9是本发明提供的主设备的结构示意图。FIG. 9 is a schematic structural diagram of a master device provided by the present invention.

具体实施方式detailed description

需要说明的是,本发明实施例提供的方法、设备和系统,不局限于具体的应用设备,例如,主设备可以为手机,从设备可以为蓝牙耳机;主设备也可以为电脑,从设备为手机。主设备和从设备仅是一个相对的概念,不是绝对的。随着技术的发展,其他很多设备也可以直接使用无线数据传输,例如电视等家用电器。本发明实施例不限定设备的具体种类。It should be noted that the method, device, and system provided by the embodiments of the present invention are not limited to specific application devices. For example, the master device may be a mobile phone, the slave device may be a Bluetooth headset, the master device may also be a computer, and the slave device may be a Mobile phone. Master and slave are just a relative concept, not absolute. With the development of technology, many other devices can also directly use wireless data transmission, such as household appliances such as television. The embodiments of the present invention do not limit the specific types of devices.

方法实施例一:Method embodiment one:

参见图1a,该图为本发明提供的设备之间自动实现无线连接的方法实施例一流程图。Referring to FIG. 1a, a flowchart of Embodiment 1 of a method for automatically implementing a wireless connection between devices provided by the present invention is shown.

本实施例提供的设备之间自动实现无线连接的方法,包括:The method for automatically implementing a wireless connection between devices provided by this embodiment includes:

S101a:当主设备获取到从设备与所述主设备相连接时,所述主设备读取所述从设备的身份标识;S101a: when the master device acquires the slave device to connect with the master device, the master device reads the identity identifier of the slave device.

需要说明的是,从设备的身份标识可以为物理地址(MAC,Media Access Control)或串号,无论是MAC码还是串号,均是从设备唯一的身份标识,因此主设备可以通过这样的身份标识完成对从设备的认证。It should be noted that the identity of the slave device may be a physical address (MAC, Media Access Control) or a serial number, and the MAC address or the serial number is a unique identifier of the slave device, so the master device can pass such an identity. The identification completes the authentication of the slave device.

S102a:当所述主设备获取到所述从设备与所述主设备由连接变为断开时,所述主设备通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。S102a: when the master device acquires that the slave device is disconnected from the master device by the connection, the master device pairs with the slave device by using the read identity of the slave device to implement wireless connection.

需要说明的是,本发明实施例中,配对指的是两个设备之间建立无线传输通道,建立数据传输链接。可以理解的是,配对属于现有技术,在此不再详细赘述。It should be noted that, in the embodiment of the present invention, pairing refers to establishing a wireless transmission channel between two devices to establish a data transmission link. It can be understood that the pairing belongs to the prior art and will not be described in detail herein.

但是,本发明提供的预配对过程不是现有技术,预配对指的是正式配对前主设备对从设备的身份认证或识别,为正式的配对做准备。However, the pre-pairing process provided by the present invention is not prior art, and pre-pairing refers to the identity authentication or identification of the master device to the slave device before the formal pairing, in preparation for formal pairing.

本发明实施例提供的设备之间自动实现无线连接的方法,当主设备检测到有从设备相连接时,说明从设备在请求配对,则读取从设备的身份标识。当检测到从设备断开连接时,说明从设备已经拔下,此时主设备通过已经读取的从设备的身份标识与从设备配对以实现无线连接。显然,本申请提供的方法,主设备通过检测从设备与自身的连接状态,便可以自动完成与 从设备的无线连接。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者在主设备和从设备上的多步操作,使用者仅需要将从设备与主设备进行一次插拔即可,操作方便简单。A method for automatically implementing a wireless connection between devices provided by an embodiment of the present invention. When the master device detects that a slave device is connected, the slave device requests the pairing, and then reads the identity of the slave device. When it is detected that the slave device is disconnected, the slave device has been unplugged, and the master device is paired with the slave device through the identity of the slave device that has been read to implement a wireless connection. Obviously, the method provided by the present application can automatically complete the method by detecting the connection state between the slave device and the master device. Wireless connection from the device. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's multi-step operation on the master device and the slave device, and the user only needs to perform the plug-in operation of the slave device and the master device at one time, and the operation is convenient and simple.

方法实施例二:Method Embodiment 2:

参见图1,该图为本发明提供的设备之间自动实现无线连接的方法实施例二示意图。Referring to FIG. 1, FIG. 1 is a schematic diagram of Embodiment 2 of a method for automatically implementing wireless connection between devices provided by the present invention.

本实施例提供的设备之间自动实现无线连接的方法,包括:The method for automatically implementing a wireless connection between devices provided by this embodiment includes:

S101:主设备检测自身USB接口的电平;S101: The master device detects a level of the USB interface of the own device;

需要说明的是,当主设备的USB接口没有插接任何器件时,即USB接口处于悬空状态时,USB接口的电平一般为高电平;当有器件插接到主设备的USB接口时,USB接口的电平会产生跳变,例如由高电平变为低电平,只要USB接口一直插接器件,则这个接口的低电平将保持一段时间。当然,主设备插接充电器时,随着时间的增加,USB接口会有电源过来的充电脉冲信号。本发明实施例中的不包括主设备充电的情况。It should be noted that when the USB interface of the master device is not plugged into any device, that is, when the USB interface is in a floating state, the level of the USB interface is generally high; when a device is plugged into the USB interface of the master device, USB The level of the interface will change, for example from high to low, as long as the USB interface is plugged into the device, the low level of this interface will remain for a while. Of course, when the main device is plugged into the charger, as the time increases, the USB interface will have a charging pulse signal from the power source. The case where the main device is charged is not included in the embodiment of the present invention.

S102:当所述USB接口的电平为第一电平并保持第一预定时间段时,读取通过所述USB接口与主设备连接的从设备的身份标识;判断所述从设备的身份标识是否已经存储,如果否则进行存储;S102: When the level of the USB interface is at a first level and is maintained for a first predetermined time period, reading an identity of a slave device connected to the master device by using the USB interface; determining an identity of the slave device Whether it has been stored, if it is stored otherwise;

例如,第一电平为低电平,如果USB接口的低电平保持第一预定时间段,则说明USB接口有从设备插接进来,主设备可以读取从设备的身份标识,如果预先没有存储过该身份标识,则进行存储。For example, the first level is a low level. If the low level of the USB interface is maintained for the first predetermined time period, the USB interface is plugged in from the device, and the master device can read the identity of the slave device, if not previously The identity is stored and stored.

S103:当所述USB接口的电平由所述第一电平跳变为第二电平,且第二电平保持第二预定时间段时,主设备打开自身的无线控制开关,并通过已经存储的所述从设备的身份标识完成与从设备的配对;所述第一电平与第二电平的电平状态相反。S103: when the level of the USB interface changes from the first level to the second level, and the second level remains for the second predetermined time period, the master device turns on its own wireless control switch, and passes the already The stored identity of the slave device completes pairing with the slave device; the first level is opposite to the level state of the second level.

需要说明的是,本发明实施例中的无线控制开关可以为蓝牙开关或者WIFI开关,但是不局限于这两种类型。It should be noted that the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.

主设备检测到电平跳变,且跳变为第二电平保持第二预定时间段时,则说明从设备与主设备由连接变为断开。需要说明的是,主设备需要检测到电平跳变,且跳变为第二电平保持第二预定时间段时,才打开蓝牙开关或者WIFI开关。主设备并不是单纯检测到USB接口为第二电平时,就一 直打开蓝牙开关或者WIFI开关。例如,没有从设备接入时,主设备的USB接口可能一直保持第二电平。但是这种情况下,主设备并不打开蓝牙开关或者WIFI开关。When the master device detects a level jump and the jump becomes the second level for a second predetermined period of time, it indicates that the slave device is disconnected from the master device by the connection. It should be noted that the Bluetooth switch or the WIFI switch is only turned on when the master device needs to detect the level jump and the jump to the second level for the second predetermined time period. The master device does not simply detect that the USB interface is at the second level. Turn on the Bluetooth switch or WIFI switch straight. For example, the USB interface of the master device may remain at the second level when not accessed from the device. However, in this case, the master device does not turn on the Bluetooth switch or the WIFI switch.

例如,第二电平为高电平,并且该高电平保持第二预定时间段,则说明主设备USB接口插接的从设备已经拔出。接下来需要主设备打开蓝牙开关或者WIFI开关,完成与从设备的配对。For example, if the second level is a high level and the high level is maintained for a second predetermined period of time, then the slave device to which the master device USB interface is plugged in has been unplugged. Next, the master device needs to turn on the Bluetooth switch or the WIFI switch to complete the pairing with the slave device.

需要说明的是,所述第一预定时间段和第二预定时间段均是预定的时间段,两者可以相等,也可以不相等。It should be noted that the first predetermined time period and the second predetermined time period are both predetermined time periods, and the two may be equal or not equal.

综上所述,本发明提供的设备之间自动实现无线连接的方法,主设备只需要检测自身USB接口的电平,就可以来判断是否有从设备插接,当判断有从设备插接时,说明从设备在请求配对,则读取并存储从设备的身份标识,完成预配对。当检测USB接口的电平变为另一种电平并保持预定时间时,说明从设备已经拔下,此时主设备打开自己的蓝牙开关或者WIFI开关,自动完成配对。显然,本申请提供的方法,主设备通过检测自身USB接口的电平变化,便可以自动完成与从设备的蓝牙配对或者WIFI配对。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者的操作,使用者仅需要将从设备与主设备进行一次插拔即可,方便简单。In summary, the method for automatically implementing wireless connection between devices provided by the present invention, the master device only needs to detect the level of its own USB interface, and can determine whether there is a slave device plugged in. When it is determined that there is a slave device plugged in, , indicating that the slave device is requesting pairing, then reading and storing the identity of the slave device completes the pre-pairing. When it is detected that the level of the USB interface changes to another level and remains for a predetermined time, the slave device has been unplugged, and the master device turns on its own Bluetooth switch or WIFI switch to automatically complete the pairing. Obviously, the method provided by the present application can automatically complete the Bluetooth pairing or WIFI pairing with the slave device by detecting the level change of the USB interface of the master device. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's operation, and the user only needs to insert and remove the slave device and the master device at one time, which is convenient and simple.

需要说明的是,对于本发明实施例提供的方法,从设备需要通过数据线与主设备插接在一起,然后拔出,插拔的过程中主设备会检测到自身USB接口电平的变化;这个数据线只传输信号,不传输电流,主设备识别的是一个电平的变化,因此,该数据线区别于给主设备充电时的电源线。或者主设备和从设备可以直接插接在一起,不需要任何数据线,两者的接口是互相匹配的。It should be noted that, for the method provided by the embodiment of the present invention, the slave device needs to be plugged together with the master device through the data line, and then pulled out, and the master device detects the change of the level of the USB interface of the master device during the plugging and unplugging process; This data line only transmits signals, does not transmit current, and the master recognizes a level change. Therefore, the data line is different from the power line when charging the master device. Or the master device and the slave device can be directly plugged together without any data lines, and the interfaces of the two are matched to each other.

主设备读取了从设备的身份标识以后,可以一并存储从设备的身份标识,这样下一次同一个从设备再与主设备插接时,主设备读取从设备的身份标识,判断已经保存有该身份标识,则不必再进行从设备身份标识的保存。可以理解的是,当然主设备可以每次都读取并保存从设备的身份标识。After the master device reads the identity of the slave device, the identity of the slave device can be stored together, so that the next time the same slave device is connected to the master device, the master device reads the identity of the slave device and determines that the slave device has been saved. With this identity, you no longer have to save the slave identity. It can be understood that, of course, the master device can read and save the identity of the slave device each time.

方法实施例三:Method embodiment three:

参见图2,该图为本发明提供的方法实施例三流程图。 Referring to FIG. 2, the figure is a flowchart of Embodiment 3 of a method provided by the present invention.

S201:本实施例中的S201与方法实施例一中的S101相同,在此不再赘述。S201: S201 in this embodiment is the same as S101 in the first embodiment of the method, and details are not described herein again.

S202:所述主设备检测到自身USB接口的电平为第一电平并保持预定时间段时,无法读取通过所述USB接口与主设备连接的从设备的身份标识,则放弃配对。S202: When the master device detects that the level of the USB interface is the first level and maintains the predetermined time period, the identity of the slave device connected to the master device through the USB interface cannot be read, and the pairing is abandoned.

本实施例提供的方法与方法实施例一的区别是:本实施例中,当主设备无法读取从设备的身份标识时,主设备不允许这样的从设备进行配对,以防止非认证的从设备对主设备的损坏。The difference between the method and the method provided in this embodiment is that, in this embodiment, when the master device cannot read the identity of the slave device, the master device does not allow such slave devices to perform pairing to prevent the non-authenticated slave device. Damage to the primary device.

方法实施例四:Method Embodiment 4:

需要说明的是,方法实施例一到方法实施例三均是从主设备侧来描述的自动配对过程。下面以从设备侧来描述自动配对过程。It should be noted that the method embodiment 1 to the method embodiment 3 are the automatic pairing process described from the master device side. The automatic pairing process is described below from the device side.

参见图3a,该图为本发明提供的方法实施例四流程图。Referring to FIG. 3a, the figure is a flowchart of Embodiment 4 of a method provided by the present invention.

S301a:从设备获取所述从设备是否与主设备断开连接;S301a: Obtain, from the device, whether the slave device is disconnected from the master device;

需要说明的是,本实施例中,从设备可以不需要读取和存储主设备的MAC码和串号,即,从设备不需要对主设备进行认证。It should be noted that, in this embodiment, the slave device may not need to read and store the MAC code and the serial number of the master device, that is, the slave device does not need to authenticate the master device.

S302a:如果是,所述从设备打开自身的无线控制开关以实现与主设备的无线连接。S302a: If yes, the slave device turns on its own wireless control switch to implement a wireless connection with the master device.

需要说明的是,本发明实施例中的无线控制开关可以为蓝牙开关或者WIFI开关,但是不局限于这两种类型。It should be noted that the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.

本实施例提供的方法中,从设备与主设备实现无线连接时,从设备只需要判断自身是否与主设备断开连接,当从设备与主设备断开连接时,主设备自动打开自身的无线控制开关以实现与主设备的无线连接。对于从设备实现无线连接的过程要比主设备更简单,从设备可以不需要读取主设备的身份标识,从设备也可以不需要在与主设备相连时做任何动作。这样相对于现有技术中实现无线连接的多步操作更为简单。In the method provided by the embodiment, when the slave device and the master device are wirelessly connected, the slave device only needs to determine whether it is disconnected from the master device. When the slave device is disconnected from the master device, the master device automatically turns on its own wireless device. Control the switch to achieve a wireless connection to the primary device. The process of implementing a wireless connection from a device is simpler than that of a master device. The slave device may not need to read the identity of the master device, and the slave device may not need to perform any action when connected to the master device. This is simpler than the multi-step operation of implementing wireless connections in the prior art.

方法实施例五:Method Embodiment 5:

参见图3,该图为本发明提供的方法实施例五流程图。Referring to FIG. 3, the figure is a flowchart of Embodiment 5 of a method provided by the present invention.

本实施例提供的设备之间自动实现无线连接的方法,包括:The method for automatically implementing a wireless connection between devices provided by this embodiment includes:

S301:从设备检测自身USB接口的电平; S301: The slave device detects a level of the USB interface of the slave device;

S302:当所述USB接口的电平为预定电平并保持第三预定时间段时,所述从设备打开自身的无线控制开关。S302: When the level of the USB interface is a predetermined level and is maintained for a third predetermined period of time, the slave device turns on its own wireless control switch.

需要说明的是,所述第三预定时间段分别与所述第一预定时间段和第二预定时间段可以相同,也可以均不相同。It should be noted that the third predetermined time period may be the same as the first predetermined time period and the second predetermined time period, or may be different.

所述预定电平为所述从设备的USB接口没有与主设备插接在一起的电平状态。即,从设备检测自身的USB接口的电平,当为预定电平时,说明从设备已经从主设备上拔下,从设备打开自身的蓝牙开关或者WIFI开关。The predetermined level is a level state in which the USB interface of the slave device is not plugged together with the master device. That is, the slave device detects the level of its own USB interface. When it is at a predetermined level, it indicates that the slave device has been unplugged from the master device, and the slave device turns on its own Bluetooth switch or WIFI switch.

从设备只需要检测自身USB接口的电平为预定电平并保持第三预定时间段时,打开自身的蓝牙开关或者WIFI开关。The slave device only needs to detect the level of its own USB interface to a predetermined level and maintain the third predetermined time period, and turn on its own Bluetooth switch or WIFI switch.

需要说明的是,以上实施例提供的方法,均是主设备通过检测自身USB的电平来判断从设备与主设备的连接状态,本发明另外一个实施例中提供的方法是,从设备中存储预定的数字序列。主设备可以通过读取该数字序列来判断从设备是否与主设备连接。It should be noted that, in the method provided by the foregoing embodiment, the master device determines the connection state between the slave device and the master device by detecting the level of the USB, and the method provided in another embodiment of the present invention is: A predetermined sequence of numbers. The master device can determine whether the slave device is connected to the master device by reading the sequence of digits.

基于以上实施例提供的一种设备之间自动实现无线连接的方法,本发明实施例还提供了一种自动实现无线连接的设备。Based on the foregoing method for automatically implementing a wireless connection between devices, the embodiment of the present invention further provides an apparatus for automatically implementing a wireless connection.

主设备实施例一:Main device embodiment 1:

首先介绍主设备;First introduce the main device;

参见图4a,该图为本发明提供的主设备实施例一示意图。Referring to FIG. 4a, the figure is a schematic diagram of a first embodiment of a master device provided by the present invention.

本实施例提供的自动实现无线连接的主设备,包括:连接状态获取模块401a、读取模块402a和配对模块403a;The main device for automatically implementing the wireless connection provided in this embodiment includes: a connection state obtaining module 401a, a reading module 402a, and a pairing module 403a;

所述连接状态获取模块401a,用于获取主设备与从设备的连接状态;The connection state obtaining module 401a is configured to acquire a connection state between the master device and the slave device.

所述读取模块402a,用于当所述连接状态获取模块401a获取所述主设备与从设备相连接时,读取所述从设备的身份标识;The reading module 402a is configured to read the identity identifier of the slave device when the connection state obtaining module 401a acquires the master device and the slave device;

需要说明的是,从设备的身份标识可以为物理地址(MAC,Media Access Control)或串号,无论是MAC码还是串号,均是从设备唯一的身份标识,因此主设备可以通过这样的身份标识完成对从设备的认证。It should be noted that the identity of the slave device may be a physical address (MAC, Media Access Control) or a serial number, and the MAC address or the serial number is a unique identifier of the slave device, so the master device can pass such an identity. The identification completes the authentication of the slave device.

所述配对模块403a,用于当所述连接状态获取模块401a获取所述从设备与所述主设备由连接变为断开时,通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。The pairing module 403a is configured to: when the connection state obtaining module 401a acquires that the slave device is disconnected from the master device by the connection, the identifier of the slave device that is read is read by the slave device Pair to achieve a wireless connection.

本发明实施例提供的主设备,当连接状态获取模块401a获取有从设备 相连接时,说明从设备在请求配对,则读取从设备的身份标识。当连接状态获取模块401a获取从设备断开连接时,说明从设备已经拔下,此时读取模块402a通过已经读取的从设备的身份标识与从设备配对以实现无线连接。显然,主设备通过检测从设备与自身的连接状态,便可以自动完成与从设备的无线连接。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者在主设备和从设备上的多步操作,使用者仅需要将从设备与主设备进行一次插拔即可,操作方便简单。The master device provided by the embodiment of the present invention acquires the slave device when the connection state obtaining module 401a acquires When connected, the slave device reads the identity of the slave device when it requests pairing. When the connection state obtaining module 401a acquires the disconnection from the device, it indicates that the slave device has been unplugged, and at this time, the reading module 402a pairs with the slave device through the identity of the slave device that has been read to implement the wireless connection. Obviously, the master device can automatically complete the wireless connection with the slave device by detecting the connection state between the slave device and itself. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's multi-step operation on the master device and the slave device, and the user only needs to perform the plug-in operation of the slave device and the master device at one time, and the operation is convenient and simple.

主设备实施例二:Master device embodiment 2:

参见图4,该图为本发明提供的自动实现无线连接的主设备实施例二示意图。Referring to FIG. 4, it is a schematic diagram of Embodiment 2 of a master device for automatically implementing a wireless connection provided by the present invention.

本实施例提供的主设备,所述连接状态获取模块401a包括:第一USB接口电平检测子模块401a1和第一连接确定子模块401a2;The master device provided by the embodiment, the connection state obtaining module 401a includes: a first USB interface level detecting submodule 401a1 and a first connection determining submodule 401a2;

所述第一USB接口电平检测子模块401a1,用于检测主设备USB接口的电平;The first USB interface level detecting submodule 401a1 is configured to detect a level of a USB interface of the main device;

需要说明的是,当主设备的USB接口没有插接任何器件时,即USB接口处于悬空状态时,USB接口的电平一般为高电平;当有器件插接到主设备的USB接口时,USB接口的电平会产生跳变,例如由高电平变为低电平,只要USB接口一直插接器件,则这个接口的低电平将保持一段时间。当然,主设备插接充电器时,随着时间的增加,USB接口会有电源过来的充电脉冲信号。本发明实施例中的不包括主设备充电的情况。It should be noted that when the USB interface of the master device is not plugged into any device, that is, when the USB interface is in a floating state, the level of the USB interface is generally high; when a device is plugged into the USB interface of the master device, USB The level of the interface will change, for example from high to low, as long as the USB interface is plugged into the device, the low level of this interface will remain for a while. Of course, when the main device is plugged into the charger, as the time increases, the USB interface will have a charging pulse signal from the power source. The case where the main device is charged is not included in the embodiment of the present invention.

所述第一连接确定子模块401a2,用于当所述第一USB接口电平检测子模块401a1获取所述USB接口的电平为第一电平并保持第一预定时间段时,确定所述从设备与主设备相连接。The first connection determining submodule 401a2 is configured to determine, when the first USB interface level detecting submodule 401a1 acquires the level of the USB interface to a first level and maintains a first predetermined time period. The slave device is connected to the master device.

例如,第一电平为低电平,如果USB接口的低电平保持第一预定时间段,则说明USB接口有从设备插接进来,主设备可以读取从设备的身份标识,如果预先没有存储过该身份标识,则进行存储。For example, the first level is a low level. If the low level of the USB interface is maintained for the first predetermined time period, the USB interface is plugged in from the device, and the master device can read the identity of the slave device, if not previously The identity is stored and stored.

所述连接状态获取模块401a还包括:断开确定子模块401a3;The connection state obtaining module 401a further includes: a disconnection determining submodule 401a3;

所述断开确定子模块401a3,当所述第一USB接口电平检测子模块401a1获取所述USB接口的电平由所述第一电平变为第二电平,且所述USB接口的电平为第二电平后保持第二预定时间段时,用于确定所述从设备与 所述主设备由连接变为断开;The disconnect determination sub-module 401a3, when the first USB interface level detecting sub-module 401a1 acquires the level of the USB interface from the first level to the second level, and the USB interface Used to determine the slave device when the level is the second level and then remain for the second predetermined time period The master device becomes disconnected from the connection;

所述第一电平与第二电平的电平状态相反。The first level is opposite to the level of the second level.

本实施例提供的主设备,所述配对模块具体用于:The master device provided in this embodiment, the pairing module is specifically configured to:

当所述连接状态获取模块确定所述从设备与主设备由连接变为断开时,打开自身的无线控制开关,并通过读取到的所述从设备的身份标识进行与所述从设备配对以实现无线连接。When the connection state obtaining module determines that the slave device is disconnected from the master device by the connection, turns on the wireless control switch of the slave device, and performs pairing with the slave device by using the read identity of the slave device. To achieve a wireless connection.

需要说明的是,本发明实施例中的无线控制开关可以为蓝牙开关或者WIFI开关,但是不局限于这两种类型。It should be noted that the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.

例如,USB接口的电平由第一电平跳变为第二电平,第二电平为高电平,并且该高电平保持第二预定时间段,则说明USB接口插接的从设备已经拔出。接下来需要打开蓝牙开关或者WIFI开关,完成与从设备的配对。For example, the level of the USB interface changes from the first level to the second level, the second level is the high level, and the high level remains for the second predetermined period of time, indicating the slave device that is plugged into the USB interface. Has been pulled out. Next, you need to turn on the Bluetooth switch or WIFI switch to complete the pairing with the slave device.

需要说明的是,所述第一预定时间段和第二预定时间段均是预定的时间段,两者可以相等,也可以不相等。It should be noted that the first predetermined time period and the second predetermined time period are both predetermined time periods, and the two may be equal or not equal.

综上所述,本发明提供的自动实现无线连接的主设备,只需要检测自身USB接口的电平,就可以来判断是否有从设备插接,当判断有从设备插接时,说明从设备在请求配对,则读取并存储从设备的身份标识,完成预配对。当检测USB电平变为另一种电平并保持预定时间时,说明从设备已经拔下,此时打开自己的蓝牙开关或者WIFI开关,自动完成配对。显然,本申请提供的设备,通过检测自身USB的电平变化,便可以自动完成与从设备的蓝牙配对或者WIFI配对。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者的操作,使用者仅需要将从设备与主设备进行一次插拔即可,方便简单。In summary, the main device for automatically implementing the wireless connection provided by the present invention only needs to detect the level of its own USB interface, and can determine whether there is a slave device. When it is determined that there is a slave device, the slave device is described. Upon requesting pairing, the identity of the slave device is read and stored to complete the pre-pairing. When it is detected that the USB level changes to another level and remains for a predetermined time, it indicates that the slave device has been unplugged, and at this time, its own Bluetooth switch or WIFI switch is turned on to automatically complete the pairing. Obviously, the device provided by the present application can automatically complete the Bluetooth pairing or WIFI pairing with the slave device by detecting the level change of the USB itself. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's operation, and the user only needs to insert and remove the slave device and the master device at one time, which is convenient and simple.

需要说明的是,对于本发明实施例提供的设备,需要通过数据线与从设备插接在一起,然后拔出,插拔的过程中主设备会检测到自身USB接口电平的变化;这个数据线只传输信号,不传输电流,识别的是一个电平的变化,因此,区别于电源线。或者主设备和从设备可以直接插接在一起,不需要任何数据线,两者的接口是互相匹配的。It should be noted that, for the device provided by the embodiment of the present invention, the data device needs to be plugged together with the slave device, and then pulled out, and the master device detects the change of the level of the USB interface of the device in the process of plugging and unplugging; The line only transmits the signal, does not transmit current, and recognizes a level change, so it is different from the power line. Or the master device and the slave device can be directly plugged together without any data lines, and the interfaces of the two are matched to each other.

设备实施例三:Equipment Embodiment 3:

参见图5,该图为本发明提供的主设备实施例三示意图。Referring to FIG. 5, the figure is a schematic diagram of Embodiment 3 of a main device provided by the present invention.

本实施例提供的设备,还包括:放弃模块501; The device provided in this embodiment further includes: a discarding module 501;

所述放弃模块501,当所述读取模块无法通过所述USB接口读取从设备的身份标识时,用于放弃配对。The discarding module 501 is configured to abandon the pairing when the reading module cannot read the identity of the slave device through the USB interface.

本实施例中,当主设备无法读取从设备的身份标识时,主设备不允许这样的从设备进行配对,以防止非认证的从设备对主设备的损坏。In this embodiment, when the master device cannot read the identity of the slave device, the master device does not allow such slave devices to perform pairing to prevent damage to the master device by the non-authenticated slave device.

从设备实施例一:Slave device example one:

本实施例提供的设备为从设备;The device provided in this embodiment is a slave device;

参见图5a,该图为本发明提供的从设备实施例一示意图。Referring to FIG. 5a, FIG. 5 is a schematic diagram of a first embodiment of a slave device provided by the present invention.

本实施例提供的自动实现无线连接的从设备,包括:获取模块501a和无线控制开关打开模块501b;The slave device that automatically implements the wireless connection provided in this embodiment includes: an obtaining module 501a and a wireless control switch opening module 501b;

所述获取模块501a,用于获取从设备与主设备的连接状态;The obtaining module 501a is configured to acquire a connection state between the slave device and the master device.

需要说明的是,本实施例中,从设备不需要读取和存储主设备的MAC码和串号,即,从设备不需要对主设备进行认证。It should be noted that, in this embodiment, the slave device does not need to read and store the MAC code and the serial number of the master device, that is, the slave device does not need to authenticate the master device.

所述无线控制开关打开模块501b,用于当所述获取模块501a获取到从设备与主设备断开连接时,打开自身的无线控制开关以实现与主设备的无线连接。The wireless control switch opening module 501b is configured to open its own wireless control switch to implement wireless connection with the master device when the acquiring module 501a acquires that the slave device is disconnected from the master device.

需要说明的是,本发明实施例中的无线控制开关可以为蓝牙开关或者WIFI开关,但是不局限于这两种类型。It should be noted that the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.

本实施例提供的从设备,从设备与主设备实现无线连接时,从设备只需要判断自身是否与主设备断开连接,当从设备与主设备断开连接时,主设备自动打开自身的无线控制开关以实现与主设备的无线连接。对于从设备实现无线连接的过程要比主设备更简单,从设备不需要读取主设备的身份标识,从设备不需要在与主设备相连时做任何动作。这样相对于现有技术中实现无线连接的多步操作更为简单。When the slave device provides a wireless connection between the slave device and the master device, the slave device only needs to determine whether it is disconnected from the master device. When the slave device is disconnected from the master device, the master device automatically turns on its own wireless device. Control the switch to achieve a wireless connection to the primary device. The process of implementing a wireless connection from a device is simpler than that of a master device. The slave device does not need to read the identity of the master device, and the slave device does not need to do anything when connected to the master device. This is simpler than the multi-step operation of implementing wireless connections in the prior art.

从设备实施例二:Slave device embodiment 2:

参见图6,该图为本发明提供的从设备实施例二示意图。Referring to FIG. 6, which is a schematic diagram of a second embodiment of a slave device provided by the present invention.

所述获取模块501a包括:第二USB接口电平检测子模块501a1和第二连接确定子模块501a2;The obtaining module 501a includes: a second USB interface level detecting submodule 501a1 and a second connection determining submodule 501a2;

所述第二USB接口电平检测子模块501a1,用于检测从设备USB接口的电平; The second USB interface level detecting submodule 501a1 is configured to detect a level of the slave device USB interface;

所述第二连接确定子模块501a2,用于当所述第二USB接口电平检测子模块501a1所述USB接口的电平为预定电平并保持第三预定时间段时,确定所述从设备与所述主设备断开连接。The second connection determining submodule 501a2 is configured to determine the slave device when the level of the USB interface of the second USB interface level detecting submodule 501a1 is a predetermined level and is maintained for a third predetermined time period. Disconnected from the master device.

需要说明的是,所述第三预定时间段分别与所述第一预定时间段和第二预定时间段可以相同,也可以均不相同。It should be noted that the third predetermined time period may be the same as the first predetermined time period and the second predetermined time period, or may be different.

所述预定电平为所述从设备的USB接口没有与主设备插接在一起的电平状态。即,从设备已经从主设备上拔下后,从设备检测自身的USB接口的电平,当为预定电平时,说明预配对完成,打开自身的蓝牙开关或者WIFI开关。The predetermined level is a level state in which the USB interface of the slave device is not plugged together with the master device. That is, after the slave device has been unplugged from the master device, the slave device detects the level of its own USB interface. When it is at a predetermined level, it indicates that the pre-pairing is completed, and turns on its own Bluetooth switch or WIFI switch.

需要说明的是,本实施例中,从设备不需要读取和存储主设备的MAC码和串号,即,从设备不需要对主设备进行认证。从设备只需要检测自身USB接口的电平为预定电平并保持第三预定时间段时,打开自身的蓝牙开关或者WIFI开关即可。It should be noted that, in this embodiment, the slave device does not need to read and store the MAC code and the serial number of the master device, that is, the slave device does not need to authenticate the master device. When the slave device only needs to detect the level of its own USB interface to a predetermined level and maintain the third predetermined time period, it can turn on its own Bluetooth switch or WIFI switch.

基于以上实施例提供的一种设备之间自动实现无线连接的方法和设备,本发明实施例还提供了一种自动实现无线连接的系统。Based on the method and device for automatically implementing a wireless connection between devices according to the foregoing embodiments, an embodiment of the present invention further provides a system for automatically implementing a wireless connection.

系统实施例一:System embodiment one:

参见图7,该图为本发明提供的设备之间自动实现无线连接的系统实施例一示意图。Referring to FIG. 7, FIG. 7 is a schematic diagram of a first embodiment of a system for automatically implementing wireless connection between devices provided by the present invention.

本实施例提供的设备之间自动实现无线连接的系统,包括:主设备700和从设备800;The system for automatically implementing wireless connection between the devices provided in this embodiment includes: a master device 700 and a slave device 800;

所述主设备700,用于检测自身USB接口的电平;当所述USB接口的电平为第一电平并保持第一预定时间段时,读取通过所述USB接口连接的从设备800的身份标识;判断所述从设备800的身份标识是否已经存储,如果否则进行存储;当所述USB接口的电平由所述第一电平跳变为第二电平,且第二电平并保持第二预定时间段时,打开自身的无线控制开关,并通过已经存储的所述从设备800的身份标识完成与从设备800的配对;所述第一电平与第二电平的电平状态相反;The master device 700 is configured to detect a level of the USB interface of the USB device, and read the slave device 800 connected through the USB interface when the level of the USB interface is at the first level and is maintained for the first predetermined time period. Identity of the slave device 800 is determined whether the identity of the slave device 800 has been stored, if otherwise stored; when the level of the USB interface is changed from the first level to the second level, and the second level And maintaining the second predetermined time period, turning on its own wireless control switch, and completing the pairing with the slave device 800 through the already stored identity of the slave device 800; the first level and the second level of power The opposite state;

需要说明的是,本发明实施例中的无线控制开关可以为蓝牙开关或者WIFI开关,但是不局限于这两种类型。It should be noted that the wireless control switch in the embodiment of the present invention may be a Bluetooth switch or a WIFI switch, but is not limited to these two types.

需要说明的是,当主设备的USB接口没有插接任何器件时,即USB 接口处于悬空状态时,USB接口的电平一般为高电平;当有器件插接到主设备的USB接口时,USB接口的电平会产生跳变,例如由高电平变为低电平,只要USB接口一直插接器件,则这个接口的低电平将保持一段时间。当然,主设备插接充电器时,随着时间的增加,USB接口会有电源过来的充电脉冲信号。本发明实施例中的不属于主设备充电的情况。It should be noted that when the USB interface of the master device is not plugged in any device, that is, USB When the interface is in the floating state, the level of the USB interface is generally high; when a device is plugged into the USB interface of the master device, the level of the USB interface will jump, for example, from a high level to a low level. As long as the USB interface is plugged into the device, the low level of this interface will remain for a while. Of course, when the main device is plugged into the charger, as the time increases, the USB interface will have a charging pulse signal from the power source. The case in the embodiment of the present invention does not belong to the charging of the master device.

例如,第一电平为低电平,如果USB接口的低电平保持第一预定时间段,则说明USB接口有从设备插接进来,主设备可以读取从设备的身份标识,如果预先没有存储过该身份标识,则进行存储。For example, the first level is a low level. If the low level of the USB interface is maintained for the first predetermined time period, the USB interface is plugged in from the device, and the master device can read the identity of the slave device, if not previously The identity is stored and stored.

例如,第二电平为高电平,并且该高电平保持第二预定时间段,则说明USB接口插接的从设备已经拔出,此时已经完成了预配对的过程。接下来需要打开蓝牙开关或者WIFI开关,完成与从设备的配对。For example, if the second level is a high level and the high level is maintained for a second predetermined period of time, then the slave device to which the USB interface is plugged in has been unplugged, and the pre-pairing process has been completed. Next, you need to turn on the Bluetooth switch or WIFI switch to complete the pairing with the slave device.

需要说明的是,所述第一预定时间段和第二预定时间段均是预定的时间段,两者可以相等,也可以不相等。It should be noted that the first predetermined time period and the second predetermined time period are both predetermined time periods, and the two may be equal or not equal.

所述从设备800,用于检测自身USB接口的电平;当所述USB接口的电平为预定电平并保持第三预定时间段时,所述从设备打开自身的无线控制开关。The slave device 800 is configured to detect a level of the USB interface of the user; when the level of the USB interface is a predetermined level and is maintained for a third predetermined period of time, the slave device turns on its own wireless control switch.

需要说明的是,所述第三预定时间段分别与所述第一预定时间段和第二预定时间段可以相同,也可以均不相同。It should be noted that the third predetermined time period may be the same as the first predetermined time period and the second predetermined time period, or may be different.

所述预定电平为所述从设备的USB接口没有与主设备插接在一起的电平状态。即,从设备已经从主设备上拔下后,从设备检测自身的USB接口的电平,当为预定电平时,说明预配对完成,打开自身的蓝牙开关或者WIFI开关。The predetermined level is a level state in which the USB interface of the slave device is not plugged together with the master device. That is, after the slave device has been unplugged from the master device, the slave device detects the level of its own USB interface. When it is at a predetermined level, it indicates that the pre-pairing is completed, and turns on its own Bluetooth switch or WIFI switch.

需要说明的是,本实施例中,从设备不需要读取和存储主设备的MAC码和串号,即,从设备不需要对主设备进行认证。从设备只需要检测自身USB接口的电平为预定电平并保持第三预定时间段时,打开自身的蓝牙开关或者WIFI开关。It should be noted that, in this embodiment, the slave device does not need to read and store the MAC code and the serial number of the master device, that is, the slave device does not need to authenticate the master device. The slave device only needs to detect the level of its own USB interface to a predetermined level and maintain the third predetermined time period, and turn on its own Bluetooth switch or WIFI switch.

综上所述,本发明提供的系统,主设备只需要检测自身USB接口的电平,就可以来判断是否有从设备插接,当判断有从设备插接时,说明从设备在请求配对,则读取并存储从设备的身份标识,完成预配对。当检测USB电平变为另一种电平并保持预定时间时,说明从设备已经拔下,此时主设备打开自己的蓝牙开关或者WIFI开关,自动完成配对。显然,本申请提供 的系统,主设备通过检测自身USB的电平变化,便可以自动完成与从设备的蓝牙配对或者WIFI配对。不必像现有技术那样,需要使用者操作很多步骤才能实现配对。这样可以释放使用者的操作,使用者仅需要将从设备与主设备进行一次插拔即可,方便简单。In summary, in the system provided by the present invention, the master device only needs to detect the level of the USB interface, and can determine whether there is a slave device. When it is determined that the slave device is plugged in, it indicates that the slave device is requesting pairing. Then read and store the identity of the slave device to complete the pre-pairing. When it is detected that the USB level changes to another level and remains for a predetermined time, it indicates that the slave device has been unplugged, and the master device turns on its own Bluetooth switch or WIFI switch to automatically complete the pairing. Obviously, this application provides The system, the master device can automatically complete the Bluetooth pairing or WIFI pairing with the slave device by detecting the level change of its own USB. There is no need for the user to operate many steps to achieve pairing as in the prior art. This can release the user's operation, and the user only needs to insert and remove the slave device and the master device at one time, which is convenient and simple.

系统实施例二:System Embodiment 2:

参见图8,该图为本发明提供的系统实施例二示意图。Referring to FIG. 8, the figure is a schematic diagram of a second embodiment of a system provided by the present invention.

本实施例提供的设备之间自动实现无线连接的系统,还包括:数据线900;The system for automatically implementing the wireless connection between the devices provided in this embodiment further includes: a data line 900;

所述从设备800通过所述数据线900与所述主设备700插接在一起。然后拔出,插拔的过程中主设备700会检测到自身USB接口电平的变化;The slave device 800 is plugged into the master device 700 through the data line 900. Then, the main device 700 detects the change of the level of its own USB interface during the process of plugging and unplugging;

需要说明的是,这个数据线只传输信号,不传输电流,主设备识别的是一个电平的变化,因此,区别于电源线。It should be noted that this data line only transmits signals, does not transmit current, and the master device recognizes a level change, and therefore, is different from the power line.

需要说明的是,在本发明提供的系统另一个实施例中,也可以不需要数据线,而是主设备和从设备直接插接在一起,主设备和从设备的接口是互相匹配的。It should be noted that, in another embodiment of the system provided by the present invention, the data line may not be needed, but the master device and the slave device are directly plugged together, and the interfaces of the master device and the slave device are matched with each other.

需要说明的是,所述主设备700,还用于检测到自身USB接口的电平为第一电平并保持预定时间段时,无法读取通过所述USB接口与主设备连接的从设备的身份标识,则放弃与所述从设备的配对。It should be noted that, when the master device 700 is further configured to detect that the level of the USB interface is the first level and maintain the predetermined time period, the slave device connected to the master device through the USB interface cannot be read. Identity, then abandon the pairing with the slave device.

本实施例中,当主设备无法读取从设备的身份标识时,主设备不允许这样的从设备进行配对,以防止非认证的从设备对主设备的损坏。In this embodiment, when the master device cannot read the identity of the slave device, the master device does not allow such slave devices to perform pairing to prevent damage to the master device by the non-authenticated slave device.

本发明实施例还提供了一种设备,下面结合附图来详细介绍其组成。The embodiment of the invention further provides an apparatus, and the composition thereof is described in detail below with reference to the accompanying drawings.

参见图9,本发明提供的主设备结构示意图。Referring to FIG. 9, a schematic structural diagram of a main device provided by the present invention is shown.

本发明实施例涉及的主设备,所述主设备可以包括蓝牙耳机、手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等。The master device involved in the embodiment of the present invention may include a Bluetooth headset, a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the like.

以主设备为手机为例,图9示出的是与本发明实施例相关的手机1000的部分结构的框图。Taking the host device as a mobile phone as an example, FIG. 9 is a block diagram showing a part of the structure of the mobile phone 1000 related to the embodiment of the present invention.

参考图9,手机1000包括处理器1000a、输入单元1000b、显示单元1000c、存储器1000d和电池1000e。Referring to FIG. 9, the mobile phone 1000 includes a processor 1000a, an input unit 1000b, a display unit 1000c, a memory 1000d, and a battery 1000e.

处理器1000a是手机1000的控制中心,利用各种接口和线路连接整个 手机的各个部分,通过运行或执行存储在存储器1000d内的软件程序和/或模块,以及调用存储在存储器1000d内的数据,执行手机1000的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1000a可包括一个或多个处理单元;优选的,处理器1000a可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1000a中。The processor 1000a is a control center of the mobile phone 1000, and connects the entire interface by using various interfaces and lines. The various parts of the handset perform overall monitoring of the handset by running or executing software programs and/or modules stored in the memory 1000d, as well as invoking data stored in the memory 1000d, performing various functions and processing data of the handset 1000. Optionally, the processor 1000a may include one or more processing units; preferably, the processor 1000a may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 1000a.

本实施例中,主设备的处理器1000a获取到从设备与所述主设备相连接时,所述主设备读取所述从设备的身份标识;当所述主设备的处理器1000a获取到所述从设备与所述主设备由连接变为断开时,所述主设备的处理器1000a通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。In this embodiment, when the processor 1000a of the master device acquires that the slave device is connected to the master device, the master device reads the identity of the slave device; when the processor 1000a of the master device obtains the location When the slave device and the master device are disconnected from being connected, the processor 1000a of the master device pairs with the slave device by reading the identity of the slave device to achieve a wireless connection.

需要说明的是,在另一个主设备实施例中,还包括USB接口1000f,处理器1000a通过检测USB接口1000f的电平来判断是否有从设备与主设备相连接。当所述USB接口1000f的电平为第一电平并保持第一预定时间段时,读取通过所述USB接口1000f与主设备连接的从设备的身份标识;判断所述从设备的身份标识是否已经存储,如果否则进行存储;当所述USB接口1000f的电平由所述第一种电平跳变为第二电平,且第二电平保持第二预定时间段时,主设备打开自身的无线控制开关,并通过已经存储的所述从设备的身份标识完成与从设备的配对;所述第一电平与第二电平的电平状态相反。It should be noted that, in another main device embodiment, the USB interface 1000f is further included, and the processor 1000a determines whether the slave device is connected to the master device by detecting the level of the USB interface 1000f. Reading the identity of the slave device connected to the master device through the USB interface 1000f when the level of the USB interface 1000f is at the first level and maintaining the first predetermined time period; determining the identity of the slave device Whether it has been stored, if otherwise stored; when the level of the USB interface 1000f jumps from the first level to the second level, and the second level remains for the second predetermined time period, the master device turns on Its own wireless control switch completes pairing with the slave device through the identity of the slave device that has been stored; the first level is opposite to the level state of the second level.

在本发明提供的另一个主设备实施例中,处理器1000a通过USB接口1000f读取从设备中的数字序列,来判断从设备是否与主设备相连接。当处理器1000a通过USB接口1000f读取到数字序列时,说明从设备与主设备相连接,当没有读取到数字序列时,说明从设备与主设备断开连接。In another main device embodiment provided by the present invention, the processor 1000a reads the digital sequence in the slave device through the USB interface 1000f to determine whether the slave device is connected to the master device. When the processor 1000a reads the digital sequence through the USB interface 1000f, it indicates that the slave device is connected to the master device, and when the digital sequence is not read, the slave device is disconnected from the master device.

输入单元1000b可用于接收输入的数字或字符信息,以及产生与手机1000的用户设置以及功能控制有关的键信号输入。The input unit 1000b can be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1000.

具体地,输入单元1000b可包括触控面板1000b1以及其他输入设备1000b2。触控面板1000b1,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1000b1上或在触控面板1000b1附近的操作),并根据预先设定的程式驱动 相应的连接装置。可选的,触控面板1000b1可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1000a,并能接收处理器1000a发来的命令并加以执行。Specifically, the input unit 1000b may include the touch panel 1000b1 and other input devices 1000b2. The touch panel 1000b1, also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 1000b1 or near the touch panel 1000b1. Operation) and driven according to a preset program Corresponding connection device. Optionally, the touch panel 1000b1 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 1000a is provided and can receive commands from the processor 1000a and execute them.

此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1000b1。In addition, the touch panel 1000b1 can be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.

除了触控面板1000b1,输入单元1000b还可以包括其他输入设备1000b2。具体地,其他输入设备1000b2可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。In addition to the touch panel 1000b1, the input unit 1000b may further include other input devices 1000b2. Specifically, the other input device 1000b2 may include, but is not limited to, one or more of a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.

显示单元1000c可用于显示由用户输入的信息或提供给用户的信息以及手机1000的各种菜单。The display unit 1000c can be used to display information input by the user or information provided to the user and various menus of the mobile phone 1000.

显示单元1000c可包括显示面板1000c1,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板1000c1。The display unit 1000c1 may include a display panel 1000c1. Alternatively, the display panel 1000c1 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.

进一步的,触控面板1000b1可覆盖显示面板1000c1,当触控面板1000b1检测到在其上或附近的触摸操作后,传送给处理器1000a以确定触摸事件的类型,随后处理器1000a根据触摸事件的类型在显示面板1000c1上提供相应的视觉输出。Further, the touch panel 1000b1 may cover the display panel 1000c1, and when the touch panel 1000b1 detects a touch operation thereon or nearby, the touch panel 1000b1 transmits to the processor 1000a to determine the type of the touch event, and then the processor 1000a according to the touch event. The type provides a corresponding visual output on display panel 1000c1.

虽然在图9中,触控面板1000b1与显示面板1000c1是作为两个独立的部件来实现手机1000的输入和输入功能,但是在某些实施例中,可以将触控面板1000b1与显示面板1000c1集成而实现手机100的输入和输出功能。Although the touch panel 1000b1 and the display panel 1000c1 are used as two independent components to implement the input and input functions of the mobile phone 1000 in FIG. 9, in some embodiments, the touch panel 1000b1 and the display panel 1000c1 may be integrated. The input and output functions of the mobile phone 100 are implemented.

本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,该程序在执行时,可以包括前述的通信方法各个实施方式的内容。这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。 A person skilled in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program instructing related hardware, and the program can be stored in a computer readable storage medium. The content of each embodiment of the aforementioned communication method may be included. The storage medium referred to herein is, for example, a ROM/RAM, a magnetic disk, an optical disk, or the like.

Claims (12)

一种设备之间自动实现无线连接的方法,其特征在于,包括:A method for automatically implementing a wireless connection between devices, comprising: 当主设备获取到从设备与所述主设备相连接时,所述主设备读取所述从设备的身份标识;When the master device acquires the slave device to connect with the master device, the master device reads the identity identifier of the slave device; 当所述主设备获取到所述从设备与所述主设备由连接变为断开时,所述主设备通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。When the master device acquires that the slave device is disconnected from the master device by the connection, the master device pairs with the slave device by using the read identity of the slave device to implement a wireless connection. 根据权利要求1所述的设备之间自动实现无线连接的方法,其特征在于,所述主设备通过以下方式获取到所述从设备与所述主设备相连接:The method for automatically implementing a wireless connection between devices according to claim 1, wherein the master device obtains the slave device to be connected to the master device by: 所述主设备检测自身USB接口的电平;The master device detects the level of its own USB interface; 当所述USB接口的电平为第一电平并保持第一预定时间段时,所述主设备获取到所述从设备与所述主设备相连接。When the level of the USB interface is at a first level and is maintained for a first predetermined period of time, the master device acquires that the slave device is connected to the master device. 根据权利要求2所述的设备之间自动实现无线连接的方法,其特征在于,所述主设备通过以下方式获取到所述从设备与所述主设备由连接变为断开:The method for automatically implementing a wireless connection between devices according to claim 2, wherein the master device obtains that the slave device is disconnected from the master device by a connection in the following manner: 当所述USB接口的电平由所述第一电平变为第二电平,且所述USB接口的电平为第二电平后保持第二预定时间段时,所述主设备获取到所述从设备与所述主设备由连接变为断开;When the level of the USB interface is changed from the first level to the second level, and the level of the USB interface is the second level, and the second predetermined time period is maintained, the master device acquires The slave device is disconnected from the master device by a connection; 所述第一电平与第二电平的电平状态相反。The first level is opposite to the level of the second level. 根据权利要求1-3任一所述的设备之间自动实现无线连接的方法,其特征在于,所述主设备通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接,包括:The method for automatically implementing a wireless connection between devices according to any one of claims 1-3, wherein the master device pairs with the slave device by using the read identity of the slave device to implement wireless connection. ,include: 所述主设备打开自身的无线控制开关,并通过读取到的所述从设备的身份标识进行与所述从设备配对以实现无线连接。The master device turns on its own wireless control switch, and performs pairing with the slave device through the read identity of the slave device to implement a wireless connection. 一种设备之间自动实现无线连接的方法,其特征在于,包括:A method for automatically implementing a wireless connection between devices, comprising: 从设备获取所述从设备是否与主设备断开连接;Obtaining, from the device, whether the slave device is disconnected from the master device; 如果是,所述从设备打开自身的无线控制开关以实现与主设备的无线连接。If so, the slave device turns on its own wireless control switch to enable a wireless connection with the master device. 根据权利要求5所述的设备之间自动实现无线连接的方法,其特征在于,所述从设备通过以下方式获取所述从设备是否与主设备断开连接:The method for automatically implementing a wireless connection between devices according to claim 5, wherein the slave device obtains whether the slave device is disconnected from the master device by: 所述从设备检测自身USB接口的电平; The slave device detects a level of its own USB interface; 当所述USB接口的电平为预定电平并保持第三预定时间段时,所述从设备获取到所述从设备与所述主设备断开连接。When the level of the USB interface is a predetermined level and is maintained for a third predetermined period of time, the slave device acquires that the slave device is disconnected from the master device. 一种自动实现无线连接的主设备,其特征在于,包括:连接状态获取模块、读取模块和配对模块;A master device for automatically implementing a wireless connection, comprising: a connection state acquisition module, a reading module, and a pairing module; 所述连接状态获取模块,用于获取主设备与从设备的连接状态;The connection state obtaining module is configured to acquire a connection state between the master device and the slave device; 所述读取模块,用于当所述连接状态获取模块获取所述主设备与从设备相连接时,读取所述从设备的身份标识;The reading module is configured to read an identity identifier of the slave device when the connection state acquiring module acquires that the master device is connected to the slave device; 所述配对模块,用于当所述连接状态获取模块获取所述从设备与所述主设备由连接变为断开时,通过读取的所述从设备的身份标识与所述从设备配对以实现无线连接。The pairing module is configured to: when the connection state acquisition module acquires that the slave device is disconnected from the master device by a connection, the identity of the slave device that is read is paired with the slave device to Implement a wireless connection. 根据权利要求7所述的自动实现无线连接的主设备,其特征在于,所述连接状态获取模块包括:第一USB接口电平检测子模块和第一连接确定子模块;The master device for automatically implementing wireless connection according to claim 7, wherein the connection state obtaining module comprises: a first USB interface level detecting submodule and a first connection determining submodule; 所述第一USB接口电平检测子模块,用于检测主设备USB接口的电平;The first USB interface level detecting submodule is configured to detect a level of a USB interface of the main device; 所述第一连接确定子模块,用于当所述第一USB接口电平检测子模块获取所述USB接口的电平为第一电平并保持第一预定时间段时,确定所述从设备与主设备相连接。The first connection determining submodule, configured to determine the slave device when the first USB interface level detecting submodule acquires the level of the USB interface to a first level and maintains a first predetermined time period Connect to the main unit. 根据权利要求8所述的自动实现无线连接的主设备,其特征在于,所述连接状态获取模块还包括:断开确定子模块;The master device for automatically implementing wireless connection according to claim 8, wherein the connection state obtaining module further comprises: a disconnection determining submodule; 所述断开确定子模块,用于当所述第一USB接口电平检测子模块获取所述USB接口的电平由所述第一电平变为第二电平,且所述USB接口的电平为第二电平后保持第二预定时间段时,确定所述从设备与主设备由连接变为断开;The disconnection determining submodule is configured to: when the first USB interface level detecting submodule acquires the level of the USB interface from the first level to a second level, and the USB interface When the level is the second level and remains for the second predetermined time period, it is determined that the slave device is disconnected from the master device by the connection; 所述第一电平与第二电平的电平状态相反。The first level is opposite to the level of the second level. 根据权利要求7-9任一项所述的自动实现无线连接的主设备,其特征在于,所述配对模块具体用于:The master device for automatically implementing wireless connection according to any one of claims 7-9, wherein the pairing module is specifically configured to: 当所述连接状态获取模块确定所述从设备与主设备由连接变为断开时,打开自身的无线控制开关,并通过读取到的所述从设备的身份标识进行与所述从设备配对以实现无线连接。When the connection state obtaining module determines that the slave device is disconnected from the master device by the connection, turns on the wireless control switch of the slave device, and performs pairing with the slave device by using the read identity of the slave device. To achieve a wireless connection. 一种自动实现无线连接的从设备,其特征在于,包括:获取模块和无线控制开关打开模块; A slave device that automatically implements a wireless connection, comprising: an acquisition module and a wireless control switch opening module; 所述获取模块,用于获取从设备与主设备的连接状态;The obtaining module is configured to acquire a connection state between the slave device and the master device; 所述无线控制开关打开模块,用于当所述获取模块获取到从设备与主设备断开连接时,打开自身的无线控制开关以实现与主设备的无线连接。The wireless control switch opening module is configured to open a wireless control switch of the wireless device to implement wireless connection with the master device when the acquiring module acquires that the slave device is disconnected from the master device. 根据权利要求11所述的自动实现无线连接的从设备,其特征在于,所述获取模块包括:第二USB接口电平检测子模块和第二连接确定子模块;The slave device for automatically implementing wireless connection according to claim 11, wherein the obtaining module comprises: a second USB interface level detecting submodule and a second connection determining submodule; 所述第二USB接口电平检测子模块,用于检测从设备USB接口的电平;The second USB interface level detecting submodule is configured to detect a level of the slave device USB interface; 所述第二连接确定子模块,用于当所述第二USB接口电平检测子模块所述USB接口的电平为预定电平并保持第三预定时间段时,确定所述从设备与所述主设备断开连接。 The second connection determining submodule is configured to determine the slave device and the device when the level of the USB interface of the second USB interface level detecting submodule is a predetermined level and is maintained for a third predetermined time period The master device is disconnected.
PCT/CN2014/088175 2013-10-10 2014-10-09 Method and device for automatically implementing wireless connection between devices Ceased WO2015051742A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310469845.0 2013-10-10
CN201310469845.0A CN103561478A (en) 2013-10-10 2013-10-10 Method and device for automatically achieving wireless connection between devices

Publications (1)

Publication Number Publication Date
WO2015051742A1 true WO2015051742A1 (en) 2015-04-16

Family

ID=50015580

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088175 Ceased WO2015051742A1 (en) 2013-10-10 2014-10-09 Method and device for automatically implementing wireless connection between devices

Country Status (2)

Country Link
CN (1) CN103561478A (en)
WO (1) WO2015051742A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561478A (en) * 2013-10-10 2014-02-05 华为终端有限公司 Method and device for automatically achieving wireless connection between devices
CN108174376B (en) * 2017-12-28 2021-01-01 飞天诚信科技股份有限公司 A method and system for preventing interference
TWI710911B (en) * 2019-05-02 2020-11-21 緯創資通股份有限公司 Electronic system, host device and control method
CN114158025B (en) * 2022-02-09 2022-06-14 荣耀终端有限公司 Device reconnection method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060068760A1 (en) * 2004-08-31 2006-03-30 Hameed Muhammad F System and method for pairing dual mode wired/wireless devices
CN101645727A (en) * 2008-08-04 2010-02-10 达方电子股份有限公司 Quick connection method of Bluetooth device and input device capable of quick connection
CN102833021A (en) * 2012-09-11 2012-12-19 Tcl通力电子(惠州)有限公司 Bluetooth pairing method and system in test
CN103167366A (en) * 2011-12-15 2013-06-19 鸿富锦精密工业(深圳)有限公司 Bluetooth headset and Bluetooth headset pairing method
CN103402011A (en) * 2013-07-29 2013-11-20 深圳市金立通信设备有限公司 Bluetooth device matching method, Bluetooth device and mobile terminal
CN103561478A (en) * 2013-10-10 2014-02-05 华为终端有限公司 Method and device for automatically achieving wireless connection between devices

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212241A (en) * 2006-12-28 2008-07-02 摩托罗拉公司 Wireless head-band earphone operating method
EP3119101B1 (en) * 2009-04-01 2018-05-23 Oticon A/s Pairing wireless devices
CN102983890B (en) * 2012-11-14 2015-08-12 小米科技有限责任公司 A kind of method that device pairing connects and device
CN103311766B (en) * 2013-05-15 2017-02-15 深圳市文鼎创数据科技有限公司 Mobile equipment switching device and working mode switching method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060068760A1 (en) * 2004-08-31 2006-03-30 Hameed Muhammad F System and method for pairing dual mode wired/wireless devices
CN101645727A (en) * 2008-08-04 2010-02-10 达方电子股份有限公司 Quick connection method of Bluetooth device and input device capable of quick connection
CN103167366A (en) * 2011-12-15 2013-06-19 鸿富锦精密工业(深圳)有限公司 Bluetooth headset and Bluetooth headset pairing method
CN102833021A (en) * 2012-09-11 2012-12-19 Tcl通力电子(惠州)有限公司 Bluetooth pairing method and system in test
CN103402011A (en) * 2013-07-29 2013-11-20 深圳市金立通信设备有限公司 Bluetooth device matching method, Bluetooth device and mobile terminal
CN103561478A (en) * 2013-10-10 2014-02-05 华为终端有限公司 Method and device for automatically achieving wireless connection between devices

Also Published As

Publication number Publication date
CN103561478A (en) 2014-02-05

Similar Documents

Publication Publication Date Title
US11057376B2 (en) Method, apparatus, and system for controlling intelligent device, and storage medium
US9258402B2 (en) System and method for controlling mobile devices
EP3873004B1 (en) Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device
CN104335497B (en) Method and device for automatic connection of bluetooth human interface devices
CN104838558B (en) Apparatus and method for using a wireless charger in a wireless docking environment
US11184754B2 (en) Data sharing method and terminal
US8750799B2 (en) Wireless accessory device pairing determination for multiple host devices
US20120083208A1 (en) Wireless accessory device pairing transfer between multiple host devices
CN103210383A (en) Wireless accessory device pairing transfer between multiple host devices
WO2018076604A1 (en) Bluetooth pairing method and terminal device
WO2018209555A1 (en) Bluetooth device connection method and terminal device
CN106454810A (en) A method and terminal equipment for establishing a hotspot
EP3585127B1 (en) Wireless communication-based connection method and terminal
WO2015051742A1 (en) Method and device for automatically implementing wireless connection between devices
HK1205319A1 (en) A method and device for confirmation of the execution of an operation
WO2015010483A1 (en) Request processing method, terminal, server, grant server and system
CN107071153B (en) Fingerprint module mode switching method and device
CN114143765A (en) Bluetooth connection method, device and storage medium
CN107451462B (en) Application avatar operation method and related products

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

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

Country of ref document: EP

Kind code of ref document: A1