WO2016011926A1 - 一种信息传输方法、装置和移动终端、存储介质 - Google Patents
一种信息传输方法、装置和移动终端、存储介质 Download PDFInfo
- Publication number
- WO2016011926A1 WO2016011926A1 PCT/CN2015/084521 CN2015084521W WO2016011926A1 WO 2016011926 A1 WO2016011926 A1 WO 2016011926A1 CN 2015084521 W CN2015084521 W CN 2015084521W WO 2016011926 A1 WO2016011926 A1 WO 2016011926A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- mobile terminal
- external device
- information transmission
- interface
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
Definitions
- the present invention relates to the field of mobile terminal technologies, and in particular, to an information transmission method and apparatus, and a mobile terminal and a storage medium.
- USB Universal Serial Bus
- NFC Wired Fidelity
- WIFI Wired Fidelity
- Bluetooth Wired Fidelity
- USB port communication mode needs to go through a certain protocol stack. Although its information transmission rate is high, the resource occupancy rate is large, and for some peripheral devices that do not require a very high transmission rate, only the USB port can be connected. This leads to a large resource occupancy rate and an unnecessary waste of resources.
- the technical problem to be solved by the present invention is to provide an information transmission method and apparatus, and a mobile terminal and a storage medium, so as to solve the technical problem that the peripheral device without the wireless connection function can only transmit information with the mobile terminal through the USB interface. .
- an information transmission method comprising the steps of:
- the mobile terminal When the mobile terminal receives the trigger instruction, sending a startup instruction to the external device through the earphone interface, so that the external device transmits the information to the mobile terminal;
- sending the startup command to the external device through the earphone interface includes:
- the sound channel of the headphone interface is used as a channel for transmitting a start command, and a start command is sent to an external device through the serial data line of the I2C bus.
- receiving information transmitted from the external device through the earphone interface further includes:
- the microphone channel using the headphone interface is used as a channel for receiving information, and the information transmitted from the external device is received through the serial data line of the I2C bus.
- the method after receiving the information transmitted from the external device through the earphone interface, the method further includes:
- the mode is an analog signal
- the pseudo signal is converted into a digital signal.
- the method after receiving the information transmitted from the external device through the earphone interface, the method further includes:
- the encoded information is decoded when the mobile terminal receives the information encoded by the external device.
- the method further comprises:
- the information transmitted from the external device is sent to the processing control unit of the mobile terminal, and the processing control unit displays or saves the information in real time.
- an information transmission apparatus comprising:
- the instruction sending module is configured to: when the mobile terminal receives the triggering instruction, send a startup instruction to the external device through the earphone interface, so that the external device transmits the information to the mobile terminal;
- the information receiving module is configured to receive information transmitted from the external device through the earphone interface.
- the device further comprises:
- the analog-to-digital conversion module is configured to convert the analog signal into a digital signal when the information transmitted from the external device received by the mobile terminal is an analog signal;
- the first information sending module is configured to send the information to the processing control unit of the mobile terminal.
- the device further comprises:
- a decoding module configured to decode the information after the mobile terminal receives the information encoded by the external device
- the second information sending module is configured to send the information to the processing control unit of the mobile terminal.
- a mobile terminal comprising the information transmission apparatus described in the foregoing second embodiment.
- a computer storage medium wherein the computer storage medium stores computer executable instructions for performing the information transmission method provided by the first aspect of the present invention.
- the information transmission method and device, the mobile terminal and the storage medium of the embodiment of the present invention use the sound channel of the earphone interface of the mobile terminal as an interface for starting command transmission, and use the microphone channel of the earphone interface as an interface for receiving information.
- the serial data line of the I2C (Inter-Integrated Circuit) bus is used to transmit the start command and the information of the receiving external device, and the information transmission between the external device and the mobile terminal with low rate requirement is met, the resource occupancy rate is low, and resources are saved.
- FIG. 1 is a flow chart of an information transmission method according to an embodiment of the present invention.
- FIG. 2 is a flow chart of an information transmission method according to another embodiment of the present invention.
- FIG. 3 is a block diagram showing the structure of an information transmission apparatus according to an embodiment of the present invention.
- FIG. 4 is a block diagram showing the structure of an information transmission apparatus according to another embodiment of the present invention.
- Figure 5 is a schematic diagram of a physical connection of an embodiment of the present invention.
- Figure 6 is a schematic diagram of a physical connection of another embodiment of the present invention.
- FIG. 7 is a schematic diagram of a communication principle of an I2C bus according to an embodiment of the present invention.
- the information transmission method provided by the embodiment of the present invention includes the following steps:
- the user inputs a trigger instruction by clicking or touching
- the mobile terminal receives the trigger instruction
- the processing control unit generates a startup instruction, and sends the startup instruction to the serial data line of the I2C bus through the sound channel of the headphone interface.
- the start command is transmitted to the external device through the serial data line.
- the sound channel includes a left channel and a right channel, and the left channel or the right channel can be used as a channel for starting a command, or the left channel and the right channel can be simultaneously used as a channel for starting a command.
- the external device is a peripheral sensor or a financial terminal device, and the sensor includes but is not limited to a pressure sensor, a temperature/humidity acquisition sensor, and the like.
- Mobile terminals include, but are not limited to, smartphones, tablets, and the like.
- the mobile terminal receives the information transmitted from the external device through the earphone interface.
- the external device After receiving the startup command through the serial data line of the I2C bus, the external device acquires the analog signal collected by the acquisition unit, or converts the acquired analog signal into a digital signal and encodes it, and then sends it to and from the mobile device.
- the microphone interface of the terminal is connected to the I2C bus.
- the mobile terminal adopts a microphone of the earphone interface as a receiving end, and is connected to the I2C bus to receive information transmitted from the serial data line of the I2C bus. If the received information is an analog signal, the mobile terminal converts the analog signal into a digital signal; If the received message is a digital signal, The digital signal is decoded.
- the information transmission method of the embodiment of the present invention uses the sound channel of the earphone interface of the mobile terminal as an interface for starting the command transmission, and uses the microphone channel of the earphone interface as an interface for receiving information, and uses the serial data line of the I2C bus to send a start command and receive the external interface.
- the information of the device meets the information transmission between the external device and the mobile terminal with low rate requirements, and the resource occupancy rate is low, which saves resources.
- step S103 the information is sent to the processing control unit of the mobile terminal, and is displayed or saved in real time by the processing control unit.
- the mobile terminal after receiving the information through the microphone interface, transmits the parsed information to the processing control unit in the mobile terminal through analog-to-digital conversion or decoding, and the processing control unit displays or saves in real time, and uses the user to view the information in real time. Or use the mobile terminal for backup and save.
- an information transmission apparatus includes the following modules:
- the command sending module 10 is configured to: when the mobile terminal receives the trigger instruction, send a start command to the external device through the earphone interface, so that the external device transmits the information to the mobile terminal.
- the sound channel interface of the mobile terminal is connected to the I2C bus, and the startup command is sent to the serial data line of the I2C bus, and is transmitted to the external device by the serial data line.
- the sound channel includes a left channel and a right channel, and the left channel or the right channel can be used as a channel for starting a command, or the left channel and the right channel can be simultaneously used as a channel for starting a command.
- the information receiving module 20 is configured to receive, by the mobile terminal, information transmitted by the external device through the earphone interface.
- the external device After receiving the startup command through the serial data line of the I2C bus, the external device acquires the analog signal collected by the acquisition unit and directly sends it to the I2C bus connected to the microphone interface of the mobile terminal; or the acquired analog signal After being converted into a digital signal and encoded, it is sent to the I2C bus that is connected to the microphone interface of the mobile terminal.
- the information transmission device when the information received by the mobile terminal is an analog signal, the information transmission device further includes:
- the analog-to-digital conversion module 30 is configured to convert the analog signal into a digital signal when the information transmitted from the external device received by the mobile terminal is an analog signal.
- the first information sending module 40 is configured to send information to the processing control unit of the mobile terminal, and is displayed or saved in real time by the processing control unit.
- the mobile terminal receives the information transmitted by the external device, and after being processed by the analog-to-digital conversion module or the decoding module, is sent to the processing control unit by the first information sending module 40, and is displayed or saved in real time by the processing control unit, which is beneficial to The user can view the information in real time or back up important information transmitted by the external device.
- the information transmission device includes, in addition to the command sending module 10 and the information receiving module 20, the following:
- the decoding module 50 is configured to decode the information when the mobile terminal receives the information encoded by the external device.
- the second information sending module 60 is configured to send information to the processing control unit of the mobile terminal, and is displayed or saved in real time by the processing control unit.
- the mobile terminal receives the digital signal transmitted by the external device, and after being decoded by the decoding module, is sent to the processing control unit by the second information sending module 60, and the processing control unit displays or saves in real time, so that the user can view the information in real time, or Back up important information transmitted by external devices.
- the present invention further provides a mobile terminal, which includes the information transmission apparatus described in Embodiment 3 above.
- FIG. 5 is a schematic diagram of a physical connection according to an embodiment of the present invention.
- the figure is a physical connection diagram of an external device transmitting an analog signal to a mobile terminal, where the L/R output interface represents a left channel output interface and/or Or right channel output interface, MIC input interface represents microphone input interface.
- the host is a mobile terminal, including but not limited to a mobile phone, a tablet, and the slave is an external device, including but not limited to a sensor, a financial terminal device, and the sensor includes but is not limited to a pressure sensor, a temperature/humidity acquisition sensor.
- the mobile terminal receives the trigger instruction of the user as the host, and the processing control unit generates a startup instruction, and sends a startup instruction to the external device through the L/R output interface.
- the external device transmits the information collected by the acquisition unit to the mobile terminal through the microphone channel through the analog signal.
- the mobile terminal samples the analog signal and converts the analog signal into a digital signal.
- the digital signal is transmitted to the processing control unit, and the processing control unit obtains the digital signal and displays or saves it in real time, so that the user can view the obtained information in real time, or save the information by the mobile terminal.
- FIG. 6 is a schematic diagram of a physical connection according to another embodiment of the present invention.
- the figure is a physical connection diagram of an external device transmitting a digital signal to a mobile terminal.
- the host is a mobile terminal, including but not limited to a mobile phone, a tablet
- the slave is an external device, including but not limited to a sensor, a financial terminal device, and the sensor includes but is not limited to a pressure sensor, a temperature/humidity acquisition sensor.
- the mobile terminal receives the trigger instruction of the user as the host, and the processing control unit generates a startup instruction, and sends a startup instruction to the external device through the L/R output interface.
- the processing control unit After receiving the startup command, the processing control unit converts the analog signal collected by the acquisition unit into a digital signal, and then encodes it by the encoder, and finally transmits it to the mobile terminal through the microphone channel. After receiving the digital signal, the mobile terminal decodes the signal through the decoder and transmits it to the processing control unit. The processing control unit obtains the digital signal and displays or saves it in real time, so that the user can view the obtained information in real time or save the information through the mobile terminal. Backup.
- the earphone interface is used as an interface for transmitting information
- the earphone interface rules usually have several specifications such as 2.5 mm and 3.5 mm, and generally have four channels, namely, a left channel L, a right channel R, and a microphone channel.
- the MIC and the detection channel D in the embodiment of the present invention, need to use the left and / or right channel (ie, the L / R output interface in the figure), and the microphone channel (ie, the MIC input interface in the figure), wherein, L
- the /R channel is used as an output, and the communication mode of the I2C bus is adopted.
- the MIC channel is used as an input to receive an analog signal or a digital signal transmitted by an external device, thereby realizing information interaction between the external device and the mobile terminal.
- the I2C bus has two bus lines: one serial data line SDA and one serial clock line SCL.
- the SCL line is When high level, the SDA line switches from high level to low level. This condition indicates the start condition; when the SCL line is high level, the SDA line switches from low level to high level. This condition indicates a stop condition.
- Each byte on the SDA line must be 8 bits, and the number of bytes that can be transmitted per transmission is not limited. Each byte must be followed by a response bit.
- the first bit of the message is transmitted first (MSB) if After the slave has completed some other functions (such as an internal interrupt service routine), it can receive or transmit the next complete information byte, which can keep the clock line SCL low, forcing the host to enter the wait state, when the slave is ready to receive. The information transmission continues after the next message byte and the clock line SCL is released.
- the I2C bus information transmission must have an acknowledgment response, and it is only started or stopped when it detects that the information line is a rising or falling edge.
- the L/R interface can only be used as an output to send a start command, after the start command is sent, the level is pulled or pulled low without waiting for a response or ignoring the response. In order to start receiving information or stop receiving information.
- the information transmission method, device and mobile terminal of the above embodiment use the sound channel of the earphone interface of the mobile terminal as the interface for transmitting the command, and use the microphone channel of the earphone interface as the interface for receiving information, and the serial data line of the I2C bus is used to transmit and start.
- Command and receive external devices The information provides a way for information transmission between the mobile terminal and the external device. When the USB interface is occupied, or when the information transmission rate is not high, the earphone interface is used for information transmission, and the resource occupancy rate is low. save resources.
- the instruction sending module, the information receiving module, the analog-to-digital conversion module, the first information sending module, the decoding module and the second information sending module in the information transmission device provided by the embodiment of the present invention can all be implemented by a processor in the mobile terminal.
- the functions performed by the above processor can also be implemented by specific logic circuits; in the process of the specific embodiment, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP). Or field programmable gate array (FPGA), etc.
- the above information transmission method is implemented in the form of a software function module and sold or used as a separate product, it may also be stored in a computer readable storage medium.
- the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
- a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- program codes such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
- the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the information transmission method in the embodiment of the present invention.
- the mobile terminal when the mobile terminal receives the trigger instruction, the mobile terminal sends a start command to the external device through the earphone interface, so that the external device transmits the information to the mobile terminal, and receives the information transmitted from the external device through the earphone interface.
- the mobile terminal headset interface is used to send a startup command to the external device, and the information transmitted by the external device is received through the earphone interface, which provides a way for the information transmission between the mobile terminal and the external device, when the USB interface When it is occupied, or when the information transmission rate is not high, the headphone interface is used for information transmission, which has low resource occupancy rate and saves resources.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种信息传输方法、装置和移动终端、存储介质,属于移动终端技术领域。该方法包括:当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;通过耳机接口接收从外部设备传输过来的信息。
Description
本发明涉及移动终端技术领域,尤其涉及一种信息传输方法、装置和移动终端、存储介质。
目前的智能终端(智能手机,平板电脑等)与外设进行连接的方式通常为无线连接(NFC,WIFI,蓝牙等)以及USB接口连接,对于某些没有无线连接方式的外设来说(如现有的压力传感器,金融终端设备等),只能通过USB接口与智能终端进行连接,当USB口被占用时,这些外设则无法与智能终端连接。其使用上并不方便。此外,USB口通讯方式需要经过一定的协议栈,尽管其信息传输速率高,但是资源占用率也较大,而对于某些不需要很高传输速率的外设来说,只能接USB口,导致资源占用率较大,同时造成了资源不必要的浪费。
发明内容
有鉴于此,本发明要解决的技术问题是提供一种信息传输方法、装置和移动终端、存储介质,以解决没有无线连接功能的外设只能通过USB接口与移动终端进行信息传输的技术问题。
本发明解决上述技术问题所采用的技术方案如下:
根据本发明实施例的第一方面,提供的一种信息传输方法,该方法包括以下步骤:
当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;
通过耳机接口接收从外部设备传输过来的信息。
在本发明的一种实施例中,当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令具体包括:
使用耳机接口的声音通道作为发送启动指令的通道,通过I2C总线的串行数据线向外部设备发送启动指令。
在本发明的一种实施例中,通过耳机接口接收从外部设备传输过来的信息进一步包括:
采用耳机接口的话筒通道作为接收信息的通道,通过I2C总线的串行数据线接收从外部设备传输过来的信息。
在本发明的一种实施例中,通过耳机接口接收从外部设备传输过来的信息之后还包括:
当移动终端接收到的从外部设备传输过来的信息为模拟信号时,将模
拟信号转换为数字信号。
在本发明的一种实施例中,通过耳机接口接收从外部设备传输过来的信息之后还包括:
当移动终端接收到的为外部设备编码后的信息时,对编码后的信息进行解码。
在本发明的一种实施例中,该方法之后还包括:
将外部设备传输过来的信息发送给移动终端的处理控制单元,由处理控制单元实时显示或者保存该信息。
根据发明实施例的第二方面,提供的一种信息传输装置,该装置包括:
指令发送模块,配置为当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;
信息接收模块,配置为通过耳机接口接收从外部设备传输过来的信息。
在本发明的一种实施例中,该装置还包括:
模数转换模块,配置为当移动终端接收到的从外部设备传输过来的信息为模拟信号时,将该模拟信号转换为数字信号;
第一信息发送模块,配置为将信息发送给移动终端的处理控制单元。
在本发明的一种实施例中,该装置还包括:
解码模块,配置为当移动终端接收到的为外部设备编码后的信息时,对该信息进行解码;
第二信息发送模块,配置为将信息发送给移动终端的处理控制单元。
根据本发明实施例的第三方面,提供的一种移动终端,该移动终端包括上述第二方面实施例所述的信息传输装置。
根据本发明实施例的第四方面,提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第一方面实施例提供的信息传输方法。
与现有技术相比,本发明实施例的信息传输方法、装置和移动终端、存储介质,利用移动终端耳机接口的声音通道作为启动指令发送的接口,利用耳机接口的话筒通道作为接收信息的接口,采用I2C(Inter-Integrated Circuit)总线的串行数据线发送启动指令和接收外部设备的信息,满足速率要求不高的外部设备与移动终端之间的信息传输,资源占用率低,节约资源。
图1为本发明的一个实施例的信息传输方法的流程图。
图2为本发明的另一个实施例的信息传输方法的流程图。
图3为本发明的一个实施例的信息传输装置的模块结构框图。
图4为本发明的另一个实施例的信息传输装置的模块结构框图。
图5为本发明的一个实施例的实体连接示意图。
图6为本发明的另一个实施例的实体连接示意图。
图7为本发明的一个实施例的I2C总线的通信原理示意图。
为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
实施例一
如图1所示,本发明实施例提供的信息传输方法包括以下步骤:
S101、当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息。
具体而言,用户通过点击或者触摸的方式输入触发指令,移动终端接收到该触发指令,由处理控制单元生成启动指令,通过耳机接口的声音通道将启动指令发送到I2C总线的串行数据线上,通过串行数据线将启动指令传输给外部设备。声音通道包括左通道和右通道,可以采用左通道或右通道作为启动指令的通道,也可以同时采用左通道和右通道作为启动指令的通道。
其中,外部设备为外设的传感器或者金融终端设备,传感器包括但不限于压力传感器、温度/湿度采集传感器等。移动终端包括但不限于智能手机、平板电脑等。
S102、移动终端通过耳机接口接收从外部设备传输过来的信息。
具体而言,外部设备通过I2C总线的串行数据线接收到启动指令后,获取采集单元采集到的模拟信号直接发送,或者将获取到的模拟信号转换为数字信号并且编码后,发送到与移动终端的话筒接口连接的I2C总线上。
移动终端采用耳机接口的话筒作为接收端,与I2C总线连接,接收从I2C总线的串行数据线传输过来的信息,如果接收到的信息为模拟信号,移动终端将该模拟信号转换为数字信号;如果接收到的信息为数字信号,将
该数字信号解码。
本发明实施例的信息传输方法,利用移动终端耳机接口的声音通道作为启动指令发送的接口,利用耳机接口的话筒通道作为接收信息的接口,采用I2C总线的串行数据线发送启动指令和接收外部设备的信息,满足速率要求不高的外部设备与移动终端之间的信息传输,资源占用率低,节约资源。
实施例二
如图2所示,本实施例二在实施例一的基础上进行了优化:在步骤S102之后,增加步骤S103:将信息发送给移动终端的处理控制单元,由处理控制单元实时显示或者保存。
具体而言,移动终端通过话筒接口接收到信息后,通过模数转换或者解码,将解析得到的信息发送给移动终端内的处理控制单元,由处理控制单元实时显示或者保存,利用用户实时查看信息或者利用移动终端作备份保存。
实施例三
如图3所示,本发明的一个实施例提供的信息传输装置,包括以下模块:
指令发送模块10,配置为当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息。
具体而言,移动终端的声音通道接口与I2C总线连接,将启动指令发送到I2C总线的串行数据线上,由串行数据线传输给外部设备。声音通道包括左通道和右通道,可以采用左通道或右通道作为启动指令的通道,也可以同时采用左通道和右通道作为启动指令的通道。
信息接收模块20,配置为移动终端通过耳机接口接收外部设备传输过来的信息。
具体而言,外部设备通过I2C总线的串行数据线接收到启动指令后,获取采集单元采集到的模拟信号直接发送到与移动终端的话筒接口连接的I2C总线上;或者将获取到的模拟信号转换为数字信号并且编码后,发送到与移动终端的话筒接口连接的I2C总线上。
其中,当移动终端接收到的信息为模拟信号时,该信息传输装置还包括:
模数转换模块30,配置为当移动终端接收到的从外部设备传输过来的信息为模拟信号时,将该模拟信号转换为数字信号。
第一信息发送模块40,配置为将信息发送给移动终端的处理控制单元,由处理控制单元实时显示或者保存。
具体而言,移动终端接收到外部设备传输过来的信息,通过模数转换模块或者解码模块处理完后,通过第一信息发送模块40发送给处理控制单元,由处理控制单元实时显示或者保存,利于用户实时查看信息,或者对外部设备传输的重要信息进行备份保存。
如图4所示,如果外部设备将采集到的模拟信号转换为数字信号并且编码后再发送,那么信息传输装置除了包括指令发送模块10、信息接收模块20,还包括:
解码模块50,配置为当移动终端接收到的为外部设备编码后的信息时,对该信息进行解码。
第二信息发送模块60,配置为将信息发送给移动终端的处理控制单元,由处理控制单元实时显示或者保存。
具体而言,移动终端接收到外部设备传输过来的数字信号,由解码模块解码后,通过第二信息发送模块60发送给处理控制单元,处理控制单元实时显示或者保存,利于用户实时查看信息,或者对外部设备传输的重要信息进行备份保存。
相应地,本发明还提供了一种移动终端,该移动终端包括上述实施例三所述的信息传输装置。
图5为本发明的一个实施例的实体连接示意图,如图5所示,该图为外部设备向移动终端传输模拟信号的实体连接示意图,图中L/R输出接口表示左通道输出接口和/或右通道输出接口,MIC输入接口表示话筒输入接口。主机为移动终端,包括但不限于手机、平板电脑,从机为外部设备,包括但不限于传感器、金融终端设备,传感器包括但不限于压力传感器,温度/湿度采集传感器。移动终端作为主机接收用户的触发指令,处理控制单元生成启动指令,通过L/R输出接口向外部设备发送启动指令。外部设备接收到启动指令后,将采集单元采集到的信息通过模拟信号的方式通过话筒通道传输给移动终端,移动终端接收到该模拟信号后进行采样,将模拟信号转换为数字信号,将得到的数字信号传递至处理控制单元,处理控制单元得到该数字信号后实时显示或者保存,方便用户对获得的信息实时查看,或者通过移动终端将信息保存备份。
图6为本发明的另一个实施例的实体连接示意图,如图6所示,该图为外部设备向移动终端传输数字信号的实体连接示意图。主机为移动终端,包括但不限于手机、平板电脑,从机为外部设备,包括但不限于传感器、金融终端设备,传感器包括但不限于压力传感器,温度/湿度采集传感器。移动终端作为主机接收用户的触发指令,处理控制单元生成启动指令,通过L/R输出接口向外部设备发送启动指令。外部设备接收到启动指令后,处理控制单元将采集单元采集到的模拟信号转换为数字信号,然后通过编码器编码后,最后通过话筒通道传输给移动终端。移动终端接收到该数字信号后通过解码器进行解码,再传送至处理控制单元,处理控制单元得到该数字信号后实时显示或者保存,方便用户对获得的信息实时查看,或者通过移动终端将信息保存备份。
本发明的实施例中采用耳机接口作为传输信息的接口,耳机接口规则通常有2.5mm,3.5mm等几种规格,且通常有四通道,分别是左声道L,右声道R,话筒通道MIC和检测通道D,在本发明实施例中,需要用到左和/或右通道(即图中的L/R输出接口),以及话筒通道(即图中的MIC输入接口),其中,L/R通道用作输出,采用I2C总线的通信方式,MIC通道用作输入,接收外部设备发送的模拟信号或者数字信号,从而实现外部设备与移动终端的信息交互。
图7为根据本发明的一个实施例的I2C总线(的通信原理示意图,如图6所示,I2C总线有两条总线线路:一条串行数据线SDA,一条串行时钟线SCL。SCL线是高电平时,SDA线从高电平向低电平切换,这个情况表示起始条件;SCL线是高电平时,SDA线由低电平向高电平切换,这个情况表示停止条件。发送到SDA线上的每个字节必须为8位,每次传输可以发送的字节数量不受限制。每个字节后必须跟一个响应位。首先传输的是信息的最高位(MSB),如果从机要完成一些其他功能后(例如一个内部中断服务程序)才能接收或发送下一个完整的信息字节,可以使时钟线SCL保持低电平,迫使主机进入等待状态,当从机准备好接收下一个信息字节并释放时钟线SCL后信息传输继续。
一般而言,I2C总线信息传输必须有应答响应,只有检测到信息线是上升沿或下降沿时才进行启动或停止。而在本发明实施例中,由于L/R接口只能用作输出端发送启动指令,故在发送启动指令后,无需等待应答响应或者不理睬应答响应,强制将电平拉高或者拉低,以便开始进行信息接收或停止进行信息接收。
上述实施例的信息传输方法、装置和移动终端,利用移动终端耳机接口的声音通道作为启动指令发送的接口,利用耳机接口的话筒通道作为接收信息的接口,采用I2C总线的串行数据线发送启动指令和接收外部设备
的信息,为移动终端与外部设备之间的信息传输多提供了一种方式,当USB接口被占用时,或者对信息传输速率要求不高时,采用耳机接口进行信息传输,资源占用率低,节约资源。
本发明实施例提供的信息传输装置中的指令发送模块、信息接收模块、模数转换模块、第一信息发送模块、解码模块和第二信息发送模块,都可以通过移动终端中的处理器来实现;当然上述处理器完成的功能也可通过具体的逻辑电路实现;在具体实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的信息传输方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。
相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中信息传输方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来控制相关的硬件完成,所述的程序可以在存储于一计算机可读取存储介质中,所述的存储介质,如ROM/RAM、磁盘、光盘等。
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。
本发明实施例中,当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;通过耳机接口接收从外部设备传输过来的信息。采用本发明,利用移动终端耳机接口向外部设备发送启动指令,并且通过耳机接口接收外部设备传射过来的信息,为移动终端与外部设备之间的信息传输多提供了一种方式,当USB接口被占用时,或者对信息传输速率要求不高时,采用耳机接口进行信息传输,资源占用率低,节约资源。
Claims (11)
- 一种信息传输方法,应用于移动终端,所述方法包括如下步骤:当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;通过耳机接口接收从所述外部设备传输过来的信息。
- 根据权利要求1所述的信息传输方法,其中,所述当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令包括:使用耳机接口的声音通道作为发送启动指令的通道,通过I2C总线的串行数据线向外部设备发送启动指令。
- 根据权利要求1所述的信息传输方法,其中,所述通过耳机接口接收从所述外部设备传输过来的信息包括:采用耳机接口的话筒通道作为接收信息的通道,通过I2C总线的串行数据线接收从所述外部设备传输过来的信息。
- 根据权利要求1所述的信息传输方法,其中,所述通过耳机接口接收从所述外部设备传输过来的信息之后还包括:当移动终端接收到的从所述外部设备传输过来的信息为模拟信号时,将模拟信号转换为数字信号。
- 根据权利要求1所述的信息传输方法,其中,所述通过耳机接口接收从所述外部设备传输过来的信息之后还包括:当移动终端接收到的为所述外部设备编码后的信息时,对所述编码后的信息进行解码。
- 根据权利要求1所述的信息传输方法,其中,所述方法之后还包括:将所述外部设备传输过来的信息发送给移动终端的处理控制单元,由所述处理控制单元实时显示或者保存该信息。
- 一种信息传输装置,该装置包括:指令发送模块,配置为当移动终端接收到触发指令,通过耳机接口向外部设备发送启动指令,使外部设备向移动终端传输信息;信息接收模块,配置为通过耳机接口接收从所述外部设备传输过来的信息。
- 根据权利要求7所述的信息传输装置,其中,该装置还包括:模数转换模块,配置为当移动终端接收到的从所述外部设备传输过来的信息为模拟信号时,将该模拟信号转换为数字信号;第一信息发送模块,配置为将信息发送给移动终端的处理控制单元。
- 根据权利要求7所述的信息传输装置,其中,该装置还包括:解码模块,配置为当移动终端接收到的为所述外部设备编码后的信息时,对该信息进行解码;第二信息发送模块,配置为将信息发送给移动终端的处理控制单元。
- 一种移动终端,该移动终端包括权利要求7至9任一所述的信息传输装置。
- 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至6任一项所述的信息传输方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410351394.5A CN104113933B (zh) | 2014-07-22 | 2014-07-22 | 一种信息传输方法、装置和移动终端 |
| CN201410351394.5 | 2014-07-22 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016011926A1 true WO2016011926A1 (zh) | 2016-01-28 |
Family
ID=51710525
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/084521 Ceased WO2016011926A1 (zh) | 2014-07-22 | 2015-07-20 | 一种信息传输方法、装置和移动终端、存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN104113933B (zh) |
| WO (1) | WO2016011926A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104113933B (zh) * | 2014-07-22 | 2016-03-30 | 努比亚技术有限公司 | 一种信息传输方法、装置和移动终端 |
| CN105117365A (zh) * | 2015-07-16 | 2015-12-02 | 上海斐讯数据通信技术有限公司 | 一种基于Mpc837x框架的数据读取方法 |
| CN108377291B (zh) * | 2018-01-29 | 2020-05-12 | 维沃移动通信有限公司 | 一种基于耳机接口的通信方法及移动终端、存储介质 |
| CN110825591B (zh) * | 2019-10-28 | 2023-05-26 | 闻泰通讯股份有限公司 | 系统信息读取方法、读取装置以及电子设备 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102413208A (zh) * | 2011-10-14 | 2012-04-11 | 杭州芯赛微电子有限公司 | 利用手机耳机接口实现串口通信的方法 |
| KR20120120813A (ko) * | 2011-04-25 | 2012-11-02 | 주식회사 유프레스토 | 이어폰커넥터를 구비한 호스트통신장비와 오디오경로를 통해 데이터통신을 실행하는 슬레이브장비 및 그 제어방법 |
| CN102857631A (zh) * | 2012-07-31 | 2013-01-02 | 上海天臣防伪技术股份有限公司 | 一种手机利用耳机插孔读取rfid/nfc标签的方法与系统 |
| CN103514425A (zh) * | 2013-08-22 | 2014-01-15 | 厦门英诺尔信息科技有限公司 | 一种基于音频接口读取rfid/uhf标签的方法和装置 |
| CN103593633A (zh) * | 2013-10-24 | 2014-02-19 | 厦门英诺尔信息科技有限公司 | 一种基于音频接口读取多个rfid/hf标签的方法和装置 |
| CN104113933A (zh) * | 2014-07-22 | 2014-10-22 | 深圳市中兴移动通信有限公司 | 一种信息传输方法、装置和移动终端 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9179198B2 (en) * | 2010-10-01 | 2015-11-03 | Sony Corporation | Receiving apparatus, receiving method, and program |
| CN203133830U (zh) * | 2013-03-25 | 2013-08-14 | 北京展芯智源信息技术有限公司 | 基于耳机通道的外设接口设备和信号传输系统 |
-
2014
- 2014-07-22 CN CN201410351394.5A patent/CN104113933B/zh active Active
-
2015
- 2015-07-20 WO PCT/CN2015/084521 patent/WO2016011926A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20120120813A (ko) * | 2011-04-25 | 2012-11-02 | 주식회사 유프레스토 | 이어폰커넥터를 구비한 호스트통신장비와 오디오경로를 통해 데이터통신을 실행하는 슬레이브장비 및 그 제어방법 |
| CN102413208A (zh) * | 2011-10-14 | 2012-04-11 | 杭州芯赛微电子有限公司 | 利用手机耳机接口实现串口通信的方法 |
| CN102857631A (zh) * | 2012-07-31 | 2013-01-02 | 上海天臣防伪技术股份有限公司 | 一种手机利用耳机插孔读取rfid/nfc标签的方法与系统 |
| CN103514425A (zh) * | 2013-08-22 | 2014-01-15 | 厦门英诺尔信息科技有限公司 | 一种基于音频接口读取rfid/uhf标签的方法和装置 |
| CN103593633A (zh) * | 2013-10-24 | 2014-02-19 | 厦门英诺尔信息科技有限公司 | 一种基于音频接口读取多个rfid/hf标签的方法和装置 |
| CN104113933A (zh) * | 2014-07-22 | 2014-10-22 | 深圳市中兴移动通信有限公司 | 一种信息传输方法、装置和移动终端 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104113933B (zh) | 2016-03-30 |
| CN104113933A (zh) | 2014-10-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3091719B1 (en) | Method for short-range wireless communication and electronic device using the same | |
| CN102638397B (zh) | 一种usb设备通信传输方法、设备及系统 | |
| TWI614608B (zh) | 用於觸控感測器資訊的通訊之設備、系統及方法 | |
| CN103890744B (zh) | 多点触摸界面方法、系统和设备 | |
| CN106708240B (zh) | 一种省电方法、服务器及省电系统 | |
| CN103995567B (zh) | 一种双系统智能交互一体机及其双系统切换实现方法 | |
| CN105578385B (zh) | 电子设备收发数据的方法及使用该方法的电子设备 | |
| KR102256291B1 (ko) | 번역 상황을 인지하고 번역 기능을 수행하는 방법 및 이를 구현하는 전자장치 | |
| CN109416624A (zh) | 用于使用分布式通用串行总线(usb)主机驱动器的系统和方法 | |
| WO2014058334A1 (en) | Usb audio and power transmission | |
| US11119960B2 (en) | Adapter to concatenate connectors | |
| CN110018976A (zh) | Usb主设备响应usb从设备方法及相关设备 | |
| US11196868B2 (en) | Audio data processing method, server, client and server, and storage medium | |
| WO2018157431A1 (zh) | 单线通信方法及设备 | |
| WO2011116610A1 (zh) | 一种对上网设备进行初始化的方法、系统及设备 | |
| CN102915290B (zh) | 实现移动终端与人机接口设备连接的方法、适配器及系统 | |
| US11061464B2 (en) | Electronic device, method for reducing power consumption, and apparatus | |
| CN104113933B (zh) | 一种信息传输方法、装置和移动终端 | |
| CN106952207A (zh) | 监控云平台分布式系统的选举方法及系统 | |
| CN113316057B (zh) | 耳机、降低功耗的方法、装置及电子设备 | |
| CN106792896B (zh) | 一种数据发送方法及移动终端 | |
| US20140139449A1 (en) | Transmission interface for a touch system | |
| TW201502982A (zh) | 支援紅外線接收器/發送器之系統平台及其操作方法 | |
| CN104202474A (zh) | 一种无线报时及拍照方法 | |
| TWI460610B (zh) | 無線裝置配對的方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15824231 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.06.2017) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15824231 Country of ref document: EP Kind code of ref document: A1 |