Background technology
The product of Apple's (hereinafter referred apple) is popular in generation with the design of its unique fashion.But, also incompatible between a lot of functions and peripheral non-apple products in the private IOS system of apple.
The present invention is directed to its Bluetooth function, at present tradition and the blue-teeth data transmission of standard realizes by SPP agreement (bluetooth serial ports agreement), and compatible multiple versions, market has intelligent operating system, all adopt this standard agreement, except apple products, the bluetooth between each smart electronics product all can be carried out free communication.
And apple IOS system, the SPP authority of not opening to the outside world, cannot be directly and the blue tooth products of other non-apples carry out data communication.If outside bluetooth module need with apple data communication, just need to add the certification IC of application Apple, must be through the apple deciphering chip of MFI certification.This measure needs certain expense undoubtedly, increases cost.
And apple system is only open to the data communication under bluetooth 4.0 patterns.If be that outside blue tooth products is communicated by letter with it, this product must carry bluetooth 4.0.
Though and bluetooth 4.0 claims with low-power consumption note, so market popularity rate is still not high at present, and during with apple data communication, still can only transmit very small data quantity (every frame is not more than 20 bytes, 2000 bytes that are not more than per second).
Summary of the invention
The object of the present invention is to provide a kind of without support bluetooth 4.0 and need not the situation of apple MFI trusted authentication chip under, between peripheral bluetooth module and apple IOS system, realize the method for data communication.The technical solution used in the present invention is:
IOS system and bluetooth module carry out a method for data communication, comprise the steps:
Step 1. the data that apple equipment sends needs as transmitting terminal are carried out unipolarity non-return-to-zero coding;
Step 2. above-mentioned coding is carried out to OOK keying amplitude modulation(PAM) and become one section of special audio stream;
Step 3. apple equipment is sent to bluetooth module as receiving terminal using this section audio stream by A2DP agreement or HFP agreement as transmitting terminal;
Step 4. outside bluetooth module carries out decoding work to the audio stream after modulating.
Further, in described step 1, the data that transmitting terminal sends are audio file.
Further, in described step 1, while carrying out unipolarity non-return-to-zero coding, the duration of each code element is 10ms.
Further, in described step 3, adopt sinusoidal wave to carrying out OOK keying amplitude modulation(PAM) through the data of unipolarity non-return-to-zero coding.
The invention has the advantages that: the invention provides and a kind ofly do not supporting bluetooth 4.0 and need not apple MFI trusted authentication chip in the situation that, between peripheral bluetooth module and apple IOS system, just can realize the method for data communication, save cost having increased in compatible.
Embodiment
Below in conjunction with concrete drawings and Examples, the invention will be further described.
The invention provides a kind of do not need to support bluetooth 4.0 and the method that the peripheral bluetooth module with MFI trusted authentication chip is not communicated by letter with apple IOS data among systems, in method, adopted unipolarity non-return-to-zero coding and OOK modulation system.
What communicate by letter with apple device data as shown in Figure 1, is the bluetooth module that there is no apple MFI certification deciphering chip.This communication means comprises:
Step 1. the data that apple equipment sends needs as transmitting terminal are carried out unipolarity non-return-to-zero coding;
Step 2. above-mentioned coding is carried out to OOK keying amplitude modulation(PAM) and become one section of special audio stream;
Step 3. apple equipment is sent to bluetooth module as receiving terminal using this section audio stream by A2DP agreement or HFP agreement as transmitting terminal;
Step 4. bluetooth module is decoded to audio stream.
In detail above-mentioned steps is explained below.In Fig. 1, the outside bluetooth module App that unipolarity non-return-to-zero coding and OOK modulation work are installed by apple equipment end completes.
First,, in step 1, the audio file that apple equipment end can send needs forms the digital signal of a rectangular pulse after unipolarity non-return-to-zero coding, as shown in Figure 2.The feature of this yard is: constant high level represents 1, and zero level represents that the duration of 0, one code element is 10ms, and 10ms is not mandatory provisions herein, also can set as required, but 10ms is a preferred value after overtesting.Representing that after a code element, voltage does not need to get back to 0, and during a code element, level can not change.As shown, a code element T
sit is a code element.
Then, after having encoded, recycling is sinusoidal wave carries out OOK keying amplitude modulation(PAM) to the digital signal after coding, forms one section of special audio stream, and as described in Figure 3,1 is sinusoidal wave to modulation system; 0 represents to turn-off, without waveform.
OOK modulation: On-Off Keying binary system on off keying, has another name called binary system amplitude-shift keying (2ASK).An amplitude is taken as to 0, and another amplitude is non-zero.Digital signal through unipolarity non-return-to-zero coding is carried out to 2ASK(OOK keying with sine wave) amplitude modulation(PAM) be sine wave 1 time; 0 represents to turn-off, there is no waveform.
Waveform after modulating by OOK is one section of special audio stream, and transmitting terminal apple equipment is sent to outside bluetooth module by this section audio stream by A2DP agreement (Bluetooth audio frequency mode agreement) or HFP agreement (bluetooth handsfree application protocol).Between the outside bluetooth module App that apple equipment end is installed and outside bluetooth module, carry out communication by A2DP agreement or HFP agreement.This bluetooth module authenticates without apple MFI.
A2DP agreement: Bluetooth audio frequency mode agreement, a kind of technical specification of bluetooth, stereo music that can uppick high-quality by this agreement.This protocol definition set up the needed parameter of audio/video flow and flow process.The application of A2DP is from SRC(digital audio stream sending ending equipment) to SNK(digital audio stream receiving device) set up/control/audio data stream of operation.Sets up and carries out beginning data stream transmitting (Starting Streaming) process once audio data stream connects, SRC and SNK are with regard in preparing at any time " data stream transmitting (Streaming) state " of transceiving data.SRC uses " Send Audio Stream " that audio stream data is sent to SNK, and SNK uses " Receive Audio Stream " audio reception data.
HFP agreement: bluetooth handsfree application protocol is also a kind of technical specification of bluetooth, only listens to the monophony tonequality of regular phone.
Finally can decode to this audio stream as the outside bluetooth module of receiving terminal, audio stream is resolved to module can identification data, and these data are a string binary data.Be illustrated in figure 4 waveform before decoding in the time of decoding, if having signal in a code element, be expressed as 1, if there is no signal, be expressed as 0, as to scheme illustrative audio stream be 110111001001111010 after decoding, this string data is the data that finally obtain.
Be connected to again the hardware facility that other need adaptive apple equipment if outside, the data communication mode of realizing by this bluetooth module just can obtain the data of apple end, utilize these data can realize more easily the function that this hardware facility need to be realized, realize and do not supported bluetooth 4.0 and need not apple MFI trusted authentication chip in the situation that, the method for carrying out data communication between peripheral bluetooth module and apple IOS system.
This method increases has saved cost compatible time.
Some technical terms that the present invention relates to are explained as follows:
APP, i.e. application software or application program.
A2D, Advanced Audio Distribution Profile, Bluetooth audio frequency mode agreement.
SPP, Serial Port Profile, bluetooth serial ports agreement.
HFP, Hands-free Profile, bluetooth handsfree application protocol.
IAP, the abbreviation of iPod Accessory Protocol, is the agreement that Apple specifies for apple accessory specially.
Apple MFi certification, is that Apple (Apple Inc.) authorizes the one of the external accessory of accessory manufacturers produce to identify the usage license to it, is the english abbreviation of apple company " Made for iOS ".