CN105657646A - Bluetooth 4.0 based device-to-device big data communication method - Google Patents

Bluetooth 4.0 based device-to-device big data communication method Download PDF

Info

Publication number
CN105657646A
CN105657646A CN201610067566.5A CN201610067566A CN105657646A CN 105657646 A CN105657646 A CN 105657646A CN 201610067566 A CN201610067566 A CN 201610067566A CN 105657646 A CN105657646 A CN 105657646A
Authority
CN
China
Prior art keywords
data
bluetooth
burst
peripheral hardware
transmission
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.)
Pending
Application number
CN201610067566.5A
Other languages
Chinese (zh)
Inventor
周昊
张香江
徐文杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Yuekong Intelligent Technology Co Ltd
Original Assignee
Nanjing Yuekong Intelligent 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 Nanjing Yuekong Intelligent Technology Co Ltd filed Critical Nanjing Yuekong Intelligent Technology Co Ltd
Priority to CN201610067566.5A priority Critical patent/CN105657646A/en
Publication of CN105657646A publication Critical patent/CN105657646A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0229Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a Bluetooth 4.0 based device-to-device big data communication method. In a physical link layer, connection between a Bluetooth host and a Bluetooth peripheral device is established based on a Bluetooth 4.0 protocol. In a transport layer, a full-duplex communication manner is utilized, and to-be-transmitted data is subjected to fragmentation and reassembly, wherein the structure of a fragmented and reassembled data comprises: if fragmented data is a data frame of 20 bytes, the structure of the fragmented data from front to back is sequentially as follows: two bytes represent payloads, 1 byte represents a segmentation number, 16 bytes represent payload data, and 1 byte represents a proof test value; if the fragmentation confirmation data is a data frame of 20 bytes, the structure of the fragmented confirmation data from front to back is sequentially as follows: 1 byte represents a data type, 1 byte represents a response type, and 18 bytes represent response data. According to the Bluetooth 4.0 based device-to-device big data communication method, the size of transmitted data can break through a limit of 20 bytes per frame; additionally, a transmission confirmation mechanism is provided, and frame dropping and frame errors in a transmission process are effectively avoided.

Description

