CN113301545B - Dynamic access Bluetooth device cascading method and device and electronic device - Google Patents

Dynamic access Bluetooth device cascading method and device and electronic device Download PDF

Info

Publication number
CN113301545B
CN113301545B CN202110411564.4A CN202110411564A CN113301545B CN 113301545 B CN113301545 B CN 113301545B CN 202110411564 A CN202110411564 A CN 202110411564A CN 113301545 B CN113301545 B CN 113301545B
Authority
CN
China
Prior art keywords
address
bluetooth device
connection
bluetooth
slave
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.)
Active
Application number
CN202110411564.4A
Other languages
Chinese (zh)
Other versions
CN113301545A (en
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.)
Zhuhai Huilian Technology Co ltd
Original Assignee
Zhuhai Huilian Technology 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 Zhuhai Huilian Technology Co ltd filed Critical Zhuhai Huilian Technology Co ltd
Priority to CN202110411564.4A priority Critical patent/CN113301545B/en
Publication of CN113301545A publication Critical patent/CN113301545A/en
Application granted granted Critical
Publication of CN113301545B publication Critical patent/CN113301545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention relates to a technical scheme of a dynamic access Bluetooth device cascade method, a device and an electronic device, comprising that when a main Bluetooth device is in a paging scanning state, an address in the paging scanning state is used as a first connection address; when the master Bluetooth device is detected to be paged by the slave Bluetooth device, establishing communication connection between the master Bluetooth device and the slave Bluetooth device, wherein the communication connection is communicated with the master Bluetooth device through the device address of the slave Bluetooth device; and paging and communicating with the next Bluetooth device through the first connection address according to the slave Bluetooth device. The first connection address is a general paging address, and is used separately from the self address of the Bluetooth device during scanning and connection. The invention has the beneficial effects that: the connection method is simple, the connection speed is high, and the efficiency is high; limitation of the number of devices without cascade connection; all the devices have the same firmware, only the device addresses are different, and any one device can be dynamically cascaded into the network.

Description

