CN104811359A - Serial port communication method and terminal - Google Patents

Serial port communication method and terminal Download PDF

Info

Publication number
CN104811359A
CN104811359A CN201510170183.6A CN201510170183A CN104811359A CN 104811359 A CN104811359 A CN 104811359A CN 201510170183 A CN201510170183 A CN 201510170183A CN 104811359 A CN104811359 A CN 104811359A
Authority
CN
China
Prior art keywords
identification information
equipment
serial
target strings
serial ports
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
Application number
CN201510170183.6A
Other languages
Chinese (zh)
Other versions
CN104811359B (en
Inventor
刘均
张业进
邓芳鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201510170183.6A priority Critical patent/CN104811359B/en
Publication of CN104811359A publication Critical patent/CN104811359A/en
Application granted granted Critical
Publication of CN104811359B publication Critical patent/CN104811359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a serial port communication method and terminal. The method includes the steps: receiving a first control instruction inputted by a user according to a target serial port device; acquiring a serial port number corresponding to identification information of the target serial port device according to a mapping relation between a pre-stored serial port number and identification information of a serial port device; transmitting the first control instruction to the target serial port device according to the serial port number corresponding to the identification information of the target serial port device to control the target serial port device to execute target operations according to the first control instruction. The first control instruction carries the identification information of the target serial port device. The serial port number corresponding to the serial port device can be automatically acquired, a user does not need to manually select the serial port number corresponding to the serial port device, and the success rate of communication between a main terminal and the serial port device can be increased.

Description

A kind of serial port communication method and terminal
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of serial port communication method and terminal.
Background technology
Serial line interface is called for short serial ports, refers to that data one ground order transmits, is characterized in that communication line is simple, as long as a pair transmission line just can realize two-way communication, thus greatly reduces cost, be specially adapted to telecommunication.
In actual applications, master terminal is often connected with multiple stage serial equipment by serial ports by user, and is controlled serial equipment by master terminal.When each serial equipment is connected with master terminal by serial ports, master terminal is by the serial ports number for each serial equipment Random assignment one correspondence.In the prior art, when master terminal controls a serial equipment, need user manually to select the serial ports number that this serial equipment is corresponding, the serial ports that master terminal obtains user's selection could communicate with this serial equipment.Because serial ports number is master terminal Random assignment, when master terminal connects multiple serial equipment, user determines which serial equipment which serial ports number corresponding by being difficult to; Manually select user to be easy to select wrong serial ports number in the process of serial ports number, therefore, manually select the serial ports of serial equipment number to reduce the success rate of master terminal and serial equipment communicating by user.
Summary of the invention
The invention discloses a kind of serial port communication method and terminal, can serial ports number corresponding to automatic acquisition serial equipment, avoid user manually to select the serial ports number that serial equipment is corresponding, the success rate of master terminal and serial equipment communicating can be improved.
The invention discloses a kind of serial port communication method, described method comprises:
Receive first control command for target strings jaws equipment of user's input, described first control command carries the identification information of described target strings jaws equipment;
According to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of described target strings jaws equipment;
According to the serial ports number corresponding with the identification information of described target strings jaws equipment, described first control command is sent to described target strings jaws equipment, to control described target strings jaws equipment according to described first control command performance objective operation.
The invention also discloses a kind of terminal, described terminal comprises:
Receiver module, for receiving first control command for target strings jaws equipment of user's input, described first control command carries the identification information of described target strings jaws equipment;
Acquisition module, for according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of described target strings jaws equipment;
Sending module, for according to the serial ports number corresponding with the identification information of described target strings jaws equipment, is sent to described target strings jaws equipment by described first control command, to control described target strings jaws equipment according to described first control command performance objective operation.
In the present invention, terminal receive user input carry the first control command of the identification information of target strings jaws equipment after, terminal, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by terminal, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Accompanying drawing explanation
In order to be illustrated more clearly in technical scheme of the present invention, be briefly described to the accompanying drawing that will use required for the present invention below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of serial port communication method disclosed by the invention;
Fig. 2 is the schematic flow sheet of another kind of serial port communication method disclosed by the invention;
Fig. 3 is the schematic flow sheet of another kind of serial port communication method disclosed by the invention;
Fig. 4 is the schematic flow sheet of another kind of serial port communication method disclosed by the invention;
Fig. 5 is the structural representation of a kind of terminal disclosed by the invention;
Fig. 6 is the structural representation of another kind of terminal disclosed by the invention;
Fig. 7 is the structural representation of another kind of terminal disclosed by the invention;
Fig. 8 is the structural representation of another kind of terminal disclosed by the invention.
Embodiment
Below in conjunction with accompanying drawing of the present invention and embodiment, be clearly and completely described technical scheme of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of serial port communication method and terminal, can serial ports number corresponding to automatic acquisition serial equipment, avoid user manually to select the serial ports number that serial equipment is corresponding, the success rate of master terminal and serial equipment communicating can be improved.Below be described in detail respectively.
Refer to Fig. 1, the schematic flow sheet of Fig. 1 a kind of serial port communication method disclosed in the embodiment of the present invention.As shown in Figure 1, this serial port communication method can comprise the following steps.
First control command for target strings jaws equipment of S101, reception user input, this first control command carries the identification information of this target strings jaws equipment.
In the embodiment of the present invention, terminal will receive first control command for target strings jaws equipment of user's input, and this first control command carries the identification information of this target strings jaws equipment.Wherein, this terminal can include but not limited to that panel computer, notebook computer, desktop computer etc. have the terminal of serial ports; The operating system of this terminal can include but not limited to IOS, Windows operating system etc., and the embodiment of the present invention does not limit.In the embodiment of the present invention, serial equipment is can set up by the serial ports of terminal and terminal the equipment that serial ports is connected, and such as this serial equipment can be manipulator, printer, projecting apparatus, smart mobile phone etc.; The identification information of serial equipment is can the information of this serial equipment of unique identification; The identification information of serial equipment can be numeral or alphabetical, and the identification information of this serial equipment also can be combination of numeral and letter etc., and the embodiment of the present invention does not limit.
S102, according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of this target strings jaws equipment.
In the embodiment of the present invention, set up with terminal all corresponding a string slogan of each serial equipment that serial ports connects, the serial ports number that each serial equipment is corresponding different.First control command could be sent to serial equipment by the terminal serial ports corresponding according to serial equipment.
In the embodiment of the present invention, serial ports that terminal prestores number and the mapping relations of the identification information of serial equipment are the serial ports number of serial equipment and the mapping relations of the identification information of serial equipment.After terminal receives the first control command of target strings jaws equipment, terminal is by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtain the serial ports number that the identification information of target strings jaws equipment is corresponding, the serial ports number that the identification information of this target strings jaws equipment is corresponding is the serial ports number of this target strings jaws equipment.
The serial ports number that S103, basis are corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment, operates to control this target strings jaws equipment according to the first control command performance objective by the first control command.
In the embodiment of the present invention, the first control command can be sent to target strings jaws equipment by the serial ports number corresponding according to the identification information of target strings jaws equipment after getting serial ports number corresponding to the identification information of target strings jaws equipment by terminal; This target strings jaws equipment will according to the first control command performance objective operation after receiving the first control command.Such as, if this target strings jaws equipment is smart mobile phone, then this target strings jaws equipment can increase volume according to the first control command or reduce volume etc.; If this target strings jaws equipment is manipulator, then this target strings jaws equipment can capture article etc. according to the first control command.
In the method described by Fig. 1, terminal receive user input carry the first control command of the identification information of target strings jaws equipment after, terminal, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by terminal, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the embodiment of the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Refer to Fig. 2, the schematic flow sheet of Fig. 2 another kind of serial port communication method disclosed in the embodiment of the present invention.As shown in Figure 2, this serial port communication method can comprise the following steps.
S201, when terminal detect serial equipment by serial ports and local terminal set up serial ports be connected time, terminal obtains the serial ports number of serial equipment and the identification information of this serial equipment.
In the embodiment of the present invention, when a serial equipment connects terminal by serial ports, terminal will distribute a string slogan for this serial equipment; Wherein, this serial ports number can be terminal is serial equipment Random assignment.
In the embodiment of the present invention, when terminal detect serial equipment by serial ports and local terminal set up serial ports be connected time, terminal also first can obtain the identification information of serial equipment, obtain the serial ports number of serial equipment again, or terminal first can obtain the serial ports number of serial equipment, obtain the identification information of serial equipment again, the embodiment of the present invention does not limit.
S202, terminal set up the mapping relations of this serial ports number and the identification information of this serial equipment, and these mapping relations are stored.
In the embodiment of the present invention, terminal is after the identification information of the serial ports number and this serial equipment that obtain serial equipment, and these mapping relations by the mapping relations of the identification information of the serial ports number and this serial equipment of setting up serial equipment, and store by terminal.
S203, terminal receive first control command for target strings jaws equipment of user's input, and this first control command carries the identification information of target strings jaws equipment.
S204, terminal, according to the serial ports the prestored number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of target strings jaws equipment.
First control command, according to the serial ports number corresponding with the identification information of target strings jaws equipment, is sent to target strings jaws equipment by S205, terminal, operates according to the first control command performance objective with control objectives serial equipment.
S206, when terminal detects that target strings jaws equipment interrupts being connected with the serial ports of local terminal, the serial ports number of deletion storage and the mapping relations of the identification information of target strings jaws equipment.
In the embodiment of the present invention, each serial equipment and terminal set up serial ports when being connected, and terminal can distribute a string slogan for this serial equipment, and therefore each serial equipment and terminal set up serial ports when being connected, the serial ports number possible difference of serial equipment.In order to the serial ports number that serial equipment can be found corresponding by the identification information of serial equipment, therefore when terminal detects that serial equipment interrupts being connected with the serial ports of local terminal, the serial ports number of terminal by deletion storage and the mapping relations of the identification information of serial equipment; When terminal detects that serial equipment is connected with the serial ports of local terminal by serial ports, terminal can set up the mapping relations of serial ports number and the identification information of serial equipment, and stores this mapping relations.
In the method described by Fig. 2, terminal receive user input carry the first control command of the identification information of target strings jaws equipment after, terminal, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by terminal, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the embodiment of the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Refer to Fig. 3, the schematic flow sheet of Fig. 3 another kind of serial port communication method disclosed in the embodiment of the present invention.As shown in Figure 3, this serial port communication method can comprise the following steps.
What S301, terminal reception user inputted arranges instruction for what arrange the identification information of target strings jaws equipment.
In the embodiment of the present invention, user can be arranged the identification information of target strings jaws equipment.Such as, if the current identification information of target strings jaws equipment is the ID that dispatches from the factory, the ID that dispatches from the factory of target strings jaws equipment is generally mess code form, therefore user can change the identification information of target strings jaws equipment into numeral number by the ID that dispatches from the factory, as 1,2,3 etc. numberings, or user can change the identification information of target strings jaws equipment into letter by the ID that dispatches from the factory, or user can change the identification information of target strings jaws equipment into letter and number combinatorics on words etc. by the ID that dispatches from the factory; The combining form that the identification information of target strings jaws equipment is set to numeral, letter or number and letter by user can facilitate calling of program.
S302, terminal response this instruction is set, export the identification information input port for inputting identification information.
In the embodiment of the present invention, user can in the combination of identification information input port input numeral, letter or number and letter.
S303, terminal obtain the identification information inputted by identification information input port, and generate the second control command comprising the identification information inputted by identification information input port.
This second control command is sent to target strings jaws equipment by S304, terminal, to make target strings jaws equipment respond this second control command, the identification information inputted is set to the identification information of target strings jaws equipment by identification information input port.
In the embodiment of the present invention, after this second control command is sent to target strings jaws equipment by terminal, the identification information inputted by identification information input port, by this second control command of response, is set to the identification information of target strings jaws equipment by target strings jaws equipment.Such as, if the current identification information of target strings jaws equipment is the ID that dispatches from the factory of target strings jaws equipment, then deletion is dispatched from the factory ID by target strings jaws equipment, and the identification information inputted by identification information input port is set to the identification information of target strings jaws equipment.
S305, terminal receive first control command for target strings jaws equipment of user's input, and this first control command carries the identification information of target strings jaws equipment.
S306, terminal, according to the serial ports the prestored number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of target strings jaws equipment.
First control command, according to the serial ports number corresponding with the identification information of target strings jaws equipment, is sent to target strings jaws equipment by S307, terminal, operates according to the first control command performance objective with control objectives serial equipment.
In the method described by Fig. 3, terminal receive user input carry the first control command of the identification information of target strings jaws equipment after, terminal, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by terminal, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the embodiment of the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Refer to Fig. 4, the schematic flow sheet of Fig. 4 another kind of serial port communication method disclosed in the embodiment of the present invention.As shown in Figure 4, this serial port communication method can comprise the following steps.
S401, terminal receive first control command for target strings jaws equipment of user's input, and this first control command carries the identification information of target strings jaws equipment.
S402, terminal export information input port to be verified.
In the embodiment of the present invention, after terminal receives first control command for target strings jaws equipment of user's input, output is used for pointing out the information inputting information to be verified by terminal, and terminal will export information input port to be verified.
S403, terminal obtain the information to be verified by information input port to be verified input.
In the embodiment of the present invention, this information to be verified can include but not limited to any one and several combinations in password to be verified, finger print information to be verified, shape of face information to be verified, iris information to be verified, retinal information to be verified and voiceprint to be verified.
Whether this information to be verified of S404, terminal judges matches with default check information.
In the embodiment of the present invention, when this information to be verified of terminal judges and default check information match, perform step S405; When this information to be verified of terminal judges is not mated with default check information, terminate this flow process or export for pointing out user's information to be verified and the unmatched miscue information of default check information, again inputting information to be verified in information input port to be verified to point out user.
In the embodiment of the present invention, this default check information can include but not limited to preset verification password, preset verification finger print information, preset verification shape of face information, preset verification iris information, preset verification retinal information and preset any one and several combinations in verification voiceprint.
In the embodiment of the present invention, above-mentioned default verification password can be digital, alphabetical, or the combination of numeral and letter etc., the embodiment of the present invention does not limit.
In this embodiment, above-mentioned default check information can comprise fingerprint string information and input time corresponding to each fingerprint; So correspondingly, judge whether information to be verified matches can comprise the following steps with default check information:
Judge that whether fingerprint string is identical with the fingerprint string that default check information comprises, and whether the difference of the input time of identical fingerprints is all less than preset value, if verification fingerprint string is identical with the fingerprint string that default check information comprises, and the difference of the input time of identical fingerprints is all less than preset value, so can determine that information to be verified and default check information match; Otherwise, determine information to be verified and default check information inconsistent.Wherein, by implementing this execution mode, can prevent disabled user from controlling target strings jaws equipment in terminal, thus can effectively prevent terminal from wantonly being operated by disabled user.
S405, terminal, according to the serial ports the prestored number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of target strings jaws equipment.
First control command, according to the serial ports number corresponding with the identification information of target strings jaws equipment, is sent to target strings jaws equipment by S406, terminal, operates according to the first control command performance objective with control objectives serial equipment.
In the method described by Fig. 4, terminal receive user input carry the first control command of the identification information of target strings jaws equipment after, terminal, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by terminal, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the embodiment of the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Refer to Fig. 5, Fig. 5 is the structural representation of a kind of terminal disclosed in the embodiment of the present invention.Wherein, the terminal shown in Fig. 5 can comprise receiver module 501, acquisition module 502, sending module 503.Wherein:
Receiver module 501, for receiving first control command for target strings jaws equipment of user's input, described first control command carries the identification information of described target strings jaws equipment.
In the embodiment of the present invention, receiver module 501 will receive first control command for target strings jaws equipment of user's input, and this first control command carries the identification information of this target strings jaws equipment.Wherein, serial equipment is can set up by the serial ports of terminal and terminal the equipment that serial ports is connected, and such as this serial equipment can be manipulator, printer, projecting apparatus, smart mobile phone etc.; The identification information of serial equipment is can the information of this serial equipment of unique identification; The identification information of serial equipment can be numeral or alphabetical, and the identification information of this serial equipment also can be combination of numeral and letter etc., and the embodiment of the present invention does not limit.
Acquisition module 502, for according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of described target strings jaws equipment.
In the embodiment of the present invention, set up with terminal all corresponding a string slogan of each serial equipment that serial ports connects, the serial ports number that each serial equipment is corresponding different.First control command could be sent to serial equipment by the serial ports that sending module 503 is corresponding according to serial equipment.
In the embodiment of the present invention, serial ports that terminal prestores number and the mapping relations of the identification information of serial equipment are the serial ports number of serial equipment and the mapping relations of the identification information of serial equipment.After receiver module 501 receives the first control command of target strings jaws equipment, acquisition module 502 is by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtain the serial ports number that the identification information of target strings jaws equipment is corresponding, the serial ports number that the identification information of this target strings jaws equipment is corresponding is the serial ports number of this target strings jaws equipment.
Sending module 503, for according to the serial ports number corresponding with the identification information of described target strings jaws equipment, is sent to described target strings jaws equipment by described first control command, to control described target strings jaws equipment according to described first control command performance objective operation.
In the embodiment of the present invention, after acquisition module 502 gets serial ports number corresponding to the identification information of target strings jaws equipment, the first control command can be sent to target strings jaws equipment by the serial ports number corresponding according to the identification information of target strings jaws equipment by sending module 503; This target strings jaws equipment will according to the first control command performance objective operation after receiving the first control command.Such as, if this target strings jaws equipment is smart mobile phone, then this target strings jaws equipment can increase volume according to the first control command or reduce volume etc.; If this target strings jaws equipment is manipulator, then this target strings jaws equipment can capture article etc. according to the first control command.
See also Fig. 6, Fig. 6 is the structural representation of another kind of terminal disclosed in the embodiment of the present invention.Wherein, the terminal shown in Fig. 6 is that terminal is as shown in Figure 5 optimized and obtains.Compared with the terminal shown in Fig. 5, the terminal shown in Fig. 6, except all modules comprising the terminal shown in Fig. 5, can also comprise storage module 504 and removing module 505.Wherein:
Described acquisition module 502, also for when detect serial equipment by serial ports and local terminal set up serial ports be connected time, obtain the serial ports number of described serial equipment and the identification information of described serial equipment.
In the embodiment of the present invention, when a serial equipment connects terminal by serial ports, terminal will distribute a string slogan for this serial equipment; Wherein, this serial ports number can be terminal is serial equipment Random assignment.
In the embodiment of the present invention, when terminal detect serial equipment by serial ports and local terminal set up serial ports be connected time, acquisition module 502 also first can obtain the identification information of serial equipment, obtain the serial ports number of serial equipment again, acquisition module 502 first can obtain the serial ports number of serial equipment, obtain the identification information of serial equipment again, the embodiment of the present invention does not limit.
Described mapping relations for setting up the mapping relations of described serial ports number and the identification information of described serial equipment, and are stored by storage module 504.
In the embodiment of the present invention, after acquisition module 502 obtains the serial ports number of serial equipment and the identification information of this serial equipment, these mapping relations by the mapping relations of the identification information of the serial ports number and this serial equipment of setting up serial equipment, and store by storage module 504.
Removing module 505, for when detecting that described target strings jaws equipment interrupts being connected with the described serial ports of described local terminal, deletes the serial ports number of described storage module storage and the mapping relations of the identification information of described target strings jaws equipment.
In the embodiment of the present invention, each serial equipment and terminal set up serial ports when being connected, and terminal can distribute a string slogan for this serial equipment, and therefore each serial equipment and terminal set up serial ports when being connected, the serial ports number possible difference of serial equipment.In order to the serial ports number that serial equipment can be found corresponding by the identification information of serial equipment, therefore when terminal detects that serial equipment interrupts being connected with the serial ports of local terminal, the serial ports number of removing module 505 by deletion storage and the mapping relations of the identification information of serial equipment; When terminal detects that serial equipment is connected with the serial ports of local terminal by serial ports, acquisition module 502 can obtain the serial ports number of serial equipment and the identification information of serial equipment, and set up the mapping relations of serial ports number and the identification information of serial equipment by storage module 504, and store this mapping relations.
See also Fig. 7, Fig. 7 is the structural representation of another kind of terminal disclosed in the embodiment of the present invention.Wherein, the terminal shown in Fig. 7 is that terminal is as shown in Figure 5 optimized and obtains.Compared with the terminal shown in Fig. 5, the terminal shown in Fig. 7, except all modules comprising the terminal shown in Fig. 5, can also comprise the first output module 506 and generation module 507.Wherein:
Described receiver module 501, also for receive user input for what arrange the identification information of described target strings jaws equipment, instruction is set.
In the embodiment of the present invention, user can be arranged the identification information of target strings jaws equipment.Such as, if the current identification information of target strings jaws equipment is the ID that dispatches from the factory, the ID that dispatches from the factory of target strings jaws equipment is generally mess code form, therefore user can change the identification information of target strings jaws equipment into numeral number by the ID that dispatches from the factory, as 1,2,3 etc. numberings, or user can change the identification information of target strings jaws equipment into letter by the ID that dispatches from the factory, or user can change the identification information of target strings jaws equipment into letter and number combinatorics on words etc. by the ID that dispatches from the factory; The combining form that the identification information of target strings jaws equipment is set to numeral, letter or number and letter by user can facilitate calling of program.
Described first output module 506, for respond receiver module 501 receive instruction is set, export the identification information input port for inputting identification information.
Described acquisition module 502, also for obtaining the identification information by the input of described identification information input port.
Described generation module 507, for generating the second control command of the identification information comprised by the input of described identification information input port.
Described sending module 503, the second control command also for being generated by generation module 507 is sent to described target strings jaws equipment, to make described target strings jaws equipment respond described second control command, the identification information by the input of described identification information input port is set to the identification information of described target strings jaws equipment.
In the embodiment of the present invention, after this second control command is sent to target strings jaws equipment by sending module 503, the identification information inputted by identification information input port, by this second control command of response, is set to the identification information of target strings jaws equipment by target strings jaws equipment.Such as, if the current identification information of target strings jaws equipment is the ID that dispatches from the factory of target strings jaws equipment, then deletion is dispatched from the factory ID by target strings jaws equipment, and the identification information inputted by identification information input port is set to the identification information of target strings jaws equipment.
See also Fig. 8, Fig. 8 is the structural representation of another kind of terminal disclosed in the embodiment of the present invention.Wherein, the terminal shown in Fig. 8 is that terminal is as shown in Figure 5 optimized and obtains.Compared with the terminal shown in Fig. 5, the terminal shown in Fig. 8, except all modules comprising the terminal shown in Fig. 5, can also comprise the second output module 508 and judge module 509.Wherein:
Described second output module 508, for exporting information input port to be verified.
In the embodiment of the present invention, after receiver module 501 receives first control command for target strings jaws equipment of user's input, output is used for pointing out the information inputting information to be verified by the second output module 508, and terminal will export information input port to be verified.
Described acquisition module 502, also for obtaining the information to be verified by described information input port to be verified input.
In the embodiment of the present invention, this information to be verified can include but not limited to any one and several combinations in password to be verified, finger print information to be verified, shape of face information to be verified, iris information to be verified, retinal information to be verified and voiceprint to be verified.
Described judge module 509, for judging whether described information to be verified matches with default check information.
In the embodiment of the present invention, when judge module 509 judges that this information to be verified and default check information match, acquisition module 502, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of described target strings jaws equipment.When judge module 509 judges that this information to be verified is not mated with default check information, terminal terminates this flow process or exports for pointing out user's information to be verified and the unmatched miscue information of default check information, again inputs information to be verified in information input port to be verified to point out user.
In the embodiment of the present invention, this default check information can include but not limited to preset verification password, preset verification finger print information, preset verification shape of face information, preset verification iris information, preset verification retinal information and preset any one and several combinations in verification voiceprint.
In the embodiment of the present invention, above-mentioned default verification password can be digital, alphabetical, or the combination of numeral and letter etc., the embodiment of the present invention does not limit.
In this embodiment, above-mentioned default check information can comprise fingerprint string information and input time corresponding to each fingerprint; So correspondingly, judge module 509 judges whether information to be verified matches can comprise the following steps with default check information:
Judge module 509 judges that whether fingerprint string is identical with the fingerprint string that default check information comprises, and judge module 509 judges whether the difference of the input time of identical fingerprints is all less than preset value, if verification fingerprint string is identical with the fingerprint string that default check information comprises, and the difference of the input time of identical fingerprints is all less than preset value, so can determine that information to be verified and default check information match; Otherwise, determine information to be verified and default check information inconsistent.Wherein, by implementing this execution mode, can prevent disabled user from controlling target strings jaws equipment in terminal, thus can effectively prevent terminal from wantonly being operated by disabled user.
In the terminal described by Fig. 5 ~ Fig. 8, receiver module receive user input carry the first control command of the identification information of target strings jaws equipment after, acquisition module, by according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of this target strings jaws equipment; First control command, according to the serial ports number corresponding with the identification information of this target strings jaws equipment, is sent to this target strings jaws equipment by sending module, operates according to the first control command performance objective to control this target strings jaws equipment.Visible, the embodiment of the present invention can serial ports number corresponding to automatic acquisition serial equipment, avoids user manually to select the serial ports number that serial equipment is corresponding, can improve the success rate of master terminal and serial equipment communicating.
Step in embodiment of the present invention method can be carried out order according to actual needs and be adjusted, merges and delete.
Module in embodiment of the present invention terminal or equipment can carry out merging, divide and deleting according to actual needs.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment can carry out the device-dependent hardware of command terminal by program to have come, this program can be stored in a computer-readable recording medium, storage medium can comprise: flash disk, read-only memory (Read-OnlyMemory, ROM), random access device (Random Access Memory, RAM), disk or CD etc.
Above a kind of serial port communication method disclosed in the embodiment of the present invention and terminal are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a serial port communication method, is characterized in that, described method comprises:
Receive first control command for target strings jaws equipment of user's input, described first control command carries the identification information of described target strings jaws equipment;
According to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtain the serial ports number corresponding with the identification information of described target strings jaws equipment;
According to the serial ports number corresponding with the identification information of described target strings jaws equipment, described first control command is sent to described target strings jaws equipment, to control described target strings jaws equipment according to described first control command performance objective operation.
2. method according to claim 1, is characterized in that, the mapping relations of serial ports that described basis prestores number and the identification information of serial equipment, and before obtaining the serial ports number corresponding with the identification information of described target strings jaws equipment, described method also comprises:
When detect serial equipment by serial ports and local terminal set up serial ports be connected time, obtain the serial ports number of described serial equipment and the identification information of described serial equipment;
Set up the mapping relations of described serial ports number and the identification information of described serial equipment, and described mapping relations are stored.
3. method according to claim 2, it is characterized in that, the serial ports number that described basis is corresponding with the identification information of described target strings jaws equipment, described first control command is sent to described target strings jaws equipment, to control described target strings jaws equipment according to after described first control command performance objective operation, described method also comprises:
When detecting that described target strings jaws equipment interrupts being connected with the described serial ports of described local terminal, the serial ports number of deletion storage and the mapping relations of the identification information of described target strings jaws equipment.
4. the method according to claims 1 to 3 any one, is characterized in that, before first control command for target strings jaws equipment of described reception user input, described method also comprises:
What receive user's input arranges instruction for what arrange the identification information of described target strings jaws equipment;
Responding and described instruction is set, exporting the identification information input port for inputting identification information;
Obtain the identification information by the input of described identification information input port, and generate the second control command of the identification information comprised by the input of described identification information input port;
Described second control command is sent to described target strings jaws equipment, to make described target strings jaws equipment respond described second control command, the identification information by the input of described identification information input port is set to the identification information of described target strings jaws equipment.
5. the method according to claims 1 to 3 any one, is characterized in that, after first control command for target strings jaws equipment of described reception user input, described method also comprises:
Export information input port to be verified;
Obtain the information to be verified by described information input port to be verified input;
Judge whether described information to be verified matches with default check information;
If described information to be verified and described default check information match, then perform the mapping relations of serial ports that described basis prestores number and the identification information of serial equipment, obtain the step of the serial ports corresponding with the identification information of described target strings jaws equipment number.
6. a terminal, is characterized in that, described terminal comprises:
Receiver module, for receiving first control command for target strings jaws equipment of user's input, described first control command carries the identification information of described target strings jaws equipment;
Acquisition module, for according to the serial ports that the prestores number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of described target strings jaws equipment;
Sending module, for according to the serial ports number corresponding with the identification information of described target strings jaws equipment, is sent to described target strings jaws equipment by described first control command, to control described target strings jaws equipment according to described first control command performance objective operation.
7. terminal according to claim 6, is characterized in that, described terminal also comprises storage module, wherein:
Described acquisition module, also for when detect serial equipment by serial ports and local terminal set up serial ports be connected time, obtain the serial ports number of described serial equipment and the identification information of described serial equipment;
Described mapping relations for setting up the mapping relations of described serial ports number and the identification information of described serial equipment, and are stored by described storage module.
8. terminal according to claim 7, is characterized in that, described terminal also comprises:
Removing module, for when detecting that described target strings jaws equipment interrupts being connected with the described serial ports of described local terminal, deletes the serial ports number of described storage module storage and the mapping relations of the identification information of described target strings jaws equipment.
9. the terminal according to claim 6 ~ 8 any one, is characterized in that, described terminal also comprises the first output module and generation module, wherein:
Described receiver module, also for receive user input for what arrange the identification information of described target strings jaws equipment, instruction is set;
Described first output module, describedly arranging instruction for responding, exporting the identification information input port for inputting identification information;
Described acquisition module, also for obtaining the identification information by the input of described identification information input port;
Described generation module, for generating the second control command of the identification information comprised by the input of described identification information input port;
Described sending module, also for described second control command is sent to described target strings jaws equipment, to make described target strings jaws equipment respond described second control command, the identification information by the input of described identification information input port is set to the identification information of described target strings jaws equipment.
10. the terminal according to claim 6 ~ 8 any one, is characterized in that, described terminal also comprises:
Described second output module, for exporting information input port to be verified;
Described acquisition module, also for obtaining the information to be verified by described information input port to be verified input;
Described judge module, for judging whether described information to be verified matches with default check information;
If described information to be verified and described default check information match, then described acquisition module is according to the serial ports the prestored number mapping relations with the identification information of serial equipment, obtains the serial ports number corresponding with the identification information of described target strings jaws equipment.
CN201510170183.6A 2015-04-10 2015-04-10 A kind of serial port communication method and terminal Active CN104811359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510170183.6A CN104811359B (en) 2015-04-10 2015-04-10 A kind of serial port communication method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510170183.6A CN104811359B (en) 2015-04-10 2015-04-10 A kind of serial port communication method and terminal

Publications (2)

Publication Number Publication Date
CN104811359A true CN104811359A (en) 2015-07-29
CN104811359B CN104811359B (en) 2018-12-07

Family

ID=53695869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510170183.6A Active CN104811359B (en) 2015-04-10 2015-04-10 A kind of serial port communication method and terminal

Country Status (1)

Country Link
CN (1) CN104811359B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868149A (en) * 2016-03-24 2016-08-17 杭州昆海信息技术有限公司 A serial port information transmission method and device
CN107967229A (en) * 2017-12-22 2018-04-27 安徽博微长安电子有限公司 A kind of serial ports automatic identifying method, system and computer-readable recording medium
CN108282545A (en) * 2017-12-26 2018-07-13 北京航天测控技术有限公司 A kind of self-defined reallocating method of serial port and device
CN108509366A (en) * 2018-03-22 2018-09-07 成都泰盟软件有限公司 A kind of embedded intelligence serial port implementing method
CN108809832A (en) * 2017-04-27 2018-11-13 四零四科技股份有限公司 The devices and methods therefor serially routeing is safeguarded when sending work request
CN110895501A (en) * 2019-06-10 2020-03-20 研祥智能科技股份有限公司 Serial port switching method and system
CN111009966A (en) * 2019-11-22 2020-04-14 贵州电网有限责任公司 Data interaction system, method and device of transformer substation equipment and storage medium
CN113284602A (en) * 2020-02-19 2021-08-20 深圳市理邦精密仪器股份有限公司 Serial port information configuration method, monitor and plug-in box
CN113965917A (en) * 2021-10-19 2022-01-21 深圳市元征科技股份有限公司 Communication method, device and terminal equipment
CN114490454A (en) * 2021-12-29 2022-05-13 广州河东科技有限公司 Self-adaptive driving method and device for serial port of equipment and serial port equipment
CN116483751A (en) * 2023-04-06 2023-07-25 河南翔宇医疗设备股份有限公司 Method, device and medium for identifying serial numbers

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570899A (en) * 2004-04-25 2005-01-26 赵红刚 Method for automatic matching communication of computer and serial port external module
CN1835464A (en) * 2005-03-16 2006-09-20 联想(北京)有限公司 Method and system of communicating via bluetooth serial port
CN101465839A (en) * 2008-10-24 2009-06-24 北京蛙视通信技术有限责任公司 Transmission control method and apparatus for serial data
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
CN102542171A (en) * 2012-01-16 2012-07-04 天津市先石光学技术有限公司 Automatic identification device and method for RFID port of electronic health station
US20130219060A1 (en) * 2010-10-04 2013-08-22 Avocent Huntsville Corp. Remote access appliance having mss functionality

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1570899A (en) * 2004-04-25 2005-01-26 赵红刚 Method for automatic matching communication of computer and serial port external module
CN1835464A (en) * 2005-03-16 2006-09-20 联想(北京)有限公司 Method and system of communicating via bluetooth serial port
CN101465839A (en) * 2008-10-24 2009-06-24 北京蛙视通信技术有限责任公司 Transmission control method and apparatus for serial data
CN101719212A (en) * 2009-12-11 2010-06-02 北京飞天诚信科技有限公司 Identification method and device of serial-port card reader
US20130219060A1 (en) * 2010-10-04 2013-08-22 Avocent Huntsville Corp. Remote access appliance having mss functionality
CN102542171A (en) * 2012-01-16 2012-07-04 天津市先石光学技术有限公司 Automatic identification device and method for RFID port of electronic health station

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868149A (en) * 2016-03-24 2016-08-17 杭州昆海信息技术有限公司 A serial port information transmission method and device
CN108809832A (en) * 2017-04-27 2018-11-13 四零四科技股份有限公司 The devices and methods therefor serially routeing is safeguarded when sending work request
CN107967229A (en) * 2017-12-22 2018-04-27 安徽博微长安电子有限公司 A kind of serial ports automatic identifying method, system and computer-readable recording medium
CN108282545A (en) * 2017-12-26 2018-07-13 北京航天测控技术有限公司 A kind of self-defined reallocating method of serial port and device
CN108282545B (en) * 2017-12-26 2020-12-01 北京航天测控技术有限公司 Serial port number user-defined reconfiguration method and device
CN108509366A (en) * 2018-03-22 2018-09-07 成都泰盟软件有限公司 A kind of embedded intelligence serial port implementing method
CN110895501B (en) * 2019-06-10 2024-05-14 研祥智慧物联科技有限公司 Serial port switching method and system thereof
CN110895501A (en) * 2019-06-10 2020-03-20 研祥智能科技股份有限公司 Serial port switching method and system
CN111009966A (en) * 2019-11-22 2020-04-14 贵州电网有限责任公司 Data interaction system, method and device of transformer substation equipment and storage medium
CN113284602A (en) * 2020-02-19 2021-08-20 深圳市理邦精密仪器股份有限公司 Serial port information configuration method, monitor and plug-in box
CN113965917A (en) * 2021-10-19 2022-01-21 深圳市元征科技股份有限公司 Communication method, device and terminal equipment
CN113965917B (en) * 2021-10-19 2024-04-02 深圳市元征科技股份有限公司 Communication method, device and terminal equipment
CN114490454A (en) * 2021-12-29 2022-05-13 广州河东科技有限公司 Self-adaptive driving method and device for serial port of equipment and serial port equipment
CN114490454B (en) * 2021-12-29 2023-07-18 广州河东科技有限公司 Method and device for self-adaptive driving of equipment serial port and serial port equipment
CN116483751A (en) * 2023-04-06 2023-07-25 河南翔宇医疗设备股份有限公司 Method, device and medium for identifying serial numbers

Also Published As

Publication number Publication date
CN104811359B (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN104811359A (en) Serial port communication method and terminal
CN105162820A (en) Data synchronous method and equipment
CN105045085B (en) The control method and intelligent watch of a kind of intelligent watch
CN106502492A (en) A kind of operational approach of application icon and device
EP3598368A1 (en) Financial transaction management system, method, storage medium and server
CN111801731B (en) Voice control method, voice control device, and computer-executable nonvolatile storage medium
CN103942121A (en) Data recovery system and mobile terminal
CN107329927A (en) A kind of data-sharing systems and method
CN105208232A (en) Method and device for automatically making call
CN105050061A (en) Method and device for sending messages on the basis of user voiceprint information
CN105095409A (en) Information processing method and terminal
CN107295153A (en) A kind of management method and terminal for switching logon account
CN104023040B (en) A kind of method and device of information processing
CN112201231A (en) Remote controller and control method and device thereof
CN105678143A (en) Methods and devices for setting and acquiring electronic business card
CN105678144A (en) Screen unlocking method and device and electronic equipment
CN105574400A (en) Information processing method and electronic device
CN105677198B (en) Method for sending information and information transmitting apparatus
CN105871840B (en) A kind of certificate management method and system
CN109684817B (en) Multi-system user management method
CN105978867A (en) Fingerprint authentication method and cloud server
CN103903614A (en) Information processing method and electronic devices
CN108200558A (en) A kind of Bluetooth pairing methods and device
CN107688932A (en) Payment platform transfers method, device and mobile terminal
CN103490874A (en) Safety information interaction system, method, device and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant