CN107734002A - The reception device and its method of a kind of blue-teeth data - Google Patents

The reception device and its method of a kind of blue-teeth data Download PDF

Info

Publication number
CN107734002A
CN107734002A CN201710876722.7A CN201710876722A CN107734002A CN 107734002 A CN107734002 A CN 107734002A CN 201710876722 A CN201710876722 A CN 201710876722A CN 107734002 A CN107734002 A CN 107734002A
Authority
CN
China
Prior art keywords
data
receiving terminal
reception
redundant
group
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.)
Granted
Application number
CN201710876722.7A
Other languages
Chinese (zh)
Other versions
CN107734002B (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.)
Xian Fast Auto Drive Co Ltd
Original Assignee
Xian Fast Auto Drive 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 Xian Fast Auto Drive Co Ltd filed Critical Xian Fast Auto Drive Co Ltd
Priority to CN201710876722.7A priority Critical patent/CN107734002B/en
Publication of CN107734002A publication Critical patent/CN107734002A/en
Application granted granted Critical
Publication of CN107734002B publication Critical patent/CN107734002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The invention discloses a kind of reception device of blue-teeth data and its method, including the receiving terminal with bluetooth equipment virtual serial port, receiving terminal read all data in buffering area;Receiving terminal is begun stepping through from the first character section of data, finds the starting point of first group of data, and first group of data and its data afterwards is receive data;Receiving terminal calculates the length L for receiving data, and receiving terminal according to the length K of packet to receiving data complementation, obtain redundant data;Redundant data is stored in storage internal memory by receiving terminal, and the reception data to other parts receive;Wherein redundant data is incorporated into before the reception data of next round by receiving terminal when next round receives data.By setting a storage internal memory, redundant data is stored, then in data receiver next time, the data of itself and buffering area is together read, redundant data is received, realizes the integrality of Bluetooth data reception.

Description