Dynamic access Bluetooth device cascading method and device and electronic device
Technical Field
The invention relates to the field of computers, in particular to a dynamic access Bluetooth device cascade method, a device and an electronic device.
Background
The Bluetooth network avoids mutual interference among connections adopting the same address in the communication process in a mode that each Bluetooth address is different. Therefore, addresses of bluetooth devices are different, and a discovery and connection process is needed to establish connection between the two devices.
Referring to fig. 1, the normal bluetooth connection process requires:
1. the master device initiates an inquiry process to search all devices in the air; the slave device is in a searched state inquiry scan and a connected state page scan;
2. after searching the equipment to be connected, the main equipment initiates a connection process according to the Bluetooth address of the equipment to be connected, the main equipment initiates page (paging), and at the moment, the slave equipment needs to be in a page scan state, and places the address of the slave equipment in an FHS packet;
and 3, after the page process is successful, the main and auxiliary equipment switches the communication address into the address of the main equipment for communication.
And (3) normal connection process:
1, the other party needs to be searched, and the process is complicated; the slave devices need to be switched between the inquiry scan and the page scan, so that the efficiency is low and the time consumption is high.
2, a plurality of Bluetooth devices may exist in an inquiry scan state in the air, and the searching process is interfered by other devices, so that the efficiency is low and the consumed time is more;
3, when the page is opposite, the address of the opposite device is needed. Therefore, if bluetooth devices are cascaded one by one, the bluetooth devices need to be searched to determine the bluetooth devices belong to the next device to be connected, or the addresses of the bluetooth devices need to be known in advance. More devices cannot be cascaded efficiently and arbitrarily dynamically.
Disclosure of Invention
The invention aims to solve at least one of the technical problems in the prior art, and provides a Bluetooth device cascade method, a Bluetooth device cascade device and electronic equipment, which can efficiently and quickly establish cascade connection of order-magnitude Bluetooth devices.
The technical scheme of the invention comprises a dynamic access Bluetooth device cascade method, which is characterized by comprising the following steps: when the master Bluetooth equipment is in a paging scanning state, taking an address of the paging scanning state as a first connection address; when the master Bluetooth device is detected to be paged by a slave Bluetooth device, establishing a communication connection between the master Bluetooth device and the slave Bluetooth device, wherein the communication connection is communicated with the master Bluetooth device through a device address of the slave Bluetooth device; and paging and communicating with the next Bluetooth device through the first connection address according to the slave Bluetooth device.
According to the dynamic access Bluetooth device cascade method, when the master Bluetooth device is started, the address of the own Bluetooth device is used as a second connection address.
The method for cascading the dynamically accessed Bluetooth devices, wherein the communication connection comprises the following steps: and connecting with the device address of the slave Bluetooth device through the second connection address, wherein the second connection address has uniqueness.
According to the dynamically accessed Bluetooth device cascading method, when the master Bluetooth device is detected to be paged by the slave Bluetooth device, establishing the communication connection between the master Bluetooth device and the slave Bluetooth device comprises the following steps: if the slave Bluetooth equipment is paged, the master Bluetooth equipment acquires the address of the slave Bluetooth equipment from the FHS packet, communicates with the master Bluetooth equipment by adopting the equipment address in the FHS packet, and pages the next Bluetooth equipment by adopting the first connection address, wherein the first connection address is a general paging address.
The method for cascading the dynamically accessed Bluetooth devices further comprises the following steps: and after the slave Bluetooth equipment completes the connection with the master Bluetooth equipment, entering a paging scanning state to search for next Bluetooth equipment, switching the identity of the slave Bluetooth equipment to be the master Bluetooth equipment when the slave Bluetooth equipment is successfully connected with the next Bluetooth equipment, and repeatedly executing until the cascade connection of a plurality of Bluetooth equipment is completed.
The method for cascading the dynamically accessed Bluetooth devices further comprises the following steps: and the slave Bluetooth equipment can dynamically cascade one or more pieces of equipment when entering a paging scanning state after completing the connection with the master Bluetooth equipment.
The technical solution of the present invention further includes a dynamic access bluetooth device cascade apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes any of the method steps described in the computer program.
The present invention also includes an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the method steps when executing the computer program.
The invention has the beneficial effects that: the connection method is simple, the connection speed is high, and the efficiency is high; limitation of the number of devices without cascade connection; all the devices have the same firmware, only the device addresses are different, and any one device can be dynamically cascaded into the network.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 is a schematic diagram of a Bluetooth cascade;
FIG. 2 illustrates an overall flow diagram according to an embodiment of the invention;
FIG. 3 is a detailed flow diagram according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a Bluetooth dynamic concatenation according to an embodiment of the present invention;
fig. 5 is a diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number.
In the description of the present invention, the method steps are labeled consecutively for convenience of examination and understanding, and the implementation order of the steps is adjusted without affecting the technical effect achieved by the technical solution of the present invention by combining the whole technical solution of the present invention and the logical relationship between the steps.
In the description of the present invention, unless otherwise specifically limited, the terms such as set forth and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meanings of the above terms in combination with the detailed contents of the technical solutions.
Interpretation of terms:
FHS packet, including bluetooth apparatus address and clock information;
inquiry/inquiry scan;
page/page scan, page/page scan.
Fig. 2 shows a general flow chart according to an embodiment of the invention, the flow chart comprising: when the main Bluetooth device is in a paging scanning state, taking an address in the paging scanning state as a first connection address; when the master Bluetooth device is detected to be paged by the slave Bluetooth device, establishing communication connection between the master Bluetooth device and the slave Bluetooth device, wherein the communication connection is communicated with the master Bluetooth device through the device address of the slave Bluetooth device; and paging and communication are carried out with the next Bluetooth device through the first connection address according to the slave Bluetooth device. The first connection address is a general paging address, and is used separately from the self address of the Bluetooth device during scanning and connection. In the technical scheme of the invention, the Bluetooth devices have the same firmware, only the device addresses are different, and any one device can be dynamically cascaded to access the network.
Fig. 3 is a detailed flow chart according to an embodiment of the present invention, which includes the following steps:
the Bluetooth starting up address is the self address;
entering a connection waiting state, starting a page/scan, and setting the address of the page/scan as a universal paging address;
if the other equipment pages arrive, the address of the equipment is obtained from the FHS packet, the equipment address in the FHS packet is adopted to communicate with the master equipment, and the slave equipment enters a connection state with the upper-level equipment and adopts the next Bluetooth equipment of the universal paging address Bluetooth equipment page;
after the Page reaches the equipment, the Page serves as main equipment and adopts the address of the Page to enter a main equipment connection state with the equipment;
the equipment is connected with the upper-level equipment as slave equipment;
as main equipment, connecting with next-level equipment; the connection process is completed. Is to separate the address used when establishing the connection from the address used when being connected. When the device is connected/waits for connection, a universal connection address is adopted to carry out page/page scan. And after the page is successful, switching to the address of the main device. Therefore, any one device can be accessed into the cascade network, and the communication among the devices can not be interfered because the addresses of the Bluetooth connections are different.
Fig. 4 is a schematic diagram of dynamic bluetooth cascade according to an embodiment of the present invention, where as shown in the diagram, M1, M2, M31 and M32, and MN1 and MN2 are bluetooth devices that are dynamically cascaded in sequence, and after each slave bluetooth device is connected, a subsequent dynamic cascade of multiple bluetooth devices may be performed.
Fig. 5 is a diagram of an apparatus according to an embodiment of the present invention. The apparatus comprises a memory 100 and a processor 200, wherein the processor 200 stores a computer program for performing: when the main Bluetooth device is in a paging scanning state, taking an address in the paging scanning state as a first connection address; when the master Bluetooth device is detected to be paged by the slave Bluetooth device, establishing a communication connection between the master Bluetooth device and the slave Bluetooth device, wherein the communication connection is communicated with the master Bluetooth device through a device address of the slave Bluetooth device; and paging and communication are carried out with the next Bluetooth device through the first connection address according to the slave Bluetooth device. The first connection address is a general paging address, and is used separately from the self address of the Bluetooth device during scanning and connection. Wherein the memory 100 is used for storing data.
It should be recognized that the method steps in embodiments of the present invention may be embodied or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method may use standard programming techniques. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated onto a computing platform, such as a hard disk, optically read and/or write storage media, RAM, ROM, etc., so that it is readable by a programmable computer, which when read by the computer can be used to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (7)

