CN112969146B - Efficient communication method based on Bluetooth broadcast in elevator scene - Google Patents

Efficient communication method based on Bluetooth broadcast in elevator scene Download PDF

Info

Publication number
CN112969146B
CN112969146B CN202110193037.0A CN202110193037A CN112969146B CN 112969146 B CN112969146 B CN 112969146B CN 202110193037 A CN202110193037 A CN 202110193037A CN 112969146 B CN112969146 B CN 112969146B
Authority
CN
China
Prior art keywords
message
app
ble
bluetooth
elevator
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
CN202110193037.0A
Other languages
Chinese (zh)
Other versions
CN112969146A (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.)
Shanghai Jisheng Network Technology Co ltd
Original Assignee
Shanghai Jisheng Network 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 Shanghai Jisheng Network Technology Co ltd filed Critical Shanghai Jisheng Network Technology Co ltd
Priority to CN202110193037.0A priority Critical patent/CN112969146B/en
Publication of CN112969146A publication Critical patent/CN112969146A/en
Application granted granted Critical
Publication of CN112969146B publication Critical patent/CN112969146B/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/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B1/00Control systems of elevators in general
    • B66B1/02Control systems without regulation, i.e. without retroactive action
    • B66B1/06Control systems without regulation, i.e. without retroactive action electric
    • B66B1/14Control systems without regulation, i.e. without retroactive action electric with devices, e.g. push-buttons, for indirect control of movements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B1/00Control systems of elevators in general
    • B66B1/34Details, e.g. call counting devices, data transmission from car to control system, devices giving information to the control system
    • B66B1/46Adaptations of switches or switchgear
    • 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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B2201/00Aspects of control systems of elevators
    • B66B2201/40Details of the change of control mode
    • B66B2201/46Switches or switchgear
    • B66B2201/4607Call registering systems
    • B66B2201/4653Call registering systems wherein the call is registered using portable devices
    • 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 discloses an efficient communication method based on Bluetooth broadcasting in an elevator scene, which adopts a device comprising a mobile phone APP terminal, a BLE terminal and a CPU; according to the method, a mobile phone number is used as a mobile phone Bluetooth end communication address at an APP end, a lift related unique ID is used as an address at a BLE end, under the related scene of a lift for the lift, a plurality of APPs or a plurality of Bluetooth BLE ends broadcast data mutually at the same time, respective protocol interaction is completed by depending on address guide retrieval of an application layer protocol, a target APP address is compressed in downlink data in a CRC16 mode, a broadcast message frame is used for carrying a plurality of downlink message replies, and the BLE end has 1-to-many APP communication capacity. The method provided by the invention realizes multi-request and high-concurrency communication by adopting a mode of checking the address compression code and adding the message serial number in an application protocol layer, thereby ensuring that a plurality of concurrent ladder-using requests can be quickly responded and replied at the same time.

Description