The reception device and its method of a kind of blue-teeth data
Technical field
The invention belongs to technical field of data transmission;It is related to a kind of method of receiving terminal receiving bluetooth;It is specifically related to A kind of reception device of blue-teeth data;Further relate to a kind of method of reseptance of blue-teeth data.
Background technology
From after 2012, the operation of PC ends bluetooth can be carried out by inventing serial ports, when the collection of data needs bluetooth With operation of serial-port and when depositing, this greatly facilitates algorithm design of programmer, but there is also one it is serious the problem of;It is i.e. blue Tooth invents serial ports, when receiving data, it is found that the situation that the data received often do not plan a successor, cause packet endless Whole, such case occur has much relations with the allocated cache size of bluetooth and transmission rate, and with current reception The method of end receiving bluetooth also has relation.
At present during receiving terminal receiving bluetooth, complete packet is only taken, and unnecessary data are abandoned, although so The reception speed of data can be improved, but causes the reception to blue-teeth data data tomography, corrupt data and confusion to be present The problem of.
The content of the invention
The invention provides a kind of method of reseptance of blue-teeth data, can ensure that RFCOMM and blue-teeth data connect In the time receiving, in the absence of the discarding to data, it ensure that the integrality of data.
Present invention also offers a kind of reception device of blue-teeth data, by setting a storage internal memory, to redundant data Stored, then in data receiver next time, the data of itself and buffering area are together read, redundant data is connect Receive, realize the integrality of Bluetooth data reception.
The technical scheme is that:A kind of method of reseptance of blue-teeth data, comprises the following steps:
Step 1, the bluetooth equipment of receiving terminal is invented into serial ports, serial ports receives all data of buffering area;
Step 2, the starting point of first group of data is found in data, the data after starting point is receive data, receiving terminal Received;
Step 3, the length L of data is received in calculation procedure 2, and according to the length K complementations of packet, obtains redundant digit According to;
Step 4, redundant data is stored, then carries out the reception of next round data, and in next round data In receive process, the redundant data will be received first, and then the reception data to next round receive.
Further, the features of the present invention also resides in:
The starting point of first group of data is wherein found in step 2 in data, specific is to be opened from the first character section of data Begin to travel through each byte, judge whether it is the first group of data received.
Wherein being judged as YES in step 2, receiving terminal receive the data after it since first group of data.
Judgement wherein in step 2 is is not, then receiving terminal first receives the redundant data in last round of reception data procedures, Then first group of data and its data afterwards are received again.
Before wherein redundant data is incorporated into first group of data by step 2 receiving terminal, then receiving terminal starts to receive data.
Wherein in step 4 in the DRP data reception process of next round, redundant data is incorporated into connecing for next round by receiving terminal Before receiving data, then start to receive data.
Present invention also offers a kind of Bluetooth data reception device, including the receiving terminal with bluetooth equipment virtual serial port, Receiving terminal reads all data in buffering area;Receiving terminal is begun stepping through from the first character section of data, finds first group of data Starting point, first group of data and its data afterwards is receive data;Receiving terminal calculates the length L for receiving data, and connects Receiving end, to receiving data complementation, obtains redundant data according to the length K of packet;Redundant data is stored in storage by receiving terminal In depositing, and the reception data to other parts receive;Wherein receiving terminal is when next round receives data, by redundant digit According to being incorporated into before the original position of reception data of next round.
Compared with prior art, the beneficial effects of the invention are as follows:During receiving terminal receiving bluetooth, add To receive data length processing, i.e., to receive data length L according to the length K complementations of packet, yield less than the more of K positions Remainder evidence;Then redundant data is stored, in the receive process of next round data, then the reception by redundant data and next round Data are received together;The complete reception of data is realized, does not abandon data, realizes the complete reception of data.
Further, the starting point of first group of data is found in data, by the way of traversal, and from first Individual byte starts to judge whether it is the first group of data received;Because the data of bluetooth transmission/reception are all to meet its agreement Specification, therefore found from data according to the agreement and to receive the starting points of data and be that by.
Further, receiving terminal can be in the reception data procedures of next round, by last round of redundant data and originally Secondary reception data together receive, or are being received after first being integrated, and realize the integrality of data.
Beneficial effects of the present invention also reside in:The present invention is used to store redundant data by increasing a storage internal memory, and And in the reception data of next round, receiving terminal reads the redundant data from storage internal memory;Which obviate to redundant data Lose, realize and redundant data is received, realize the integrality of Bluetooth data reception.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the present invention;
Fig. 2 is the structural representation of the present invention.
In figure:1 is receiving terminal;2 be buffering area;3 be storage internal memory.
Embodiment
Technical scheme is further illustrated with specific embodiment below in conjunction with the accompanying drawings.
The invention provides a kind of method of reseptance of blue-teeth data, as shown in figure 1, its specific method includes following step Suddenly:
Step 1, the bluetooth equipment of receiving terminal is invented into serial ports, receiving terminal is PC ends or other-end equipment, receiving terminal All data of data sending terminal buffering area are received by bluetooth serial ports.
Step 2, receiving terminal finds the starting point of first group of data from data, and the data after starting point is receive number According to needing the data received in epicycle DRP data reception process, receiving terminal receives to it;In this process due to receiving End and transmitting terminal carry out transmission/reception of data by Bluetooth protocol, and receiving terminal finds from data the according to Bluetooth protocol The starting point of one group of data, receiving terminal begin stepping through each byte from the first character section of data, and judge whether it is to connect The first group of data received;When being judged as YES, receiving terminal receives the data after it since first group of data;When judgement is not When, receiving terminal receives the redundant data in last round of reception data first, then receives first group of data and its data afterwards.
Carry out the judgement of first group of data in step 2, be due to receiving terminal when receiving the data in buffering area, it is first First to judge that epicycle receives whether data are a new data transmission procedure, if not a new data transmission procedure, The data that i.e. epicycle receives are a part of data among a partial data transmitting procedure, it is therefore desirable to last round of caused Received more than data;If a new data transmission procedure, then data procedures are received without upper wheel.
Step 3, the reception data obtained in receiving terminal calculation procedure 2, and according to the length complementation of packet, it is unnecessary to obtain Data;Calculating process is as follows:The length for receiving data is L, and the length of packet is K, and the length of packet is each for transmitting terminal Send the length of packet, or one length of receiving terminal sets itself, use the length L divided by packet for receiving data Length be K, obtained divisor is M, remainder N, that is, represents that received data packet contains M received data packet, and N number of byte Redundant data, because redundant data not enough forms a complete received data packet, it is therefore desirable to which redundant data is carried out down The processing of face mode.
Step 4, the redundant data in step 3 is stored, receiving terminal can be set in internal memory one section dedicated for Store the storage internal memory of redundant data;In the DRP data reception process of next round, by the redundant data and the reception number of next round According to together receiving.Specifically in next round DRP data reception process, it will merge what is obtained in the step 2 of next round more than data Before receiving data, then using the data after merging as reception data, and the calculating of step 3 is carried out, circulated with this, completed whole The reception work of individual data.
Embodiments of the invention are:
Embodiment 1
The first round data instance that the present invention is sent with PC receiving terminals receiving end/sending end illustrates, wherein the length of packet Spend for 16 bytes, its concrete operations it is as follows
The bluetooth equipment of PC receiving terminals is invented into serial ports first, after PC receiving terminals and transmitting terminal are by bluetooth connection, The data of 1500 bytes of transmitting terminal transmission are received, PC receiving terminals find the 50th byte as first group by Bluetooth protocol The starting point of data, the data of wherein 1-49 byte are the invalid data that transmitting terminal is sent, therefore the reception data of the first round For the data of 50-1500 totally 1451 bytes, the length for receiving data is 1451, and then the length 16 of packet is asked It is remaining, then 90 complete packets are obtained, the redundant data of also remaining 11 bytes, due to inadequate one of the data of 11 bytes The length of packet, thus the redundant data of 11 bytes is stored in set in PC receiving terminals dedicated for store redundant digit According to storage internal memory in, then receiving terminal is handled 90 complete packets.
In the second wheel data receiver, PC receiving terminals still receive the data of 1500 bytes of transmitting terminal transmission, PC Receiving terminal is combined by last round of 11 unnecessary bytes and this data, and is received first group of 16 bytes as this First group of data, then the reception data length of the second wheel is 1511, then carries out complementation to the length 16 of packet, obtains 94 Individual complete packet, the redundant data of also remaining 7 bytes, then storage internal memory is emptied and by the redundant digit of 7 bytes According to storage into storage internal memory.
Then circulated with this, until PC receiving terminals all receive the data of transmitting terminal.
Embodiment 2
The 6th wheel data instance that the present invention is sent with PC receiving terminals receiving end/sending end illustrates, wherein the length of packet Spend for 8 bytes, and the redundant data that 4 bytes are stored with internal memory is stored in the 5th wheel DRP data reception process;Its concrete operations It is as follows:
PC receiving terminals receive 992 of transmitting terminal transmission in the 6th wheel data receiver in a data transmission procedure The data of byte, the 5th redundant data for taking turns 4 bytes stored in DRP data reception process in storage internal memory is incorporated into connect first The original position of data is received, obtains new reception data length as 1000;Then complementation is carried out to the length 8 of packet, obtained 125 complete data packets, epicycle does not produce redundant data, therefore PC receiving terminals are directly carried out 125 complete packets Receive, complete the data receiver work of the 6th wheel.
In the DRP data reception process of the 7th wheel, PC receiving terminals receive the data of 1002 bytes of transmitting terminal transmission, by Without generation redundant data in the 6th wheel DRP data reception process, therefore the reception data length of the 7th wheel data receiver kind is 1000, complementation then is carried out to the length 8 of packet, obtains 125 complete packets, and the redundant data of 2 bytes, Redundant data is stored in storage internal memory, PC receiving terminals handle 125 complete packets.
Present invention also offers a kind of Bluetooth data reception device, as shown in Fig. 2 including receiving terminal 1, receiving terminal 1 is PC End or other receiving terminals, the bluetooth equipment of receiving terminal 1 invent serial ports, and receiving terminal 1 receives the data in buffering area 2, buffering After the data that data in area 2 are sent out for transmitting terminal, receiving terminal 1 and transmitting terminal are by bluetooth connection, out of buffering area 2 Directly read the data of transmitting terminal transmission, receiving terminal 1 get need after the data in buffering area 2 to carry out it is further judge and Calculate;Whether the data that receiving terminal 1 first determines whether to receive are first round data receiver in this data transmission procedure, i.e. root Each byte is begun stepping through from first character section according to Bluetooth protocol, the starting point of data receiver is found according to the information of byte, Data from starting point and its afterwards are the reception data of epicycle, and the length for receiving data is L, and according to the length of packet For K to receiving data complementation, obtained divisor be M, remainder N, that is, obtains the individual complete packets of M, and N number of byte is unnecessary Data;Redundant data is stored in storage internal memory 3 by receiving terminal 1, and storage internal memory 3 sets special for receiving terminal 1 in internal memory For storing the memory headroom of redundant data, while receiving terminal receives to M complete packets.In the reception of next round During data, receiving terminal 1 is needed to read redundant data from storage internal memory 3, and redundant data is incorporated into connecing for next round Before receiving data start, and the reception data of next round are obtained, then receiving terminal 3 empties storage internal memory 3, to store down The redundant data of one wheel.