A kind of big data communications method of the equipment room based on bluetooth 4.0
Technical field
The present invention relates to a kind of big data communications method of equipment room, more particularly relate to a kind of big data communications method of the equipment room based on bluetooth 4.0, belong to communication protocol expansion technique field.
Background technology
The birth of bluetooth 4.0GATT technology, particularly BLE(BluetoothLowEnergy) universal, create immeasurable effect in Internet of Things application. Utilize bluetooth BLE to carry out internet of things establishment, there is radio frequency band and exempt from license (2 .4GHz frequency range), the advantage such as low in energy consumption, real-time. But bluetooth 4.0BLE has certain restriction equally in transmitting data frame length, and its limitation is embodied in: data length limits, every frame is not more than 20 bytes, per second is not more than 2000 bytes; Reliability is poor, is subject to bluetooth peripheral hardware and the impact of main frame connective stability, easily occurs in actual applications connecting the problems such as disconnection, loss of data; Data no parity check, although the service (Service) providing relatively more in bluetooth 4.0 specification is supported with configuration (Profile), but it remains a kind of unreliable transmission in the self-defining data of Internet of Things field.
Summary of the invention
Goal of the invention: present invention aim at for the deficiencies in the prior art, it is provided that a kind of highly reliable, carrying big big data communications method of the equipment room based on bluetooth 4.0 of data volume.
Technical scheme: a kind of big data communications method of the equipment room based on bluetooth 4.0 of the present invention, bluetooth 4.0 agreement is adopted to set up the connection between bluetooth host and bluetooth peripheral hardware at physical link layer, full-duplex communication mode is adopted in transport layer, and the data of transmission are carried out IP fragmentation and reassembly, the data structure of its IP fragmentation and reassembly is:
Fragment data is the Frame of 20 bytes, and its structure is followed successively by from front to back: 2 bytes represent payload, and 1 byte represents burst numbering, and 16 bytes represent payload data, and 1 byte represents check value;
Burst confirms the Frame that data are 20 bytes, and its structure is followed successively by from front to back: 1 byte representative data type, 1 byte represents respond style, and 18 bytes represent response data.
Being further defined to of technical solution of the present invention, described full-duplex communication mode specifically carries out as follows:
The client layer data that S1, bluetooth host will send carry out length computation, and are committed to transport layer; Transport layer adopts 16 byte burst principles that data carry out burst, and by down going channel, the data of burst the bluetooth peripheral hardware to be received such as are transferred to;
S2, bluetooth peripheral hardware receive fragment data, and payload and burst in verification fragment data are numbered, if correctly, then being carried out by the fragment data of reception recombinates preservation and send the burst that respond style is " success " confirms data; If incorrect, then send the burst that respond style is " failure " and confirm data;
S3, bluetooth host receive, by the data feedback channel of transport layer, the burst confirmation data that bluetooth peripheral hardware sends, confirm that the data type carried in data judges that this information received confirms data as burst by burst, confirm that the respond style of data judges whether data transmit successful again through burst, if it succeeds, according to burst, bluetooth host confirms that the response data carried in data continues a piece of burst under transmission;
S4, repeated execution of steps S1 and S2, until the payload that bluetooth peripheral hardware receives is equal to application data length, be considered as application data transmission success, and bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
The maximum problem of Bluetooth transmission is exactly poor reliability, and the present invention is in order to ensure its reliability, it is to avoid data would be likely to occur loss or error code in transmitting procedure, it is necessary to add following mechanism in transmitting procedure:
The first mechanism, in step sl, after bluetooth host sends data, enter and block waiting state, if being not received by the burst from bluetooth peripheral hardware in time-out time to confirm data, think and sliced transmission failure and then re-transmission current slice confirm data or exceed the number of retransmissions upper limit until being properly received the burst from bluetooth peripheral hardware.
The second mechanism, if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, is then considered as transmission transaction and is not fully complete, can enable breakpoint transmission, particularly as follows:
X1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
X2, determine the last burst numbering N sending successful fragment data, start to send burst and be numbered the fragment data of N+1, until the payload that bluetooth peripheral hardware receives is equal to application data length, it is considered as application data transmission success, bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
The third mechanism, if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, is then considered as transmission transaction and is not fully complete, can restart and carry out data transmission, particularly as follows:
C1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
C2, bluetooth host send burst and are numbered the fragment data of 0, after bluetooth peripheral hardware receives this fragment data, adopt state reset mechanism, abandon the fragment data receiving before and recombinating rollback transmission transaction, and transmission restarts.
4th kind of mechanism, in step S2, if during bluetooth peripheral hardware verification burst numbering, it has been found that burst numbering is not desired numbering, then sends the burst that respond style is " failure " and confirms data, and meanwhile, response data is desired burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
5th kind of mechanism, in step S2, if occurring abnormal when bluetooth peripheral hardware reception processes, then directly abandons this burst, and sends the burst confirmation data that respond style is " failure ", and meanwhile, response data is current burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
In the present invention, it is non-continuous that bluetooth connects, and namely at application, only when there being external data transmission request to arrive every time, the main frame of this transmission system just can be initiated the specific connection from machine; And after the end of transmission, main frame or determine a need for cutting off connection from machine, therefore, heretofore described physical link layer adopts bluetooth 4.0 agreement to set up the method for the connection between bluetooth host and bluetooth peripheral hardware and is specifically divided into the following two kinds type:
Host request sends: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, setting up at least two logic channels, and use GATTCharacteristicWrite and notify mode to carry out full-duplex communication, peripheral hardware carries out frame ACK and application layer ACK according to the data of main frame active transmission, until DTD, main frame disconnects;
Host request receives: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, set up at least two logic channels, and carry out full-duplex communication, peripheral hardware does not actively send data in notify mode to main frame, main frame adopts GATTCharacteristicRead mode to obtain data, until DTD, main frame disconnects.
Beneficial effect: the present invention proposes a kind of big data communications method of the equipment room based on bluetooth 4.0, it is based on the application layer transmission mechanism on bluetooth 4.0 physical connection basis, keeping on the basis of bluetooth 4.0 transmission range, power consumption, transmitted data amount can break through the restriction of the 20 every frames of byte, and there is transfer acknowledgement mechanism, the frame being prevented effectively from transmitting procedure abandons and frame mistake; The present invention has Connectondemand characteristic, and in application scenarios, bluetooth host can be accomplished to connect bluetooth peripheral hardware by demand; Meanwhile, the function of breakpoint transmission: based on the data forward method of Connectondemand characteristic, it is to avoid physical connection disconnects the logical transport failure brought.
Accompanying drawing explanation
Fig. 1 is the flow chart that physical link layer provided by the invention sets up that bluetooth 4.0 agreement connects;
Fig. 2 is the state transition diagram that physical link layer provided by the invention sets up in bluetooth 4.0 process between main frame and peripheral hardware;
Fig. 3 is the structural representation of transport layer IP fragmentation and reassembly data provided by the invention;
Fig. 4 is the structure chart that transport layer burst provided by the invention confirms data;
Fig. 5 is the flow chart of reliability transmission provided by the invention;
Fig. 6 is the global operation flow chart of steps of big data communications method provided by the invention.
Detailed description of the invention
Below by accompanying drawing, technical solution of the present invention is described in detail, but protection scope of the present invention is not limited to described embodiment.
Embodiment 1:The present embodiment provides a kind of big data communications method of the equipment room based on bluetooth 4.0, bluetooth 4.0 agreement is adopted to set up the connection between bluetooth host and bluetooth peripheral hardware at physical link layer, adopt full-duplex communication mode in transport layer, and the data of transmission are carried out IP fragmentation and reassembly.What the present invention proposed carries out big data transmission method based on bluetooth 4.0 and is divided into following ingredient:
1, connection management: bluetooth 4.0 main frame ingredient, response external request also is initiated to connect according to state and target.
2, burst and restructuring: had by bluetooth host and peripheral hardware, coordinated, logic level data transmission is carried out burst, insert shuffling information in burst stem, and utilize Notify and the write of regulation in BLEGATTProfile to carry out uplink and downlink full-duplex communication on two different characteristics.
The data of logic level are transmitted and are regarded an affairs (Transaction) as by 3, breakpoint transmission: had by bluetooth host and peripheral hardware, coordinated, by safeguarding a transmission state machine and then safeguarding the integrity of transmission transaction.
4, transmission reliably: had by bluetooth host and peripheral hardware, coordinated, a kind of guarantees burst and the affairs mechanism without logic loss and mistake in by physical layer transmission process.
Above-mentioned ingredient needs collaborative work, is reached for and has bluetooth 4.0 physical transfer capacity device offer purpose of transmission mass data ability on logic level.
The present embodiment is carried out one-way transmission by bluetooth host to bluetooth peripheral hardware for data, set forth from connecting initiation, data transmission until terminating transmission the overall process disconnected, because bluetooth host and bluetooth peripheral hardware are peer-to-peers, therefore, bluetooth peripheral hardware to bluetooth host transmit data process in like manner, after do not repeating.
Concrete flow process is:
1, the advertisement that peripheral hardware is sent by main frame is scanned, determine whether this transmission objectives according to MAC Address or title, if it is initiate bluetooth physical connection, and find service and find GATTCharacteristics up, descending, after this process terminates, logical connection is set up.
Owing to the connection of bluetooth is always initiated by main frame (central), periodically advertisement and advertisement are detected on the physical channel to be now based on peripheral hardware (peripheral) in fact, it is therefore desirable to include peripheral hardware MAC Address, device name, Service and GATTCharacteristicsUUID information at ad content. Bluetooth host catches these information in scanning process, determines uniquely coupled target according to MAC Address or title or UUID value. In the present invention, it is non-continuous that bluetooth connects, and namely at application, only when there being external data transmission request to arrive every time, the main frame of this transmission system just can be initiated the specific connection from machine; And after the end of transmission, main frame or from machine determine a need for by connection cut off. Connect scene be divided into host request send and host request receive two types, connection procedure as shown in Figure 1:
Host request sends: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, set up at least two logic channels, and use GATTCharacteristicWrite and notify mode to carry out full-duplex communication on this basis. Peripheral hardware is transmitted a layer frame ACK and application layer ACK according to the data of main frame active transmission, until DTD, main frame disconnects.
Host request receives: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, set up at least two logic channels, and carry out full-duplex communication on this basis.Peripheral hardware does not actively send data in notify mode to main frame, and main frame adopts GATTCharacteristicRead mode to obtain data, until DTD, main frame disconnects.
Two ways is at connection procedure aspect zero difference, and process prescription is as shown in Figure 1.
In connection procedure, between main frame and peripheral hardware, be likely to be at one of following several state: physics is not connected with, scan in, physical link set up in, physics connect, service and Characteristic find in, logic connect, transmit in, during physical connection discharges. State transition is responded according to external request by main frame, and process prescription is as shown in Figure 2.
2, it is subject in bluetooth 4.0 transmitting procedure the every frame of GAP sublayer and must not exceed 20 bytes restrictions, make it can not meet the application scenarios having mass data needs to transmit, the present invention adopts the method for two layer protocols to solve this problem, namely under application-layer data transmission aspect, it is achieved a transport layer with burst and functions of retransmission. The data structure of transport layer IP fragmentation and reassembly is as shown in Figure 3, particularly as follows: the Frame that fragment data is 20 bytes, its structure is followed successively by from front to back: 2 bytes represent payload, and 1 byte represents burst numbering, 16 bytes represent payload data, and 1 byte represents check value; Burst confirms the Frame that data are 20 bytes, and its structure as shown in Figure 4, is followed successively by from front to back: 1 byte representative data type, 1 byte represents respond style, and 18 bytes represent response data.
Owing to being full-duplex communication mode, method provided by the invention adopt the Characteristics in 2 GATTProfile carry out data exchange, it is assumed that for CharacteristicA and CharacteristicB. Wherein A is as the data downstream passage of main frame to peripheral hardware, and B is as the data feedback channel being set to main frame from outward. In transport layer header in the above description, comprise payload and the application layer data total length of 2 bytes, and 1 byte burst numbering, when burst is passed to peripheral hardware by CharacteristicA by main frame, peripheral hardware carries out payload total length identification, current slice sequence number confirms, IP fragmentation and reassembly and 16 byte payloads are effectively verified, if burst sequence number meets expectation burst sequence number, and validity check passes through, then preserve data, and provided a confirmation ACK by peripheral hardware to main frame by CharacteristicA. Confirmation data form total length is 20 bytes, including 1 byte data type, 1 byte response type, 18 byte response data. Wherein several types are used for allowing bluetooth host distinguish this information is ACK or other client layer data. If being ACK, represent that whether a upper sliced transmission is successful by respond style, if it is successful, the desired next burst sequence number of peripheral hardware will be included in response data.
Therefore, the client layer data that will send are carried out length computation by main frame, and submit to transport layer, and transport layer adopts 16 byte burst principles that data carry out burst, and by down going channel, the data of burst the bluetooth peripheral hardware to be received such as are transferred to. Method when transport layer is to data fragmentation is: start client layer data are carried out burst from 0 sequence number, this transmission overall payload length, current slice sequence number is added at each burst head, and add current slice checking data at burst afterbody, it is transferred to etc. to be received from machine by descending CharacteristicWrite mode.
It should be noted that to realize full-duplex communication, if the data that main frame sends to peripheral hardware, be no matter the response of burst or burst, interact each through CharacteristicA.Whereas if peripheral hardware sends data to main frame, adopt and carry out burst, checking and response with method as above, but interacted by CharacteristicB. So when the GATT aspect of main frame receives upstream data (notify or read), it is possible to distinguished by Characteristic, this is a burst ACK from peripheral hardware or an application layer transmission request from peripheral hardware; For peripheral hardware, also it is in like manner.
The transmitting procedure of data is:
The client layer data that S1, bluetooth host will send carry out length computation, and are committed to transport layer; Transport layer adopts 16 byte burst principles, and by down going channel, the data of burst the bluetooth peripheral hardware to be received such as are transferred to.
S2, bluetooth peripheral hardware receive fragment data, and payload and burst in verification fragment data are numbered, if correctly, then being carried out by the fragment data of reception recombinates preservation and send the burst that respond style is " success " confirms data; If incorrect, then send the burst that respond style is " failure " and confirm data;
S3, bluetooth host receive, by the data feedback channel of transport layer, the burst confirmation data that bluetooth peripheral hardware sends, confirm that the data type carried in data judges that this information received confirms data as burst by burst, confirm that the respond style of data judges whether data transmit successful again through burst, if it succeeds, according to burst, bluetooth host confirms that the response data carried in data continues a piece of burst under transmission;
S4, repeated execution of steps S1 and S2, until the payload that bluetooth peripheral hardware receives is equal to application data length, be considered as application data transmission success, and bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
3, the problem that Bluetooth transmission is maximum is exactly poor reliability, and the present invention is in order to ensure its reliability, it is to avoid data would be likely to occur loss or error code in transmitting procedure, it is necessary to add breakpoint transmission and reliability transmission mechanism in transmitting procedure.
Principle is: owing to possessing the support of transport layer burst mechanism, the peer-to-peer (peer) in data transmission procedure, it is possible to well keep track of the progress of current transmission. The logical transport (such as transmitting certain order or some data) of application is considered as affairs by the present invention: if all bursts send completely or receive completely, affairs success, if there being burst not yet send or receive, then it is considered as affairs failure. If transmission disconnects because of physical link or the frame failure set forth in Section 4 and failure, then sender can initiate physical link again, and to recipient send burst numbering be not 0 resume burst. This requires that recipient is while receiving, be numbered the burst of 0 without receiving burst, then do not reset reception state, carries out breakpoint transmission with this, until all sliced transmission terminate, the data length summation that recipient receives is equal to till the payload length summation of 2 byte representations before burst.
The flow chart of reliability transmission is as it is shown in figure 5, the concrete mechanism adopted is as follows:
The first mechanism, in step sl, after bluetooth host sends data, enter and block waiting state, if being not received by the burst from bluetooth peripheral hardware in time-out time to confirm data, think and sliced transmission failure and then re-transmission current slice confirm data or exceed the number of retransmissions upper limit until being properly received the burst from bluetooth peripheral hardware.
The application scenarios of this mechanism is: certain burst is sending to the process of opposite end loss.Now recipient can not receive any burst, and wait is blocked in the transmission that is transmitted into of sender, time-out after waiting for a period of time, and starts to retransmit a upper burst.
The second mechanism, if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, is then considered as transmission transaction and is not fully complete, can enable breakpoint transmission, particularly as follows:
X1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
X2, determine the last burst numbering N sending successful fragment data, start to send burst and be numbered the fragment data of N+1, until the payload that bluetooth peripheral hardware receives is equal to application data length, it is considered as application data transmission success, bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
The application scenarios of this mechanism is: if as abnormal cause, cause that bluetooth physical link disconnects, a disconnected event all can be produced sender and recipient, both sides terminate sending operation after receiving this event, if sender does not select breakpoint transmission, then can restart to send burst sequence number is the burst of 0, then both sides' resets, affairs failure also restarts. Or, for single specific burst, number of retransmissions should arrange the upper limit, reaches if retransmitting the upper limit, it was demonstrated that bluetooth bottom link occurs abnormal, now disconnects physical connection.
The third mechanism, if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, is then considered as transmission transaction and is not fully complete, can restart and carry out data transmission, particularly as follows:
C1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
C2, bluetooth host send burst and are numbered the fragment data of 0, after bluetooth peripheral hardware receives this fragment data, adopt state reset mechanism, abandon the fragment data receiving before and recombinating rollback transmission transaction, and transmission restarts.
4th kind of mechanism, in step S2, if during bluetooth peripheral hardware verification burst numbering, it has been found that burst numbering is not desired numbering, then sends the burst that respond style is " failure " and confirms data, and meanwhile, response data is desired burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
The application scenarios of this mechanism is: recipient receives the burst that sequence number is N, but issue being dropped in transmitting procedure with the ACK that expectation sequence number is N+1 of sender, in like manner, sender enters transmission and blocks wait, now should retransmitting a upper burst by the logic of sender, after the burst of this repeating transmission is received by recipient, the burst sequence number N that recipient's contrast receives not is desired N+1, therefore abandon this burst, and retransmit expectation sequence number be that the ACK of N+1 is to sender.
5th kind of mechanism, in step S2, if occurring abnormal when bluetooth peripheral hardware reception processes, then directly abandons this burst, and sends the burst confirmation data that respond style is " failure ", and meanwhile, response data is current burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
The application scenarios of this mechanism is: recipient occurs abnormal when reception processes, and directly abandons this burst, and using current slice sequence number N as next the burst sequence number expected, and inform that sender, sender receive burst of repeating transmission afterwards by ACK.Or, if recipient is to receiving data that burst sequence number is N and verifying, if validity check failure, then it is assumed that data there occurs and illegally distort, then arranging expectation burst sequence number in ACK is N, and request sender retransmit.
As shown in Figure 6, idiographic flow is as follows for above-mentioned global operation step:
(1) advertisement that peripheral hardware is sent by main frame is scanned, determine whether this transmission objectives according to MAC Address or title, if it is initiate bluetooth physical connection, and find service and find GATTCharacteristics up, descending, after this process terminates, logical connection is set up;
(2) the client layer data that will send are carried out length computation by main frame, and submit to transport layer;
(3) transport layer adopts 16 byte burst principles, start client layer data are carried out burst from 0 sequence number, this transmission overall payload length, current slice sequence number is added at each burst head, and add current slice checking data at burst afterbody, it is transferred to etc. to be received from machine by descending CharacteristicWrite mode;
(4) from machine as recipient, validity check is carried out after receiving data, data carry out after verifying successfully restructuring preserve, and notify whether this burst of sender sends correctly by ACK and up CharacteristicNotify mode, and next burst sequence number desired;
(5) sender is after sending current slice, enter and block waiting state, if being not received by the ACK from recipient in time-out time, it is believed that sliced transmission failure, and then re-transmission current slice, until it is properly received from the ACK of recipient or beyond the number of retransmissions upper limit;
(6) repeating step (3) to (5) until the payload that recipient receives is equal to application data length, be considered as receiving successfully, recipient sends " receiving successfully " ACK to sender, sender terminate transmission and disconnect bluetooth physical link;
(7) repeating step (3) to (5), in the process if there is retransmitting beyond the upper limit, or physical link disconnects, then be considered as transmission transaction and be not fully complete, it is assumed that be currently transmitted the burst that sequence number is N. Now by sender's external intervention, decide whether to enable breakpoint transmission, if carried out breakpoint transmission, then sender or re-establish bluetooth physical connection, and start the burst sent sequence number as N+1, return to the transmitting procedure that (3) build to (5), until successfully terminating enter (6) or unsuccessfully enter (7); If sender determines not carry out breakpoint transmission, so it is considered as transmission transaction failure, or after re-establishing physical link, send sequence number be 0 burst, cause Recipient Status to reset, abandon the burst receiving before and recombinating rollback transmission transaction, transmission restarts, until successfully terminating enter (6) or unsuccessfully enter (7).
The present invention is expanded by application layer protocol in mass data and insecure bluetooth 4.0 link specification can not transmit, and achieves the above-mentioned two characteristic of bluetooth 4.0 disappearance preferably. Its advantage of method provided in the present invention is embodied in:
(1) need to use in the scene that mass data is transmitted in Internet of Things field and can find broad application, for instance the data of the content that transmission file, specific code stream, a large number of users produce;
(2) improve the flexibility ratio that linking bluetooth is initiated, namely it is transmitted by the data of application layer customization without carrying out growing connecting, but disposable data transmission can be carried out when main frame has transmission request, or carry out disposable data transmission when main frame has data acquisition demand;
(3) owing to link is not real-time existence, the power consumption on Internet of Things embedded device is therefore more saved;
(4) possess breakpoint transmission ability, it is possible to solve because of between main frame, peripheral hardware because Bluetooth signal is more weak or the disconnection that causes beyond join domain is abnormal, logic level guarantees no data is lost;
(5) burst verification and the mechanism retransmitted are especially suitable for some occasions needing accurate conduction data.
Although as it has been described above, represented and described the present invention with reference to specific preferred embodiment, but it shall not be construed as the restriction to the present invention self. Under the spirit and scope of the present invention premise defined without departing from claims, it can be made in the form and details various change.