Efficient communication method based on Bluetooth broadcast in elevator scene
Technical Field
The invention relates to a communication method used in the field of elevators, in particular to an efficient communication method based on Bluetooth broadcasting in an elevator scene for an elevator.
Background
When an existing elevator passenger calls a call and registers with elevator authority, an IC card is mostly adopted for card swiping authorization, the passenger needs to register in a property center before using to get an entity card, registers and issues related authority information through a computer client, and if the card is lost, the passenger needs to be lost, logged out and re-claimed; in addition, due to the card issuing cost or the flow limitation of the entity card, the time cost and labor cost for the permission issuing of the visitors needing authorization in a shopping mall or an office building can be greatly increased. In conclusion, the method of using the IC card as the elevator authority issuing has the problems of complex issuing process, easy card loss, inconvenient management, insufficient environmental protection and the like.
Meanwhile, in view of the popularization of the existing smart phones, the Bluetooth is already the standard peripheral of the smart phones, and the high-end, middle-end and low-end phones are equipped with and support Bluetooth protocols, so that a hardware basis is fundamentally provided for the application of the Bluetooth on the elevator. The mainstream application mode of the bluetooth technology in the elevator technology is the mode of establishing connection, but the problem of prolonging the connection establishment and limiting the quantity of concurrent communication exists in the pure connection establishment and then interactive communication.
Disclosure of Invention
The invention aims to provide a communication method used in the field of elevators, which aims at the existing problems, uses mobile phone Bluetooth to apply for elevator-using permission, creatively adopts a mode of address compression code check and message sequence number in an application protocol layer to realize multi-request and high-concurrency communication, thereby ensuring that a plurality of people can quickly respond to elevator-using requests and reply at the same time.
In order to achieve the aim, the invention provides an efficient communication method based on Bluetooth broadcasting in an elevator scene, wherein the method adopts a device comprising the following steps: the Bluetooth module end is a BLE end, and the processor end is a CPU end; the high-efficiency communication method is characterized in that a mobile phone number is used as a mobile phone Bluetooth end communication address at an APP end, a lift-related unique ID is used as an address at a BLE end, under the lift-related scene, multiple APPs or multiple Bluetooth BLE ends broadcast data mutually at the same time, address guide retrieval depending on an application layer protocol is realized, respective protocol interaction is completed, a CRC16 mode is used for compressing a destination APP address in downlink data, multiple downlink message replies are carried by utilizing a broadcast message frame, the BLE end has 1-to-multiple APP communication capacity, when a plurality of people use lift requests of APPs at the same time, downlink reply of messages is efficiently completed, and the communication success rate is improved.
In the method, a module for system communication comprises an APP end, a BLE end and a CPU end, an actual usage scenario comprises a plurality of APP ends and BLE ends, and the APP ends and the BLE ends must be unique address IDs assigned by the system to ensure normal completion of communication and handshake establishment; the APP terminal adopts BCD codes of the rear 10 digits of the mobile phone number as unique IDs; BLE end and CPU end directly link, by CPU end direct configuration one with the relevant only ID of elevator serial number, adopt 3 bytes as BLE end address, the ID display of BLE end embodies on the bluetooth name, in addition elevator bluetooth name prefix discernment head, as APP end discernment current user whether have this elevator use the mark of authority.
The efficient communication method for the Bluetooth broadcast in the elevator scene is based on the Bluetooth protocol 4.2 and above, the application layer protocol is based on the ADV _ IND type in the broadcast protocol, namely the universal broadcast messages, the effective available data load length of each broadcast message is 31 bytes, and a three-terminal communication interaction protocol of an APP terminal, a BLE terminal and a CPU terminal is formulated according to the characteristics of the broadcast messages; the Bluetooth and BLE terminals of the mobile phone work in slave modes, mutual broadcast type communication is realized in a communication range through broadcast data, fields of source addresses, destination addresses and command contents are defined for the contents of broadcast messages, so that a plurality of mobile phones can simultaneously communicate with the BLE terminals without establishing connection with the BLE terminals, the requirements of calling/registering by a plurality of people at the same time and efficiently are met.
The efficient communication method for the Bluetooth broadcast in the elevator scene is characterized in that the mobile phone APP terminal is responsible for calling a system Bluetooth function, and the calling comprises the steps of sending the Bluetooth broadcast and monitoring Bluetooth broadcast messages; the CPU end is provided with an MCU which is responsible for processing the information processing of the user APP end and the interaction of the elevator controller; and the BLE end buffers and forwards the messages of the APP end and the CPU end.
The efficient communication method for the Bluetooth broadcast in the elevator scene is characterized in that: the BLE end acquires a uniquely mapped Bluetooth name associated with a current elevator through the CPU end every time the BLE end is electrified, the APP end scans the Bluetooth name and then compares the Bluetooth name with a current user database to determine whether the APP end has the authority of the elevator, if the APP end has the authority of using the elevator, the APP end initiates a ladder using request through Bluetooth broadcasting and sends the ladder using an ASK1 message format, the BLE end receives an ASK1 message of the APP and then forwards the message to a sub-CPU end through a serial port, and the CPU end receives an ASK1 message and then compares the authority of the user and whether the elevator can be executed and returns an RET1 message; ASK1 and RET1 are a pair of handshake protocols, handshake is guaranteed through address check and message sequence numbers, after the APP end receives the RET1 message, the state of the DATA section is analyzed, and the result of the current elevator execution state is fed back to a user.
In the communication process, after scanning the available bluetooth name of the elevator, the APP sends an ASK1 message to the BLE end in a period of Ts1, the BLE end transparently transmits the message to the CPU end, the CPU end determines the current user authority and the elevator state, and then gives a RET1 message back to the APP end, when the APP end receives a RET1 message within Ttimeout1, a communication is completed, and if no message is received within a timeout Ttimeout1, the handshake request fails; in the process, the BLE terminal receives RET _ BLOCK messages from the CPU through the serial port, one RET _ BLOCK is stored in the sending buf, and the anti-repetition processing is carried out; when the APP terminal receives any Bluetooth broadcast message verification CS, RET _ BLOCK of each message is retrieved, whether the CRC16 compression code is matched with the compression code generated by the mobile phone number of the APP terminal is checked, the sequence number of the current ASK1 request message is compared, and if the comparison is successful, the request is replied to complete one-time handshake communication.
The efficient communication method for the Bluetooth broadcast in the elevator scene is characterized in that 8 RET _ BLOCK data are stored in the BLE terminal at most, the broadcast transmission life cycle of each RET _ BLOCK is RET _ BLOCK _ St time and is limited by the limitation of Bluetooth broadcast length, 4 RET _ BLOCK data can be transmitted in each BLE broadcast message at most, and only one piece of broadcast is transmitted when the number m of the RET _ BLOCKs to be transmitted is less than or equal to 4; when the number m is less than or equal to 8, two messages are broadcast and sent, when the life cycle of any RET _ BLOCK is ended, zero is filled in the sending position, and when m is less than or equal to 4, a message is sent back.
In the method, two protocol formats are formulated due to different data transmission of two message types, namely ASK1 and RET1, and are respectively an uplink protocol format A from an APP end to an MCU (microprogrammed control unit) and a downlink protocol format B from a CPU end to the APP end; the target ID of the protocol format A is a BLE end ID, each two bits of 6 bytes after the Bluetooth name of the BLE end are converted into hexadecimal values, the source ID is the last 10 bits of the current mobile phone APP mobile phone number, each two bits are converted into compressed BCD codes to be represented, the length is the byte length occupied by the instruction type and the data, and the CS verification is that the low byte value is obtained by the sum of all fields of the target ID, the source ID, the length, the instruction type and the data.
The above efficient communication method for bluetooth broadcast in the elevator scenario, wherein the protocol format B has a length of nx4 bytes, each RET _ BLOCK has 4 bytes, each RET _ BLOCK has N RET _ BLOCKs, when a RET1 message is transmitted from the CPU end to the BLE end, N is 1, and when a RET1 message is transmitted from the BLE end to the APP end, N is less than or equal to 4; the specific value standard of N depends on the transmission object of RET1, N is 1 when the CPU end transmits to the BLE end, N is more than or equal to 0 and less than or equal to 4 when the BLE end transmits the CPU message to the APP, and N RET _ BLOCKs are sent depending on the current buffer of the BLE end; CS check is that the sum of length + RET _ BLOCK data takes the low byte value; RET _ BLOCK consists of CRC16+ MSG _ INDEX + DATA triplets.
The efficient communication method for the Bluetooth broadcast in the elevator scene is characterized in that the algorithm of the CRC16 adopts the CRC16-MODBUS standard, the CRC16 verification code corresponds to 5 hexadecimal byte data by removing the rear 10 bits after the first bit 1 from the mobile phone number, and 2 byte data is generated by the CRC16-MODBUS algorithm; the MSG _ INDEX is a message sequence number, which corresponds to the message sequence number sent by the uplink message, after receiving the message, the APP firstly judges whether the CRC16 check code passes, and then judges whether the MSG _ INDEX is consistent, and the MSG _ INDEX and the APP verify that the DATA in the message can be used for dispatching the elevator DATA; after receiving the RET1 message, the APP terminal determines whether the received message is the local message by calculating the CRC16-MODBUS code of the current user mobile phone number and comparing the message sequence number, thereby obtaining the elevator feedback information requested last time and displaying the elevator feedback information to the user for checking.
The efficient communication method for the Bluetooth broadcast in the elevator scene provided by the invention has the following advantages:
when the mobile phone Bluetooth broadcasting technology is applied to the elevator scene, the invention has the main advantages that:
(1) convenience: after the invention is used, the mobile phone can be provided with a special APP and is directly connected with the data server, and a user can directly register and apply for the authority by using the mobile phone number without applying for the property or the data center on the spot;
(2) digitalizing: after the invention is used, a physical card is not needed, the card loss condition does not exist, even if the mobile phone is lost, the mobile phone number can be used for applying for binding the account again, and meanwhile, the user can trace the history condition of using the elevator more conveniently.
(3) No blocking: after the invention is used, the card sending and holding are not needed, and the invention is low-carbon and environment-friendly.
(4) Non-contact: after the elevator calling system and the elevator calling method are used, a user can call and register the elevator without touching the physical keys of the elevator.
(5) Supporting a multi-person concurrent scene: after the invention is used, the elevator using and calling requests can be simultaneously sent by a plurality of people without queuing and swiping cards, the elevator using permission queuing problem in rush hours on office upstairs and off duty is well solved, and the traditional IC card can be realized by a plurality of card swipes.
Drawings
Fig. 1 is a schematic diagram of the system device for the efficient communication method of bluetooth broadcasting in the elevator scene.
Fig. 2 is a communication link diagram of the efficient communication method for bluetooth broadcasting in an elevator scene.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
The invention provides a high-efficiency communication method for Bluetooth broadcasting in an elevator scene, which adopts the following devices: the Bluetooth module end is a BLE end, and the processor end is a CPU end; the high-efficiency communication method is characterized in that a mobile phone number is used as a mobile phone Bluetooth end communication address at an APP end, a lift-related unique ID is used as an address at a BLE end, under the lift-related scene, multiple APPs or multiple Bluetooth BLE ends broadcast data mutually at the same time, address guide retrieval depending on an application layer protocol is realized, respective protocol interaction is completed, a CRC16 mode is used for compressing a destination APP address in downlink data, multiple downlink message replies are carried by utilizing a broadcast message frame, the BLE end has 1-to-multiple APP communication capacity, when a plurality of people use lift requests of APPs at the same time, downlink reply of messages is efficiently completed, and the communication success rate is improved.
The method comprises the steps that a module of system communication comprises an APP end, a BLE end and a CPU end, an actual use scene comprises a plurality of APP ends and a BLE end, and the APP ends and the BLE end need to be unique address IDs appointed by the system so as to guarantee normal completion of communication and handshake establishment; the APP terminal adopts a BCD code of the rear 10 digits of the mobile phone number as a unique ID; BLE end and CPU end directly link, by CPU end direct configuration one with the relevant only ID of elevator serial number, adopt 3 bytes as BLE end address, the ID display of BLE end embodies on the bluetooth name, in addition elevator bluetooth name prefix discernment head, as APP end discernment current user whether have this elevator use the mark of authority.
The method is based on a Bluetooth protocol version 4.2 and above, an application layer protocol is based on an ADV _ IND (non-directional broadcast) type in a broadcast protocol, namely a universal broadcast message, the length of an effective available data load of each broadcast message is 31 bytes, and a three-terminal communication interaction protocol of an APP terminal, a BLE terminal and a CPU terminal is formulated according to the characteristics of the broadcast messages; the Bluetooth and BLE terminals of the mobile phone work in slave modes, mutual broadcast type communication is realized in a communication range through broadcast data, fields of source addresses, destination addresses and command contents are defined for the contents of broadcast messages, so that a plurality of mobile phones can simultaneously communicate with the BLE terminals without establishing connection with the BLE terminals, the requirements of calling/registering by a plurality of people at the same time and efficiently are met.
ADV _ IND, a connectable non-directional broadcast, is the most common type of bluetooth broadcast including broadcast data and scan response data, which indicates that the current device can accept any device connection request while user-defined data can be piggybacked in the message. The master-slave mode is a client/server structure, the client and the server are in master-slave relationship, and the client/server structure is a one-to-many mode, the information and data of the client/server structure need to be stored on the server, if a user wants to browse and download the information, the user needs to access the server first to browse and download the information, and the client/server structure has no interactive capability.
The mobile phone APP terminal is responsible for calling a system Bluetooth function, and the calling comprises the steps of sending Bluetooth broadcast and monitoring Bluetooth broadcast information; the CPU end is provided with an MCU (micro control unit) which is responsible for processing the information processing of the user APP end and the interaction of the elevator controller; and the BLE end buffers and forwards the messages of the APP end and the CPU end.
The communication process in the method is as follows: the BLE end acquires a uniquely mapped Bluetooth name associated with a current elevator through the CPU end every time the BLE end is electrified, the APP end scans the Bluetooth name and then compares the Bluetooth name with a current user database to determine whether the APP end has the authority of the elevator, if the APP end has the authority of using the elevator, the APP end initiates a ladder using request through Bluetooth broadcasting and sends the ladder using an ASK1 message format, the BLE end receives an ASK1 message of the APP and then forwards the message to a sub-CPU end through a serial port, and the CPU end receives an ASK1 message and then compares the authority of the user and whether the elevator can be executed and returns an RET1 message; ASK1 and RET1 are a pair of handshake protocols, which guarantee handshake through address check and message sequence number, when receiving RET1 message at APP end, resolve DATA segment state, and feed back to user current elevator execution state result.
In the communication process, after scanning available Bluetooth names of the elevators, the APP sends an ASK1 message to a BLE end in a Ts1 period, the BLE end transparently transmits the message to a CPU end, the CPU end gives a RET1 message return to the APP end after judging the current user authority and the elevator state, when the APP end receives the RET1 message in Ttime out1, one-time communication is completed, and if the message is not received in time out Ttime out1, the handshake request is failed; in the process, the BLE terminal receives RET _ BLOCK messages from the CPU through a serial port, one RET _ BLOCK is stored in a transmitting buf (buffer area), and anti-repeat processing is performed; when the APP terminal receives any Bluetooth broadcast message verification CS, RET _ BLOCK of each message is retrieved, whether the CRC16 compression code is matched with the compression code generated by the mobile phone number of the APP terminal is checked, the sequence number of the current ASK1 request message is compared, and if the comparison is successful, the request is replied to complete one-time handshake communication.
The method comprises the steps that 8 RET _ BLOCK data are stored in a BLE terminal at most, the broadcasting transmission life cycle of each RET _ BLOCK is RET _ BLOCK _ St time and is limited by Bluetooth broadcasting length, each BLE broadcasting message can transmit 4 RET _ BLOCK data at most, and only one piece of broadcasting is transmitted when the number m of RET _ BLOCKs to be transmitted is less than or equal to 4; when the number m is less than or equal to 8, two messages are broadcast and sent, when the life cycle of any RET _ BLOCK is ended, zero is filled in the sending position, and when m is less than or equal to 4, a message is sent back.
In the method, two protocol formats are formulated as the ASK1 and RET1 have different message types of data transmission, namely an uplink protocol format A from an APP end to an MCU (microprogrammed control Unit) and a downlink protocol format B from a CPU end to the APP end; the target ID of the protocol format A is a BLE end ID, each two bits of 6 bytes after the Bluetooth name of the BLE end are converted into hexadecimal values, the source ID is the last 10 bits of the current mobile phone APP mobile phone number, each two bits are converted into compressed BCD codes to be represented, the length is the byte length occupied by the instruction type and the data, and the CS verification is that the low byte value is obtained by the sum of all fields of the target ID, the source ID, the length, the instruction type and the data. The BCD code (Binary-Coded Decimal) is a Binary digit code which uses 4-digit Binary numbers to represent 10 digits of 0-9 in 1 digit Decimal numbers, and is a Binary digit code form and uses Binary Coded Decimal numbers.
Protocol format B is N × 4 bytes long, each RET _ BLOCK has 4 bytes, each message has N RET _ BLOCKs, when RET1 message is transferred from CPU end to BLE end, N is 1, when RET1 message is transferred from BLE end to APP end, N is not more than 4; the specific value standard of N depends on the transmission object of RET1, N is 1 when the CPU end transmits to the BLE end, N is more than or equal to 0 and less than or equal to 4 when the BLE end transmits the CPU message to the APP, and N RET _ BLOCKs are sent depending on the current buffer of the BLE end; CS check is that the sum of length + RET _ BLOCK data takes the low byte value; RET _ BLOCK consists of CRC16+ MSG _ INDEX + DATA triplets.
The algorithm of the CRC16 adopts the CRC16-MODBUS standard, the CRC16 identifying code removes the back 10 bits after the first bit 1 from the mobile phone number, corresponds to 5 hexadecimal byte data, and generates 2 byte data through the CRC16-MODBUS algorithm; the MSG _ INDEX is a message sequence number, which corresponds to the message sequence number sent by the uplink message, after receiving the message, the APP firstly judges whether the CRC16 check code passes, and then judges whether the MSG _ INDEX is consistent, and the MSG _ INDEX and the APP verify that the DATA in the message can be used only after passing, namely dispatch ladder DATA; after receiving the RET1 message, the APP end determines whether the message received at that time is the local message by calculating the CRC16-MODBUS code of the current user mobile phone number and comparing the message sequence number, thereby obtaining the elevator feedback information requested at the last time and displaying the elevator feedback information to the user for checking.
The CRC16 checking algorithm, that is, the cyclic check code (CRC code) is one of the most commonly used error check codes in the field of data communication, and is characterized in that the lengths of the information field and the check field can be arbitrarily selected. The basic principle of generating a CRC code is that any code consisting of a binary string of bits can be one-to-one mapped to a polynomial whose coefficients are only '0' and '1'. The most common CRC-16 check can be used for information transmission according to the Modbus protocol.
The efficient communication method for bluetooth broadcasting in the elevator scene provided by the invention is further described below with reference to the embodiments.
Example 1
An application device of the method consists of three parts, namely a mobile phone APP end (APP end for short), a Bluetooth module end (BLE end) and a processor end (CPU). As shown in fig. 1.
The method is applied to versions of Bluetooth protocol 4.2 and above, an application layer protocol is based on ADV _ IND type-general broadcast messages in a broadcast protocol, the effective available data load length of each broadcast message is 31 bytes, and a three-terminal (APP terminal, BLE terminal and CPU terminal) communication interaction protocol is formulated based on the characteristics. The Bluetooth and BLE terminals of the mobile phone work in slave modes, mutual broadcast type communication is realized in a communication range through broadcast data, fields such as source addresses, destination addresses and command contents are defined for broadcast message contents, so that a plurality of mobile phones can communicate with the BLE terminals at the same time without establishing connection with the BLE terminals, and the requirement of efficient elevator use (calling/registering) of a plurality of people at the same time is met.
The APP terminal of the mobile phone is responsible for calling the system Bluetooth function, including sending Bluetooth broadcast and monitoring Bluetooth broadcast messages. And the CPU side is responsible for processing the interaction between the message processing of the user APP side and the elevator controller. And the BLE end buffers and forwards the messages of the APP end and the CPU end.
In the method, the communication flow principle is as follows: the BLE end is electrified at every turn and can acquire the only bluetooth name of mapping that current elevator is correlated with through the CPU end, APP end scan behind the bluetooth name with current user database contrast have this elevator permission, if can use this elevator, then the APP end is through the initiative ladder request of bluetooth broadcast, use ASK1 message format to send, BLE end receives behind the ASK1 message of APP and forwards to branch CPU end through the serial ports, CPU end compares behind the ASK1 message whether user permission and elevator executable state give and returns RET1 message. ASK1 and RET1 are a pair of handshake protocols that guarantee handshake by address check and message sequence number. And after receiving the RET1 message, the APP terminal analyzes the state of the date section and feeds back the current elevator execution state result to the user. The communication link principle is illustrated with reference to fig. 2.
In the method, the address of the communication module is formulated as follows: the modules participating in the whole system communication comprise APP ends, BLE ends and CPU ends, and the actual use scene can meet the situations of a plurality of APP ends and a plurality of BLE ends. Therefore, the APP end and the BLE end are both required to be unique address IDs assigned by the system, so that normal completion of communication and handshake establishment can be guaranteed. The APP end, in combination with the feature of the mobile phone use, uses the BCD code of the last 10 digits of the mobile phone number as a unique ID, for example, 13912345678, which is 0x 390 x 120 x 340 x 560 x 78. The BLE end and the CPU end are directly connected, so that the CPU end directly configures a unique ID related to an elevator number, and here, 3 bytes are used as an address of the BLE end, such as 0x 110 x 220 x 33. The BLE terminal ID is explicitly embodied on a Bluetooth name, an identification head 'Elveator' is added to the Bluetooth name prefix of the Elevator, the Bluetooth name is an Elevator112233, and the BLE terminal ID is used as an important identification for identifying whether a current user has the Elevator use permission or not by the APP terminal.
In the method, a communication protocol is formulated as follows: considering that the data transmission of the two message types of ASK1 and RET1 are particularly different, two protocol formats are established.
Protocol format a (APP- > MCU uplink), as shown in table 1 below.
Table 1 protocol format a parameter table.
Figure GDA0003530470870000091
Destination ID: namely, the BLE end ID, each two bits of the 6 bytes after the bluetooth name of the BLE end are converted into hexadecimal values, for example, the Elevator112233, the BLE end address is 0x 110 x 220 x 33;
a source ID: that is, the last 10 digits of the current mobile phone APP phone number, each two digits are converted into a compressed BCD code to be represented, for example: 13912345678, APP ID is 0x 390 x 120 x 340 x 560 x 78.
Length: indicating the byte length occupied by instruction type + data.
And (3) CS verification: the low byte value is taken by the sum of all fields of destination ID + source ID + length + instruction type + data.
Protocol format B (APP < -CPU downlink), as shown in Table 2 below.
Table 2 protocol format B parameter table.
Figure GDA0003530470870000092
Figure GDA0003530470870000101
Length: n × 4 bytes, 4 bytes per RET _ BLOCK, N RET _ BLOCKs per message, when a RET1 message is passed on CPU- > BLE side, N ═ 1. When the RET1 message is transmitted at BLE- > APP, N is not more than 4. (the specific value criterion of N depends on the transmission object of RET1, when CPU- > transmission between BLE, N is 1, when the BLE forwards the CPU message to APP, N is not less than 0 and not more than 4, and at this time, N RET _ BLOCKs are sent depending on the current buffer of BLE).
And (3) CS verification: the sum of the length + RET _ BLOCK data takes a low byte value.
RET _ BLOCK: CRC16+ MSG _ INDEX + DATA is composed of 3 parts.
Note: the CRC16 algorithm uses the CRC16-MODBUS standard.
The CRC16 identifying code is the last 10 bits after the first bit 1 is removed by the mobile phone number, corresponding to 5 hexadecimal byte data, 2 byte data generated by the CRC16-MODBUS algorithm. For example, the mobile phone number 18516699978 is intercepted to obtain five data of 0x85, 0x16, 0x69, 0x99 and 0x80, and a CRC16 check code is generated through a CRC16-MODBUS algorithm to obtain 0xF 80 x 57.
The MSG _ INDEX is a message sequence number corresponding to the message sequence number sent by the uplink message, after receiving the message, the APP firstly judges whether the CRC16 check code passes, and then judges whether the MSG _ INDEX is consistent, and the MSG _ INDEX and the APP can use the DATA dispatch ladder DATA in the message only after passing verification. After receiving the RET1 message, the APP terminal calculates the CRC16-MODBUS code of the current user mobile phone number, and compares the message sequence numbers at the same time, so that whether the message received at that time is the local message can be determined, and the elevator feedback information requested at the last time is obtained and displayed for the user to check.
In the method, the detailed communication flow is as follows: after scanning the available Bluetooth name of the elevator, the APP sends an ASK1 message to a BLE end in a period of Ts1, the BLE end transparently transmits the message to a CPU end, the CPU end judges the current user authority and the elevator state, and then gives a RET1 message return to the APP end, when the APP end receives the RET1 message in Ttime out1, one-time communication is completed, and if the message is not received in time out Ttime out1, the handshake request is failed. In the process, a BLE terminal receives RET _ BLOCK messages (one RE _ BLOCK for each message) from a CPU through a serial port, stores one RET _ BLOCK (needing to be subjected to anti-repetition processing) into a transmitting buf, stores 8 RET _ BLOCK data at most in the BLE terminal, and transmits the broadcasting transmission life cycle of each RET _ BLOCK, wherein the broadcasting transmission life cycle of each RET _ BLOCK is RET _ BLOCK _ St time (configurable through a command and limited by Bluetooth broadcasting length limitation (31 bytes), each broadcasting message of the BLE can transmit 4 RET _ BLOCK data at most, and only one piece of broadcasting is transmitted when the number m of the RET _ BLOCKs to be transmitted is less than or equal to 4; and when the number m is less than or equal to 8, broadcasting and sending two messages. When the life cycle of any RET _ BLOCK is over, zero is filled in the sending position by 0x 000 x 000 x 000 x00, and when m is less than or equal to 4, a message is sent back.
When BLE has no RET _ BLOCK message to send idle state: send 11AB 100000000000000000000000000000000010.
The scenario is demonstrated as follows:
1) CPU- > BLE sends RET _ BLOCK _01:0x 110 x 110 x11
Message: 11AB 041111111148
2) BLE receives RET _ BLOCK _01 and RET _ BLOCK _01_ St for timing, and immediately sends broadcast message
Broadcasting messages: 11AB 101111111100000000000000000000000054
3) MCU- > BLE sends RET _ BLOCK _02:0x 220 x 220 x 220 x22
Message: 11AB 042222222248
4) BLE receives RET _ BLOCK _02 and immediately sends broadcast message
Broadcasting messages: 11AB 1011111111222222220000000000000000 DC
5) BLE broadcast message after timing timeout of RET _ BLOCK _01_ St
Broadcasting messages: 11AB 100000000022222222000000000000000010
.....
x) m ═ 8, when BLE broadcasts two messages:
broadcast message 1: 11AB 1011111111222222223333333344444444B 8
And (3) broadcast message 2: 11AB 1055555555666666667777777788888888F 8
x +1) when RET _ BLOCK _01_ St, RET _ BLOCK _02_ St, RET _ BLOCK _03_ St RET _ BLOCK _04_ St times out, the message is broadcast:
broadcast message 1: 11AB 1055555555666666667777777788888888F 8
.......
x + x) all RET _ BLOCK _ St times out, BLE broadcasts a message:
13EF 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10
in the above, after the APP end receives any bluetooth broadcast message check CS, the RET _ BLOCK of each message is retrieved, whether the compressed code generated by the CRC16 in the message matches the compressed code generated by the mobile phone number of the APP end is checked, and meanwhile, the serial number of the current ASK1 request message is compared, if the two are successfully compared, the request is replied to complete one-time handshake communication.
To sum up, use the cell-phone number as cell-phone bluetooth end communication address at the APP end, use the relevant only ID of elevator as the address at BLE end, under the relevant scene, a plurality of APPs or a plurality of bluetooth BLE end broadcast data of each other simultaneously, rely on the address guide retrieval of application layer agreement, accomplish respective agreement interaction, use CRC16 mode compression purpose APP address in downlink data, make full use of a broadcast message frame "carry on" many downlink message reply, downlink bandwidth and message occupation time slot have been practiced thrift, downlink data reply success rate has objectively been increased, make the BLE end possess 1 to many APP communication ability, concrete achievement embodiment is when just using the APP to use the ladder request simultaneously to many people, the downlink reply of message is accomplished to the higher efficiency, improve the communication success rate.
The invention provides an efficient communication method for Bluetooth broadcasting in an elevator scene, which aims at the problems that IC cards are troublesome to card issue, the cards are easy to lose, the authority is more difficult to change and conflict exists in concurrent use in the application of elevator use authority, and the interaction of elevator request messages and elevator response messages is realized by using a BLE broadcasting transparent mode, namely customized application layer protocol interaction is carried out in BLE broadcasting contents. The invention realizes multi-request and high-concurrency communication by using the mobile phone Bluetooth to apply for the elevator-using permission and creatively adopting a mode of address compression code check (CRC16) and message sequence number in an application protocol layer, thereby ensuring that a plurality of people can quickly respond to the elevator-using request and reply at the same time.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (7)

