The invention generally relates to a control method of embedded system device, and in particular relates to a method of controlling an embedded system device linked to a host computer by standard file I/O.
As shown in
To control the embedded system device 20 through proprietary protocols, additional proprietary class interfaces 2 and 3 are required besides the embedded system controller 22 working with external memory 23 for system control information access and other control processes. Therefore, each time when new features are required, the embedded system controller 22 has to be re-developed. Since the complication of relative technology is getting higher, the development time of embedded system device 20 is also becoming longer. Moreover, this kind of design gives the embedded system controller 22 a large burden that lowers the efficiency of the embedded system device 20.
Therefore, under the conventional structure of embedded system device 20, the software developer requires professional abilities to develop the driver for linking the device 20 to the host computer 10 and accomplishing the control. Meanwhile, in order to control the embedded system device 20 through the host computer 10, the host computer 10 must be installed with driver of the proprietary class interface 2 to provide a proprietary system control interface 1 for user to operate. Also, the proprietary system control interface 1 usually requires a period of learning time for user to accustom to. Therefore, the conventional proprietary protocols are rather complicated for both software developers and users.
As protocol interfaces being continuously developed, nowadays there have been some universal protocol interfaces available for users to develop relative software. For example, Universal Serial Bus (USB) is the most well-supported and widely used interface that almost every host computer 10 has built-in driver for it.
Therefore, to solve to the problem of lacking of friendly human-machine interface for general embedded system devices, a possibility is to utilize the resources of general protocol interfaces and provide an easier operation method for controlling embedded system device 20. The general protocol interface gets rid of inconvenience of proprietary protocols, saves the time of software developer in the unnecessary development of driver, and save the time of users in learning the operation because the user is familiar to the general protocol interface. This is an important issue in the development of future embedded system devices 20.
The object of the invention is to solve the problem of lacking of user-friendly and designer-friendly control interface for general embedded system devices and to provide a method for controlling the embedded system device via standard file I/O from a host computer linked to the embedded system device.
In a preferred embodiment of the invention, an USB is used as a connection interface between the embedded system device and the host computer. A system control file established in the embedded system device that can be read, stored, modified and updated via a file I/O interface accomplishes the management control of the embedded system device.
When the system control file has to be modified as the host computer changes, the invention provides an update manner for synchronous update of the embedded system device. In the same way, when the system control file has to be modified as the embedded system device changes, the invention provides an update manner for synchronous update of the host computer.
The method for controlling embedded system device according to the invention provides an easy-operated interface for users, and saves software development time for the developers so as to be a win-win solution.
The invention will become more fully understood from the detailed description given hereinbelow. However, this description is for purposes of illustration only, and thus is not limitative of the invention, wherein:
The invention provides a method of controlling an embedded system device 20 linked to a host computer 10. In a preferred embodiment, a USB is used as a connection interface between the two.
The software construction of the embedded system controller 22 includes an “embedded system 221” and a “simple serial interface (Master) 222” for communication with the smart I/O controller 21.
The memory 23 is used to store data of the application software, system control file, passwords and so on. The memory can be of flash memory or electrically erasable programmable read only memory (EEPROM). In other embodiments, the memory 23 can also be included in the smart I/O controller 21.
The host computer 10 includes an operation system 11. The software structure includes a “USB Mass Storage Class (USB-MSC) interface 113” corresponding to the smart I/O controller 21 of the embedded system device 20 for parsing the commands and a “USB host controller 114” for communication with the embedded system device 20. The operation system 11 also includes a system control interface 111 and a file I/O interface 112 provided by the application software of the embedded system device 20 for managing the system control file.
FIGS. 2 to 4B illustrate the major control method of an embedded system device of the invention. In which,
In order to assure that legal users take the operations, the method of the invention further includes a step of password verification after the step 100. The process is as follows. The smart I/O controller 21 receives the password transferred by the operation system 11 of the host computer 10, and compares to get a verification result (step 120). If the password is the same of that stored in the memory 23, the verification passes (step 130). Otherwise, the verification fails. When pass, the smart I/O controller 21 of the embedded system device 20 allows data access and replies the verification result to the host computer 10 (step 140). Then, executing said application software from the host computer, generating a standard file I/O command for reading a system control file stored in the memory and displaying the system control file on a system control interface provided by the application software (step 150). On the contrary, when verification fails, re-trials of password input in predetermined times is allowed. In other words, the steps 120 to 130 are repeated (step 160). Other conventional password verification processes can be applied herein.
When the contents of system control file being displayed on the system control interface 111 of the host computer 10, some file management processes are executed as shown in
The process of step 230 is further illustrated in
Practically, the synchronization can be determined by different file status flags. That is, according to different file status flags corresponding to different requirements of file updates, some update contents that do not directly influence the current operation of the embedded system controller 22 do not execute the synchronization.
Besides the controls form the host computer 10 to the embedded system device 20, sometimes the system control file updates have to be executed from the embedded system controller 22 due to operational requirements of the embedded system device 20. In that case, the system control file displayed on the system control interface 111 of the host computer 10 can be influenced. Therefore, the invention also provides a process of managing system control file from the embedded system device 20 as described below.
Referring to
Basically, the synchronization is made each time when the content of system control file changes. However, as described above, different file status flags can be defined for determining whether the synchronization is required or not.
By means of aforesaid methods, the invention is capable of controlling an embedded system device 20 through standard file I/O. The system control file can be managed through either the host computer 10 or the embedded system device 20. Though a data synchronization process, the system control file is kept consistent.
The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
093118500 | Jun 2004 | TW | national |