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

Progress and serial equipment communicating method and its device

A technology of device communication and serial port, which is applied in the field of communication, and can solve problems such as serial device idleness, blockage, and inability to use serial device

Inactive Publication Date: 2009-12-16
GUANGDONG VTRON TECH CO LTD
View PDF2 Cites 0 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] This embodiment is a method for the process to communicate with the local serial device, figure 1 It is a flow chart of the method of the present embodiment, which includes 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...

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] Embodiment one and embodiment two are the method that client process communicates with local serial device, and this embodiment is the method that client process communicates with remote serial device, such as figure 2 The flow chart of the method. 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.

[004...

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 and device for communication between a process and a serial port device. The method includes the steps: the service process agent is responsible for opening the serial port and executing the command operation of reading / writing the serial port device, and detecting the state information of the serial port according to the query sent by the client process instruction, detecting the state of the serial port; if the serial port is opened, the client process sends a read / write serial port device command; the service process receives the read / write serial port device command from multiple client processes simultaneously, and executes it first One of the read / write serial device commands operates, and the next read / write serial device command is processed after the operation is successfully completed. In the method of the present invention, multiple processes can make full use of the serial port to communicate with the serial device without causing idleness of the serial device and blocking of client processes.

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 Patents(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