1. An efficient communication method based on Bluetooth broadcasting in an elevator scene is characterized in that the method adopts a device comprising: the Bluetooth module end is a BLE end, and the processor end is a CPU end; the high-efficiency communication method is characterized in that a mobile phone number is used as a mobile phone Bluetooth end communication address at an APP end, a lift-related unique ID is used as an address at a BLE end, under the related scene of a lift for the lift, a plurality of APPs or a plurality of BLE ends broadcast data mutually at the same time, respective protocol interaction is completed by depending on address guide retrieval of an application layer protocol, a target APP address is compressed in downlink data in a CRC16 mode, a plurality of downlink message replies are carried by one broadcast message frame, so that the BLE end has 1-to-many APP communication capacity, when a plurality of persons use lift requests at the same time, downlink reply of messages is efficiently completed, and the communication success rate is improved;
the communication process in the method is as follows: the BLE end acquires a uniquely mapped Bluetooth name associated with a current elevator through the CPU end every time the BLE end is electrified, the APP end scans the Bluetooth name and then compares the Bluetooth name with a current user database to determine whether the APP end has the authority of the elevator, if the APP end has the authority of using the elevator, the APP end initiates a ladder using request through Bluetooth broadcasting and sends the ladder using an ASK1 message format, the BLE end receives an ASK1 message of the APP and then forwards the message to a sub-CPU end through a serial port, and the CPU end receives an ASK1 message and then compares the authority of the user and whether the elevator can be executed and returns an RET1 message; ASK1 and RET1 are a pair of handshake protocols, handshake is guaranteed through address check and message sequence numbers, when an APP end receives a RET1 message, a state of a date section is analyzed, and a current elevator execution state result is fed back to a user;
in the communication process, after scanning the available Bluetooth name of the elevator, the APP sends an ASK1 message to a BLE end in a period of Ts1, the BLE end transparently transmits the message to a CPU end, the CPU end gives a RET1 message back to the APP end after judging the current user authority and the elevator state, when the APP end receives the RET1 message in Ttime out1, one-time communication is completed, and if the message is not received in time out Ttime out1, the handshake request is failed; in the process, the BLE terminal receives RET _ BLOCK messages from the CPU through the serial port, one RET _ BLOCK is stored in the sending buf, and the anti-repetition processing is carried out; when the APP terminal receives any Bluetooth broadcast message verification CS, RET _ BLOCK of each message is retrieved, whether a CRC16 compression code in the RET _ BLOCK is matched with a compression code generated by a mobile phone number of the APP terminal, and meanwhile, the sequence number of the current ASK1 request message is compared, if the two are successfully compared, the request is replied to complete one-time handshake communication;
the method comprises the steps that 8 RET _ BLOCK data are stored in a BLE terminal at most, the broadcasting transmission life cycle of each RET _ BLOCK is RET _ BLOCK _ St time and is limited by Bluetooth broadcasting length limitation, each broadcasting message of the BLE can transmit 4 RET _ BLOCK data at most, and only one broadcasting message is transmitted when the number m of the RET _ BLOCKs to be transmitted is less than or equal to 4; when the number m is less than or equal to 8, two messages are broadcast and sent, when the life cycle of any RET _ BLOCK is ended, zero is filled in the sending position, and when m is less than or equal to 4, a message is sent back.
2. The efficient communication method based on the bluetooth broadcast in the elevator scenario of claim 1, wherein in the method, a module for system communication includes an APP end, a BLE end, and a CPU end, an actual usage scenario includes a plurality of APP ends and BLE ends, and the APP ends and the BLE ends must be unique address IDs assigned by the system to ensure normal completion of communication and handshake establishment; the APP terminal adopts BCD codes of the rear 10 digits of the mobile phone number as unique IDs; BLE end and CPU end directly link, by CPU end direct configuration one with the relevant only ID of elevator serial number, adopt 3 bytes as BLE end address, the ID display of BLE end embodies on the bluetooth name, in addition elevator bluetooth name prefix discernment head, as APP end discernment current user whether have this elevator use the mark of authority.
3. The efficient communication method based on the Bluetooth broadcast in the elevator scene according to claim 1, wherein the method is based on the Bluetooth protocol 4.2 and above, the application layer protocol is based on the ADV _ IND type in the broadcast protocol, namely, the universal broadcast messages, the length of the effective available data load of each broadcast message is 31 bytes, and a three-terminal communication interaction protocol of an APP terminal, a BLE terminal and a CPU terminal is established according to the characteristics of the broadcast messages; the Bluetooth and BLE terminals of the mobile phone work in slave modes, mutual broadcast type communication is realized in a communication range through broadcast data, fields of source addresses, destination addresses and command contents are defined for the contents of broadcast messages, so that a plurality of mobile phones can simultaneously communicate with the BLE terminals without establishing connection with the BLE terminals, the requirements of calling/registering by a plurality of people at the same time and efficiently are met.
4. The efficient communication method based on the Bluetooth broadcast in the elevator scene as claimed in claim 1, wherein the mobile phone APP terminal is responsible for calling system Bluetooth function functions, including sending Bluetooth broadcast and monitoring Bluetooth broadcast messages; the CPU end is provided with an MCU which is responsible for processing the information processing of the user APP end and the interaction of the elevator controller; and the BLE end buffers and forwards the messages of the APP end and the CPU end.
5. The efficient communication method based on Bluetooth broadcasting in the elevator scene as claimed in claim 1, wherein in the method, due to the difference of data transmission between ASK1 and RET1, two protocol formats are established, namely, an APP-to-MCU uplink protocol format A and a CPU-to-APP downlink protocol format B; the target ID of the protocol format A is a BLE end ID, each two bits of 6 bytes after the Bluetooth name of the BLE end are converted into hexadecimal values, the source ID is the last 10 bits of the current mobile phone APP mobile phone number, each two bits are converted into compressed BCD codes to be represented, the length is the byte length occupied by the instruction type and the data, and the CS verification is that the low byte value is obtained by the sum of all fields of the target ID, the source ID, the length, the instruction type and the data.
6. The method according to claim 5, wherein the protocol format B has a length of Nx 4 bytes, each RET _ BLOCK has 4 bytes, each message has N RET _ BLOCKs, when RET1 message is transmitted from CPU end to BLE end, N is 1, when RET1 message is transmitted from BLE end to APP end, N is less than or equal to 4; the specific value standard of N depends on the transmission object of RET1, N is 1 when the CPU end transmits to the BLE end, N is more than or equal to 0 and less than or equal to 4 when the BLE end transmits the CPU message to the APP, and N RET _ BLOCKs are sent depending on the current buffer of the BLE end; CS check is that the sum of length + RET _ BLOCK data takes the low byte value; RET _ BLOCK consists of CRC16+ MSG _ INDEX + DATA triplets.
7. The efficient communication method based on Bluetooth broadcasting in the elevator scene as claimed in claim 6, wherein the algorithm of CRC16 adopts CRC16-MODBUS standard, CRC16 verification code is that the mobile phone number removes the last 10 bits after the first bit 1, corresponding to 5 hexadecimal byte data, and 2 byte data is generated by the algorithm of CRC 16-MODBUS; the MSG _ INDEX is a message sequence number, which corresponds to the message sequence number sent by the uplink message, after receiving the message, the APP firstly judges whether the CRC16 check code passes, and then judges whether the MSG _ INDEX is consistent, and the MSG _ INDEX and the APP verify that the DATA in the message can be used for dispatching the elevator DATA; after receiving the RET1 message, the APP terminal determines whether the received message is the local message by calculating the CRC16-MODBUS code of the current user mobile phone number and comparing the message sequence number, thereby obtaining the elevator feedback information requested last time and displaying the elevator feedback information to the user for checking.
CN202110193037.0A 2021-02-20 2021-02-20 Efficient communication method based on Bluetooth broadcast in elevator scene Active CN112969146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110193037.0A CN112969146B (en) 2021-02-20 2021-02-20 Efficient communication method based on Bluetooth broadcast in elevator scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110193037.0A CN112969146B (en) 2021-02-20 2021-02-20 Efficient communication method based on Bluetooth broadcast in elevator scene