Claims (8)

1. the big data communications method of the equipment room based on bluetooth 4.0, bluetooth 4.0 agreement is adopted to set up the connection between bluetooth host and bluetooth peripheral hardware at physical link layer, it is characterized in that, full-duplex communication mode is adopted in transport layer, and the data of transmission are carried out IP fragmentation and reassembly, the data structure of its IP fragmentation and reassembly is:
Fragment data is the Frame of 20 bytes, and its structure is followed successively by from front to back: 2 bytes represent payload, and 1 byte represents burst numbering, and 16 bytes represent payload data, and 1 byte represents check value;
Burst confirms the Frame that data are 20 bytes, and its structure is followed successively by from front to back: 1 byte representative data type, 1 byte represents respond style, and 18 bytes represent response data.
2. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 1, it is characterised in that described full-duplex communication mode specifically carries out as follows:
The client layer data that S1, bluetooth host will send carry out length computation, and are committed to transport layer; Transport layer adopts 16 byte burst principles that data carry out burst, and by down going channel, the data of burst the bluetooth peripheral hardware to be received such as are transferred to;
S2, bluetooth peripheral hardware receive fragment data, and payload and burst in verification fragment data are numbered, if correctly, then being carried out by the fragment data of reception recombinates preservation and send the burst that respond style is " success " confirms data; If incorrect, then send the burst that respond style is " failure " and confirm data;
S3, bluetooth host receive, by the data feedback channel of transport layer, the burst confirmation data that bluetooth peripheral hardware sends, confirm that the data type carried in data judges that this information received confirms data as burst by burst, confirm that the respond style of data judges whether data transmit successful again through burst, if it succeeds, according to burst, bluetooth host confirms that the response data carried in data continues a piece of burst under transmission;
S4, repeated execution of steps S1 and S2, until the payload that bluetooth peripheral hardware receives is equal to application data length, be considered as application data transmission success, and bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
3. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 2, it is characterized in that, in step sl, after bluetooth host sends data, enter and block waiting state, if being not received by the burst from bluetooth peripheral hardware in time-out time to confirm data, it is believed that sliced transmission failure, and then re-transmission current slice, until it is properly received the burst from bluetooth peripheral hardware to confirm data or beyond the number of retransmissions upper limit.
4. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 3, it is characterised in that if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, be then considered as transmission transaction and be not fully complete, breakpoint transmission can be enabled, particularly as follows:
X1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
X2, determine the last burst numbering N sending successful fragment data, start to send burst and be numbered the fragment data of N+1, until the payload that bluetooth peripheral hardware receives is equal to application data length, it is considered as application data transmission success, bluetooth peripheral hardware sends the burst of " receiving successfully " and confirms that data are to bluetooth host, and bluetooth host terminates transmission.
5. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 3, it is characterized in that, if the connection beyond the number of retransmissions upper limit or physical link layer disconnects, be then considered as transmission transaction and be not fully complete, can restart and carry out data transmission, particularly as follows:
C1, confirm that the connection of physical link layer is whether normal, if abnormal, re-establish the connection of physical link layer;
C2, bluetooth host send burst and are numbered the fragment data of 0, after bluetooth peripheral hardware receives this fragment data, adopt state reset mechanism, abandon the fragment data receiving before and recombinating rollback transmission transaction, and transmission restarts.
6. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 2, it is characterized in that, in step S2, if during bluetooth peripheral hardware verification burst numbering, find that burst numbering is not desired numbering, then sending the burst that respond style is " failure " and confirm data, meanwhile, response data is desired burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
7. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 2, it is characterized in that, in step S2, if occurring abnormal when bluetooth peripheral hardware reception processes, then directly abandon this burst, and send the burst confirmation data that respond style is " failure ", meanwhile, response data is current burst numbering;
In step S3, after bluetooth host receives this burst confirmation data, start to send fragment data according to the expectation burst numbering that response data represents.
8. a kind of big data communications method of the equipment room based on bluetooth 4.0 according to claim 1, it is characterised in that described physical link layer adopts the method that bluetooth 4.0 agreement sets up the connection between bluetooth host and bluetooth peripheral hardware to be specifically divided into the following two kinds type:
Host request sends: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, setting up at least two logic channels, and use GATTCharacteristicWrite and notify mode to carry out full-duplex communication, peripheral hardware carries out frame ACK and application layer ACK according to the data of main frame active transmission, until DTD, main frame disconnects;
Host request receives: main frame is after scanning peripheral hardware MAC or title, if it is determined that target device, then initiate to connect, according to the CharacteristicUUID specified in connection procedure, set up at least two logic channels, and carry out full-duplex communication, peripheral hardware does not actively send data in notify mode to main frame, main frame adopts GATTCharacteristicRead mode to obtain data, until DTD, main frame disconnects.
CN201610067566.5A 2016-01-29 2016-01-29 Bluetooth 4.0 based device-to-device big data communication method Pending CN105657646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610067566.5A CN105657646A (en) 2016-01-29 2016-01-29 Bluetooth 4.0 based device-to-device big data communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610067566.5A CN105657646A (en) 2016-01-29 2016-01-29 Bluetooth 4.0 based device-to-device big data communication method