Claims (7)

1. a kind of method of reseptance of blue-teeth data, it is characterised in that comprise the following steps:
Step 1, the bluetooth equipment of receiving terminal is invented into serial ports, serial ports receives all data of buffering area;
Step 2, the starting point of first group of data is found in data, to receive data, receiving terminal is carried out the data after starting point Receive;
Step 3, the length L of data is received in calculation procedure 2, and according to the length K complementations of packet, obtains redundant data;
Step 4, redundant data is stored, then carries out the reception of next round data, and in the reception of next round data During, the redundant data will be received first, and then the reception data to next round receive.
2. the method for reseptance of blue-teeth data according to claim 1, it is characterised in that found in the step 2 in data The starting point of first group of data, specific is to begin stepping through each byte from the first character section of data, judge its whether be The first group of data received.
3. the method for reseptance of blue-teeth data according to claim 2, it is characterised in that being judged as YES in the step 2, Receiving terminal receives the data after it since first group of data.
4. the method for reseptance of blue-teeth data according to claim 2, it is characterised in that the judgement in the step 2 is not It is that then receiving terminal first receives the redundant data in last round of reception data procedures, then receives first group of data and its afterwards again Data.
5. the method for reseptance of blue-teeth data according to claim 4, it is characterised in that step 2 receiving terminal will be unnecessary Data Integration is before first group of data, and then receiving terminal starts to receive data.
6. the method for reseptance of blue-teeth data according to claim 1, it is characterised in that in next round in the step 4 In DRP data reception process, before redundant data is incorporated into the reception data of next round by receiving terminal, then start to receive data.
A kind of 7. reception device of blue-teeth data, it is characterised in that including the receiving terminal (1) with bluetooth equipment virtual serial port, Receiving terminal (1) reads all data in buffering area (2);Receiving terminal (1) is begun stepping through from the first character section of data, finds The starting point of one group of data, first group of data and its data afterwards is receive data;Receiving terminal (1) calculates the length for receiving data Spend L, and receiving terminal (1) according to the length K of packet to receiving data complementation, obtain redundant data;Receiving terminal (1) will be unnecessary Data storage is in storage internal memory (3), and the reception data to other parts receive;
Redundant data is incorporated into the reception data start bit of next round by the receiving terminal (1) when next round receives data Before putting.
CN201710876722.7A 2017-09-25 2017-09-25 Bluetooth data receiving device and method thereof Active CN107734002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710876722.7A CN107734002B (en) 2017-09-25 2017-09-25 Bluetooth data receiving device and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710876722.7A CN107734002B (en) 2017-09-25 2017-09-25 Bluetooth data receiving device and method thereof