Publications (2)

Publication Number Publication Date
CN112969146A CN112969146A (en) 2021-06-15
CN112969146B true CN112969146B (en) 2022-05-20

Family

ID=76285267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110193037.0A Active CN112969146B (en) 2021-02-20 2021-02-20 Efficient communication method based on Bluetooth broadcast in elevator scene

Country Status (1)

Country Link
CN (1) CN112969146B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106946108A (en) * 2017-03-29 2017-07-14 深圳市旺龙智能科技有限公司 A kind of apparatus for controlling elevator and method
CN107592607A (en) * 2017-09-07 2018-01-16 飞天诚信科技股份有限公司 A kind of bluetooth equipment complex and its communication means
CN108803429A (en) * 2018-07-03 2018-11-13 广东万家乐厨房科技有限公司 Kitchen tools control system and method
CN110356939A (en) * 2019-07-16 2019-10-22 广州诺谱盾信息科技有限公司 A kind of multichannel bluetooth elevator control system and method
CN110996307A (en) * 2019-11-22 2020-04-10 华为技术有限公司 Accessory device, host device and data transmission method
CN111818669A (en) * 2020-06-04 2020-10-23 青岛海信移动通信技术股份有限公司 Mobile terminal and data transmission method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105050033A (en) * 2015-07-01 2015-11-11 惠州Tcl移动通信有限公司 Piconet networking interconnection method and system based on low-power-dissipation Bluetooth and traditional Bluetooth

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106946108A (en) * 2017-03-29 2017-07-14 深圳市旺龙智能科技有限公司 A kind of apparatus for controlling elevator and method
CN107592607A (en) * 2017-09-07 2018-01-16 飞天诚信科技股份有限公司 A kind of bluetooth equipment complex and its communication means
CN108803429A (en) * 2018-07-03 2018-11-13 广东万家乐厨房科技有限公司 Kitchen tools control system and method
CN110356939A (en) * 2019-07-16 2019-10-22 广州诺谱盾信息科技有限公司 A kind of multichannel bluetooth elevator control system and method
CN110996307A (en) * 2019-11-22 2020-04-10 华为技术有限公司 Accessory device, host device and data transmission method
CN111818669A (en) * 2020-06-04 2020-10-23 青岛海信移动通信技术股份有限公司 Mobile terminal and data transmission method thereof