1. A dynamic access Bluetooth device cascading method is characterized by comprising the following steps:
when the master Bluetooth equipment is in a paging scanning state, taking an address of the paging scanning state as a first connection address;
when detecting that the master Bluetooth device is paged by a slave Bluetooth device, establishing a communication connection between the master Bluetooth device and the slave Bluetooth device, wherein the communication connection is communicated with the master Bluetooth device through a device address of the slave Bluetooth device;
paging and communicating with the next Bluetooth device through the first connection address according to the slave Bluetooth device;
and after the slave Bluetooth equipment completes the connection with the master Bluetooth equipment, entering a paging scanning state to search for next Bluetooth equipment, switching the identity of the slave Bluetooth equipment to be the master Bluetooth equipment when the slave Bluetooth equipment is successfully connected with the next Bluetooth equipment, and repeatedly executing until the cascade connection of a plurality of Bluetooth equipment is completed.
2. The method as claimed in claim 1, wherein the master bluetooth device takes the address of its own bluetooth device as the second connection address when starting up.
3. The dynamic access Bluetooth device cascading method of claim 2, wherein the communication connection comprises:
and connecting with the device address of the slave Bluetooth device through the second connection address, wherein the second connection address has uniqueness.
4. The method as claimed in claim 1, wherein the step of establishing the communication connection between the master bluetooth device and the slave bluetooth device when the master bluetooth device is detected to be paged by the slave bluetooth device comprises:
if the slave Bluetooth equipment is paged, the master Bluetooth equipment acquires the address of the slave Bluetooth equipment from the FHS packet and adopts the equipment address in the FHS packet to communicate with the master Bluetooth equipment,
and paging the next Bluetooth device by adopting the first connection address, wherein the first connection address is a general paging address.
5. The dynamic access Bluetooth device cascading method of claim 1, further comprising: and the slave Bluetooth equipment can dynamically cascade one or more pieces of equipment when entering a paging scanning state after completing the connection with the master Bluetooth equipment.
6. A dynamic access bluetooth device cascade apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method steps of any of claims 1 to 5 when executing the computer program.
7. An electronic device, characterized in that the electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor realizes the method steps of any of claims 1-5 when executing the computer program.
CN202110411564.4A 2021-04-16 2021-04-16 Dynamic access Bluetooth device cascading method and device and electronic device Active CN113301545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110411564.4A CN113301545B (en) 2021-04-16 2021-04-16 Dynamic access Bluetooth device cascading method and device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110411564.4A CN113301545B (en) 2021-04-16 2021-04-16 Dynamic access Bluetooth device cascading method and device and electronic device