Publications (2)

Publication Number Publication Date
CN107734002A true CN107734002A (en) 2018-02-23
CN107734002B CN107734002B (en) 2020-07-17

Family

ID=61207956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710876722.7A Active CN107734002B (en) 2017-09-25 2017-09-25 Bluetooth data receiving device and method thereof

Country Status (1)

Country Link
CN (1) CN107734002B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447808A (en) * 2007-11-27 2009-06-03 中兴通讯股份有限公司 Bluetooth file transmission system
US20120302169A1 (en) * 2011-05-25 2012-11-29 Sunrex Technology Corp. Bluetooth data transmission system and method
JP5170697B2 (en) * 2009-03-30 2013-03-27 Kddi株式会社 Bluetooth communication method and system
CN104135339A (en) * 2014-07-08 2014-11-05 福建联迪商用设备有限公司 Bluetooth low-power-consumption communication method, Bluetooth equipment and system
CN105900347A (en) * 2015-10-27 2016-08-24 深圳还是威健康科技有限公司 Bluetooth-based data transmission method and device
CN106162536A (en) * 2016-08-30 2016-11-23 韦嘉志 A kind of system of bluetooth data transmission
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447808A (en) * 2007-11-27 2009-06-03 中兴通讯股份有限公司 Bluetooth file transmission system
JP5170697B2 (en) * 2009-03-30 2013-03-27 Kddi株式会社 Bluetooth communication method and system
US20120302169A1 (en) * 2011-05-25 2012-11-29 Sunrex Technology Corp. Bluetooth data transmission system and method
CN104135339A (en) * 2014-07-08 2014-11-05 福建联迪商用设备有限公司 Bluetooth low-power-consumption communication method, Bluetooth equipment and system
CN105900347A (en) * 2015-10-27 2016-08-24 深圳还是威健康科技有限公司 Bluetooth-based data transmission method and device
CN106162536A (en) * 2016-08-30 2016-11-23 韦嘉志 A kind of system of bluetooth data transmission
CN106571894A (en) * 2016-11-10 2017-04-19 深圳市民德电子科技股份有限公司 Bluetooth information sending and receiving methods

