WO2016015373A1 - Beacon-based broadcast method and beacon device - Google Patents
Beacon-based broadcast method and beacon device Download PDFInfo
- Publication number
- WO2016015373A1 WO2016015373A1 PCT/CN2014/087251 CN2014087251W WO2016015373A1 WO 2016015373 A1 WO2016015373 A1 WO 2016015373A1 CN 2014087251 W CN2014087251 W CN 2014087251W WO 2016015373 A1 WO2016015373 A1 WO 2016015373A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- broadcast
- scan
- beacon
- sampling frequency
- beacon device
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W80/00—Wireless network protocols or protocol adaptations to wireless operation
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a Beacon-based broadcast method and a Beacon device.
- Beacon implements data transmission by using Bluetooth Low Energy (BLE), also known as Bluetooth 4.0 or Bluetooth Smart.
- BLE Bluetooth Low Energy
- a device equipped with BLE communication uses BLE technology to send its own unique ID to the surroundings, and the application that receives the ID takes some action based on the ID. For example, when the Beacon communication module is set in the store, a message can be run on the iPhone and iPad to inform the designated server, or the server can send discount coupons and store credits to the iPhone and iPad in the hands of the customer.
- the length of the Protocol Data Unit is 2 to 39 octets in the air interface data packet.
- the Beacon protocol three types of broadcast AdvData data are used in the PDU. These three types of broadcasts are: connectable non-directed broadcast (ADV_IND), non-connectable undirected broadcast (ADV_NONCONN_IND), and received scans from the device. After the request (SCAN_REQ), the reply is sent (SCAN_RSP).
- the length of AdvData is 31 bytes, and in Apple's Beacon protocol, the first 30 bytes of AdvData are used as the identifier of a Beacon product.
- the Beacon protocol the AdvData data meets the requirements of the Beacon protocol and can be considered as a Beacon device.
- Beacon's broadcast protocol can't carry more custom data.
- many other peripherals such as sensors may be added to Beacon products.
- other additional data cannot be broadcasted, and can only be read after the Beacon device is successfully connected. Connecting Beacon devices takes time, which can result in low data interaction efficiency.
- the present invention provides a Beacon-based broadcast method and a Beacon device, which are used to solve the technical problem that the data transmission efficiency of the Beacon device is low in the prior art.
- an embodiment of the present invention provides a Beacon-based broadcast method, including:
- the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area follows the second sampling.
- the frequency scan acquires the first device identifier in the first broadcast;
- the Beacon device replaces and forms a scan reply SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency, where the SCAN_RSP broadcast carries the Beacon device And the second device identifier and the custom data; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first device identifier in the first broadcast to be sent by the Beacon device the same;
- the Beacon device If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device after the first broadcast is sent, the Beacon device replaces the SCAN_RSP formed by the current replacement after receiving the SCAN_REQ.
- the broadcast is temporarily sent to the fixed area at a next sampling moment corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
- an embodiment of the present invention provides a Beacon device, including:
- a sending module configured to send a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area is configured according to Obtaining, by the second sampling frequency, the first device identifier in the first broadcast;
- a processing module configured to: when the sending module sends the first broadcast to the fixed area according to the first sampling frequency, replace the forming a scan reply SCAN_RSP broadcast according to the first sampling frequency, where the SCAN_RSP broadcast carries The second device identifier and the customized data of the Beacon device; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first broadcast to be sent by the Beacon device The first device identifier is the same;
- a receiving module configured to receive the Bluetooth master after the sending module sends the first broadcast Scan request SCAN_REQ sent by the device;
- the sending module is further configured to: after the SCAN_REQ is received by the receiving module, broadcast the SCAN_RSP formed by the current replacement of the processing module at a next sampling time corresponding to the first sampling frequency. Sending to the fixed area, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
- the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device;
- the Bluetooth master device in the area scans and acquires the first device identifier in the first broadcast according to the second sampling frequency; the Beacon device replaces and forms the scan according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency.
- the SCAN_RSP broadcast carrying the second device identifier and the custom data of the Beacon device; wherein, the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement and the first broadcast in the first broadcast to be sent by the Beacon device
- the device identifier is the same; if the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement every time after receiving the SCAN_REQ. The next sampling time corresponding to a sampling frequency is temporarily sent to the fixed area.
- Bluetooth master device for obtaining a fixed area in accordance with a second sampling frequency sweep. This solution effectively improves the data transmission efficiency of Beacon devices.
- FIG. 1 is a flowchart of an embodiment of a Beacon-based broadcast method provided by the present invention
- FIG. 2 is a schematic structural diagram of an embodiment of a Beacon device according to the present invention.
- FIG. 1 is a flowchart of an embodiment of a Beacon-based broadcast method provided by the present invention.
- the executor of the method in this embodiment may be an existing device that complies with the Beacon protocol, such as a Beacon base station.
- the Beacon-based broadcast method specifically includes:
- the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area scans and acquires according to the second sampling frequency.
- the Beacon device in the fixed position sends the first broadcast periodically and continuously to the fixed area within a certain distance of the distance according to the broadcast protocol of the Beacon technology, so as to send its own unique device identifier to the fixed area, such as
- the first device identifier may be specifically formed by characters such as numbers, letters, symbols, and the like.
- the Bluetooth master device that has been turned on actively scans the broadcast information sent by the Beacon device near the surrounding area according to a certain sampling frequency, such as the second sampling frequency.
- the Bluetooth master device enters the fixed area covered by the broadcast sent by the Beacon device, the first broadcast can be scanned and acquired, thereby obtaining the first device identifier of the Beacon device.
- the Bluetooth master device can independently send a scan request SCAN_REQ to the Beacon device to obtain more data information according to the first device identifier of the Beacon device that is scanned, and also prompt the user to access the Beacon device.
- the foregoing first broadcast may be a broadcast type that the existing Beacon device can send autonomously, such as a connectable undirected ADV_IND broadcast based on the Bluetooth 4.0 protocol; and a non-connectable undirected ADV_NONCONN_IND broadcast based on the Bluetooth 4.0 protocol.
- the Beacon device sends a scan response SCAN_RSP broadcast according to the first sampling frequency, and the second device identifier and the custom data of the Beacon device are carried in the SCAN_RSP broadcast.
- the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device;
- a broadcast type that only responds to the SCAN_REQ received from the Bluetooth master device that is, the scan reply SCAN_RSP broadcast
- the SCAN_RSP broadcast typically provides a richer amount of information to share to the Bluetooth master in the fixed area.
- the Beacon device sends the first broadcast in the fixed area according to the first sampling frequency, and also periodically replaces and forms the SCAN_RSP broadcast according to the first sampling frequency.
- the data content carried in the SCAN_RSP broadcast formed by each replacement may be the same or different.
- the second device identification and custom data of the Beacon device are carried in the SCAN_RSP broadcast formed in the current time when the SCAN_RSP broadcast is formed each time.
- the second device identifier is the same as the first device identifier function, and is used to identify the identity of the Beacon device.
- the Beacon device can use the same device identifier, such as Beacon-ID, when identifying its identity. Multiple device IDs are required to identify their identity, such as Beacon-ID1, Beacon-ID2, and so on. Beacon devices can use these device IDs in a predetermined manner according to their needs in each broadcast packet.
- the Beacon device uses the same device identifier in various broadcasts sent in the same sampling time period, which also includes the first identifier in the above ADV_IND broadcast and the above-mentioned SCAN_RSP broadcast. Second device identification. Therefore, the Beacon device needs to set the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement to the first device in the first broadcast that is to be sent by the Beacon device in the next sampling period, each time the SCAN_RSP broadcast is formed. The identifiers are the same; thus ensuring that the device identifiers in the broadcast packets sent by the Beacon device in the same sampling period are the same.
- the Beacon device periodically replaces the first device identifier in the ADV_IND broadcast according to a predetermined rule to simulate an application scenario in which multiple Beacon devices work simultaneously.
- the Beacon device pre-specifies four device identifiers, including: Beacon-ID1, Beacon-ID2, Beacon-ID3, and Beacon-ID4, and cyclically sets the four device identifiers in the broadcast packet according to the predetermined number according to a predetermined rule.
- the Beacon device pre-specifies four device identifiers, including: Beacon-ID1, Beacon-ID2, Beacon-ID3, and Beacon-ID4, and cyclically sets the four device identifiers in the broadcast packet according to the predetermined number according to a predetermined rule.
- the content type of the foregoing customized data may include: a temperature data type, a humidity data type, and a light sensing data type in the fixed area; wherein the customized data of the temperature data type displays an environment surrounding the current Beacon device The temperature value; the custom data of the humidity data type shows the ambient humidity value around the above Beacon device, and the custom data of the light sensing data type shows the ambient light intensity value around the above Beacon device, and these values can be integrated through Obtained after the temperature sensor or humidity sensor in the above Beacon device measures the surrounding environment.
- the Beacon device sets the data in the data field in the SCAN_RSP broadcast packet each time the formed SCAN_RSP broadcast formed is replaced.
- the Beacon device can carry various types of customized data content in a SCAN_RSP broadcast formed by each replacement in a fixed and periodic manner.
- the first sampling frequency used by the Beacon device may be set to be no longer than the second sampling frequency used by the Bluetooth master device held by the user.
- the specific application scenario is as follows: Before the Beacon device leaves the factory, a fixed sampling frequency interval of the Beacon device can be preset, and the maximum value of the sampling frequency interval is not It is greater than the minimum sampling frequency of the existing Bluetooth master device, so that the frequency at which the Beacon device transmits the broadcast is less than the frequency at which the Bluetooth master device scans the received broadcast. In turn, the SCAN_RSP broadcast formed by the Beacon device can be sent out every time.
- the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement to the next one corresponding to the first sampling frequency after receiving the SCAN_REQ.
- the sampling moment is temporarily sent to the fixed area, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency;
- the Beacon device After the Beacon device sends the first broadcast, there is an open Bluetooth master device in the fixed area. After receiving the first broadcast, the Bluetooth master device will actively send SCAN_REQ. After receiving the SCAN_REQ, the Beacon device will The SCAN_RSP broadcast formed by the current replacement is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency. When the first sampling frequency is not greater than the second sampling frequency, the Beacon device may receive the SCAN_REQ sent by the Bluetooth master device after each broadcast of the ADV_IND broadcast, and then send the SCAN_RSP broadcast formed by each replacement to the fixed area.
- the scanning receiving frequency of the Bluetooth master device is greater than the frequency of the SCAN_RSP broadcast sent by the Beacon device, the SCAN_RSP broadcast sent by all the above Beacon devices can be scanned and received by the Bluetooth master device in the fixed area, thereby improving data transmission efficiency.
- the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so as to enter the fixed area.
- the Bluetooth master device scans and acquires the first device identifier in the first broadcast according to the second sampling frequency; the Beacon device replaces and forms the scan reply SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast in the fixed region according to the first sampling frequency.
- the SCAN_RSP broadcast carries the second device identifier and the customized data of the Beacon device.
- the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device. If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement at the first sampling frequency after receiving the SCAN_REQ every time. The corresponding next sampling time is temporarily sent to the fixed area for fixing Bluetooth master device acquires the art in accordance with the second sampling frequency sweep. This program effectively improves Beacon equipment Data transfer efficiency.
- the aforementioned program can be stored in a computer readable storage medium.
- the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
- the Beacon device can perform the method steps shown in FIG. 1.
- the Beacon device includes: a sending module 21, a processing module 22, and a receiving module 23;
- the sending module 21 is configured to send a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area is in accordance with the second
- the sampling frequency scan acquires the first device identifier in the first broadcast
- the processing module 22 is configured to send, by the sending module 21, a scan response SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency, where the SCAN_RSP broadcast carries the second device identifier of the Beacon device And the custom data; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device;
- the receiving module 23 is configured to receive the scan request SCAN_REQ sent by the Bluetooth master device after the sending module 21 sends the first broadcast;
- the sending module 21 is further configured to: after the SCAN_REQ is received by the receiving module 23, the SCAN_RSP broadcast formed by the current replacement of the processing module is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, for being fixed.
- the Bluetooth master device in the area scans and acquires according to the second sampling frequency.
- the foregoing first broadcast is specifically a connectable undirected ADV_IND broadcast, or a non-connectable undirected ADV_NONCONN_IND broadcast.
- the processing module 22 is further configured to periodically replace the first device identifier in the ADV_IND broadcast according to a predetermined rule.
- the content type of the above customized data includes: a temperature data type and a humidity data type in the fixed area;
- the processing module 22 is further configured to carry various types of customized data content in a fixed and sequential periodicity in the SCAN_RSP broadcast formed by each replacement.
- the first sampling frequency is not greater than the second sampling frequency.
- the Beacon device of the present invention sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area follows the second sampling.
- the frequency scan acquires the first device identifier in the first broadcast;
- the Beacon device sends the scan reply SCAN_RSP broadcast according to the first sampling frequency timing change while transmitting the first broadcast in the fixed area according to the first sampling frequency, and the SCAN_RSP broadcast carries The second device identifier and the custom data of the Beacon device; if the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device will receive the SCAN_REQ every time after receiving the SCAN_REQ
- the SCAN_RSP broadcast formed by the current replacement is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention provides a beacon-based broadcast method and a Beacon device. The method comprises: a Beacon device transmits a first broadcast to a fixed area according to a first sampling frequency; while the Beacon device transmits the first broadcast to the fixed area according to the first sampling frequency, the Beacon device replaces to form a scanning response (SCAN_RSP) broadcast according to the first sampling frequency, wherein the SCAN_RSP broadcast carries a second device identifier and customized data of the Beacon device; and each time after the Beacon device receives a SCAN_REQ, the Beacon device transmits the currently formed SCAN_RSP broadcast to the fixed area when a next sampling time point corresponding to the first sampling frequency comes, so as to allow a Bluetooth main device in the fixed area to scan and acquire the SCAN_RSP broadcast according to a second sampling frequency. The scheme effectively solves the technical problem that the data transmission efficiency of an existing Beacon device is low.
Description
本发明涉及通信技术领域,尤其涉及一种基于Beacon的广播方法和Beacon设备。The present invention relates to the field of communications technologies, and in particular, to a Beacon-based broadcast method and a Beacon device.
Beacon通过使用低功耗蓝牙技术(Bluetooth Low Energy,BLE),也就是通常所说的Bluetooth 4.0或者Bluetooth Smart来实现数据传输。其工作方式是:配备有BLE通信功能的设备使用BLE技术向周围发送自己特有的ID,而接收到该ID的应用软件会根据该ID采取一些行动。比如,当在店铺里设置Beacon通信模块时,便可让iPhone和iPad上运行一资讯来告知指定的服务器,或者由该服务器向顾客手中的iPhone和iPad发送折扣券及进店积分等。Beacon implements data transmission by using Bluetooth Low Energy (BLE), also known as Bluetooth 4.0 or Bluetooth Smart. The way it works is that a device equipped with BLE communication uses BLE technology to send its own unique ID to the surroundings, and the application that receives the ID takes some action based on the ID. For example, when the Beacon communication module is set in the store, a message can be run on the iPhone and iPad to inform the designated server, or the server can send discount coupons and store credits to the iPhone and iPad in the hands of the customer.
依照蓝牙4.0协议,在空中接口数据包中规定,协议数据单元(Protocol Data Unit,PDU)的长度为2~39个八位字节。而在Beacon协议中,使用了的PDU中的三种类型广播的AdvData数据,这三种类型广播为:可连接不定向广播(ADV_IND)、不可连接不定向广播(ADV_NONCONN_IND)和从设备收到扫描请求(SCAN_REQ)后,发出的回复广播(SCAN_RSP)的。蓝牙4.0协议中,AdvData的长度为31字节,而苹果的Beacon协议中,使用了AdvData中的前30个字节,来作为一个Beacon产品的标识。根据Beacon协议的规定,AdvData数据中满足Beacon协议的要求,均可以认作为一个Beacon设备。According to the Bluetooth 4.0 protocol, the length of the Protocol Data Unit (PDU) is 2 to 39 octets in the air interface data packet. In the Beacon protocol, three types of broadcast AdvData data are used in the PDU. These three types of broadcasts are: connectable non-directed broadcast (ADV_IND), non-connectable undirected broadcast (ADV_NONCONN_IND), and received scans from the device. After the request (SCAN_REQ), the reply is sent (SCAN_RSP). In the Bluetooth 4.0 protocol, the length of AdvData is 31 bytes, and in Apple's Beacon protocol, the first 30 bytes of AdvData are used as the identifier of a Beacon product. According to the Beacon protocol, the AdvData data meets the requirements of the Beacon protocol and can be considered as a Beacon device.
但恰恰却因为这点,导致Beacon的广播协议中无法承载更多的自定义数据。而随着Beacon产品的发展,Beacon产品中可能附加很多传感器等其他外设。但是由于广播协议限制,无法将其他附加数据广播出来,只有在Beacon设备连接成功之后才能读取。而连接Beacon设备需要耗时,这样会导致数据交互的效率变的很低。
But precisely because of this, Beacon's broadcast protocol can't carry more custom data. With the development of Beacon products, many other peripherals such as sensors may be added to Beacon products. However, due to the limitations of the broadcast protocol, other additional data cannot be broadcasted, and can only be read after the Beacon device is successfully connected. Connecting Beacon devices takes time, which can result in low data interaction efficiency.
发明内容Summary of the invention
本发明提供一种基于Beacon的广播方法和Beacon设备,用于解决现有技术中,Beacon设备的数据传输效率低的技术问题。The present invention provides a Beacon-based broadcast method and a Beacon device, which are used to solve the technical problem that the data transmission efficiency of the Beacon device is low in the prior art.
第一方面,本发明实施例提供一种基于Beacon的广播方法,包括:In a first aspect, an embodiment of the present invention provides a Beacon-based broadcast method, including:
Beacon设备依照第一采样频率向固定区域内发送第一广播,所述第一广播中携带有所述Beacon设备的第一设备标识;以使进入所述固定区域内的蓝牙主设备依照第二采样频率扫描获取所述第一广播中的所述第一设备标识;The Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area follows the second sampling. The frequency scan acquires the first device identifier in the first broadcast;
所述Beacon设备在依照所述第一采样频率向固定区域内发送所述第一广播的同时,依照所述第一采样频率更换形成扫描回复SCAN_RSP广播,所述SCAN_RSP广播中携带所述Beacon设备的第二设备标识和自定义数据;其中,当次所述更换形成的所述SCAN_RSP广播中携带的所述第二设备标识与所述Beacon设备即将发送的所述第一广播中的第一设备标识相同;The Beacon device replaces and forms a scan reply SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency, where the SCAN_RSP broadcast carries the Beacon device And the second device identifier and the custom data; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first device identifier in the first broadcast to be sent by the Beacon device the same;
若所述Beacon设备在发出所述第一广播后,接收到所述蓝牙主设备发送的扫描请求SCAN_REQ,则所述Beacon设备在每次接收到所述SCAN_REQ后,将当前更换形成的所述SCAN_RSP广播在所述第一采样频率对应的下一个采样时刻来临时发送到所述固定区域内,以供所述固定区域内的所述蓝牙主设备依照所述第二采样频率扫描获取。If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device after the first broadcast is sent, the Beacon device replaces the SCAN_RSP formed by the current replacement after receiving the SCAN_REQ. The broadcast is temporarily sent to the fixed area at a next sampling moment corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
第二方面,本发明实施例提供一种Beacon设备,包括:In a second aspect, an embodiment of the present invention provides a Beacon device, including:
发送模块,用于依照第一采样频率向固定区域内发送第一广播,所述第一广播中携带有所述Beacon设备的第一设备标识;以使进入所述固定区域内的蓝牙主设备依照第二采样频率扫描获取所述第一广播中的所述第一设备标识;a sending module, configured to send a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area is configured according to Obtaining, by the second sampling frequency, the first device identifier in the first broadcast;
处理模块,用于所述发送模块在依照所述第一采样频率向固定区域内发送所述第一广播的同时,依照所述第一采样频率更换形成扫描回复SCAN_RSP广播,所述SCAN_RSP广播中携带所述Beacon设备的第二设备标识和自定义数据;其中,当次所述更换形成的所述SCAN_RSP广播中携带的所述第二设备标识与所述Beacon设备即将发送的所述第一广播中的第一设备标识相同;a processing module, configured to: when the sending module sends the first broadcast to the fixed area according to the first sampling frequency, replace the forming a scan reply SCAN_RSP broadcast according to the first sampling frequency, where the SCAN_RSP broadcast carries The second device identifier and the customized data of the Beacon device; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first broadcast to be sent by the Beacon device The first device identifier is the same;
接收模块,用于在所述发送模块发出所述第一广播后,接收所述蓝牙主
设备发送的扫描请求SCAN_REQ;a receiving module, configured to receive the Bluetooth master after the sending module sends the first broadcast
Scan request SCAN_REQ sent by the device;
所述发送模块,还用于在所述接收模块每次接收到所述SCAN_REQ后,将所述处理模块当前更换形成的所述SCAN_RSP广播在所述第一采样频率对应的下一个采样时刻来临时发送到所述固定区域内,以供所述固定区域内的所述蓝牙主设备依照所述第二采样频率扫描获取。The sending module is further configured to: after the SCAN_REQ is received by the receiving module, broadcast the SCAN_RSP formed by the current replacement of the processing module at a next sampling time corresponding to the first sampling frequency. Sending to the fixed area, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
本发明提供的基于Beacon的广播方法和Beacon设备,Beacon设备依照第一采样频率向固定区域内发送第一广播,该第一广播中携带有所述Beacon设备的第一设备标识;以使进入固定区域内的蓝牙主设备依照第二采样频率扫描获取第一广播中的第一设备标识;Beacon设备在依照第一采样频率向固定区域内发送第一广播的同时,依照第一采样频率更换形成扫描回复SCAN_RSP广播,该SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据;其中,当次更换形成的SCAN_RSP广播中携带的第二设备标识与Beacon设备即将发送的第一广播中的第一设备标识相同;若Beacon设备在发出第一广播后,接收到蓝牙主设备依照第二采样频率发送的扫描请求SCAN_REQ,则Beacon设备在每次接收到SCAN_REQ后,将当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以供固定区域内的蓝牙主设备依照第二采样频率扫描获取。该方案有效提高了Beacon设备的数据传输效率。The Beacon-based broadcast method and the Beacon device provided by the present invention, the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device; The Bluetooth master device in the area scans and acquires the first device identifier in the first broadcast according to the second sampling frequency; the Beacon device replaces and forms the scan according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency. Responding to the SCAN_RSP broadcast, the SCAN_RSP broadcast carrying the second device identifier and the custom data of the Beacon device; wherein, the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement and the first broadcast in the first broadcast to be sent by the Beacon device The device identifier is the same; if the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement every time after receiving the SCAN_REQ. The next sampling time corresponding to a sampling frequency is temporarily sent to the fixed area. Bluetooth master device for obtaining a fixed area in accordance with a second sampling frequency sweep. This solution effectively improves the data transmission efficiency of Beacon devices.
图1为本发明提供的基于Beacon的广播方法一个实施例的流程图;1 is a flowchart of an embodiment of a Beacon-based broadcast method provided by the present invention;
图2为本发明提供的Beacon设备一个实施例的结构示意图。FIG. 2 is a schematic structural diagram of an embodiment of a Beacon device according to the present invention.
图1为本发明提供的基于Beacon的广播方法一个实施例的流程图。本实施例所述方法的执行主体可以为现有的遵循Beacon协议的设备,如Beacon基站。如图1所示,该基于Beacon的广播方法具体包括:FIG. 1 is a flowchart of an embodiment of a Beacon-based broadcast method provided by the present invention. The executor of the method in this embodiment may be an existing device that complies with the Beacon protocol, such as a Beacon base station. As shown in FIG. 1 , the Beacon-based broadcast method specifically includes:
S101,Beacon设备依照第一采样频率向固定区域内发送第一广播,该第一广播中携带有Beacon设备的第一设备标识;以使进入固定区域内的蓝牙主设备依照第二采样频率扫描获取第一广播中的第一设备标识;
S101: The Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area scans and acquires according to the second sampling frequency. The first device identifier in the first broadcast;
固定位置设置的Beacon设备依据Beacon技术的广播协议向距离自身一定距离范围内的固定区域以第一采样频率周期性不间断的发送第一广播,以向该固定区域发送自己特有的设备标识,如第一设备标识;该第一设备标识具体可以由数字、字母、符号等字符构成。当持有蓝牙主设备的用户进入到上述固定区域内时,由于已经开启的蓝牙主设备会主动的按一定采样频率,如第二采样频率扫描周围附近是否有Beacon设备发出的广播信息,因此,当该蓝牙主设备进入到上述Beacon设备发出的广播所覆盖的固定区域内时,便可以扫描获取到上述第一广播,从而获知上述Beacon设备的第一设备标识。蓝牙主设备根据扫描接收到的Beacon设备的第一设备标识,可以自主发送扫描请求SCAN_REQ给Beacon设备以获取更多的数据信息,同时也可以提示用户是否接入到该Beacon设备。The Beacon device in the fixed position sends the first broadcast periodically and continuously to the fixed area within a certain distance of the distance according to the broadcast protocol of the Beacon technology, so as to send its own unique device identifier to the fixed area, such as The first device identifier may be specifically formed by characters such as numbers, letters, symbols, and the like. When the user holding the Bluetooth master device enters the fixed area, the Bluetooth master device that has been turned on actively scans the broadcast information sent by the Beacon device near the surrounding area according to a certain sampling frequency, such as the second sampling frequency. When the Bluetooth master device enters the fixed area covered by the broadcast sent by the Beacon device, the first broadcast can be scanned and acquired, thereby obtaining the first device identifier of the Beacon device. The Bluetooth master device can independently send a scan request SCAN_REQ to the Beacon device to obtain more data information according to the first device identifier of the Beacon device that is scanned, and also prompt the user to access the Beacon device.
具体的,上述第一广播可以为现有Beacon设备可自主发送的广播类型,如基于蓝牙4.0协议中的可连接不定向ADV_IND广播;以及基于蓝牙4.0协议中的不可连接不定向ADV_NONCONN_IND广播。Specifically, the foregoing first broadcast may be a broadcast type that the existing Beacon device can send autonomously, such as a connectable undirected ADV_IND broadcast based on the Bluetooth 4.0 protocol; and a non-connectable undirected ADV_NONCONN_IND broadcast based on the Bluetooth 4.0 protocol.
S102,Beacon设备在依照第一采样频率向固定区域内发送第一广播的同时,依照第一采样频率更换形成扫描回复SCAN_RSP广播,该SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据;其中,当次更换形成的SCAN_RSP广播中携带的第二设备标识与Beacon设备即将发送的第一广播中的第一设备标识相同;S102: The Beacon device sends a scan response SCAN_RSP broadcast according to the first sampling frequency, and the second device identifier and the custom data of the Beacon device are carried in the SCAN_RSP broadcast. The second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device;
在现有的蓝牙4.0的广播协议中,还规定了一种只依据从蓝牙主设备上接收的SCAN_REQ后才回复发送的广播类型,即扫描回复SCAN_RSP广播。该SCAN_RSP广播通常可提供更丰富的信息内容以分享至固定区域内的蓝牙主设备。In the existing Bluetooth 4.0 broadcast protocol, a broadcast type that only responds to the SCAN_REQ received from the Bluetooth master device, that is, the scan reply SCAN_RSP broadcast, is also specified. The SCAN_RSP broadcast typically provides a richer amount of information to share to the Bluetooth master in the fixed area.
本实施例中,Beacon设备在依照上述第一采样频率向固定区域内发送第一广播的同时,也会依照第一采样频率定时更换形成上述SCAN_RSP广播。每次更换形成的SCAN_RSP广播中携带的数据内容可以相同,也可以不相同。在每次更换形成SCAN_RSP广播时,会在当次形成的SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据。其中,上述第二设备标识与上述第一设备标识功能相同,均用于标识Beacon设备自己的身份。而Beacon设备标识自己身份时可以采用同一个设备标识,如Beacon-ID;或者根据使用
需要采用多个设备标识来标识自己的身份,如Beacon-ID1,Beacon-ID2等等。Beacon设备在每次发送的广播包中可以根据需求按预定方式使用这些设备标识。In this embodiment, the Beacon device sends the first broadcast in the fixed area according to the first sampling frequency, and also periodically replaces and forms the SCAN_RSP broadcast according to the first sampling frequency. The data content carried in the SCAN_RSP broadcast formed by each replacement may be the same or different. The second device identification and custom data of the Beacon device are carried in the SCAN_RSP broadcast formed in the current time when the SCAN_RSP broadcast is formed each time. The second device identifier is the same as the first device identifier function, and is used to identify the identity of the Beacon device. The Beacon device can use the same device identifier, such as Beacon-ID, when identifying its identity.
Multiple device IDs are required to identify their identity, such as Beacon-ID1, Beacon-ID2, and so on. Beacon devices can use these device IDs in a predetermined manner according to their needs in each broadcast packet.
而为了区分和管理方便,本实施例中,Beacon设备将在相同采样时间周期内发送的各种广播中采用相同的设备标识,这也包括上述ADV_IND广播中的第一标识和上述SCAN_RSP广播中的第二设备标识。这就需要Beacon设备在每次更换形成SCAN_RSP广播时,将当次更换形成的SCAN_RSP广播中携带的第二设备标识设置为与Beacon设备即将在下一个采样周期内发送的第一广播中的第一设备标识相同;从而保证Beacon设备在同一采样周期内发送的各个广播包中的设备标识相同。For the sake of differentiation and management convenience, in this embodiment, the Beacon device uses the same device identifier in various broadcasts sent in the same sampling time period, which also includes the first identifier in the above ADV_IND broadcast and the above-mentioned SCAN_RSP broadcast. Second device identification. Therefore, the Beacon device needs to set the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement to the first device in the first broadcast that is to be sent by the Beacon device in the next sampling period, each time the SCAN_RSP broadcast is formed. The identifiers are the same; thus ensuring that the device identifiers in the broadcast packets sent by the Beacon device in the same sampling period are the same.
可选的,在上述步骤101之前,Beacon设备可按预定规则,周期性更换上述ADV_IND广播中的第一设备标识,以模拟多个Beacon设备同时工作的应用场景。例如,Beacon设备预先规定出四个设备标识,包括:Beacon-ID1,Beacon-ID2、Beacon-ID3和Beacon-ID4,并按预定规则如将4个设备标识按本身编号依次循环设置在广播包中,从而模拟出4个Beacon设备来同时发送广播的情景。Optionally, before the step 101, the Beacon device periodically replaces the first device identifier in the ADV_IND broadcast according to a predetermined rule to simulate an application scenario in which multiple Beacon devices work simultaneously. For example, the Beacon device pre-specifies four device identifiers, including: Beacon-ID1, Beacon-ID2, Beacon-ID3, and Beacon-ID4, and cyclically sets the four device identifiers in the broadcast packet according to the predetermined number according to a predetermined rule. In order to simulate the scenario where four Beacon devices simultaneously send broadcasts.
可选的,上述自定义数据的内容类型可包括:在上述固定区域内的温度数据类型、湿度数据类型和光感数据类型;其中,温度数据类型的自定义数据显示了当前上述Beacon设备周围的环境温度值;湿度数据类型的自定义数据显示了当前上述Beacon设备周围的环境湿度值,光感数据类型的自定义数据显示了当前上述Beacon设备周围的环境光线强度值,而这些数值具体可通过集成在上述Beacon设备中的温度传感器或湿度传感器测量周围环境之后获取的。Beacon设备在每次更换形成的上述SCAN_RSP广播时,将这些数据设置在SCAN_RSP广播包中的数据字段中。在具体实施时,Beacon设备可按固定顺续周期性的将各种类型的自定义数据内容携带在各次更换形成的SCAN_RSP广播中。Optionally, the content type of the foregoing customized data may include: a temperature data type, a humidity data type, and a light sensing data type in the fixed area; wherein the customized data of the temperature data type displays an environment surrounding the current Beacon device The temperature value; the custom data of the humidity data type shows the ambient humidity value around the above Beacon device, and the custom data of the light sensing data type shows the ambient light intensity value around the above Beacon device, and these values can be integrated through Obtained after the temperature sensor or humidity sensor in the above Beacon device measures the surrounding environment. The Beacon device sets the data in the data field in the SCAN_RSP broadcast packet each time the formed SCAN_RSP broadcast formed is replaced. In a specific implementation, the Beacon device can carry various types of customized data content in a SCAN_RSP broadcast formed by each replacement in a fixed and periodic manner.
可选的,为了让Beacon设备每次更换形成的SCAN_RSP广播都能发送出去,可将Beacon设备使用的第一采样频率设置为不大于用户手持的蓝牙主设备使用的第二采样频率。具体应用场景为:在Beacon设备出厂前,可以预先设置一个Beacon设备的固定采样频率区间,而该采样频率区间的最大值不
大于现有蓝牙主设备的采样频率的最小值,从而使Beacon设备发送广播的频率小于蓝牙主设备扫描接收广播的频率。进而保证Beacon设备每次更换形成的SCAN_RSP广播都能发送出去。Optionally, in order to enable the Beacon device to send out the SCAN_RSP broadcast formed every time, the first sampling frequency used by the Beacon device may be set to be no longer than the second sampling frequency used by the Bluetooth master device held by the user. The specific application scenario is as follows: Before the Beacon device leaves the factory, a fixed sampling frequency interval of the Beacon device can be preset, and the maximum value of the sampling frequency interval is not
It is greater than the minimum sampling frequency of the existing Bluetooth master device, so that the frequency at which the Beacon device transmits the broadcast is less than the frequency at which the Bluetooth master device scans the received broadcast. In turn, the SCAN_RSP broadcast formed by the Beacon device can be sent out every time.
S103,若Beacon设备在发出第一广播后,接收到蓝牙主设备发送的扫描请求SCAN_REQ,则Beacon设备在每次接收到SCAN_REQ后,将当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以供固定区域内的蓝牙主设备依照第二采样频率扫描获取;S103. If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement to the next one corresponding to the first sampling frequency after receiving the SCAN_REQ. The sampling moment is temporarily sent to the fixed area, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency;
当Beacon设备在发出第一广播后,在上述固定区域内存在已开启的蓝牙主设备,那么该蓝牙主设备接收到上述第一广播后,会主动发送SCAN_REQ,Beacon设备在接收到SCAN_REQ后,将当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以使该固定区域内的蓝牙主设备依照第二采样频率扫描获取。其中,当上述第一采样频率不大于第二采样频率时,Beacon设备每次发出ADV_IND广播后均可以收到蓝牙主设备发送的SCAN_REQ,然后将其每次更换形成的SCAN_RSP广播发送到上述固定区域中;再由于蓝牙主设备的扫描接收频率大于Beacon设备发送SCAN_RSP广播的频率,因此,上述所有Beacon设备发送的SCAN_RSP广播均可以被上述固定区域内的蓝牙主设备扫描接收到,提高了数据传输效率。After the Beacon device sends the first broadcast, there is an open Bluetooth master device in the fixed area. After receiving the first broadcast, the Bluetooth master device will actively send SCAN_REQ. After receiving the SCAN_REQ, the Beacon device will The SCAN_RSP broadcast formed by the current replacement is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency. When the first sampling frequency is not greater than the second sampling frequency, the Beacon device may receive the SCAN_REQ sent by the Bluetooth master device after each broadcast of the ADV_IND broadcast, and then send the SCAN_RSP broadcast formed by each replacement to the fixed area. In addition, since the scanning receiving frequency of the Bluetooth master device is greater than the frequency of the SCAN_RSP broadcast sent by the Beacon device, the SCAN_RSP broadcast sent by all the above Beacon devices can be scanned and received by the Bluetooth master device in the fixed area, thereby improving data transmission efficiency. .
本发明提供的基于Beacon的广播方法,Beacon设备依照第一采样频率向固定区域内发送第一广播,该第一广播中携带有所述Beacon设备的第一设备标识;以使进入固定区域内的蓝牙主设备依照第二采样频率扫描获取第一广播中的第一设备标识;Beacon设备在依照第一采样频率向固定区域内发送第一广播的同时,依照第一采样频率更换形成扫描回复SCAN_RSP广播,该SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据;其中,当次更换形成的SCAN_RSP广播中携带的第二设备标识与Beacon设备即将发送的第一广播中的第一设备标识相同;若Beacon设备在发出第一广播后,接收到蓝牙主设备依照第二采样频率发送的扫描请求SCAN_REQ,则Beacon设备在每次接收到SCAN_REQ后,将当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以供固定区域内的蓝牙主设备依照第二采样频率扫描获取。该方案有效提高了Beacon设备
的数据传输效率。The Beacon-based broadcast method of the present invention, the Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so as to enter the fixed area. The Bluetooth master device scans and acquires the first device identifier in the first broadcast according to the second sampling frequency; the Beacon device replaces and forms the scan reply SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast in the fixed region according to the first sampling frequency. The SCAN_RSP broadcast carries the second device identifier and the customized data of the Beacon device. The second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device. If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device broadcasts the SCAN_RSP formed by the current replacement at the first sampling frequency after receiving the SCAN_REQ every time. The corresponding next sampling time is temporarily sent to the fixed area for fixing Bluetooth master device acquires the art in accordance with the second sampling frequency sweep. This program effectively improves Beacon equipment
Data transfer efficiency.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above may be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
图2为本发明提供的Beacon设备一个实施例的结构示意图,该Beacon设备可以执行如图1所示的方法步骤,该Beacon设备包括:发送模块21,处理模块22和接收模块23;其中:2 is a schematic structural diagram of an embodiment of a Beacon device according to the present invention. The Beacon device can perform the method steps shown in FIG. 1. The Beacon device includes: a sending module 21, a processing module 22, and a receiving module 23;
发送模块21,用于依照第一采样频率向固定区域内发送第一广播,该第一广播中携带有该Beacon设备的第一设备标识;以使进入该固定区域内的蓝牙主设备依照第二采样频率扫描获取该第一广播中的第一设备标识;The sending module 21 is configured to send a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area is in accordance with the second The sampling frequency scan acquires the first device identifier in the first broadcast;
处理模块22,用于发送模块21在依照第一采样频率向固定区域内发送第一广播的同时,依照第一采样频率更换形成扫描回复SCAN_RSP广播,该SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据;其中,当次更换形成的SCAN_RSP广播中携带的第二设备标识与Beacon设备即将发送的第一广播中的第一设备标识相同;The processing module 22 is configured to send, by the sending module 21, a scan response SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency, where the SCAN_RSP broadcast carries the second device identifier of the Beacon device And the custom data; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the current replacement is the same as the first device identifier in the first broadcast to be sent by the Beacon device;
接收模块23,用于在发送模块21发出第一广播后,接收蓝牙主设备发送的扫描请求SCAN_REQ;The receiving module 23 is configured to receive the scan request SCAN_REQ sent by the Bluetooth master device after the sending module 21 sends the first broadcast;
发送模块21,还用于在接收模块23每次接收到上述SCAN_REQ后,将处理模块当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以供固定区域内的所述蓝牙主设备依照第二采样频率扫描获取。The sending module 21 is further configured to: after the SCAN_REQ is received by the receiving module 23, the SCAN_RSP broadcast formed by the current replacement of the processing module is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, for being fixed. The Bluetooth master device in the area scans and acquires according to the second sampling frequency.
进一步的,上述第一广播具体为可连接不定向ADV_IND广播,或者为不可连接不定向ADV_NONCONN_IND广播。Further, the foregoing first broadcast is specifically a connectable undirected ADV_IND broadcast, or a non-connectable undirected ADV_NONCONN_IND broadcast.
进一步的,在发送模块21依照第一采样频率向固定区域内发送第一广播之前,处理模块22还用于按预定规则,周期性更换ADV_IND广播中的第一设备标识。Further, before the sending module 21 sends the first broadcast to the fixed area according to the first sampling frequency, the processing module 22 is further configured to periodically replace the first device identifier in the ADV_IND broadcast according to a predetermined rule.
进一步的,上述自定义数据的内容类型包括:固定区域内的温度数据类型和湿度数据类型;
Further, the content type of the above customized data includes: a temperature data type and a humidity data type in the fixed area;
处理模块22,还用于将各种类型的自定义数据内容按固定顺续周期性携带在各次更换形成的SCAN_RSP广播中。The processing module 22 is further configured to carry various types of customized data content in a fixed and sequential periodicity in the SCAN_RSP broadcast formed by each replacement.
进一步的,上述第一采样频率不大于上述第二采样频率。Further, the first sampling frequency is not greater than the second sampling frequency.
本发明提供的Beacon设备,依照第一采样频率向固定区域内发送第一广播,该第一广播中携带有Beacon设备的第一设备标识;以使进入固定区域内的蓝牙主设备依照第二采样频率扫描获取第一广播中的第一设备标识;Beacon设备在依照第一采样频率向固定区域内发送第一广播的同时,依照第一采样频率定时更换形成扫描回复SCAN_RSP广播,该SCAN_RSP广播中携带Beacon设备的第二设备标识和自定义数据;若Beacon设备在发出第一广播后,接收到蓝牙主设备依照第二采样频率发送的扫描请求SCAN_REQ,则Beacon设备在每次接收到SCAN_REQ后,将当前更换形成的SCAN_RSP广播在第一采样频率对应的下一个采样时刻来临时发送到固定区域内,以供固定区域内的蓝牙主设备依照第二采样频率扫描获取。该方案有效提高了Beacon设备的数据传输效率。The Beacon device of the present invention sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area follows the second sampling. The frequency scan acquires the first device identifier in the first broadcast; the Beacon device sends the scan reply SCAN_RSP broadcast according to the first sampling frequency timing change while transmitting the first broadcast in the fixed area according to the first sampling frequency, and the SCAN_RSP broadcast carries The second device identifier and the custom data of the Beacon device; if the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device according to the second sampling frequency after the first broadcast is sent, the Beacon device will receive the SCAN_REQ every time after receiving the SCAN_REQ The SCAN_RSP broadcast formed by the current replacement is temporarily sent to the fixed area at the next sampling time corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency. This solution effectively improves the data transmission efficiency of Beacon devices.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.
Claims (10)
- 一种基于Beacon的广播方法,其特征在于,包括:A Beacon-based broadcast method, comprising:Beacon设备依照第一采样频率向固定区域内发送第一广播,所述第一广播中携带有所述Beacon设备的第一设备标识;以使进入所述固定区域内的蓝牙主设备依照第二采样频率扫描获取所述第一广播中的所述第一设备标识;The Beacon device sends a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area follows the second sampling. The frequency scan acquires the first device identifier in the first broadcast;所述Beacon设备在依照所述第一采样频率向固定区域内发送所述第一广播的同时,依照所述第一采样频率更换形成扫描回复SCAN_RSP广播,所述SCAN_RSP广播中携带所述Beacon设备的第二设备标识和自定义数据;其中,当次所述更换形成的所述SCAN_RSP广播中携带的所述第二设备标识与所述Beacon设备即将发送的所述第一广播中的第一设备标识相同;The Beacon device replaces and forms a scan reply SCAN_RSP broadcast according to the first sampling frequency while transmitting the first broadcast to the fixed area according to the first sampling frequency, where the SCAN_RSP broadcast carries the Beacon device And the second device identifier and the custom data; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first device identifier in the first broadcast to be sent by the Beacon device the same;若所述Beacon设备在发出所述第一广播后,接收到所述蓝牙主设备发送的扫描请求SCAN_REQ,则所述Beacon设备在每次接收到所述SCAN_REQ后,将当前更换形成的所述SCAN_RSP广播在所述第一采样频率对应的下一个采样时刻来临时发送到所述固定区域内,以供所述固定区域内的所述蓝牙主设备依照所述第二采样频率扫描获取。If the Beacon device receives the scan request SCAN_REQ sent by the Bluetooth master device after the first broadcast is sent, the Beacon device replaces the SCAN_RSP formed by the current replacement after receiving the SCAN_REQ. The broadcast is temporarily sent to the fixed area at a next sampling moment corresponding to the first sampling frequency, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
- 根据权利要求1所述的基于Beacon的广播方法,其特征在于,所述第一广播具体为可连接不定向ADV_IND广播,或者为不可连接不定向ADV_NONCONN_IND广播。The Beacon-based broadcast method according to claim 1, wherein the first broadcast is specifically a connectable undirected ADV_IND broadcast, or a non-connectable undirected ADV_NONCONN_IND broadcast.
- 根据权利要求1所述的基于Beacon的广播方法,其特征在于,所述Beacon设备依照第一采样频率向固定区域内发送第一广播之前,还包括:The method for broadcasting a Beacon according to claim 1, wherein before the sending, by the Beacon device, the first broadcast to the fixed area according to the first sampling frequency, the method further includes:所述Beacon设备按预定规则,周期性更换所述ADV_IND广播中的所述第一设备标识。The Beacon device periodically replaces the first device identifier in the ADV_IND broadcast according to a predetermined rule.
- 根据权利要求3所述的基于Beacon的广播方法,其特征在于,所述自定义数据的内容类型包括:所述固定区域内的温度数据类型、湿度数据类型和光感数据类型;且各种类型的所述自定义数据内容被所述Beacon设备按固定顺续周期性携带在各次更换形成的所述SCAN_RSP广播中。The Beacon-based broadcast method according to claim 3, wherein the content type of the customized data comprises: a temperature data type, a humidity data type, and a light sensing data type in the fixed area; and various types of The customized data content is periodically and periodically carried by the Beacon device in the SCAN_RSP broadcast formed by each replacement.
- 根据权利要求1-4任一项所述的基于Beacon的广播方法,其特征在于,所述第一采样频率不大于所述第二采样频率。The Beacon-based broadcast method according to any one of claims 1 to 4, wherein the first sampling frequency is not greater than the second sampling frequency.
- 一种Beacon设备,其特征在于,包括: A Beacon device, comprising:发送模块,用于依照第一采样频率向固定区域内发送第一广播,所述第一广播中携带有所述Beacon设备的第一设备标识;以使进入所述固定区域内的蓝牙主设备依照第二采样频率扫描获取所述第一广播中的所述第一设备标识;a sending module, configured to send a first broadcast to the fixed area according to the first sampling frequency, where the first broadcast carries the first device identifier of the Beacon device, so that the Bluetooth master device entering the fixed area is configured according to Obtaining, by the second sampling frequency, the first device identifier in the first broadcast;处理模块,用于所述发送模块在依照所述第一采样频率向固定区域内发送所述第一广播的同时,依照所述第一采样频率更换形成扫描回复SCAN_RSP广播,所述SCAN_RSP广播中携带所述Beacon设备的第二设备标识和自定义数据;其中,当次所述更换形成的所述SCAN_RSP广播中携带的所述第二设备标识与所述Beacon设备即将发送的所述第一广播中的第一设备标识相同;a processing module, configured to: when the sending module sends the first broadcast to the fixed area according to the first sampling frequency, replace the forming a scan reply SCAN_RSP broadcast according to the first sampling frequency, where the SCAN_RSP broadcast carries The second device identifier and the customized data of the Beacon device; wherein the second device identifier carried in the SCAN_RSP broadcast formed by the replacement and the first broadcast to be sent by the Beacon device The first device identifier is the same;接收模块,用于在所述发送模块发出所述第一广播后,接收所述蓝牙主设备发送的扫描请求SCAN_REQ;a receiving module, configured to receive, after the sending module sends the first broadcast, a scan request SCAN_REQ sent by the Bluetooth master device;所述发送模块,还用于在所述接收模块每次接收到所述SCAN_REQ后,将所述处理模块当前更换形成的所述SCAN_RSP广播在所述第一采样频率对应的下一个采样时刻来临时发送到所述固定区域内,以供所述固定区域内的所述蓝牙主设备依照所述第二采样频率扫描获取。The sending module is further configured to: after the SCAN_REQ is received by the receiving module, broadcast the SCAN_RSP formed by the current replacement of the processing module at a next sampling time corresponding to the first sampling frequency. Sending to the fixed area, so that the Bluetooth master device in the fixed area scans and acquires according to the second sampling frequency.
- 根据权利要求6所述的Beacon设备,其特征在于,所述第一广播具体为可连接不定向ADV_IND广播,或者为不可连接不定向ADV_NONCONN_IND广播。The Beacon device of claim 6, wherein the first broadcast is specifically a connectable undirected ADV_IND broadcast or a non-connectable undirected ADV_NONCONN_IND broadcast.
- 根据权利要求6所述的Beacon设备,其特征在于,在所述发送模块依照第一采样频率向固定区域内发送第一广播之前,所述处理模块还用于按预定规则,周期性更换所述ADV_IND广播中的所述第一设备标识。The Beacon device according to claim 6, wherein the processing module is further configured to periodically replace the first broadcast according to a predetermined rule before the sending module sends the first broadcast to the fixed area according to the first sampling frequency. The first device identification in the ADV_IND broadcast.
- 根据权利要求8所述的Beacon设备,其特征在于,所述自定义数据的内容类型包括:所述固定区域内的温度数据类型、湿度数据类型和光感数据类型;The Beacon device according to claim 8, wherein the content type of the customized data comprises: a temperature data type, a humidity data type, and a light sensing data type in the fixed area;所述处理模块,还用于将各种类型的所述自定义数据内容按固定顺续周期性携带在各次更换形成的所述SCAN_RSP广播中。The processing module is further configured to carry various types of the customized data content in a fixed periodicity in the SCAN_RSP broadcast formed by each replacement.
- 根据权利要求6-9任一项所述的Beacon设备,其特征在于,所述第一采样频率不大于所述第二采样频率。 The Beacon device according to any one of claims 6-9, wherein the first sampling frequency is not greater than the second sampling frequency.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410374484.6A CN104219065B (en) | 2014-07-31 | 2014-07-31 | Broadcasting method and Beacon equipment based on Beacon |
CN201410374484.6 | 2014-07-31 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016015373A1 true WO2016015373A1 (en) | 2016-02-04 |
Family
ID=52100227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/087251 WO2016015373A1 (en) | 2014-07-31 | 2014-09-24 | Beacon-based broadcast method and beacon device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104219065B (en) |
WO (1) | WO2016015373A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018040043A1 (en) * | 2016-08-31 | 2018-03-08 | 华为技术有限公司 | Method for discovering bluetooth device and bluetooth device |
CN115022816A (en) * | 2022-04-21 | 2022-09-06 | 南京西觉硕信息科技有限公司 | Equipment networking method, device and system based on Bluetooth LE audio |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105050025A (en) * | 2015-05-22 | 2015-11-11 | 上海美迪索科电子科技有限公司 | Awakening method and device based on low-power-consumption Bluetooth radio frequency |
CN105682051B (en) * | 2016-01-05 | 2019-04-09 | 苏州寻息电子科技有限公司 | A kind of iBeacon broadcast and control method |
CN105554694B (en) * | 2016-02-03 | 2018-09-14 | 贝尔特物联技术无锡有限公司 | Utilize the method for bluetooth Beacon Broadcasting Control blue-tooth intelligence equipment |
US10104642B2 (en) | 2016-03-25 | 2018-10-16 | Microsoft Technology Licensing, Llc | Event-triggered control of beacon broadcasts |
CN105827638A (en) | 2016-05-10 | 2016-08-03 | 腾讯科技(深圳)有限公司 | Data transmission method, device and system |
CN109982267B (en) * | 2017-12-28 | 2021-10-26 | 成都鼎桥通信技术有限公司 | Transmission method of TCCH channel signal |
JP7183671B2 (en) * | 2018-10-02 | 2022-12-06 | カシオ計算機株式会社 | Wireless communication device, wireless communication method, and program |
CN111343614B (en) * | 2019-12-31 | 2023-04-07 | 东南大学 | BLE active scanning-oriented rapid discovery method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100002627A1 (en) * | 2008-07-02 | 2010-01-07 | Samsung Electronics Co., Ltd. | System and method for use of a short beacon in a wireless communication network |
CN101631358A (en) * | 2009-07-28 | 2010-01-20 | 杭州华三通信技术有限公司 | Method for transmitting data in wireless local area network and equipment thereof |
CN101640942A (en) * | 2009-08-31 | 2010-02-03 | 杭州华三通信技术有限公司 | Method for sending broadcast data and equipment thereof |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9445305B2 (en) * | 2011-09-12 | 2016-09-13 | Microsoft Corporation | Low energy beacon encoding |
CN103169448B (en) * | 2011-12-26 | 2016-03-02 | 中国移动通信集团公司 | Body sense net perception terminal system, sensing node and cognitive method |
US9155026B2 (en) * | 2012-01-10 | 2015-10-06 | Htc Corporation | Systems for facilitating wireless communication and related methods |
CN104488348B (en) * | 2012-06-01 | 2018-04-24 | 诺基亚技术有限公司 | The method, apparatus and computer program product found for the adaptive equipment in wireless network |
US8935411B2 (en) * | 2012-08-22 | 2015-01-13 | Nokia Corporation | Method and apparatus for utilizing advertisements to provide information regarding connection setup |
US10912131B2 (en) * | 2012-12-03 | 2021-02-02 | Samsung Electronics Co., Ltd. | Method and mobile terminal for controlling bluetooth low energy device |
US9363010B2 (en) * | 2012-12-03 | 2016-06-07 | Samsung Electronics Co., Ltd. | Mobile terminal and method of controlling function of the mobile terminal |
US9357336B2 (en) * | 2012-12-03 | 2016-05-31 | Samsung Electronics Co., Ltd. | Information providing method and mobile terminal therefor |
US9356687B2 (en) * | 2012-12-03 | 2016-05-31 | Samsung Electronics Co., Ltd. | Information providing method and mobile terminal therefor |
CN103781158A (en) * | 2013-11-30 | 2014-05-07 | 北京智谷睿拓技术服务有限公司 | Wireless network access method and access apparatus |
CN103747441B (en) * | 2013-12-10 | 2019-08-06 | 北京智谷睿拓技术服务有限公司 | Wireless network access method and access device |
-
2014
- 2014-07-31 CN CN201410374484.6A patent/CN104219065B/en active Active
- 2014-09-24 WO PCT/CN2014/087251 patent/WO2016015373A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100002627A1 (en) * | 2008-07-02 | 2010-01-07 | Samsung Electronics Co., Ltd. | System and method for use of a short beacon in a wireless communication network |
CN101631358A (en) * | 2009-07-28 | 2010-01-20 | 杭州华三通信技术有限公司 | Method for transmitting data in wireless local area network and equipment thereof |
CN101640942A (en) * | 2009-08-31 | 2010-02-03 | 杭州华三通信技术有限公司 | Method for sending broadcast data and equipment thereof |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018040043A1 (en) * | 2016-08-31 | 2018-03-08 | 华为技术有限公司 | Method for discovering bluetooth device and bluetooth device |
US11343667B2 (en) | 2016-08-31 | 2022-05-24 | Huawei Technologies Co., Ltd. | Method for discovering bluetooth device and bluetooth device |
US11722877B2 (en) | 2016-08-31 | 2023-08-08 | Huawei Technologies Co., Ltd. | Method for discovering Bluetooth device and Bluetooth device |
CN115022816A (en) * | 2022-04-21 | 2022-09-06 | 南京西觉硕信息科技有限公司 | Equipment networking method, device and system based on Bluetooth LE audio |
CN115022816B (en) * | 2022-04-21 | 2023-07-21 | 南京西觉硕信息科技有限公司 | Bluetooth LE audio-based equipment networking method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN104219065A (en) | 2014-12-17 |
CN104219065B (en) | 2017-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016015373A1 (en) | Beacon-based broadcast method and beacon device | |
EP3616424B1 (en) | Electronic device and proximity discovery method thereof | |
US10708743B2 (en) | Service sharing device and method | |
EP3125641B1 (en) | Wireless system, wireless device, non-transitory computer-readable storage medium having stored therein communication program, and communication method | |
Harris III et al. | Bluetooth low energy in dense IoT environments | |
EP3378260B1 (en) | Secure fine timing measurement | |
US20220082676A1 (en) | Electronic device for performing ranging through ultra-wide band (uwb), and method for operating electronic device | |
US9414217B2 (en) | Method and technical equipment for short range data transmission | |
EP3139660B1 (en) | Ap location query | |
JP2019083544A (en) | Service layer resource propagation across domains | |
JP6756009B2 (en) | Data transmission | |
US20140328210A1 (en) | Method and technical equipment for short range data transmission | |
EP3223452A1 (en) | Method and apparatus for providing service on basis of identifier of user equipment | |
US10591589B2 (en) | Apparatus and method for measuring wireless range | |
KR20160063041A (en) | Method for proximity service data and an electronic device thereof | |
KR102600894B1 (en) | Apparatus and method for positioning using electronic device | |
CN105075297B (en) | Use the location-based notification system of Wi-Fi | |
KR102201527B1 (en) | Method for interworking between devices for short range communication and apparatus therefor | |
GB2521500A (en) | Exchanging configuration information wirelessly | |
KR20120072557A (en) | Mobile terminal, server and information providing method using the same | |
US20150271629A1 (en) | Method And Technical Equipment For Short Range Data Transmission | |
CN104469673A (en) | Terminal positioning method and device | |
TW201247010A (en) | Identifier-sharing method for wireless communication device, wireless communication device and base station using the same | |
WO2015188432A1 (en) | Method and device for conducting information sharing broadcast based on wi-fi | |
WO2015196698A1 (en) | Paging method, system and device, and computer storage medium |
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: 14898590 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: 14898590 Country of ref document: EP Kind code of ref document: A1 |