Also Published As

Publication number Publication date
CN112969146A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US5966663A (en) Data communications protocol for facilitating communications between a message entry device and a messaging center
CN1132464C (en) Radio handset
CN1304600A (en) Wireless packet data communication apparatus and method
CN101631127A (en) File transfer method and clients
CN112969146B (en) Efficient communication method based on Bluetooth broadcast in elevator scene
CN100536480C (en) Data communication system and method for distributed system
WO2016146008A1 (en) Data parsing method, apparatus and system
US20060280174A1 (en) Method and system for establishing a data link layer protocol on a physical layer port connection
US9253292B2 (en) Memory association to folder information
CN112422485A (en) Communication method and device of transmission control protocol
CN112346661B (en) Data processing method and device and electronic equipment
CN103118046B (en) Transducer is to the method and system of code
CN115022413A (en) Internet of things communication protocol construction and interaction method and device
CN113037820B (en) Thing networking device communication module
CN114116375A (en) Data transmission method and device based on PLDM protocol
JP2002044225A (en) Method for transferring telephone book data
KR19990085912A (en) Portable communication terminal data backup device and method
JP2003224567A (en) Communication connection auxiliary device, communication equipment and communication method
KR100541756B1 (en) Method for transferring data in wireless communication system
CN111756834B (en) Code scanning delay processing method and device
CN106470185A (en) Data processing method based on C/S model and system
US20040068539A1 (en) Method and system for sharing general packet radio service cards over local area network
WO2001084779A3 (en) Remote point of sale system
CN100407630C (en) Home media center and network access device
JP2611313B2 (en) Document communication method

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