Also Published As

Publication number Publication date
CN107734002B (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US7710973B2 (en) Error masking for data transmission using received data
CN105099938B (en) The determination method and apparatus of congestion window in network
CN109246671A (en) Data transmission method, apparatus and system
US8310934B2 (en) Method and device for controlling information channel flow
CN101488912B (en) Method and apparatus for IP fragmentation
CN103078895B (en) Multi-functional pair of serial server of a kind of EPA based on MCF52233 chip
CN109815176B (en) Specific DMA data transmitting method, receiving method, system and medium
CN104980367A (en) Token bucket limiting speed method and apparatus
CN103888317B (en) A kind of unrelated network redundancy flow removing method of agreement
JP2009093348A (en) Information processing apparatus and information processing system
CN109873722B (en) Firmware remote upgrading method and device, computer equipment and storage medium
CN105450785A (en) File transmission method and device
EP1934761B1 (en) Dma transfer and hardware acceleration of ppp frame processing
US20190349296A1 (en) Data transmission method, apparatus, transmitting end, receiving end and system
JP2013122631A (en) Program rewriting method, program rewriting device, and electronic control unit
CN109376108A (en) Data transmission method, equipment, transmitting terminal and receiving end based on serial communication
CN106911740A (en) A kind of method and apparatus of cache management
CN106506390A (en) A kind of data flow transmission method
CN107734002A (en) The reception device and its method of a kind of blue-teeth data
EP3057256A1 (en) Method for processing stream media message, wifi chip and mobile terminal
US9544401B2 (en) Device and method for data communication using a transmission ring buffer
WO2020077625A1 (en) Data processing method and apparatus
CN109391605B (en) Data transmission method, device and system
JP5397353B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
CN104679715A (en) Simple inter-chip communication method and simple inter-chip communication device

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