CN102662897A - Mobile terminal and data interaction method between mobile terminals - Google Patents
Mobile terminal and data interaction method between mobile terminals Download PDFInfo
- Publication number
- CN102662897A CN102662897A CN2012100940696A CN201210094069A CN102662897A CN 102662897 A CN102662897 A CN 102662897A CN 2012100940696 A CN2012100940696 A CN 2012100940696A CN 201210094069 A CN201210094069 A CN 201210094069A CN 102662897 A CN102662897 A CN 102662897A
- Authority
- CN
- China
- Prior art keywords
- portable terminal
- memory function
- usb
- data interaction
- slave unit
- 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
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The invention relates to a mobile terminal and a data interaction method between mobile terminals. The method comprises the steps that: A. a first mobile terminal receives port connection information from a connection port, wherein the first mobile terminal is in communication connection with a second mobile terminal by the connection port; B. the equipment attribute of the first mobile terminal is determined based on the port connection information, wherein the equipment attribute comprises a host computer attribute and a slave attribute; and C. data interaction is carried out between the first mobile terminal and the second mobile terminal based on the determined equipment attribute. By executing the invention, data interaction can be directly carried out between two mobile terminals. On occasions of not increasing hardware, for any mobile terminal, the other one terminal connected with the mobile terminal can be directly used as a U disc to use the USB (universal serial bus) memory function, so that the reading and/or writing operation can be directly carried out, the compatibility is good and the application diversify is achieved.
Description
Technical field
The present invention relates to communication technical field, more particularly, relate to the method for data interaction between a kind of portable terminal and the portable terminal.
Background technology
Along with development of electronic technology, intelligent mobile terminal (like panel computer, smart mobile phone etc.) is tightly related with people's life, and go out business office, daily communication of people all will depend on intelligent mobile terminal, and it brings a lot of convenience for people's life.Existing intelligent mobile terminal all has the USB memory function of USB flash disk, can be used as USB flash disk and uses, but with common standard U disk certain difference is arranged, and must launch and could be used its USB memory function as USB flash disk by PC equipment such as (PC) through software.
In addition, at present the intelligent mobile terminal that can directly connect USB flash disk being arranged seldom on the market, promptly enable to connect USB flash disk, also must be standard U disk.For a certain portable terminal, can not connected another intelligent mobile terminal directly be served as USB flash disk and use its USB memory function, its poor compatibility is used and has been received certain restriction.So the immediate data between two intelligent mobile terminals is restricted alternately, be urgent problem in the industry.
Summary of the invention
The technical matters that the present invention will solve is; To the direct defective of swap data between the portable terminal in the prior art; The method of data interaction between a kind of portable terminal is provided, makes and directly to carry out read and/or write between two portable terminals, to realize exchanges data.
The technical matters that the present invention will solve is, to the direct defective of swap data between the portable terminal in the prior art, a kind of portable terminal is provided, and it can be with the USB storage card of another portable terminal external memory device as oneself.
The technical solution adopted for the present invention to solve the technical problems is: the method for data interaction between a kind of portable terminal is provided, may further comprise the steps:
A, first portable terminal receive the port link information from the connectivity port, and wherein said first portable terminal is connected with second communication of mobile terminal through said connectivity port;
B, confirm the device attribute of said first portable terminal based on said port link information, wherein said device attribute comprises Host Properties and slave unit attribute;
C, between said first portable terminal and said second portable terminal, carry out data interaction based on determined device attribute.
In the method for data interaction, said step C comprises between portable terminal of the present invention:
When the device attribute of confirming said first portable terminal is Host Properties, carry out following steps:
The On/Off state of the USB memory function of C11, said second portable terminal of monitoring;
C12, open, activate the memory function of said second portable terminal, enable said first portable terminal USB storage card in said second portable terminal is carried out read and/or write when the USB of said second portable terminal memory function.
Between portable terminal of the present invention in the method for data interaction, in said step C12,
The memory function of said second portable terminal of said activation is included as the said second portable terminal allocation block equipment, and said second portable terminal of carry makes its storage unit as said first portable terminal;
Perhaps, the memory function of said second portable terminal of said activation comprises directly the storage unit of second portable terminal as said first portable terminal is conducted interviews.
Between portable terminal of the present invention, in the method for data interaction, also comprise after the said step C12:
C13, close said second portable terminal of the said first portable terminal soft unloading when the USB of said second portable terminal memory function.
Between portable terminal of the present invention in the method for data interaction,
Said step C comprises:
When the device attribute of confirming said first portable terminal is the slave unit attribute, carry out following steps:
The instruction of the USB memory function of said first portable terminal is opened in C21, reception, and opens the USB memory function of said first portable terminal based on said instruction.
Between portable terminal of the present invention, in the method for data interaction, also comprise after the said step C21:
Reading and/or write command of C22, said second portable terminal of reception carried out read and/or write on the USB of said first portable terminal storage card.
In the method for data interaction, it is characterized in that between portable terminal of the present invention said first portable terminal and second portable terminal are to use the portable terminal of Android operating system.
The present invention solves another technical scheme that its technical matters adopts: construct a kind of portable terminal, comprising:
First monitoring module is used to receive the port link information from the connectivity port of said portable terminal, and wherein said connectivity port comprises HPI and slave unit interface;
The device attribute judge module; Be used for when said portable terminal is connected with another communication of mobile terminal through the connectivity port; Confirm the device attribute of said portable terminal based on said port link information, wherein said device attribute comprises Host Properties and slave unit attribute;
The data interaction administrative unit is used for based on determined device attribute, and the data interaction between said portable terminal and said another portable terminal is managed.
In portable terminal of the present invention, said data interaction administrative unit comprises:
Second monitoring module is used for when the device attribute of confirming said portable terminal is Host Properties, the On/Off state of the USB memory function of said another portable terminal of monitoring;
Active module is used for opening when the USB memory function of said another portable terminal, activates the memory function of said another portable terminal, enables said portable terminal the USB storage card in said another portable terminal is carried out read and/or write.
In portable terminal of the present invention, in said active module,
The memory function of said another portable terminal of said activation is included as said another portable terminal allocation block equipment, and said another portable terminal of carry makes its storage unit as said portable terminal; Perhaps, the memory function of said another portable terminal of said activation comprises directly the storage unit of another portable terminal as said portable terminal is conducted interviews.
In portable terminal of the present invention, said data interaction administrative unit also comprises:
Close the storage notification module, be used for when the USB of said another portable terminal memory function is closed, sending the slave unit memory function and closing notice;
Reseting module is used for closing notice based on said slave unit memory function, enables said another portable terminal of said portable terminal soft unloading.
In portable terminal of the present invention, said portable terminal comprises the USB memory module, is used for when the device attribute of confirming said portable terminal is the slave unit attribute, as the external storage unit of another portable terminal.
Embodiment of the present invention has following beneficial effect:
Can realize that two immediate datas between the portable terminal are mutual; Under the situation that does not increase hardware; For arbitrary portable terminal wherein, can connected another portable terminal directly be served as USB flash disk and use its USB memory function, promptly can directly carry out read and/or write; Compatible good, make and use variation.
Further; Owing to be provided with second monitoring module and active module; Make and not break off, only to be under the situation of USB memory function of having closed (forbidding) as the portable terminal of slave unit when the physical connection between two portable terminals; When the user desires to reactivate the USB memory function so that can carry out read/write operation to the USB storage card in the slave unit as the portable terminal of main frame the time, need not to pull out the USB connecting line and connect again, only need reactivate the USB memory function.In a single day second monitoring module detects the USB memory function of slave unit and opens, and active module is about to the storage unit of slave unit as main frame.Thereby the hot plug of the USB hot plug that has overcome prior art on only can processing hardware is to the defective that the user launches and " the soft plug " forbidden can't be handled.
Description of drawings
To combine accompanying drawing and embodiment that the present invention is described further below, in the accompanying drawing:
Fig. 1 is the structural representation of portable terminal according to an embodiment of the invention;
Fig. 2 is the structural representation of portable terminal according to another embodiment of the present invention;
Fig. 3 is the flow chart of steps of the method for data interaction between the portable terminal of the present invention;
Fig. 4 is the process flow diagram of the method for data interaction between the portable terminal according to an embodiment of the invention;
Fig. 5 is the process flow diagram according to one embodiment of the invention method of judgment device attribute in portable terminal;
Fig. 6 is the process flow diagram that in portable terminal, detects the method whether slave unit USB memory function open according to one embodiment of the invention;
Fig. 7 is the process flow diagram that in portable terminal, detects the method that the USB joint extracts according to one embodiment of the invention;
Fig. 8 is the process flow diagram that in portable terminal, detects the method whether slave unit USB memory function close according to one embodiment of the invention.
Embodiment
As shown in Figure 1, in one embodiment of this invention, portable terminal 100 comprises first monitoring module 110, device attribute judge module 120, data interaction administrative unit 130, HPI 140 and slave unit interface 150.Among the present invention, described portable terminal mainly refers to intelligent mobile terminal, like panel computer, smart mobile phone etc.
HPI 140 comprises suitable circuit, logic, interface and/or code, is used for being connected with another communication of mobile terminal.When the HPI 140 of portable terminal 100 was connected with the connectivity port of another portable terminal, portable terminal 100 was as main frame, and the USB storage card in another portable terminal can be used as the external storage unit of portable terminal 100.
Device attribute judge module 120 comprises suitable circuit, logic and/or code; Be used for when being connected, confirming the device attribute of portable terminal 100 through connectivity port (for example HPI 140 or slave unit interface 150) based on aforementioned port link information with another communication of mobile terminal when portable terminal 100.Wherein device attribute comprises Host Properties and slave unit attribute, and when the HPI 140 of portable terminal 100 is connected to the slave unit interface of another portable terminal, the device attribute of portable terminal 100 is a Host Properties; When the slave unit interface 150 of portable terminal 100 is connected to the HPI of another portable terminal, the device attribute of portable terminal 100 is the slave unit attribute.
Data interaction administrative unit 130 is used for based on determined device attribute, and the data interaction between portable terminal 100 and another portable terminal is managed.Specifically, data interaction administrative unit 130 comprises second monitoring module 132, active module 134, closes storage notification module 136 and reseting module 138.Wherein:
In one embodiment of this invention, the memory function that activates another portable terminal is included as another portable terminal allocation block equipment, and another portable terminal of carry makes its storage unit as portable terminal 100.Particularly, being about to another portable terminal has the memory device of file system to use as one.
In another embodiment, the memory function that activates another portable terminal comprises directly the storage unit of another portable terminal as portable terminal 100 is conducted interviews.Particularly, being about to another portable terminal uses as the memory device of a no file system.
Close storage notification module 136 and comprise suitable circuit, logic and/or code; Be used for when the device attribute of portable terminal 100 is Host Properties; When the USB memory function that second monitoring module 132 of portable terminal 100 monitors another portable terminal was closed, the reseting module 138 in portable terminal 100 sent the slave unit memory function and closes notice.
In one embodiment of this invention; First monitoring module is always in running status; Second monitoring module is after first monitoring module 110 receives the port link information from portable terminal 100 connectivity ports; Whenever at regular intervals (for example in 0.01 second to 1 second, select an interval time; For example every at a distance from 0.01 second, 0.05 second, 0.1 second, 0.2 second, 0.5 second, 0.8 second or 1 second etc.) whether the USB memory function of inquiring about slave unit (another portable terminal) periodically opens, and constantly inquiry always when the USB memory function of slave unit (another portable terminal) is closed,, the USB memory function of slave unit (another portable terminal) stops to inquire about when opening.
Particularly, when portable terminal 100 and another portable terminal break off be connected after, first monitoring module is the policing port link information again, second monitoring module quits work.
Be not connected when portable terminal 100 breaks off with another portable terminal, but slave unit (another portable terminal) has cut out the USB memory function, in this case, first monitoring module continues the policing port connection state; Simultaneously, whether second monitoring module is whenever periodically inquired about the USB memory function of slave unit (another portable terminal) at regular intervals available, can use or slave unit (another portable terminal) breaks off and connecting up to the USB memory function.
In the technical scheme of the present invention; Owing to be provided with second monitoring module and active module; Make and not break off, only to be under the situation of USB memory function of having closed (forbidding) as the portable terminal of slave unit when the physical connection between two portable terminals; When the user desires to reactivate the USB memory function so that can carry out read/write operation to the USB storage card in the slave unit as the portable terminal of main frame the time, need not to pull out the USB connecting line and connect again, only need reactivate the USB memory function.In a single day second monitoring module detects the USB memory function of slave unit and opens, and active module is slave unit allocation block module, and slave unit is hung up the storage unit as main frame.Thereby the hot plug of the USB hot plug that has overcome prior art on only can processing hardware launched and forbidden the defective that " the soft plug " of USB memory function can't be handled the user.
As shown in Figure 2, portable terminal 200 is compared with portable terminal 100 shown in Figure 1, and except that having increased USB memory module 210 and USB memory function ON/OFF administration module 220, remainder is identical with portable terminal 100.
USB memory module 210 comprises suitable circuit, logic and/or code, is used for when the device attribute of confirming portable terminal 200 is the slave unit attribute, as the external storage unit of another portable terminal.In one embodiment of this invention, USB memory module 210 comprises the USB storage chip.
USB memory function ON/OFF administration module 220 comprises suitable circuit, interface, logic and/or code; Be used to receive the USB memory function that the user sends and open or close instruction; And carry out should instruction, and its USB memory function is opened or closed in control during as slave unit with convenient portable terminal 100.In one embodiment of this invention, USB memory function ON/OFF administration module 220 comprises USB controller, USB controller driver, USB storage chip driver.
In one embodiment of this invention, first monitoring module 110, device attribute judge module 120, data interaction administrative unit 130 (comprise second monitoring module 132, active module 134, close storage notification module 136 and reseting module 138 is arranged in the central processing unit of portable terminal.In another embodiment, above-mentioned module also can be separately positioned in a plurality of processors of portable terminal.
Need to prove; Although Fig. 1 and Fig. 2 show some modules of portable terminal 100 and portable terminal 200 respectively; Know as is known to the person skilled in the art; Portable terminal 100 also can comprise other modules with portable terminal 200, such as but not limited to communication module (radio communication and/or wire communication module), GPS module, audio/video processing module, memory module, user's control panel etc.Book and clear and definite focal point for the purpose of simplifying the description, to describing with the irrelevant module of technical scheme of the present invention, but this does not influence technical scheme of the present invention among the application.
In one embodiment of this invention, the HPI 140 on the portable terminal 100 and 200 can be two interfaces (for example on the panel computer, such as E people E basis, iPad etc.) that separate with slave unit interface 150.For example for panel computer, if its main frame (host) interface is connected with another portable terminal, then panel computer is as main frame; If its slave unit (device) interface is connected with another portable terminal, then panel computer is as slave unit.
In another embodiment of the present invention, HPI 140 also can be to be integrated on the port (in smart mobile phone) with slave unit interface 150.For example, generally only be provided with a small USB interface, like the dual-purpose USB-OTG slot of a Mini to smart mobile phone.On the dual-purpose USB-OTG slot on the smart mobile phone, be connected with the USB joint that another portable terminal is drawn, if the connection of this USB joint makes the ID pin short circuit ground connection of dual-purpose USB-OTG slot, then this smart mobile phone is as main frame, and another portable terminal is as slave unit; If the connection of this USB joint does not make the ID pin of dual-purpose USB-OTG slot change, still be in vacant state, then this smart mobile phone is as slave unit, and another portable terminal is as main frame.
To above-mentioned two kinds of embodiments, correspondingly, first monitoring module 110 in the portable terminal 100 and 200 is also done corresponding design with device attribute judge module 120.
Below in conjunction with Fig. 3 and Fig. 4 the operating process of portable terminal 100 and portable terminal 200 is elaborated.
As shown in Figure 3, the method 300 of data interaction between the portable terminal of the present invention comprises the steps:
Steps A, first portable terminal receives the port link information from the connectivity port.Particularly, when first portable terminal is connected with second communication of mobile terminal through its connectivity port, the port link information that first monitoring module 110 in first portable terminal receives from the first portable terminal connectivity port.This connectivity port comprises HPI 140 and slave unit interface 150.The port link information comprises that the HPI 140 of first portable terminal is connected to the slave unit interface of second portable terminal, and perhaps the slave unit interface 150 of first portable terminal is connected to the HPI of second portable terminal.
Step B, the device attribute judge module 120 in first portable terminal is confirmed the device attribute of first portable terminal based on the port link information, wherein device attribute comprises Host Properties and slave unit attribute.Particularly, when the HPI 140 of first portable terminal is connected to the slave unit interface of second portable terminal, the device attribute of first portable terminal is a Host Properties; When the slave unit interface 150 of first portable terminal is connected to the HPI of second portable terminal, the device attribute of first portable terminal is the slave unit attribute.
Step C carries out data interaction based on determined device attribute between first portable terminal and second portable terminal, wherein 130 pairs of data interactive operations of the data interaction administrative unit in first portable terminal are managed.
As shown in Figure 4, in one embodiment of this invention, the method 400 of data interaction between the portable terminal of the present invention comprises the steps:
After the beginning step, carry out steps A and step B, these two steps repeat no more with identical shown in Fig. 3 here.
Step C0 is based on the device attribute of first portable terminal of confirming among the step B, at the processing procedure separated into two parts of step C0 with method 400.
When the device attribute of confirming first portable terminal is Host Properties, execution in step C11 to C13 then; And when the device attribute of confirming first portable terminal is the slave unit attribute, execution in step C21 to C22 then.Specific as follows:
On the one hand, when the device attribute of confirming said first portable terminal is Host Properties, at step C11, the On/Off state of the USB memory function of second monitoring module, 132 monitoring, second portable terminal in first portable terminal.And, confirm whether the USB memory function of second portable terminal opens at step C11a.If the second mobile terminal USB memory function is opened, then get into step C12.If the second mobile terminal USB memory function is not opened (promptly close or forbid), then return step C11, continue the On/Off state of the USB memory function of monitoring second portable terminal.
At step C12, the active module 134 in first portable terminal activates the memory function of second portable terminal, makes the portable terminal of winning carry out read and/or write to the USB storage card in second portable terminal.In one embodiment of this invention, the memory function that activates second portable terminal is included as the second portable terminal allocation block equipment, and carry second portable terminal makes its storage unit as first portable terminal (being main frame).
Afterwards, at step C12a, according to user's instruction, first portable terminal carries out read and/or write to the USB storage card in second portable terminal.After carrying out read and/or write; The second mobile terminal USB memory function is closed in user's general operation, and this moment, the described second mobile terminal USB memory function of closing was soft unloading; Promptly just break off unloading, do not comprise the unloading that removes of physical connection from software.Afterwards, at step C12b, second monitoring module 132 in first portable terminal confirms whether the second mobile terminal USB memory function closes.If the second mobile terminal USB memory function is closed (or forbidding), then get into step C13; If the second mobile terminal USB memory function is not closed, then return step C12a, wait for user's instruction, so that the USB storage card in second portable terminal is carried out read and/or write.
In step C13; Closing storage notification module 136 in first portable terminal sends second portable terminal (being slave unit) USB memory function to reseting module 138 and closes notice; Reseting module 138 is closed notice based on second portable terminal that receives (being slave unit) USB memory function; Soft unloading second portable terminal is so that second monitoring module 132 is monitored again.Afterwards, recycle execution in step C11.If the user breaks off the physical connection of first portable terminal and second portable terminal, then this method 400 is all over.
On the other hand; When the device attribute of confirming said first portable terminal is the slave unit attribute; At step C21; USB memory function ON/OFF administration module 220 in first portable terminal receives the instruction of the USB memory function of unlatching first portable terminal that users send through user's control panel (not shown), and the USB memory function of opening first portable terminal based on this instruction.Afterwards, at step C22, USB memory function ON/OFF administration module 220 receptions in first portable terminal are read and/or write command from second portable terminal, on the USB of first portable terminal storage card, carry out read and/or write.Afterwards, method 400 continues.
In technical scheme of the present invention, the continuation of method 400 can comprise:
In one embodiment, the physical connection of first portable terminal and second portable terminal is not broken off, and method 400 turns back to step C11 from step C13, and first portable terminal continues the On/Off state of the USB memory function of monitoring second portable terminal.
In another embodiment; First portable terminal is as main frame; And the physical connection of first portable terminal and second portable terminal is broken off, and then method 400 is returned steps A from step C13, the state of first monitoring module, the 110 monitoring connectivity ports in first portable terminal; Reception is from the port link information of connectivity port, with the operation of data interaction between two portable terminals that carry out next round.
In another embodiment; First portable terminal is as slave unit; And the physical connection of first portable terminal and second portable terminal is broken off, and then method 400 is returned steps A from step C22, the state of first monitoring module, the 110 monitoring connectivity ports in first portable terminal; Reception is from the port link information of connectivity port, with the operation of data interaction between two portable terminals that carry out next round.
In one embodiment of this invention, first portable terminal and second portable terminal are to use the portable terminal of Android operating system, for example panel computer, mobile phone, PDA etc.
Fig. 5 is the process flow diagram according to the method 500 of one embodiment of the invention judgment device attribute in portable terminal.In the embodiment shown in fig. 5, HPI and slave unit interface are to be integrated on the port.Whether first monitoring module, the 110 monitoring connectivity ports in the portable terminal have the USB joint to insert.When the USB joint inserts the connectivity port, be that dual-purpose USB-OTG slot is an example with this connectivity port, in step 510, first monitoring module 110 detects the type of the USB joint that inserts dual-purpose USB-OTG slot.Afterwards, in step 520, first monitoring module 110 judges that the insertion of USB joint makes the ID pin short circuit ground connection of dual-purpose USB-OTG slot; Still the ID pin of dual-purpose USB-OTG slot is in vacant state; If the ID pin of dual-purpose USB-OTG slot is in vacant state, the joint that shows insertion is the standard USB joint of 4 pins, then gets into step 540; The device attribute of confirming this portable terminal is the slave unit attribute, starts slave unit USB memory function; If make the ID pin short circuit ground connection of dual-purpose USB-OTG slot, the joint that shows insertion is the standard OTG joint of 5 pins, then gets into step 530, and the device attribute of confirming this portable terminal is a Host Properties, starts host function, opens second monitoring module 132.
In another embodiment of the present invention, HPI is two connectivity ports of separating with the slave unit interface, and in this case, first monitoring module 110 can directly be judged its device attribute according to the type of connectivity port.
Fig. 6 is the process flow diagram that in portable terminal, detects the method 600 whether slave unit USB memory function open according to one embodiment of the invention.In the embodiment shown in fig. 6, when portable terminal during as main frame, second monitoring module 132 is launched.After beginning step 610, in step 620, whether device node is opened in 132 judgements of second monitoring module successful.If step 620 is not then returned in success; If success then gets into step 630, enable the piece function of USB.Afterwards, articulate the USB memory device, make another portable terminal of being connected with portable terminal external storage unit as this portable terminal in step 640.
Fig. 7 is the process flow diagram that in portable terminal, detects the method 700 that the USB joint extracts according to one embodiment of the invention.
In the embodiment shown in fig. 7, HPI and slave unit interface are to be integrated on the port.Whether first monitoring module, the 110 monitoring connectivity ports in the portable terminal have the USB joint to extract.When the USB joint is extracted the connectivity port, be that dual-purpose USB-OTG slot is an example with this connectivity port, in step 710, first monitoring module 110 detects the type of the USB joint of extracting dual-purpose USB-OTG slot.That is, first monitoring module 110 judges that the ID pin short circuit ground connection of dual-purpose USB-OTG slot still is in vacant state before the USB joint is extracted.
In step 720, whether the ID pin of judging dual-purpose USB-OTG slot short circuit ground connection.If the joint that shows insertion is the standard OTG joint of 5 pins, confirm that then the device attribute of this portable terminal is a Host Properties, get into step 730 subsequently, reset and stop the operation of second monitoring module 132; If not, then get into step 740.
In the step 740, judge whether the ID pin of dual-purpose USB-OTG slot is in vacant state.If the joint that shows insertion is the standard USB joint of 4 pins, confirm that then the device attribute of this portable terminal is the slave unit attribute, get into step 750 subsequently, close slave unit USB memory function; If not, then return step 710.
Fig. 8 is the process flow diagram that in portable terminal, detects the method 800 whether slave unit USB memory function close according to one embodiment of the invention.
In the embodiment shown in fig. 8, whether second monitoring module, 132 monitor user ' in the portable terminal close the USB memory function of slave unit.After beginning step 810, second monitoring module 132 judges whether the system read-write file is overtime, if not, then returns step 820 and continues to judge; If, then get into step 830, send out on second monitoring module 132 incident overtime.Afterwards, in step 840, soft unloading circumscribed USB storage unit.
The system of data interaction mainly comprises main frame, slave unit, monitoring module and activates memory module between the portable terminal of the present invention.In main frame, set up a monitoring module and an activation memory module in the technical scheme of the present invention, close storage notification module and reseting module as preferably increasing in addition.
Monitoring module comprises first monitoring module and second monitoring module.Wherein first monitoring module is used for monitoring host computer (host) interface and whether is connected (when slave unit (device) mouth is connected last time with main frame (host) mouth, can excite a response to notify first monitoring module) with slave unit (device) interface; Whether second monitoring module is used to monitor slave unit USB memory function (noticing that own memory function before the slave unit connection distinguish with this memory function with the whole USB flash disk of working as after connecting, the latter is called the USB memory function in this application) and is launched by the user.
Active module; Be used for monitoring slave unit USB memory function when being launched by the user when second monitoring module; (just slave unit itself has when this function of USB flash disk to activate the slave unit memory function; Be to have activated it now among the present invention), make slave unit become one of storage unit of main process equipment.
Close the storage notification module, be used for monitoring the user when breaking off slave unit USB memory function the notice main frame when second monitoring module.
Reseting module is used for monitoring the user when closing slave unit USB memory function when second monitoring module, and the soft unloading slave unit is so that monitoring module is monitored again.
In one embodiment, implementation method step of the present invention is following: connect main frame and slave unit and (be connected slave unit (device) interface of second portable terminal through main frame (host) interface of first portable terminal, here; First portable terminal is a main frame; Second portable terminal is a slave unit), main frame is enumerated to detect through USB and has been connected slave unit, the host-initiated monitoring module; The USB memory function of wait slave unit is launched by the user; Launch the USB memory function of slave unit the user after, main frame promptly activates slave unit USB memory function, makes slave unit become one of storage unit of main frame.When the user closed (forbidding) slave unit USB memory function, the soft unloading slave unit was so that monitoring module is monitored again.
In each embodiment of the present invention; After host monitor connected to slave unit, whether main frame is enumerated the slave unit that judgement connects through USB available, as available; System will send through Android linux kernel and connect notice, and this notice can monitored module receive and handle.Monitoring specifically to as if main frame subordinate's a proprietary device node, particularly, this device node has certain characteristic, can reflect slave unit memory function availability.This device node is the piece node of main frame, is equivalent to a software module on the function, and control starts second monitoring module monitoring slave unit node whether available (being whether the user opens slave unit USB memory function).If the available operation of then carrying out active module behind the execution activation manipulation, will be given slave unit allocation block equipment, slave unit is hung up the storage unit as main frame.After the user forbade slave unit USB memory function, kernel notification monitoring module, monitoring module promptly unloaded storage unit, and software reset's main equipment second monitoring module is carried out next monitoring, so reciprocation cycle.
In order to realize the support to the USB flash disk of poor compatibility, system increases a monitoring module specially, increases Activiation method, makes it to be used.In addition, the support to the compound USB flash disk of smart machine comprises: a. kernel is supported: kernel increases partial code, connects and the disconnection notice for monitoring module provides; B. increase a monitoring module; C. increase and activate memory module.
Claims (12)
1. the method for data interaction between the portable terminal is characterized in that, may further comprise the steps:
A, first portable terminal receive the port link information from the connectivity port, and wherein said first portable terminal is connected with second communication of mobile terminal through said connectivity port;
B, confirm the device attribute of said first portable terminal based on said port link information, wherein said device attribute comprises Host Properties and slave unit attribute;
C, between said first portable terminal and said second portable terminal, carry out data interaction based on determined device attribute.
2. the method for data interaction is characterized in that between the portable terminal according to claim 1, and said step C comprises:
When the device attribute of confirming said first portable terminal is Host Properties, carry out following steps:
The On/Off state of the USB memory function of C11, said second portable terminal of monitoring;
C12, open, activate the memory function of said second portable terminal, enable said first portable terminal USB storage card in said second portable terminal is carried out read and/or write when the USB of said second portable terminal memory function.
3. the method for data interaction is characterized in that between the portable terminal according to claim 2, in said step C12,
The memory function of said second portable terminal of said activation is included as the said second portable terminal allocation block equipment, and said second portable terminal of carry makes its storage unit as said first portable terminal;
Perhaps, the memory function of said second portable terminal of said activation comprises directly the storage unit of second portable terminal as said first portable terminal is conducted interviews.
4. the method for data interaction is characterized in that between the portable terminal according to claim 2, also comprises after the said step C12:
C13, close said second portable terminal of the said first portable terminal soft unloading when the USB of said second portable terminal memory function.
5. the method for data interaction is characterized in that between the portable terminal according to claim 1, and said step C comprises:
When the device attribute of confirming said first portable terminal is the slave unit attribute, carry out following steps:
The instruction of the USB memory function of said first portable terminal is opened in C21, reception, and opens the USB memory function of said first portable terminal based on said instruction.
6. the method for data interaction is characterized in that between the portable terminal according to claim 5, also comprises after the said step C21:
Reading and/or write command of C22, said second portable terminal of reception carried out read and/or write on the USB of said first portable terminal storage card.
7. according to the method for data interaction between each described portable terminal in the claim 1 to 6, it is characterized in that said first portable terminal and second portable terminal are to use the portable terminal of Android operating system.
8. a portable terminal is characterized in that, comprising:
First monitoring module is used to receive the port link information from the connectivity port of said portable terminal, and wherein said connectivity port comprises HPI and slave unit interface;
The device attribute judge module; Be used for when said portable terminal is connected with another communication of mobile terminal through the connectivity port; Confirm the device attribute of said portable terminal based on said port link information, wherein said device attribute comprises Host Properties and slave unit attribute;
The data interaction administrative unit is used for based on determined device attribute, and the data interaction between said portable terminal and said another portable terminal is managed.
9. portable terminal according to claim 8 is characterized in that, said data interaction administrative unit comprises:
Second monitoring module is used for when the device attribute of confirming said portable terminal is Host Properties, the On/Off state of the USB memory function of said another portable terminal of monitoring;
Active module is used for opening when the USB memory function of said another portable terminal, activates the memory function of said another portable terminal, enables said portable terminal the USB storage card in said another portable terminal is carried out read and/or write.
10. portable terminal according to claim 9 is characterized in that, in said active module,
The memory function of said another portable terminal of said activation is included as said another portable terminal allocation block equipment, and said another portable terminal of carry makes its storage unit as said portable terminal; Perhaps, the memory function of said another portable terminal of said activation comprises directly the storage unit of another portable terminal as said portable terminal is conducted interviews.
11., it is characterized in that said data interaction administrative unit also comprises according to claim 9 or 10 described portable terminals:
Close the storage notification module, be used for when the USB of said another portable terminal memory function is closed, sending the slave unit memory function and closing notice;
Reseting module is used for closing notice based on said slave unit memory function, enables said another portable terminal of said portable terminal soft unloading.
12. portable terminal according to claim 8 is characterized in that, said portable terminal comprises the USB memory module, is used for when the device attribute of confirming said portable terminal is the slave unit attribute, as the external storage unit of another portable terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210094069.6A CN102662897B (en) | 2012-03-31 | 2012-03-31 | Mobile terminal and data interaction method between mobile terminals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210094069.6A CN102662897B (en) | 2012-03-31 | 2012-03-31 | Mobile terminal and data interaction method between mobile terminals |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102662897A true CN102662897A (en) | 2012-09-12 |
CN102662897B CN102662897B (en) | 2015-04-29 |
Family
ID=46772393
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210094069.6A Active CN102662897B (en) | 2012-03-31 | 2012-03-31 | Mobile terminal and data interaction method between mobile terminals |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102662897B (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231878A (en) * | 2011-06-21 | 2011-11-02 | 中兴通讯股份有限公司 | Data card starting method and data card |
CN103064812A (en) * | 2012-12-24 | 2013-04-24 | 珠海市君天电子科技有限公司 | Method and device for quick connection of mobile device and computer |
CN103473198A (en) * | 2013-09-13 | 2013-12-25 | 吴涛 | Method for sharing and transmitting files between mobile terminals |
CN103593309A (en) * | 2013-10-21 | 2014-02-19 | 杭州魔品科技有限公司 | Method of solving problem that off-line connection occurs between PC and android cellphone |
CN104035902A (en) * | 2014-07-02 | 2014-09-10 | 广东欧珀移动通信有限公司 | Data access method and communication system |
CN104660395A (en) * | 2013-11-25 | 2015-05-27 | 北京壹人壹本信息科技有限公司 | Data synchronization method, system and equipment |
CN105117363A (en) * | 2015-08-10 | 2015-12-02 | 广东欧珀移动通信有限公司 | Method and system for improving USB OTG (On-The-Go) compatibility |
CN105956458A (en) * | 2016-04-28 | 2016-09-21 | 乐视控股(北京)有限公司 | Interaction control method and device for terminals |
CN105955666A (en) * | 2016-04-29 | 2016-09-21 | 乐视控股(北京)有限公司 | Electronic device and method for providing data to another electronic device directly connected with the electronic device |
CN106686115A (en) * | 2017-01-19 | 2017-05-17 | 上海数果科技有限公司 | High-safety high-efficiency mobile terminal data inter-transmission system based on USB (universal serial bus) interface |
CN111698366A (en) * | 2020-05-08 | 2020-09-22 | 北京连山时代科技有限公司 | Mobile phone hardware extension mode based on USB interface |
CN113852760A (en) * | 2021-09-26 | 2021-12-28 | 联想(北京)有限公司 | Control method and control device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553733A (en) * | 2003-05-30 | 2004-12-08 | ΰ | Mobile with universal series bus USB storing function |
CN1755656A (en) * | 2004-09-27 | 2006-04-05 | 江苏新科电子集团有限公司 | Data transmission and control system employing USB and relative method thereof |
CN1858748A (en) * | 2006-05-22 | 2006-11-08 | 上海怀瑾计算机科技有限公司 | Method for realizing directly access USB master facility end file from slave facility end at USB |
CN201509250U (en) * | 2009-09-18 | 2010-06-16 | 天津三星光电子有限公司 | Digital camera with USB host machine expanding function |
-
2012
- 2012-03-31 CN CN201210094069.6A patent/CN102662897B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553733A (en) * | 2003-05-30 | 2004-12-08 | ΰ | Mobile with universal series bus USB storing function |
CN1755656A (en) * | 2004-09-27 | 2006-04-05 | 江苏新科电子集团有限公司 | Data transmission and control system employing USB and relative method thereof |
CN1858748A (en) * | 2006-05-22 | 2006-11-08 | 上海怀瑾计算机科技有限公司 | Method for realizing directly access USB master facility end file from slave facility end at USB |
CN201509250U (en) * | 2009-09-18 | 2010-06-16 | 天津三星光电子有限公司 | Digital camera with USB host machine expanding function |
Non-Patent Citations (1)
Title |
---|
张志,余松煜: "一种USB从设备访问主设备的方法", 《计算机工程》, vol. 34, no. 3, 5 February 2008 (2008-02-05) * |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231878A (en) * | 2011-06-21 | 2011-11-02 | 中兴通讯股份有限公司 | Data card starting method and data card |
CN103064812A (en) * | 2012-12-24 | 2013-04-24 | 珠海市君天电子科技有限公司 | Method and device for quick connection of mobile device and computer |
CN103064812B (en) * | 2012-12-24 | 2016-04-06 | 珠海市君天电子科技有限公司 | Method and device for quickly connecting mobile equipment and computer |
CN103473198A (en) * | 2013-09-13 | 2013-12-25 | 吴涛 | Method for sharing and transmitting files between mobile terminals |
CN103593309B (en) * | 2013-10-21 | 2016-06-15 | 杭州魔品科技股份有限公司 | A kind of PC of solution end occurs the method for off-line problem with Android mobile phone in being connected |
CN103593309A (en) * | 2013-10-21 | 2014-02-19 | 杭州魔品科技有限公司 | Method of solving problem that off-line connection occurs between PC and android cellphone |
CN104660395A (en) * | 2013-11-25 | 2015-05-27 | 北京壹人壹本信息科技有限公司 | Data synchronization method, system and equipment |
CN104660395B (en) * | 2013-11-25 | 2019-03-01 | 北京壹人壹本信息科技有限公司 | A kind of method of data synchronization, system and equipment |
CN104035902A (en) * | 2014-07-02 | 2014-09-10 | 广东欧珀移动通信有限公司 | Data access method and communication system |
CN104035902B (en) * | 2014-07-02 | 2017-11-10 | 广东欧珀移动通信有限公司 | A kind of method and communication system for accessing data |
CN105117363A (en) * | 2015-08-10 | 2015-12-02 | 广东欧珀移动通信有限公司 | Method and system for improving USB OTG (On-The-Go) compatibility |
CN105956458A (en) * | 2016-04-28 | 2016-09-21 | 乐视控股(北京)有限公司 | Interaction control method and device for terminals |
WO2017185680A1 (en) * | 2016-04-28 | 2017-11-02 | 乐视控股(北京)有限公司 | Terminal interaction control method and apparatus |
CN105955666A (en) * | 2016-04-29 | 2016-09-21 | 乐视控股(北京)有限公司 | Electronic device and method for providing data to another electronic device directly connected with the electronic device |
WO2017185694A1 (en) * | 2016-04-29 | 2017-11-02 | 乐视控股(北京)有限公司 | Electronic device, and method for providing data for another directly connected electronic device |
CN106686115A (en) * | 2017-01-19 | 2017-05-17 | 上海数果科技有限公司 | High-safety high-efficiency mobile terminal data inter-transmission system based on USB (universal serial bus) interface |
CN111698366A (en) * | 2020-05-08 | 2020-09-22 | 北京连山时代科技有限公司 | Mobile phone hardware extension mode based on USB interface |
CN113852760A (en) * | 2021-09-26 | 2021-12-28 | 联想(北京)有限公司 | Control method and control device |
Also Published As
Publication number | Publication date |
---|---|
CN102662897B (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102662897B (en) | Mobile terminal and data interaction method between mobile terminals | |
KR100833176B1 (en) | Efficient connection between modules of removable electronic circuit cards | |
US7895386B2 (en) | USB interface provided with host/device function and its control method | |
CN100583076C (en) | Hot plug detection method of mobile memory card | |
US10743258B2 (en) | Method of Bluetooth communication giving consideration to both communication speed and power consumption and a terminal thereof | |
EP2288102A1 (en) | Method and system for wireless data communicatiopn in data processing system with a USB interface | |
WO2015059654A1 (en) | Universal serial bus (usb) hub for switching downstream ports between host mode and slave mode | |
CN110419035B (en) | USB host-to-host automatic switching | |
CN101562906A (en) | Method and device for automatically adapting to wireless data cards with multiple formats | |
CN108038532B (en) | Intelligent card and control method thereof | |
WO2011145829A2 (en) | Microsd device loaded with a smart card | |
CN102646088A (en) | External bridge system | |
CN1331037C (en) | Storing card with multi-interfae function and transmitting mode selective method | |
WO2014023247A1 (en) | Embedded device and method for control data communication based on the device | |
WO2016065821A1 (en) | Multifunctional portable data card and data transmission method | |
EP2620899B1 (en) | Smart chip and method for smart chip data communications | |
US8602314B2 (en) | Memory card adapter | |
CN101221547B (en) | Memory card having multiple interfaces, reset control method thereof | |
CN101163304B (en) | Method and system for processing files of peripheral equipment and a mobile terminal | |
CN104239941B (en) | A kind of identification card | |
CN110188060A (en) | Mode switching system and the mode switching method for applying it | |
CN106127281B (en) | A kind of Bluetooth intelligent card and its charging method | |
US10037487B2 (en) | Single-chip financial audio IC card | |
WO2012009996A1 (en) | Memory device and smart-phone system | |
CN102073457B (en) | Storage control method for computer system and relevant storage control device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |