Universal USB (Universal Serial Bus)-to-serial equipment control method
暂无分享,去创建一个
The invention relates to a USB (Universal Serial Bus)-to-serial equipment control technique. A universal USB-to-serial equipment control method provided by the invention comprises the following steps that: 1) an application message is monitored; 2) whether the application message is received or not is judged, if not, the step 1 is conducted again, and if so, the next step is conducted; 3) whether the application message is an initialization message or not is judged; 4) a control command is packaged into a message and the message is transmitted to the subprocess of processing equipment; 5) the subprocess parses the message; 6) the subprocess transmits command data to the equipment; 7) the subprocess judges whether the equipment is passive equipment or not; 8) equipment data is received; 9) the equipment data is packaged into a message and the message is transmitted to a main process; and 10) the main process parses the message transmitted by the subprocess to obtain the equipment data, the data is packaged and the data is transmitted to an application. The universal USB-to-serial equipment control method provided by the invention provides a condition for the remote control of the USB-to-serial equipment.