Publications (1)

Publication Number Publication Date
CN105657646A true CN105657646A (en) 2016-06-08

Family

ID=56488186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610067566.5A Pending CN105657646A (en) 2016-01-29 2016-01-29 Bluetooth 4.0 based device-to-device big data communication method

Country Status (1)

Country Link
CN (1) CN105657646A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods
CN107205212A (en) * 2017-06-05 2017-09-26 南京邮电大学 A kind of laser range finder Bluetooth communication method based on Android operation system
CN107864135A (en) * 2017-11-07 2018-03-30 山东网智物联网科技有限公司 The realization device of Internet of Things communication means, device and Internet of Things Network Communication
CN108234595A (en) * 2017-11-29 2018-06-29 山东鲁能软件技术有限公司 Log transmission method and system
CN108650666A (en) * 2018-05-11 2018-10-12 深圳市沃特沃德股份有限公司 The method and its device of bluetooth bi-directional transfer of data
CN109150414A (en) * 2018-08-30 2019-01-04 深圳大势智能科技有限公司 Reinforce Bluetooth communication antihunt means, device, equipment and storage medium between equipment
CN109392196A (en) * 2018-10-25 2019-02-26 郑桂云 Big data analysis method and system based on mobile terminal
CN109561395A (en) * 2018-12-07 2019-04-02 青岛海信电器股份有限公司 A kind of blue-tooth transmission method and device
CN110572387A (en) * 2019-09-04 2019-12-13 大唐半导体科技有限公司 link layer processing method
CN112181147A (en) * 2020-09-29 2021-01-05 北京歌尔泰克科技有限公司 Wearable device interaction method and device based on applet and electronic device
CN112822664A (en) * 2019-11-16 2021-05-18 杭州九阳小家电有限公司 Data communication method and device in smart home environment
CN113438520A (en) * 2021-06-29 2021-09-24 北京奇艺世纪科技有限公司 Data processing method, device and system
CN113824798A (en) * 2021-11-19 2021-12-21 浙江中控技术股份有限公司 Breakpoint continuous transmission method and system
CN114025430A (en) * 2021-11-10 2022-02-08 上海山景集成电路股份有限公司 Bluetooth communication method, communication equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209927A1 (en) * 2004-03-18 2005-09-22 Nokia Corporation System and associated terminal, method and computer program product for uploading content
CN101888288A (en) * 2009-05-13 2010-11-17 艾威梯科技(北京)有限公司 Method for solving ACK interlocking delay in full duplex data transmission and system
CN103402229A (en) * 2013-07-25 2013-11-20 中国科学院信息工程研究所 Data downloading method and data downloading system
CN104639214A (en) * 2013-11-14 2015-05-20 安凯(广州)微电子技术有限公司 Memory optimization implementation method and device
CN104639511A (en) * 2013-11-13 2015-05-20 安凯(广州)微电子技术有限公司 Method and device for saving internal memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209927A1 (en) * 2004-03-18 2005-09-22 Nokia Corporation System and associated terminal, method and computer program product for uploading content
CN101888288A (en) * 2009-05-13 2010-11-17 艾威梯科技(北京)有限公司 Method for solving ACK interlocking delay in full duplex data transmission and system
CN103402229A (en) * 2013-07-25 2013-11-20 中国科学院信息工程研究所 Data downloading method and data downloading system
CN104639511A (en) * 2013-11-13 2015-05-20 安凯(广州)微电子技术有限公司 Method and device for saving internal memory
CN104639214A (en) * 2013-11-14 2015-05-20 安凯(广州)微电子技术有限公司 Memory optimization implementation method and device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods
CN107205212A (en) * 2017-06-05 2017-09-26 南京邮电大学 A kind of laser range finder Bluetooth communication method based on Android operation system
CN107864135A (en) * 2017-11-07 2018-03-30 山东网智物联网科技有限公司 The realization device of Internet of Things communication means, device and Internet of Things Network Communication
CN108234595A (en) * 2017-11-29 2018-06-29 山东鲁能软件技术有限公司 Log transmission method and system
CN108650666B (en) * 2018-05-11 2021-06-29 深圳市沃特沃德股份有限公司 Method and device for Bluetooth two-way data transmission
CN108650666A (en) * 2018-05-11 2018-10-12 深圳市沃特沃德股份有限公司 The method and its device of bluetooth bi-directional transfer of data
CN109150414B (en) * 2018-08-30 2021-08-31 深圳大势智能科技有限公司 Method, device, equipment and storage medium for enhancing Bluetooth communication stability between equipment
CN109150414A (en) * 2018-08-30 2019-01-04 深圳大势智能科技有限公司 Reinforce Bluetooth communication antihunt means, device, equipment and storage medium between equipment
CN109392196A (en) * 2018-10-25 2019-02-26 郑桂云 Big data analysis method and system based on mobile terminal
CN109561395A (en) * 2018-12-07 2019-04-02 青岛海信电器股份有限公司 A kind of blue-tooth transmission method and device
CN110572387A (en) * 2019-09-04 2019-12-13 大唐半导体科技有限公司 link layer processing method
CN112822664A (en) * 2019-11-16 2021-05-18 杭州九阳小家电有限公司 Data communication method and device in smart home environment
CN112181147A (en) * 2020-09-29 2021-01-05 北京歌尔泰克科技有限公司 Wearable device interaction method and device based on applet and electronic device
CN112181147B (en) * 2020-09-29 2024-01-02 北京歌尔泰克科技有限公司 Small program-based wearable device interaction method and device and electronic device
CN113438520A (en) * 2021-06-29 2021-09-24 北京奇艺世纪科技有限公司 Data processing method, device and system
CN114025430A (en) * 2021-11-10 2022-02-08 上海山景集成电路股份有限公司 Bluetooth communication method, communication equipment and system
CN114025430B (en) * 2021-11-10 2022-07-19 上海山景集成电路股份有限公司 Bluetooth communication method, communication equipment and system
CN113824798A (en) * 2021-11-19 2021-12-21 浙江中控技术股份有限公司 Breakpoint continuous transmission method and system