Publications (2)

Publication Number Publication Date
CN113301545A CN113301545A (en) 2021-08-24
CN113301545B true CN113301545B (en) 2023-04-14

Family

ID=77318784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110411564.4A Active CN113301545B (en) 2021-04-16 2021-04-16 Dynamic access Bluetooth device cascading method and device and electronic device

Country Status (1)

Country Link
CN (1) CN113301545B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716072A (en) * 2013-12-20 2014-04-09 天地融科技股份有限公司 Bluetooth device connection method, master bluetooth device and slave bluetooth device
CN108738003A (en) * 2018-05-07 2018-11-02 杨晓花 Bluetooth matching method and system based on shared bluetooth communication address
CN110636485A (en) * 2019-09-20 2019-12-31 深圳市万普拉斯科技有限公司 Bluetooth automatic connection method and method for initiating Bluetooth connection
CN111405492A (en) * 2020-04-08 2020-07-10 浙江大华技术股份有限公司 Method, device, storage medium, and electronic device for connecting to target network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8442434B2 (en) * 2006-05-24 2013-05-14 Broadcom Corporation Method and system for auto coexistence priority selection for a SCO link
KR102613405B1 (en) * 2019-02-12 2023-12-14 삼성전자주식회사 Method for sharing for Bluetooth communication Information and Electronic Device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716072A (en) * 2013-12-20 2014-04-09 天地融科技股份有限公司 Bluetooth device connection method, master bluetooth device and slave bluetooth device
CN108738003A (en) * 2018-05-07 2018-11-02 杨晓花 Bluetooth matching method and system based on shared bluetooth communication address
CN110636485A (en) * 2019-09-20 2019-12-31 深圳市万普拉斯科技有限公司 Bluetooth automatic connection method and method for initiating Bluetooth connection
CN111405492A (en) * 2020-04-08 2020-07-10 浙江大华技术股份有限公司 Method, device, storage medium, and electronic device for connecting to target network

Also Published As

Publication number Publication date
CN113301545A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN111352597B (en) Multi-screen display control method and device, electronic equipment and readable storage medium
US20160004564A1 (en) Method for task scheduling and electronic device using the same
US10303135B2 (en) Method and apparatus for controlling smart home device
CN105335309A (en) Data transmission method and computer
US10862698B2 (en) Method and device for searching for and controlling controllees in smart home system
CN111786737B (en) Data transmission method, data transmission device, storage medium, and electronic device
CN103986602A (en) Method for start-up operation system, related device and system
CN116028455A (en) Data processing method and device, storage medium and electronic equipment
CN113301545B (en) Dynamic access Bluetooth device cascading method and device and electronic device
CN109302669B (en) Polling mechanism setting method and device, storage medium and electronic equipment
CN108885110B (en) Positioning method, positioning device, positioning system and readable storage medium
CN109120731B (en) Universal communication method, system and device
CN112491956B (en) Upgrading method and device of communication module in Internet of things equipment and computer equipment
CN113660134B (en) Port detection method, device, electronic device and storage medium
CN107911816A (en) Startup method, multimode IoT equipment and storage medium for multimode IoT equipment
CN111669355B (en) Method for batch processing of nginx network isolation space and nginx server
CN109992197B (en) Data reading and writing method and device, electronic equipment and storage medium
CN113391931A (en) Remote control method and device based on Bluetooth, computer equipment and storage medium
CN109274175B (en) Power distribution terminal extension method and device based on power distribution automation system
CN111669423B (en) Batch processing method and system of network isolation space based on user mode protocol stack
CN112511441A (en) Message processing method and device
CN107526686B (en) Data processing circuit and data processing method
CN104951406A (en) Paging type address space management method and controller
CN117687703B (en) Method, device and system for starting server, storage medium and electronic equipment
CN115397033B (en) Wireless communication method, wireless communication device, wireless communication module, medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant