Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Progress and serial equipment communicating method and its device

A device communication, serial port technology, applied in the field of communication, can solve the problem of inability to use serial port devices, serial port devices idle, blocking and other problems

Inactive Publication Date: 2008-07-09
GUANGDONG VTRON TECH CO LTD
View PDF0 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

After process A opens the serial port, it may need to use the serial port device for a long time, so the serial port is always open. Since the serial port can only be used exclusively by one process that opens the serial port within a certain period of time, process B may use it for a long time. There is no way to use the serial device, so it will cause process blocking or reduce the usage of the serial port or even cause the serial device to be idle

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Progress and serial equipment communicating method and its device
  • Progress and serial equipment communicating method and its device
  • Progress and serial equipment communicating method and its device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0022] Present embodiment is the method for process and local serial device communication, and Fig. 1 is the method flowchart of present embodiment, and it comprises the following steps:

[0023] S101. The service process detects the state of the serial port according to the query instruction sent by the client process to detect the state information of the serial port, and sends the state information of the serial port to the client process. There can be multiple client processes.

[0024] S102. If the serial port is on or open, the client process sends a read / write serial port device instruction. There can be multiple client processes.

[0025] S103. The service process receives the instruction for reading / writing the serial port device. Multiple client processes can issue read / write serial device commands to the service process at the same time, and the service process can process the read / write serial device commands in the order in which they are received from the clien...

Embodiment 2

[0033] The present embodiment is the application instance of embodiment one scheme: client process 1 and client process 2 visit the GSM mobile phone that is connected with computer, and client process 1 will read the phone number of mobile phone and client process 2 will send ringtone to mobile phone;

[0034] 1, start client process 1 and client process 2; Create a service process, be responsible for proxy client process to carry out read / write operation to mobile phone, described service process creates receiving and sending thread 1 and receiving and sending thread 2;

[0035] 2. The client process 1 sends query serial port status information to the service process, the receiving and sending thread 1 detects the status of the serial port, and sends the result to the client process 1 through the receiving and sending thread 1, and the client process 1 finds that the serial port is not open, then sends a message to the service The process sends an instruction to open the seria...

Embodiment 3

[0039] Embodiments 1 and 2 are methods for communicating between a client process and a local serial device. This embodiment is a method for communicating between a client process and a remote serial device, as shown in the flow chart of the method shown in FIG. 2 . The method of the present embodiment comprises the following steps:

[0040] S201. The service process detects the state of the serial port according to the query instruction for detecting state information of the serial port sent by the client process through the network, and sends the state information of the serial port to the client process through the network. There may be multiple client processes, which respectively send instructions for detecting the state of the serial port through the network.

[0041] S202. If the serial port is in an open state, the client process sends a read / write serial port device instruction to a remote service process through the network, and there may be multiple client processes...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for process and serial device communication, and a device thereof. The method comprises the steps as follows: a service process agent is responsible for the operation of opening a serial interface and executing an instruction of reading / writing serial device, and detects the state of the serial interface according to an inquiring instruction for detecting serial interface status messages sent by a client process; if the serial interface is opened, the instruction of reading / writing serial device is sent by the client process; the service process receives the instructions of reading / writing serial device sent by a plurality of client processes, one instruction operation of reading / writing serial device is executed first, and the next instruction of reading / writing serial device is processed after the operation is successfully completed. By adopting the method of the invention, a plurality of processes can fully utilize the serial interface and the serial device communication, and the idling of the serial device and the obstruction of the client process are avoided.

Description

technical field [0001] The invention relates to the technical field of communication, in particular to a method and a device for communication between a process and a serial port device. Background technique [0002] With the application and development of computer technology, various computer peripherals are used more and more widely, and the communication methods between computers and peripherals are also becoming more and more diversified, including USB interface, infrared, Bluetooth, serial port, parallel port, etc. In some industrial applications, considering the design cost and environmental requirements, serial ports are still very common in some industrial equipment applications, and it is often encountered that multiple processes need to share a serial port to operate the same serial device. Assume that client process A and client process B need to use serial device 1 at the same time. If process A first communicates with the serial device through the serial port; p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/12G06F9/46H04L29/06
Inventor 刘明华朱建明
Owner GUANGDONG VTRON TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products