Content of the invention
In order to overcome the deficiencies in the prior art, it is an object of the invention to will more multiplex roles unite, provide a kind of base
In data transmission device and the method for mobile terminal interface extension, it can solve existing apparatus single function, awkward asks
Topic.
The purpose of the present invention employs the following technical solutions realization:
A kind of data transmission method based on mobile terminal interface extension, methods described includes:
Usb speed-sensitive switch chip is extended to several usb interfaces, a usb interface is set to usb-host/usb-
Device pattern, and the usb interface after conversion is connected as mobile terminal plug with mobile terminal, other described usb interfaces
For being connected with other usb equipment;
Storage card module for reading and writing is expanded from main control module, described storage card module for reading and writing is used for being connected with storage card;
The data reading from storage card or usb equipment is converted to iap2 protocol data form, and by described mobile whole
End plug sends to mobile terminal;
The iap2 protocol data that described mobile terminal is sent is converted to storage card agreement or the data of usb agreement, concurrently
Deliver to storage card or usb equipment.
Preferably, methods described also includes:
Universal asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) or synchronous string are expanded from main control module
Row coffret;
The reception of asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) or synchronous serial coffret is general
Asynchronous receiving-transmitting protocol data, serial communication protocol data, serial peripheral protocol data or the conversion of synchronous serial transmission protocol data
For iap2 protocol data;Sent to mobile terminal by described mobile terminal plug;
Described mobile terminal is parsed into asynchronous receiving-transmitting protocol data, serial communication association by the data that iap2 agreement sends
View data, serial peripheral protocol data or synchronous serial transmission protocol data, are sent to and described universal asynchronous receiving-transmitting interface, string
The equipment that row communication interface, Serial Peripheral Interface (SPI) or synchronous serial coffret connect.
Preferably, described by asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) or synchronous serial coffret
Universal asynchronous receiving-transmitting protocol data, serial communication protocol data, serial peripheral protocol data or the synchronous serial transmission association receiving
View data is converted to iap2 protocol data, is sent to mobile terminal by described mobile terminal plug, also includes before:
Give universal asynchronous receiving-transmitting protocol data, serial communication protocol data, serial peripheral protocol data or synchronous string respectively
The different data packet head of row transmission protocol data distribution, for distinguishing data type.
A kind of data transmission device based on mobile terminal interface extension, inserts including device case, pcb plate and mobile terminal
Head, described pcb plate is located in described device housing,
Also include usb union joint, usb speed-sensitive switch chip, main control module and storage card module for reading and writing;Described mobile terminal
Plug, usb union joint, usb speed-sensitive switch chip, main control module and storage card module for reading and writing are located on described pcb plate;
Described mobile terminal plug, usb union joint are electrically connected with described usb speed-sensitive switch chip, usb speed-sensitive switch core
Piece, storage card module for reading and writing are electrically connected with described main control module;
Described mobile terminal plug is used for being connected with mobile terminal, and described usb union joint is used for being connected with usb equipment, institute
State usb speed-sensitive switch chip and be used for extending usb interface, described storage card module for reading and writing is used for storing card data is written and read,
Described main control module is used for realizing controlling and data processing function.
Preferably, described mobile terminal plug is in lightning plug, type-c plug or type-c3.1 plug
At least one.
Preferably, described main control module includes main control chip and memorizer, and described main control chip is used for data processing and friendship
Change, described memorizer is used for data storage.
Preferably, universal asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI), synchronous serial transmission are also included
At least one in interface, is electrically connected with described main control module, for communicating with external equipment.
Preferably, also include encryption chip, the data for transmitting to described mobile terminal interface is encrypted/deciphers.
Preferably, described usb speed-sensitive switch chip is sgm7222 chip or fsusb30 chip.
Preferably, described main control chip is ns1081 chip or ns1068 chip.
Compared to existing technology, the beneficial effects of the present invention is: provide a kind of data based on mobile terminal interface extension
Transmitting device and method, by usb union joint, storage card module for reading and writing, universal asynchronous receiving-transmitting interface, serial communication interface, serial
Peripheral Interface or synchronous serial coffret are unified in the data transmission device extending based on mobile terminal interface, can make single
Mobile terminal interface obtain more functions expandings, make mobile terminal play more act on, bring convenience to user.
Specific embodiment
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of description, and in order to allow the above and other objects, features and advantages of the present invention can
Become apparent, below especially exemplified by preferred embodiment, and coordinate accompanying drawing, describe in detail as follows.
As Fig. 1, a kind of data transmission device based on mobile terminal interface extension, including device case (not shown), pcb
Plate 10 and mobile terminal plug 11, pcb plate 10 is located in described device housing, also includes usb union joint 12, usb speed-sensitive switch
Chip 13, main control module 14 and storage card module for reading and writing 15, main control module 14 includes main control chip 141 and memorizer 142, master control
Chip 141 is used for data processing and exchange, and memorizer 142 is used for store code data.Mobile terminal plug 11, usb connect
12, usb speed-sensitive switch chip 13, main control module 14 and storage card module for reading and writing 15 are located on pcb plate 10;Mobile terminal plug
11st, usb union joint 12 is electrically connected with usb speed-sensitive switch chip 13, usb speed-sensitive switch chip 13, storage card module for reading and writing 15 with
Main control module 14 electrically connects.Based on mobile terminal interface extension data transmission device also include universal asynchronous receiving-transmitting interface 161,
Serial communication interface 162, Serial Peripheral Interface (SPI) 163 and synchronous serial coffret 164, expand from main control chip 141.
Usb speed-sensitive switch chip 13 is sgm7222 chip in the present embodiment, and main control chip 141 is ns1081 chip;?
In another embodiment, usb speed-sensitive switch chip 13 is fsusb30 chip;Main control chip 141 is ns1068 chip.Based on mobile whole
The data transmission device of end interface extension also includes encryption chip 17, electrically connects with main control module 14, for connecing to mobile terminal
The data that mouth (lightning interface, type-c interface or type-c 3.1 interface, not shown) transmits is encrypted/deciphers.Base
Data transmission device in mobile terminal interface extension also includes LED lamp 18, electrically connects with main control module 14.Described for indicating
The working condition of the data transmission device based on mobile terminal interface extension.
Usb equipment is divided into host (main equipment) and slave (from equipment), only when a host is connected with a slave
When just enable the transmission of data.The mobile terminal interface of the mobile terminal based on ios system is arranged to usb-host/usb-
Device pattern, makes mobile terminal as host computer.Extended using usb speed-sensitive switch chip 13 and main control module 14 and manage
Usb interface and equipment: usb speed-sensitive switch chip 13 and main control module 14 are connected, and one side main control module 14 is opened by usb high speed
Close the usb interface that chip 13 enable expands, another aspect main control module passes through usb speed-sensitive switch chip 13 with usb interface even
The equipment transfering data connecing.Usb speed-sensitive switch chip 13 is extended to several usb interfaces, main control module 14 is by a usb interface
It is set to usb-host/usb-device pattern, and using the usb interface after conversion as mobile terminal plug 11 and mobile terminal
Connect, other usb interfaces are used for being connected with usb equipment;Storage card module for reading and writing 15 is expanded from main control chip 141, storage
Card module for reading and writing 15 is used for being connected with storage card;Likewise, expand from main control chip 141 universal asynchronous receiving-transmitting interface 161,
Serial communication interface 162, Serial Peripheral Interface (SPI) 163 and synchronous serial coffret 164, for exchanging with corresponding external equipment
Data.
Lightning and usb type-c interface mainly uses the mobile terminal docking of ios system, with the iap2 agreement of standard
Form communicated with mobile phone.Realize with the external device communication using other communication protocols it is necessary to hardware and software
Realize protocol conversion.Memorizer 142 (flash) stores protocol conversion code data, memorizer 142 and main control chip 141 phase
Mutual communication, makes the mobile end connecting on the usb high-speed equipment (not shown) connecting on usb union joint 12, mobile terminal plug 11
((sd card, tf card etc., not shown), universal asynchronous receiving-transmitting connect the storage card connecting on end (not shown), storage card module for reading and writing 15
Mouthfuls 161, serial communication interface 162, Serial Peripheral Interface (SPI) 163 and the external equipment (not shown) of synchronous serial coffret 164
Interface and protocol conversion is realized between the circuit of composition, it is achieved thereby that the exchange of communication data.
Described protocol conversion includes:
Main control module 14 executes the conversion of iap2 agreement and usb agreement, realizes mobile terminal and is connected with usb union joint 12
Usb high-speed equipment (not shown) between mutual operation.
Main control module 14 execute iap2 agreement be connected on storage card module for reading and writing 15 storage card ((sd card, tf card etc.,
Not shown) conversion of agreement, thus realizing the data exchange between mobile terminal and storage card, realize mobile terminal memory capacity
Increase, carry out data transfer whenever and wherever possible.
Main control module 14 by mobile terminal by the data that iap2 agreement sends be parsed into universal asynchronous receiving-transmitting interface 161,
The form of the data of serial communication interface 162, Serial Peripheral Interface (SPI) 163 and synchronous serial coffret 164, be sent to general
What asynchronous receiving-transmitting interface 161, serial communication interface 162, Serial Peripheral Interface (SPI) 163 and synchronous serial coffret 164 connected sets
Standby.And by universal asynchronous receiving-transmitting interface 161, serial communication interface 162, Serial Peripheral Interface (SPI) 163 and synchronous serial biography
Defeated interface 164 is packaged into the iap2 protocol data form of standard from the data of external reception, by the shifting being connected with mobile terminal
Dynamic terminating plug 11, is communicated with mobile terminal in the form of the iap2 agreement of standard.
Illustrate below: synchronous serial coffret 164 can be set as moving taking synchronous serial coffret 164 as a example
State speed, setting scope enters main control chip 141 in 100k-400k, synchronous serial coffret 164 from the data of external reception
Afterwards, the data receiving is packaged into the iap2 protocol data form of standard by main control chip 141 and memorizer 142, by movement
Terminating plug 11, is communicated with mobile phone with the iap2 protocol data form of standard;Mobile phone will after receiving these data
It is considered as iap2 protocol data, and the api program calling ios system layer standard iap2 just can be on ios system application layer software
Call these data;Mobile terminal sends data to main control chip 141 by iap2 agreement, and main control chip 141 is by these data
It is parsed into synchronous serial coffret 164 data mode, be sent to the equipment being connected with synchronous serial coffret 164.
Universal asynchronous receiving-transmitting interface 161, serial communication interface 162, Serial Peripheral Interface (SPI) 163, usb union joint 12, storage
Card module for reading and writing 15 is identical with data transmission procedure with synchronous serial coffret 164 protocol conversion.
The core of the technical program is to carry out protocol conversion using main control chip 141 and memorizer 142, by different transmission associations
The data of view is converted to the standard iap2 protocol data based on ios, corresponding, and the iap2 protocol data of ios system is changed not
The data of same type agreement is thus realize the mobile terminal interface extension based on ios;The agreement of type is not with different packets
Head Section divides, and the data between each different packet header can be transmitted, in a time-multiplexed manner to prevent data collision.
The embodiment of the present invention additionally provides a kind of data transmission method based on mobile terminal interface extension, below will distinguish
It is described in detail.It should be noted that, for convenience, following examples will be numbered to step and retouch successively
State it should be appreciated that the number of steps of embodiment is not intended as the restriction of the step preferred order to embodiment.
As shown in Fig. 2 a kind of data transmission method based on mobile terminal interface extension that embodiment one represents, including step
Rapid s101-s104, wherein:
Step s101: usb speed-sensitive switch chip is extended to several usb interfaces, a usb interface is set to usb-
Host/usb-device pattern, and the usb interface after conversion is connected as mobile terminal plug with mobile terminal, other institutes
State usb interface for being connected with other usb equipment;
Step s102: storage card module for reading and writing is expanded from main control module, described storage card module for reading and writing is used for and deposits
Card storage connects;
Step s103: the data reading from storage card or usb equipment is converted to iap2 protocol data form, and passes through institute
State mobile terminal plug to send to mobile terminal;
Step s104: the iap2 protocol data that described mobile terminal is sent is converted to storage card agreement or usb agreement
Data, and send to storage card or usb equipment.
The present embodiment achieves and extends usb interface and storage card module for reading and writing for mobile terminal interface;Wherein usb interface is used
In connecting usb peripheral hardware, including u disk, u shield etc.;Storage card module for reading and writing is used for shifting data, extension mobile terminal memory capacity.
As shown in figure 3, a kind of data transmission method based on mobile terminal interface extension that embodiment two represents, including step
Rapid s201-s208, wherein step s201-s204 are identical with step s101-s104 in preceding method reality embodiment one, step
S205-s208 is specific as follows:
Step s205: universal asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) are expanded from main control module
Or synchronous serial coffret;
Step s206: give universal asynchronous receiving-transmitting protocol data, serial communication protocol data, serial peripheral protocol data respectively
Or the data packet head that the distribution of synchronous serial transmission protocol data is different, for distinguishing data type;
Step s207: asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) or synchronous serial coffret are connect
Universal asynchronous receiving-transmitting protocol data, serial communication protocol data, serial peripheral protocol data or the synchronous serial host-host protocol received
Data is converted to iap2 protocol data;Sent to mobile terminal by described mobile terminal plug;
Step s208: by described mobile terminal by the data that iap2 agreement sends be parsed into asynchronous receiving-transmitting protocol data,
Serial communication protocol data, serial peripheral protocol data or synchronous serial transmission protocol data, are sent respectively to general with described
The equipment that asynchronous receiving-transmitting interface, serial communication interface, Serial Peripheral Interface (SPI) or synchronous serial coffret connect.
This method is by outside usb union joint, storage card module for reading and writing, universal asynchronous receiving-transmitting interface, serial communication interface, serial
If interface or synchronous serial coffret are unified in the data transmission device based on mobile terminal interface extension, can make single
Mobile terminal interface obtains more functions expandings, makes mobile terminal play more effects, brings convenience to user.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Step combination, but those skilled in the art should know, the present invention is not limited by described sequence of steps because
According to the present invention, some steps can be carried out using other orders or simultaneously.
For a person skilled in the art, can technical scheme as described above and design, make other each
Plant corresponding change and deform, and all these changes and deforms the protection model that all should belong to the claims in the present invention
Within enclosing.