Peripheral device and data transmission method
Patent Information
- Application Number
- TW112137273
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-09-27
AI Technical Summary
Existing peripheral devices require multiple specific tools for parameter setting and operation, leading to inefficiency and complexity for host devices.
A peripheral device with a USB interface, storage circuit, and instruction parsing unit that simulates as a virtual disk, allowing direct data exchange and operation through a host device without additional tools, using a custom command and update data for settings and updates.
Enables seamless and efficient parameter setting and operation of peripheral devices by simulating as a virtual disk, reducing the need for multiple tools and simplifying the host-device interaction.
Smart Images

Figure TWG2TB001908420_001 
Figure TWG2TB001908420_002 
Figure TWG2TB001908420_003
Abstract
Description
Peripheral Device and Data Transmission Method The present invention relates to a peripheral device, and more particularly to a peripheral device having a Universal Serial Bus (USB) interface. When a host device wants to set parameters of a peripheral device or hopes that the peripheral device performs a specific operation (such as updating code), the host device needs to first install a specific tool, and then after opening the specific tool, it can set the peripheral device through the specific tool. However, different peripheral devices may correspond to different specific tools, resulting in the host device needing to install multiple specific tools. An embodiment of the present invention provides a peripheral device, including a Universal Serial Bus interface, a storage circuit, and an instruction parsing unit. The Universal Serial Bus interface is used to couple to an external host and receive a file data from the external host. The file data includes a custom command and an update data. The storage circuit is used to store a file configuration table and a root directory. The instruction parsing unit analyzes the custom command and operates according to the analysis result. When the custom command is an update command, the instruction parsing unit performs an update operation. The present invention further provides a data transmission method, including determining whether a peripheral device is coupled to an external host; when the peripheral device is coupled to the external host, the peripheral device simulates as a virtual disk; outputting an update file data to the peripheral device to update a specific information of the peripheral device. The update file data includes a file location data and a data content. The data content includes a custom command and an update data. The data transmission method of the present invention can be implemented via the operating system of the present invention, which is hardware or firmware capable of performing specific functions, or can be recorded in a recording medium in the form of code and combined with specific hardware for implementation. When the code is loaded and executed by an electronic device, a processor, a computer, or a machine, the electronic device, the processor, the computer, or the machine becomes an external host and a peripheral device for implementing the present invention. To make the objectives, features, and advantages of the present invention more apparent and understandable, the following specifically provides embodiments and, in conjunction with the accompanying drawings, makes a detailed description. The specification of the present invention provides different embodiments to illustrate the technical features of different implementation manners of the present invention. Among them, the configuration of each component in the embodiment is for illustrative purposes and is not intended to limit the present invention. In addition, the partial repetition of the reference numerals in the drawings in the embodiments is for the purpose of simplifying the description and does not mean the关联性 between different embodiments. FIG. 1 is a schematic diagram of the operating system of the present invention. As shown in the figure, the operating system 100 includes an external host 110 and a peripheral device 120. When the peripheral device 120 is connected to the external host 110, the peripheral device 120 is simulated as a virtual disk. Therefore, to the external host 110, the peripheral device 120 is a general disk drive. The external host 110 may directly write an update data to the peripheral device 120, or directly read the settings of the peripheral device 120, without the need to open any additional tools. Taking the Microsoft operating system Windows as an example, when the peripheral device 120 is connected to the external host 110, the peripheral device 120 is simulated as a disk G. The user may drag a file content 132 to the peripheral device 120 through the mouse. Therefore, the external host 110 outputs file data 130 to the peripheral device 120. In this embodiment, the external host 110 generates the file data 130 according to the characteristics of a file allocation table (FAT). In a possible embodiment, the file data 130 includes a file location data 131 and a file content 132. In some embodiments, the file content 132 includes a custom command and a piece of data. The peripheral device 120 analyzes the custom command and performs a specific operation according to the analysis result, such as storing the data or updating an internal data (such as a time information) using the data. The present invention does not limit the architecture of the external host 110. In a possible embodiment, the external host 110 is a personal computer (PC) or a notebook computer. In some embodiments, the external host 110 includes a transmission interface 111 for coupling to the peripheral device 120. The present invention does not limit the type of the transmission interface 111. In a possible embodiment, the transmission interface 111 is a universal serial bus (USB) interface. In this embodiment, the peripheral device 120 includes a transmission interface 121. The transmission interface 121 is used to receive the file data 130. The present invention does not limit the type of the transmission interface 121. The type of the transmission interface 121 is the same as that of the transmission interface 111. In a possible embodiment, the transmission interface 121 is a USB interface. In other embodiments, the peripheral device 120 further includes an instruction parsing unit 123. The instruction parsing unit 123 analyzes a custom command in the file content 132 and acts according to the analysis result. For example, when the custom command in the file content 132 is an update command, it means that the external host 110 wants to update the settings of the peripheral device 120. Therefore, the instruction parsing unit 123 performs an update operation. In a possible embodiment, when the custom command of the file content 132 is an update command, the instruction parsing unit 123 updates a time information using the data of the file content 132. For example, the peripheral device 120 may have a real-time clock (not shown). The instruction parsing unit 123 uses the data of the file content 132 to correct the time information of the Real Time Clock (RTC). In this example, the peripheral device 120 does not retain the file content 132. Therefore, when the peripheral device 120 is powered on again, the peripheral device 120 does not have the file content 132. In this embodiment, the external host 110 only needs to provide the file content 132 (or called the time correction file) to the peripheral device 120 to achieve the purpose of time correction, without the need to develop and maintain the tools at the USB host side. In another possible example, when the custom command of the file content 132 is an update command, the instruction parsing unit 123 may update a wallpaper screen using the data of the file content 132. For example, after the peripheral device 120 is powered on, it may present a first wallpaper screen. After updating the wallpaper screen, the peripheral device 120 presents a second wallpaper screen. In this example, the external host 110 only needs to write the data of the file content 132 (or called the update file) to the peripheral device 120 to update the peripheral device 120. In this example, the peripheral device 120 retains the data of the file content 132 (i.e., the second wallpaper screen). In other embodiments, the peripheral device 120 further includes a storage circuit 122. The storage circuit 122 includes a startup information 141, a File Allocation Table (FAT) 142, a root directory 143, and data contents D1~D4. In a possible embodiment, the storage circuit 122 includes a memory controller 124 and a storage space 125. The memory controller 124 stores the startup information 141 starting from the sector 0 of the storage space 125. Therefore, the sector 0 is also called a boot sector. The peripheral device 120 is simulated as a virtual disk according to the file location data 131, the File Allocation Table 142, and the root directory 143. In some embodiments, the memory controller 124 stores the File Allocation Table 142 starting from the sector 6 of the storage space 125, and stores the root directory 143 starting from the sector 8. The File Allocation Table 142 is used to record the storage address, file size, and file name of each external data. The root directory 143 records a root directory and its subdirectories. In a possible embodiment, since the free sectors of the storage space 125 are not continuous, the memory controller 124 divides the file content 132 into data contents D1~D4, and stores the data contents D1~D4 in non-continuous free sectors starting from the sector 40. In some embodiments, the external host 110 first reads the root directory 143 to know which directory a specific data is stored in, and then according to the file allocation table 142, knows the actual address of the specific data. In this example, the external host 110 analyzes the root directory 143 and the file allocation table 142 to generate file location data 131, and provides the file location data 131 to the peripheral device 120. The peripheral device 120 analyzes the file content 132 provided by the external host 110 to determine whether there is a valid instruction. When the file content 132 has a valid instruction, the peripheral device 120 provides the specific data required by the external host 110. In some embodiments, even if the specific data is stored in discontinuous sectors, the memory controller 124 can still read the specific data (such as D1~D4) in the discontinuous sectors according to the file location data 131. FIG. 2 is an operation schematic diagram of the external host 110 of the present invention sending a command to the peripheral device 120. For convenience of explanation, it is assumed that the external host 110 uses the Windows operating system. When the peripheral device 120 is connected to the external host 110, the external host 110 regards the peripheral device 120 as a disk G. At this time, the disk G is empty. When the user drags a file (such as CMD_Write_4K.bin) to the disk G, the external host 110 outputs the file (such as CMD_Write_4K.bin) to the peripheral device 120. The instruction parsing unit 123 analyzes the file content 132 of the file data (such as CMD_Write_4K.bin) provided by the external host 110 to determine whether there is a valid instruction. When the file content 132 has a valid instruction, the instruction parsing unit 123 operates according to the file content 132. In a possible embodiment, the instruction parsing unit 123 performs an update operation according to the data of the file content 132, such as updating a time information or updating a wallpaper screen. In some embodiments, the peripheral device 120 may replace a specific data (such as a wallpaper screen) in the storage circuit 122 with the data of the file content 132. FIGS. 3A and 3B are operation schematic diagrams of the external host 110 reading the peripheral device 120. Please refer to FIG. 3A. When the user drags a file data (such as CMD_Read_4K.bin) to the disk G, the external host 110 outputs the file location data 131 and the file content 132 to the peripheral device 120. The instruction parsing unit 123 analyzes whether the file content 132 provided by the external host 110 has a valid instruction. When the file content 132 has a valid instruction, the instruction parsing unit 123 reads the data content required by the external host 110. In FIG. 3B, the instruction parsing unit 123 requests a data pool 126 to return corresponding data content to the external host 110. The user can use the external host 110 to read a corresponding file from the magnetic disk G (i.e., the peripheral device 120). In other embodiments, the instruction parsing unit 123 requests the storage circuit 122 to provide a specific piece of information (or read data), and outputs the read data to the external host 110 through the universal serial bus interface 121. In some embodiments, after the external host 110 outputs the file content 132 to the peripheral device 120 to set the specific data to be read, the corresponding file is read to obtain the data content. The storage circuit 122 outputs the specific data to the external host 110. In a possible embodiment, the user learns the internal setting value of the peripheral device 120 based on the specific data read by the external host 110. Through the internal setting value, the user learns whether the peripheral device 120 has an abnormality and the reason for the abnormality. The present invention does not limit the architecture of the storage circuit 122. In a possible embodiment, the storage circuit 122 includes a volatile memory (not shown) for storing a file allocation table 142 and a root directory 143. The present invention does not limit the type of volatile memory. In a possible embodiment, the file allocation table 142 and the root directory 143 are stored in a static random access memory (SRAM). In another possible embodiment, the storage circuit 122 further includes a non-volatile memory (not shown). In this example, the non-volatile memory is used to store an update data, such as a wallpaper screen. FIG. 4 is a flowchart of the data transmission method of the present invention. The data transmission method of the present invention can exist through code. When the code is loaded and executed by a machine, the machine becomes an operating system for implementing the present invention. First, it is determined whether a peripheral device is coupled to an external host (step S411). In a possible embodiment, the peripheral device has a USB interface for connecting to the external host. When the peripheral device is not yet coupled to the external host, return to step S411 to continue detecting whether the peripheral device is coupled to an external host. When the peripheral device is coupled to the external host, the peripheral device is simulated as a virtual disk (step S412). Then, the external host outputs an updated file data to the peripheral device to update a specific piece of information of the peripheral device (step S413). In some embodiments, the updated file data includes a file location data and a data content (or a file content). The data content includes a custom command and an update data. In a possible embodiment, the peripheral device analyzes whether the file content from the host includes a valid instruction. If so, the peripheral device corrects a time information using the update data. In another possible embodiment, the peripheral device updates a specific data, such as a wallpaper screen, using the update data. In this example, the peripheral device stores the update data. In other embodiments, when an external host wants to read data from a peripheral device, the external host sends a file of data to the peripheral device. In this example, after receiving the file of data, the peripheral device first determines whether the file content of the file of data has a valid instruction. If so, the peripheral device extracts the relevant data and returns the extracted data to the external host. The external host may determine whether the peripheral device is operating normally or whether the settings of the peripheral device are correct based on the returned file provided by the peripheral device. It must be understood that when an element or layer is referred to as being "coupled" to another element or layer, it can be directly coupled or connected to other elements or layers, or there can be other elements or layers in between. Conversely, when an element or layer is "connected" to another element or layer, there will be no other elements or layers in between. The data transmission method of the present invention, or a specific type or a part thereof, may exist in the form of code. The code can be stored in a physical medium, such as a floppy disk, a CD-ROM, a hard disk, or any other machine-readable (such as computer-readable) storage medium, or is not limited to a computer program product in an external form. Wherein, when the code is loaded and executed by a machine, such as a computer, this machine becomes an external host or a peripheral device for participating in the present invention. The code can also be transmitted through some transmission media, such as wires or cables, optical fibers, or any transmission type. Wherein, when the code is received, loaded, and executed by a machine, such as a computer, this machine becomes an external host or a peripheral device for participating in the present invention. When implemented in a general-purpose processing unit, the code combines with the processing unit to provide a unique device that operates similarly to an application-specific logic circuit. Unless otherwise defined, all terms (including technical and scientific terms) herein shall have the ordinary understanding of those of ordinary skill in the technical field to which the present invention pertains. In addition, unless explicitly stated, the definitions of terms in a general dictionary shall be interpreted as being consistent with their meanings in the context of the articles in the relevant technical field, and shall not be interpreted in an ideal state or an overly formal tone. Although terms such as "first", "second", etc. may be used to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person of ordinary skill in the technical field to which the present invention pertains can make some modifications and refinements without departing from the spirit and scope of the present invention. For example, the systems, devices, or methods described in the embodiments of the present invention can be implemented in physical embodiments of hardware, software, or a combination of hardware and software. Therefore, the protection scope of the present invention shall be subject to that defined by the appended claims. 100: Operating System 110: External Host 120: Peripheral Device 130: File Data 131: File Location Data 132: File Content 111, 121: Transmission Interface 123: Instruction Analysis Unit 122: Storage Circuit 141: Startup Information 142: File Allocation Table 143: Root Directory D1~D4: Data Content 124: Memory Controller 125: Storage Space 126: Data Pool S411~S413: Steps Figure 1 is a schematic diagram of the operating system of the present invention. Figure 2 is an operation schematic diagram of the external host of the present invention sending commands to the peripheral device. Figures 3A and 3B are operation schematic diagrams of the external host reading the peripheral device. Figure 4 is a flowchart of the data transmission method of the present invention. 110: External Host 122: Storage Circuit 131: File Location Data 132: File Content 123: Instruction Analysis Unit 141: Startup Information 142: File Allocation Table 143: Root Directory
Claims
1. A peripheral device, comprising: A general sequence bus interface is provided for coupling to an external host and receiving file data from the external host, the file data including file location information and file content, the file content including a custom command and update data; a storage circuit for storing a file configuration table and a directory; and an instruction parsing unit for analyzing the custom command and acting according to the analysis results, wherein: when the custom command is an update command, the instruction parsing unit performs an update operation, and the file data is generated according to the characteristics of the file configuration table.
2. The peripheral device as claimed in claim 1, wherein the storage circuitry includes: A volatile memory is used to store the file configuration table and the root directory.
3. The peripheral device as claimed in claim 2, wherein the storage circuitry further includes: A non-volatile memory is used to store the updated data.
4. The peripheral device as claimed in claim 3, wherein the storage circuitry further includes: A memory controller reads the file configuration table and the root directory based on a location data of the file data, in order to write the updated data to a specific address of the non-volatile memory.
5. A data transmission method, comprising: Determine whether a peripheral device is coupled to an external host; When the peripheral device is coupled to the external host, the peripheral device is simulated as a virtual disk; Based on the characteristics of a file configuration table, an update file is generated; and the update file is output to the peripheral device to update specific information of the peripheral device, wherein: the update file includes file location information and data content, the data content includes a custom command and update data, and the peripheral device includes an instruction parsing unit for analyzing the custom command and updating the specific information based on the analysis results.
6. The data transmission method as described in request item 5 further includes: The updated data is stored in the peripheral device.
7. The data transmission method as described in request item 5 further includes: A second file is sent to the peripheral device through a Universal Sequence Bus interface; And receive a return file provided by the peripheral device.
Citation Information
Patent Citations
Embedded type file system suitable for smart card application environment
CN101441634A
Data storage system and method
TW201104470A
Data processing method, memory controller and memory storage device
TW201329712A
Information recording apparatus, imaging apparatus, information updating method, and program
US20110196904A1
File page table management technology
US20200334169A1