Similar Documents

Publication Publication Date Title
CN105657646A (en) Bluetooth 4.0 based device-to-device big data communication method
US9042364B2 (en) Method of detecting and handling an endless RLC retransmission
CN101589565B (en) Method and apparatus for data transmission of radio link control layer in mobile communication system
US8750334B2 (en) Link layer assisted robust header compression context update management
EP2229745B2 (en) Status reporting for retransmission protocol
CN102025474B (en) Network data transmission method
US8976814B2 (en) Method of transporting data from sending node to destination node
CN101155311A (en) Video code stream error detecting and processing method in video communication
CN104618007B (en) A kind of synchronous satellite Transmission Control Protocol segmentation connection optimization method
WO2006044980A1 (en) Enhanced transmission systems for use in wireless personal area networks
CN108173851B (en) High-efficiency multimedia transmission method for spatial information network
CN100574274C (en) The transmission system of radio link protocol and method
EP1580916B1 (en) System and method for transmitting units of messages in a mobile communication system
CN107046452A (en) A kind of data high bandwidth high reliability transport method
WO2009088342A1 (en) Reordering timer for a retransmission protocol
CN106100797B (en) A kind of method for transmitting deep space file based on the asynchronous acceleration re-transmission policy of LTP
KR20090043724A (en) A method for serial transmitting/receiving high volume data
CN101094241A (en) Transmission method and device of hybrid automatic requesting retransmission
US9154269B2 (en) Method for operating a remote procedure call handler in a client and a server and computer system comprising the same
CN115499108A (en) Closed-loop network communication method and system based on UDP protocol
Wilson Reliable Burst Protocol—Deterministic streaming data transport
KR20050020305A (en) Multi high speed data transmission system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160608