CN106327849A - Data communication method based on mobile phone audio frequency - Google Patents
Data communication method based on mobile phone audio frequency Download PDFInfo
- Publication number
- CN106327849A CN106327849A CN201610744548.6A CN201610744548A CN106327849A CN 106327849 A CN106327849 A CN 106327849A CN 201610744548 A CN201610744548 A CN 201610744548A CN 106327849 A CN106327849 A CN 106327849A
- Authority
- CN
- China
- Prior art keywords
- mobile phone
- audio
- data
- peripheral hardware
- method based
- 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
Links
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C19/00—Electric signal transmission systems
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
The invention relates to a data communication method based on mobile phone audio frequency. A peripheral is connected with a mobile phone through a mobile phone audio port; the mobile phone sends data; the mobile phone sends encoded audio signals to the peripheral through a left/right channel of an audio head, and the peripheral decodes the content of data sent by the mobile phone by checking the pulse width on an IO pin of a peripheral CPU; the peripheral sends the data, wherein the periphery sends the encoded data to the mobile phone through the IO pin of the peripheral CPU, and the mobile phone obtains sound waveforms recorded by the audio head MIC and decodes the data sent by the periphery to the mobile phone; data communication between the mobile phone and the periphery is completed. The audio signal is converted into a recognizable digital signal, a traditional mobile phone data communication mode is expanded, the audio port standards are more unified compared with a data port, the audio port is easier and more convenient to operate compared with Bluetooth and wifi, pairing and connection are not needed, and the hardware cost is lower compared with Bluetooth and wifi.
Description
Technical field
The present invention relates to a kind of data communications method based on handset audio.
Background technology
At present the communication mode of the digital signal between mobile phone and external equipment mainly has following several: data port, bluetooth,
Wifi, the present invention is for expanding and reducing conventional data communications cost, it is proposed that a kind of data communications method based on handset audio.
Summary of the invention
It is an object of the invention to provide a kind of data communications method based on handset audio, audio signal being changed into can
The digital signal identified, has expanded traditional handset data communication mode, and with data port ratio, audio port standard is more unified, with
Bluetooth and wifi ratio, audio port operation is easier, it is not necessary to matches and is connected, and is provided simultaneously with than bluetooth with wifi peripheral hardware more
Low hardware cost.
For achieving the above object, the technical scheme is that a kind of data communications method based on handset audio, including
Following steps,
S1, peripheral hardware are connected with mobile phone by handset audio mouth;
S2, mobile phone send data: mobile phone sends encoded audio signal to peripheral hardware by the left/right sound channel of audio head, outward
If by checking the pulsewidth width on the I/O pin of peripheral hardware CPU, decoding the data content that mobile phone sends;
S3, peripheral hardware send data: peripheral hardware sends encoded data by the I/O pin of peripheral hardware CPU and obtains to mobile phone, mobile phone
The sound waveform that audio head MIC records, decodes peripheral hardware and issues the data of mobile phone;
S4, complete the data communication of mobile phone and peripheral hardware.
In an embodiment of the present invention, described handset audio mouth is 4 segmentation 3.5mm audio ports, and described peripheral hardware passes through audio frequency
Head is inserted directly into or accesses this 4 segmentation 3.5mm audio port by audio frequency extended line.
In an embodiment of the present invention, in described step S2, S3 use be encoded to Synchronization, FSK coding or
F2F encodes.
In an embodiment of the present invention, described FSK coded system is that the pulse width signal by the fixed cycle distinguishes numeral
The 0 and 1 of signal.
In an embodiment of the present invention, described mobile phone is play and is arranged parameter and be: get frequency 48000Hz, double track, bit wide ready
8;Mobile phone recording arranges parameter and is: recording frequency 44100Hz, monophonic, bit wide 16.
In an embodiment of the present invention, in described step S2, mobile phone sends encoded by the left/right sound channel of audio head
Audio signal to peripheral hardware specific implementation be: mobile phone control audio signal output time high low amplitude value and output height by a narrow margin
Value duration, thus data to be sent are converted to the audio signal of FSK coding, then by mobile phone left/right sound channel
Send.
In an embodiment of the present invention, in described step S3, mobile phone obtains the sound waveform that audio head MIC records, decoding
Go out peripheral hardware and issue the data specific implementation of mobile phone and be: mobile phone gets the sound waveform that audio head MIC records, by detection
The pulsewidth width of sound wave signal, decodes data content.
In an embodiment of the present invention, in described step S3, mobile phone needs elder generation after obtaining the sound waveform that audio head MIC records
After being filtered by filtering algorithm, then it is decoded.
In an embodiment of the present invention, when carrying out the data communication of mobile phone and peripheral hardware first, peripheral hardware returns different frequency, no
With the sound wave signal of amplitude to mobile phone, in order to mobile phone is believed by passing judgment on out the sound waveform of optimum waveform quality after decoding
Number, when carrying out the data communication of mobile phone and peripheral hardware afterwards, peripheral hardware all carries out data transmission with this optimum waveform quality.
Compared to prior art, the method have the advantages that audio signal is changed into by the present invention program can know
Other digital signal, has expanded traditional handset data communication mode, and has had the following characteristics that
1, with data port ratio, the more unified (example: the platform audio mouths such as Android, IOS, winCE, Saipan are all consistent, number of audio port standard
The multiple interfaces standards such as microUSB, miniUSB, USB, lightning are had) according to mouth;
2, with bluetooth and wifi ratio, audio port operation is easier, it is not necessary to matches and is connected;
3, it is provided simultaneously with the hardware cost lower than bluetooth and wifi peripheral hardware.
Accompanying drawing explanation
Fig. 1 is mobile phone of the present invention and peripheral hardware connection diagram.
Fig. 2 is the audio head that mobile phone of the present invention is connected by with peripheral hardware.
Fig. 3 is the communication process of mobile phone of the present invention and peripheral hardware.
Detailed description of the invention
Below in conjunction with the accompanying drawings, technical scheme is specifically described.
As Figure 1-3, a kind of data communications method based on handset audio of the present invention, comprise the steps,
S1, peripheral hardware are connected with mobile phone by handset audio mouth;
S2, mobile phone send data: mobile phone sends encoded audio signal to peripheral hardware by the left/right sound channel of audio head, outward
If by checking the pulsewidth width on the I/O pin of peripheral hardware CPU, decoding the data content that mobile phone sends;
S3, peripheral hardware send data: peripheral hardware sends encoded data by the I/O pin of peripheral hardware CPU and obtains to mobile phone, mobile phone
The sound waveform that audio head MIC records, decodes peripheral hardware and issues the data of mobile phone;
S4, complete the data communication of mobile phone and peripheral hardware.
Further, described handset audio mouth is 4 segmentation 3.5mm audio ports, and described peripheral hardware is inserted directly into by audio head
Or access this 4 segmentation 3.5mm audio port by audio frequency extended line.
Further, use in described step S2, S3 is encoded to Synchronization, FSK coding or F2F coding.
Further, described FSK coded system is that the pulse width signal by the fixed cycle distinguishes the 0 and 1 of digital signal.
Further, described mobile phone is play and is arranged parameter and be: get frequency 48000Hz, double track, bit wide 8 ready;Mobile phone is recorded
Sound arranges parameter: recording frequency 44100Hz, monophonic, bit wide 16.
Further, in described step S2, mobile phone sends encoded audio signal by the left/right sound channel of audio head
To peripheral hardware specific implementation be: mobile phone control audio signal output time high low amplitude value and export high low amplitude value lasting time
Between, thus data to be sent are converted to the audio signal of FSK coding, then sent by mobile phone left/right sound channel.
Further, in described step S3, mobile phone obtains the sound waveform that audio head MIC records, and decodes peripheral hardware and issues
The data specific implementation of mobile phone is: mobile phone gets the sound waveform that audio head MIC records, and is believed by detection sound waveform
Number pulsewidth width, decode data content.
Further, in described step S3, mobile phone needs to first pass through filtering and calculates after obtaining the sound waveform that audio head MIC records
After method filtering, then it is decoded.
Further, when carrying out the data communication of mobile phone and peripheral hardware first, peripheral hardware returns different frequency, the sound of different amplitude
Sound waveshape signal is to mobile phone, in order to mobile phone by passing judgment on out the sound wave signal of optimum waveform quality after decoding, laggard
During the data communication of row mobile phone and peripheral hardware, peripheral hardware all carries out data transmission with this optimum waveform quality.
It it is below the concrete technical scheme of the present invention.
As it is shown in figure 1, the application peripheral hardware is connected with mobile phone by 4 segmentation 3.5mm audio ports of standard (can be inserted directly into hands
Machine or accessed by audio frequency extended line)
The data link of the present invention program:
Mobile phone left/right sound channel is connected with peripheral hardware I/O pin (reception pin)
Mobile phone sends data to peripheral hardware:
Mobile phone sends the audio signal of encoded (Synchronization/FSK/F2F) to outward by the left/right sound channel of audio head
If peripheral hardware, by checking the pulsewidth width on the I/O pin of CPU, decodes the data content that mobile phone terminal sends
Mobile phone MIC is connected with peripheral hardware I/O pin (transmission pin)
Peripheral hardware sends data to mobile phone:
The data that peripheral hardware sends encoded (Synchronization/FSK/F2F) by the I/O pin of CPU obtain to mobile phone, mobile phone
Take the sound waveform that audio head MIC records, decode peripheral hardware and issue the data of mobile phone
The present invention is as a example by FSK communication mode:
FSK coded system is introduced:
This coded system is that the pulse width signal by the fixed cycle distinguishes the 0 and 1 of digital signal
Mobile phone terminal audio frequency is play and is arranged with recording parameter:
Mobile phone terminal broadcasting arranges parameter and is: get frequency 48000Hz, double track, bit wide 8 ready
Mobile phone terminal recording arranges parameter and is: recording frequency 44100Hz, monophonic, bit wide 16
The coding output of mobile phone terminal voice data:
Mobile phone terminal can control high low amplitude value when audio signal exports and export high low amplitude value duration, utilizes this hands
Data to be sent can be converted to the audio signal of FSK coding by machine end, are then sent by mobile phone left/right sound channel
The reception decoding of mobile phone terminal recording data:
Mobile phone terminal gets the waveform of recording data, by the pulsewidth width of detection waveform signal, decodes data content
Due to mobile phone huge number on the market, implement below scheme for improving handset compatibility:
Communication waveforms quality optimization
(1), the pulsewidth ratio of 0,1 signal period can not be more than 3:2 (FSK)
(2), protection data are increased before and after data, it is ensured that being properly received of critical data
Protocol optimization
(1), every byte increases check bit, complete data packet increases check byte and ensures data correctness
Algorithm optimization
(1), recording decoder time add filtering algorithm, first filter further decoding, that improves distorted waveform is decoded into power
Communication process optimizes
(1), retransmission mechanism is increased
(2), identification process is identified as follows
Mobile phone recording waveform quality is mainly affected by frequency and two factors of amplitude of audio signal, for ensureing all handss
Machine can receive best recording waveform, and communication process has carried out the process optimization confirmed of shaking hands
Being above presently preferred embodiments of the present invention, all changes made according to technical solution of the present invention, produced function is not
During beyond the scope of technical solution of the present invention, belong to protection scope of the present invention.
Claims (9)
1. a data communications method based on handset audio, it is characterised in that: comprise the steps,
S1, peripheral hardware are connected with mobile phone by handset audio mouth;
S2, mobile phone send data: mobile phone sends encoded audio signal to peripheral hardware by the left/right sound channel of audio head, outward
If by checking the pulsewidth width on the I/O pin of peripheral hardware CPU, decoding the data content that mobile phone sends;
S3, peripheral hardware send data: peripheral hardware sends encoded data by the I/O pin of peripheral hardware CPU and obtains to mobile phone, mobile phone
The sound waveform that audio head MIC records, decodes peripheral hardware and issues the data of mobile phone;
S4, complete the data communication of mobile phone and peripheral hardware.
Data communications method based on handset audio the most according to claim 1, it is characterised in that: described handset audio mouth
Being 4 segmentation 3.5mm audio ports, described peripheral hardware is inserted directly into by audio head or accesses this 4 segmentation 3.5mm by audio frequency extended line
Audio port.
Data communications method based on handset audio the most according to claim 1, it is characterised in that: described step S2, S3
Be encoded to Synchronization, FSK coding or the F2F of middle employing encode.
Data communications method based on handset audio the most according to claim 3, it is characterised in that: described FSK coding staff
Formula is that the pulse width signal by the fixed cycle distinguishes the 0 and 1 of digital signal.
Data communications method based on handset audio the most according to claim 4, it is characterised in that: described mobile phone is play and is set
Putting parameter is: get frequency 48000Hz, double track, bit wide 8 ready;Mobile phone recording arranges parameter and is: recording frequency 44100Hz, single
Sound channel, bit wide 16.
Data communications method based on handset audio the most according to claim 5, it is characterised in that: in described step S2,
Mobile phone sends encoded audio signal by the left/right sound channel of audio head: mobile phone controls
Data to be sent thus are converted to by high low amplitude value during audio signal output and export high low amplitude value duration
The audio signal of FSK coding, is then sent by mobile phone left/right sound channel.
Data communications method based on handset audio the most according to claim 5, it is characterised in that: in described step S3,
Mobile phone obtains the sound waveform recorded of audio head MIC, decodes peripheral hardware and issues the data specific implementation of mobile phone and is: mobile phone obtains
Get the sound waveform that audio head MIC records, by detecting the pulsewidth width of sound wave signal, decode data content.
Data communications method based on handset audio the most according to claim 1, it is characterised in that: in described step S3,
After mobile phone needs after obtaining the sound waveform that audio head MIC records to first pass through filtering algorithm filtering, then it is decoded.
Data communications method based on handset audio the most according to claim 1, it is characterised in that: carry out first mobile phone with
During the data communication of peripheral hardware, peripheral hardware return different frequency, different amplitude sound wave signal to mobile phone, in order to mobile phone passes through
Passing judgment on out the sound wave signal of optimum waveform quality after decoding, when carrying out the data communication of mobile phone and peripheral hardware afterwards, peripheral hardware is equal
Data transmission is carried out with this optimum waveform quality.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610744548.6A CN106327849A (en) | 2016-08-29 | 2016-08-29 | Data communication method based on mobile phone audio frequency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610744548.6A CN106327849A (en) | 2016-08-29 | 2016-08-29 | Data communication method based on mobile phone audio frequency |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106327849A true CN106327849A (en) | 2017-01-11 |
Family
ID=57791310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610744548.6A Pending CN106327849A (en) | 2016-08-29 | 2016-08-29 | Data communication method based on mobile phone audio frequency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106327849A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202260046U (en) * | 2011-07-22 | 2012-05-30 | 吴沙林 | Audio-data interface adapter device and audio-data signal conversion system |
CN103067587A (en) * | 2012-12-26 | 2013-04-24 | 北京大唐智能卡技术有限公司 | Device, mobile phone and method based on audio interface and used for bidirectional data transmission |
CN103138929A (en) * | 2011-12-05 | 2013-06-05 | 赛酷特(北京)信息技术有限公司 | Contactless smart card cellphone authentication equipment based on audio interface |
CN103685640A (en) * | 2013-12-17 | 2014-03-26 | 浙江铭众生物医学创业投资有限公司 | Controller communicated with intelligent terminal based on audio cable and communication method of controller and intelligent terminal |
CN104202312A (en) * | 2014-08-22 | 2014-12-10 | 上海动联信息技术股份有限公司 | Rapid and stable data transmission method based on mobile phone audio channels |
-
2016
- 2016-08-29 CN CN201610744548.6A patent/CN106327849A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202260046U (en) * | 2011-07-22 | 2012-05-30 | 吴沙林 | Audio-data interface adapter device and audio-data signal conversion system |
CN103138929A (en) * | 2011-12-05 | 2013-06-05 | 赛酷特(北京)信息技术有限公司 | Contactless smart card cellphone authentication equipment based on audio interface |
CN103067587A (en) * | 2012-12-26 | 2013-04-24 | 北京大唐智能卡技术有限公司 | Device, mobile phone and method based on audio interface and used for bidirectional data transmission |
CN103685640A (en) * | 2013-12-17 | 2014-03-26 | 浙江铭众生物医学创业投资有限公司 | Controller communicated with intelligent terminal based on audio cable and communication method of controller and intelligent terminal |
CN104202312A (en) * | 2014-08-22 | 2014-12-10 | 上海动联信息技术股份有限公司 | Rapid and stable data transmission method based on mobile phone audio channels |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104917671B (en) | Audio-frequency processing method and device based on mobile terminal | |
CN105790854A (en) | Short distance data transmission method and device based on sound waves | |
CN108777596B (en) | Communication method, communication system and computer readable storage medium based on sound wave | |
CN104301521A (en) | Modulation mode and communication circuit based on mobile phone audio interface and communication method of communication circuit based on mobile phone audio interface | |
CN104935527A (en) | Data packing method of audio communication | |
CN103489448A (en) | Processing method and system of voice data | |
CN102413208A (en) | Method for realizing serial port communication by utilizing mobile phone earphone interface | |
CN108289037A (en) | A kind of equipment wireless parameter configuration method based on sound wave | |
CN103077723A (en) | Audio transmission system | |
CN104506287A (en) | Real-time sound communication method under TD-LTE (time division-long term evolution) emergency communication | |
CN102334977A (en) | Measuring device, mobile equipment, system for measuring physiological parameters of human bodies and wireless transmission method for measuring data | |
CN213906675U (en) | Portable wireless bluetooth recording equipment | |
CN107004418B (en) | Digital communication method and device based on audio channel | |
CN106327849A (en) | Data communication method based on mobile phone audio frequency | |
CN103685640B (en) | A kind of controller of communicating with intelligent terminal based on tone frequency channel wire and communication means thereof | |
CN108134622A (en) | A kind of method and smart machine that control instruction is sent using Bluetooth audio frequency | |
CN102322928B (en) | Electronic scale, mobile equipment, body weight measuring system and wireless transmission method | |
CN202436213U (en) | Safety helmet based on wireless networking technology | |
CN105808651A (en) | Android WeChat based silk_v3 voice file format decoding method | |
CN203722673U (en) | Controller using audio line for communication with intelligent terminal | |
CN103984666A (en) | Method for configuring WIFI (Wireless Fidelity) equipment networking by use of audio interface of mobile phone | |
CN102426769B (en) | Remote controller device and communication method | |
CN105657592B (en) | A kind of audio communication method and device | |
CN104735809A (en) | Method for communication between terminal and external equipment and terminal | |
CN211019029U (en) | Coding and decoding integrated audio and video processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170111 |