CN1869855A - Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment - Google Patents
Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment Download PDFInfo
- Publication number
- CN1869855A CN1869855A CN 200510012541 CN200510012541A CN1869855A CN 1869855 A CN1869855 A CN 1869855A CN 200510012541 CN200510012541 CN 200510012541 CN 200510012541 A CN200510012541 A CN 200510012541A CN 1869855 A CN1869855 A CN 1869855A
- Authority
- CN
- China
- Prior art keywords
- command
- usb mass
- mass memory
- data
- write
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
A method for carrying out command interaction and two-way data transmission between USB large capacity storage and application program on said storage includes enabling to set up new file at readable-reloadable region of USB movable storage and enabling to write data in it and to fetch out data from it by user with utilizing operation system so as to realize command interaction and two-way data transmission between application program and USB large capacity storage by specifying data format and length as well as new file read-write position of read-write data buffer region.
Description
Affiliated technical field
The present invention relates to realize between a kind of a kind of upper application software of USB mass memory unit technical field and the equipment method of two-way data communication.Particularly a kind of user of having logins the operating system of safety certification and rights management such as Windows2000, the above version of Windows XP, how unauthorized user makes Application Software Program that the USB mass memory unit is sent order, thereby realizes that USB mass memory unit application program and USB mass memory unit carry out the method for command interaction and bidirectional data transfers.
Background technology
Understanding relational language for ease of the present invention is explained as follows:
1:USB mass memory unit: a kind of removable mass memory unit of supporting USB mass memory unit agreement.As common flash disk (USB Flash Disk), portable hard drive equipment such as (USB Hard Disk).
2. operating system unauthorized user: be meant the operating system login user since operating system to user's default privilege management, make with its identity create or the application software of operation to system equipment not read-write or write permission, thereby interface that can not provide by operating system and method realize command interaction and bidirectional data transfers with system equipment.
3.SCSI: being small computer system interface (Small Computer System Interface) abbreviation, is order control and the Data Transport Protocol between computer logic block device and the main frame.
4.RBC: being the english abbreviation of simplifying block command (Reduced Block Command), is the scsi command of simplifying, and is to simplify control command and Data Transport Protocol between computer logic block device and the main frame.
5.WRITE10: be to simplify block command to concentrate the write order sign indicating number of main frame, be sexadecimal 0x2A block device.
6.READ10: be to simplify block command to concentrate the read command sign indicating number of main frame, be sexadecimal 0x28 block device.
7.LUN: the apparatus logic unit number.
8.LBA: the LBA (Logical Block Addressing) of equipment read-write.
Current, along with popularizing of USB mass memory unit, many application demands also constantly combine with it, so that characteristics such as movability, convenience and practicality are provided for application.The many special applications of needs have just appearred in (USBFlash Disk) as flash disk.Theoretically, all movably the USB mass memory unit can develop various special applications.When developing various application program on the USB mass memory unit, upper application software need and be carried out command interaction and data transmission between the USB mass memory unit, so that application program can correctly and be discerned the USB mass memory unit of being supported.On various operating systems, system all provides the communication port based on the USB mass memory unit, and most operating systems all are to adopt the scsi command agreement to remove visit and control USB mass memory unit.Such as in Windows 2000 above NT kernel platform operating systems, by equipment input, output control interface access means, as long as bidding protocol is RBC agreement and formal definition according to SCSI, then the proprietary protocol of the order of protocol definition and user oneself definition can send to the USB mass memory unit by this command channel, as flash disk logical block equipment such as (USB Flash Disk).
Concentrate at scsi command, the command code of WRITE10 and READ10 is respectively sexadecimal 0x2A and 0x28, and the command parameter of WRITE10 is apparatus logic unit number (LUN), the LBA (Logical Block Addressing) (LBA) of equipment read-write, and data write length.
When the main control chip of USB mass memory unit receives the scsi command of WRITE10, by analyzing LBA (Logical Block Addressing) (LBA) and apparatus logic unit number (LUN) and the data length that above-mentioned parameter obtains writing, after receiving data, the Data Receiving port just writes this data then to the address of appointment.If data length surpasses the length restriction that chip once can hold, then can receive in batches and write.
The command parameter of READ10 is the same with WRITE10, also be apparatus logic unit number (LUN, the LBA (Logical Block Addressing) (LBA) of equipment read-write, data read length, when the main control chip of the removable mass memory unit of USB receives the scsi command of READ10, by analyzing LBA (Logical Block Addressing) (LBA) and the apparatus logic unit number (LUN) and the data length of the equipment read-write that above-mentioned parameter obtains writing, then to data sending terminal mouth transmission data, up to sending data designated length.If data length surpasses the length restriction that chip once can hold, then can send in batches.
Although various operating systems provide above-mentioned identical or close SCSI logical block device command send mode, but for secure operating system with user authority management, if, then be not all right in this way if the establishment of application program or operator do not have relevant device access authority.Be typically, the NT kernel operations system more than Windows2000 if send order for logical block equipment by equipment input and output control interface, then needs the access limit of this equipment.If but the user is common guest (Guest) or common group of (User) user, operating system acquiescence is what not authorized the access limit of logical device, therefore, need the keeper that these users are added the equipment access limit, otherwise application program will be failed to the visit of equipment.
Along with popularizing of USB mass memory unit, its convenience, movability and practicality obtain the favor of users and software vendor, and various application programs based on this kind equipment plug and play are also constantly increasing.This class application program with carrying out command interaction and data transmission between the equipment, generally just needs by above-mentioned RBC agreement and scsi command passage if desired.If but the user of the equipment of giving is equipment unauthorized read-write user or non-administrative users when the register system, although built-in programs menu or order user by operating system can realize the data file of moveable magnetic disc equipment is stored, but but can't in the application program that the third party creates, send scsi command control and access means, therefore also just can not normally run application, perhaps function of application is subjected to certain limitation.And the system login user is non-administrator's a situation is very general, computer operating system as Internet bar, public place, each office worker of large enterprises, the use of government work department, the network manager only provides domestic consumer's account number to the user in order to guarantee the safe handling of operating system.Therefore, the various application programs on the USB mass memory unit need solve how to visit under the unauthorized user with opertaing device be very important, also be very urgent.At present, common solution has following several:
1 writes specialized apparatus filtration drive or system's backstage service routine.The shortcoming of this method be drive or service routine must be earlier by can the installation system driving or the user such as the keeper of service routine authority install.Therefore, it is unacceptable needing can normally be used by driving of user installation such as keeper or service routine earlier for the application program on the USB magnanimity movable memory equipment.
2 install its application program with keeper's identity earlier, create special user's account number simultaneously.When non-administrative users was logined, application program was still with this special user's identity access means.Such shortcoming is still apparent in view, does not still accomplish plug and play for the application program on the such movable memory equipment of USB, is inconvenient to the user.
The content of invention
The purpose of this invention is to provide a kind of method: based on the application software of USB mass memory unit when carrying out the order communication with equipment, even the login user identity is also can pass through this method to the non-administrative users that this equipment does not have an access limit, realize the mutual and bidirectional data transfers of control command.That is to say that upper application software can send order by this method, realize to the equipment transmitting control commands or write private data, also can slave unit related data be read to supply and use and analyze with program.
The present invention solves the technical scheme that its technical matters takes: application program and USB mass memory unit carry out the method for command interaction and bidirectional data transfers on the USB mass memory unit, be to utilize the operating system Any user can create new file in the read-write district of USB mass memory unit also can write and this characteristic of reading of data to it by communications protocol, read-write Logical Disk at the USB mass memory unit is created a unrepeatable new file, then the parameter of scsi command and deposit data in the write command data buffer of new file, when the main control chip application program of USB mass memory unit receives the SCSI write order WRITE10 that writes of new file and data that appointment writes length, it is not common data that the data that analysis writes are found, but the scsi command that contains prescribed form identifies and parameter, then unactual these data that write, but carry out its specified command, if command execution is correct, then return application layer and write success, otherwise return error message, application layer is being received the file of deleting firm establishment after write command is finished immediately, from USB mass memory unit reading of data, then needed to adopt two steps to realize, the first step is to create new file, the back writes the prescribed form data that contain order to new file, when receiving the scsi command WRITE10 of this file, the main control chip software of USB mass memory unit finds by analyzing, be need be to the special command of upper strata return data, therefore will keep the LBA (Logical Block Addressing) (LBA) that apparatus logic unit number (LUN) and equipment are read and write in this WRITE10 command parameter and return and be finished, second step was that and then upper level applications sends a scsi command READ10, this order must guarantee that the apparatus logic unit number (LUN) of this command parameter is the same with the WRITE10 of the first step with the LBA (Logical Block Addressing) (LBA) of equipment read-write, the main control chip software of USB mass memory unit is receiving the READ10 order like this, the LBA (Logical Block Addressing) (LBA) of finding the apparatus logic unit number (LUN) of its parameter and reading and writing is the same with last WRITE10 order, then return the data of the scsi command needs of appointment in last the WRITE10 data buffer, above-mentioned normal read write order can guarantee that the main control chip software of USB mass memory magnanimity equipment is when analyzing scsi command WRITE10 and READ10, both can realize the normal read write order of equipment, realized simultaneously under the operating system unauthorized user, application program can be by the read-write operation of file, other scsi commands of carrying and data in its read write command WRITE10 and READ10 data buffer, the command interaction of realization application program and USB mass memory magnanimity equipment.
The method that USB mass memory unit application program and USB mass memory unit carry out command interaction and bidirectional data transfers also comprises:
The new file of creating in the read-write Logical Disk of USB mass memory unit, filename is to adopt each sequence number character string of calculating global unique 16 bytes of the variation of obtaining, and new file is made as non-shared read-write properties, at the new file that the read-write Logical Disk of USB mass memory unit is created, file extension adopts the extension name of definition separately or random variation.
The new files specify form of creating in the read-write Logical Disk of USB mass memory unit, wherein WRITE10 command specifies form is in proper order: command id head, command sequence number, command operation sign indicating number, command parameter district, unnecessary byte regions, order write the data field, and READ10 command specifies form is in proper order: command id head, command sequence number, unnecessary byte regions, order write the data field.
The command id head of the described new file of creating in the read-write Logical Disk of USB mass memory unit of new files specify form is 0xx55aa55aa555342.
The command sequence of the new files specify form of creating in the read-write Logical Disk of USB mass memory unit number is the unique sequence numbers of 16 bytes.
Odd-multiple, 512 bytes, 1536 bytes or 2560 bytes that the new files specify length of the new files specify form of creating in the read-write Logical Disk of USB mass memory unit is 512 bytes.
If the new files specify length of the new files specify form of creating in the read-write Logical Disk of USB mass memory unit is 1536 bytes, then when sending the WRITE10 order, byte allocation is: command id head, command sequence number, command operation sign indicating number, command parameter district, unnecessary byte regions account for 512 bytes altogether, unnecessary byte regions is a unappropriated unnecessary byte in 512 bytes, can be made as zero, order writes the data field and takies 1024 bytes; Sending the READ10 order, byte allocation is: command id head, command sequence number, and unnecessary byte regions accounts for 512 bytes, and unnecessary byte regions is a unappropriated unnecessary byte in 512 bytes, can be made as zero, and order reading of data district takies 1024 bytes,
USB mass memory unit master chip application logic flow process write order is: receive that WRITE10 order total data--judges whether to be that specified length data--judged result "No"--enter normal data write operation flow process, judged result "Yes"---judgement command id head, command sequence number, the command operation sign indicating number, in whole bytes in command parameter district whether the command id head is arranged, the command operation sign indicating number, the judged result "No"---enter normal data to write flow process, judged result: "Yes"---analysis command parameter, preserve its apparatus logic number and address and command sequence number, receive remaining byte data then--this command request of-processing, and reservation command parameter information, use in order to next bar read command--judge command process whether correct--judged result "No"---enter the command process error message is set, the judged result "Yes"---the execution result data are set for correctly.Read command is: receive READ10 order total data--judges whether to be specified length data--judged result "No"---enter normal data to read flow process, whether judged result "Yes"---judgment device logic number and address be number identical with the address with the write order apparatus logic of preserving, the judged result "No"---normal data read operation flow process entered, the judged result "Yes"----carry out last and have the command request that identical apparatus logic number and address read order are preserved---send and contain the command id head, whole bytes in command sequence number and the unnecessary byte regions send to the data equipment port--the remaining byte data that warning order need be returned also sends to the designated equipment port---the execution result data are set for correct
USB mass memory unit main control chip application program is when treatment S CSI order WRITE10, to needing the special control command of return data, the apparatus logic unit number (LUN) of this WRITE10 order indication, equipment read-write LBA (Logical Block Addressing) (LBA), command sequence number and command parameter should be saved in one or more special-purpose data variable
During USB mass memory unit reading of data, the apparatus logic unit number (LUN) of the READ10 order that the apparatus logic unit number (LUN) and second of the WRITE10 order of the then necessary assurance first step goes on foot is identical, and the read-write LBA (Logical Block Addressing) (LBA) of the READ10 order that the read-write LBA (Logical Block Addressing) (LBA) that the WRITE10 of the first step orders and second goes on foot is identical or exist fixed function to concern.
After the command process that USB mass memory unit main control chip is carried out is finished, close and delete the new file of creating in the read-write Logical Disk of USB mass memory unit immediately.
The invention has the beneficial effects as follows: solved on the operating system with the management of user log-in authentication and security permission, the user of unauthorized device visit creates or how the third party application of operation carries out this key issue of command interaction of bidirectional data transfers with the USB mass memory unit.The most important effect of the present invention is to have avoided the user of unauthorized device visit no longer to need the administrator special driving is installed or other application programs can start the operation third party application, realize that itself and USB mass memory unit carry out the mutual and bidirectional data transmission function of various command, for this class application program provides removable, convenient and reliable running environment, has " plug and play " characteristic of running software.Simultaneously also greatly facilitate the use of user, reduced the software installation administration difficulty of keeper computing machine to this class application program.
Embodiment:
The knot accompanying drawing describes the present invention below
Accompanying drawing 1 is a method embodiment USB mass memory unit application software treatment scheme of the present invention.
Accompanying drawing 2 is a method embodiment USB mass memory unit application program scsi command WRITE10 flow processing of the present invention.
Accompanying drawing 3 is a method embodiment USB mass memory unit application program scsi command READ10 flow processing of the present invention
The invention is to have utilized operating system can allow any user at the USB mass memory unit Read-write district create new file and can writing and this characteristic of reading out data to it, by the regulation agreement The data such as the data format, length of buffering area and new file read-write position that read and write data, having realized should Carry out the mutual and bidirectional data transfers of various command with program and USB mass memory unit.
In the operating system of Windows2000 and above version, any user is can be at USB Create new file on the mass memory unit, as long as disk space is enough, also be not write-protected simultaneously. The read-write of new file after processing through operating system, all sum up in the point that at last scsi command WRITE10 and READ10.
When needs when the USB mass memory unit sends scsi command and concentrates the WRITE10 order, on the read-write Logical Disk of USB mass memory unit, create a new file earlier, then the parameter of scsi command and deposit data in the WRITE10 order data buffer zone of new file, when the scsi command that the main control chip software of USB mass memory unit receives new file concentrates WRITE10 order and regulation to write the data of length, find it is not common data if analyze the data that write, but the scsi command that contains prescribed form identifies and parameter, then unactual these data that write, but carry out its specified command, if command execution is correct, then return application layer and write success, otherwise return error message, application layer is being received the new file of deleting establishment after write command is finished immediately.As not deleting the new file of creating immediately, the main control chip of USB mass memory unit needs constantly to analyze the WRITE10 order, have a strong impact on for normal file storage efficient like this, simultaneously, also can't be by the WRITE10 order from USB mass memory unit reading of data.
When needs when the USB mass memory unit sends scsi command and concentrates the READ10 order, then needed to adopt two steps to realize, the first step is to create a new file earlier on the read-write Logical Disk of USB mass memory unit, writing the prescribed form data that contain order to the new file of creating, when receiving the scsi command WRITE10 of this file, the main control chip software of USB mass memory unit finds by analyzing, be therefore will keep the LBA (Logical Block Addressing) (LBA) and the apparatus logic unit number (LUN) of equipment read-write in this WRITE10 command parameter and to return being finished to the special command of upper strata return data.Second step was that and then upper level applications sends a scsi command READ10, this order must guarantee that the LBA (Logical Block Addressing) (LBA) of equipment read-write of this command parameter is the same with the WRITE10 of the first step with apparatus logic unit number (LUN), the main control chip software of USB memory device is receiving the READ10 order like this, it is the same to find that the LBA (Logical Block Addressing) (LBA) of equipment read-write of its parameter and apparatus logic unit number (LUN) and last WRITE10 order, and then returns the data of the scsi command needs of appointment in last the WRITE10 data buffer.
Above-mentioned two operations can guarantee that the main control chip software of USB mass memory magnanimity equipment is when analyzing concentrated WRITE10 of scsi command and READ10, both can realize the normal read write order of equipment, realized simultaneously under the operating system unauthorized user, application program can be by the read-write operation of new file, concentrate other scsi commands of carrying and data in WRITE10 and the READ10 order data buffer zone at its scsi command, realize that application program and the device command of USB mass memory magnanimity are mutual.
In order to guarantee that method of the present invention can be efficient, reliability service, guarantee upper level applications software can and the USB mass memory unit between the correct command interaction of realizing, when needs send scsi command, on the read-write Logical Disk of USB mass memory unit, create a new file, should guarantee it is original and unrepeatable new file on the equipment, and prevent that other application program from also creating same file, guarantee the exclusiveness of new file read-write operation, the new filename of creating adopts each sequence number character string of calculating global unique 16 bytes of the variation of obtaining, the file extension of new file adopts the extension name of definition separately or random variation, and new file is made as non-shared read-write properties.
Method of the present invention is fixing as far as possible at concentrated WRITE10 of its scsi command and READ10 order data buffer data length, and the reading and writing data length that adopts operating system to be of little use, being convenient to USB mass memory unit main control chip software can be efficient as far as possible when analyzing, accurately with normally equipment WRITE10 and READ10 command area separate, in order to guarantee that method of the present invention reduces the normal read-write effectiveness affects of equipment as far as possible and when guaranteeing the handling capacity of data transmission, can guarantee that also its normal read-write effectiveness affects to equipment is minimum.Reading and writing data length adopts the odd-multiple 512,1536 or 2560 bytes of 512 bytes, and above-mentioned data are to be of little use in the file WRITE10 of operating system and READ10 order, and can guarantee the handling capacity of data transmission.
Method embodiment WRITE10 order data buffer zone of the present invention adopts 1536 bytes, and prescribed form is:
Method embodiment READ10 order data buffer zone of the present invention adopts 1536 bytes, and prescribed form is:
Above-mentioned formal definition of method embodiment of the present invention and data length as can be known, the data that each WRITE10 and READ10 order can be transmitted are 1024 bytes to the maximum except command code and parameter, if surpass this byte, must circulate several times and finish.
Method embodiment of the present invention is in above-mentioned WRITE10 and READ10 order data buffer zone prescribed form, WRITE10 and READ10 order data buffer zone head contain special command Data Identification head, its objective is that being convenient to USB mass memory unit main control chip software can accurately distinguish buffer zone and whether contain special command when analyzing the WRITE10 order.Application program is when reading of data, and USB mass memory unit main control chip software also should be filled in special command marking head data at return data buffer zone head.
Method embodiment of the present invention is in above-mentioned WRITE10 and READ10 order data buffer zone prescribed form, the globally unique command sequence number of 16 bytes is contained in the data buffer of WRITE10 and READ10 order, its objective is and be convenient to USB magnanimity in order further to protect the reliability of method just of the present invention the time to the equipment reading of data, can be when the new file of creating writes data transmission WRITE10 order in the first step, in the data buffer, insert global unique command sequence number of 16 bytes, USB mass memory unit main control chip software is being analyzed this sequence number of WRITE10 order back preservation, like this when second step of following sends READ10 order fetch equipment specific data, USB mass memory unit main control chip software also inserts the unique sequence number in this 16 byte whole world simultaneously in the return data buffer zone, whether be data that USB mass memory unit main control chip software return to upper level applications software if can discern like this.
Method embodiment of the present invention is when USB mass memory unit reading of data, the apparatus logic unit number (LUN) of READ10 with next step of WRITE10 order that guarantees the first step is the same, and the LBA (Logical Block Addressing) of read-write (LBA) exists certain calculable functions to concern.This logical relation is defined as follows: be y if suppose the LBA (Logical Block Addressing) (LBA) of the read-write of the second step READ10, the LBA (Logical Block Addressing) of the read-write of first step WRITE10 (LBA) is x, then y=f (x)., f is the calculable functions relation between x and the y.The simplest funtcional relationship is y=x described above, and promptly the LBA (Logical Block Addressing) of two read-writes (LBA) is the same.
Method embodiment USB mass memory unit main control chip application program of the present invention is when treatment S CSI order WRITE10, to needing the special control command of return data, the command sequence of the LBA (Logical Block Addressing) (LBA) of the apparatus logic unit number (LUN) of this WRITE10 order indication, read-write, 16 bytes number and command parameter should be saved in one or more special-purpose data variable, being used to find is the special control command of the data that need return, as judging whether it is special WRITE10, subsidiary condition of READ10 order.
Claims (11)
- Application program and USB mass memory unit carry out the method for command interaction and bidirectional data transfers on 1 one kinds of USB mass memory units, it is characterized in that: the method for described command interaction and bidirectional data transfers is, utilizing the operating system Any user to create new file in the read-write district of USB mass memory unit by communications protocol also can write and this characteristic of reading of data to it, read-write Logical Disk at the USB mass memory unit is created a unrepeatable new file, then the parameter of scsi command and data in accordance with regulations form leave in the write command data buffer of new file, when the main control chip application program of USB mass memory unit receives the SCSI write order WRITE10 that writes of new file and data that appointment writes length, it is not common data that the data that analysis writes are found, but the scsi command that contains prescribed form identifies and parameter, then unactual these data that write, but carry out its specified command, if command execution is correct, then return application layer and write success, otherwise return error message, application layer is being received the file of deleting firm establishment after write command is finished immediately, from USB mass memory unit reading of data, then needed to adopt two steps to realize, the first step is to create new file, the back writes the prescribed form data that contain order to new file, when receiving the scsi command WRITE10 of this file, the main control chip software of USB mass memory unit finds by analyzing, be need be to the special command of upper strata return data, therefore will keep the LBA (Logical Block Addressing) (LBA) that apparatus logic unit number (LUN) and equipment are read and write in this WRITE10 command parameter and return and be finished, second step was that and then upper level applications sends a scsi command READ10, this order must guarantee that the apparatus logic unit number (LUN) of this command parameter is the same with the WRITE10 of the first step with the LBA (Logical Block Addressing) (LBA) of equipment read-write, the main control chip software of USB mass memory unit is receiving the READ10 order like this, the LBA (Logical Block Addressing) (LBA) of finding the apparatus logic unit number (LUN) of its parameter and reading and writing is the same with last WRITE10 order, then return the data of the scsi command needs of appointment in last the WRITE10 data buffer, above-mentioned normal read write order can guarantee that the main control chip software of USB mass memory magnanimity equipment is when analyzing scsi command WRITE10 and READ10, both can realize the normal read write order of equipment, realized simultaneously under the operating system unauthorized user, application program can be by the read-write operation of file, other scsi commands of carrying and data in its read write command WRITE10 and READ10 data buffer, the command interaction of realization application program and USB mass memory magnanimity equipment.
- Application program and USB mass memory unit carry out the method for command interaction and bidirectional data transfers on 2 a kind of USB mass memory units according to claim 1, it is characterized in that: the described new file of creating in the read-write Logical Disk of USB mass memory unit, filename is to adopt each sequence number character string of calculating global unique 16 bytes of the variation of obtaining, and new file is made as non-shared read-write properties, new file, file extension adopt the extension name of definition separately or random variation.
- Application program and USB mass memory unit carry out the method for command interaction and bidirectional data transfers on 3 a kind of USB mass memory units according to claim 1 and 2, it is characterized in that: the described prescribed form of creating new file in the read-write Logical Disk of USB mass memory unit, wherein WRITE10 command specifies form is in proper order: the command id head, command sequence number, the command operation sign indicating number, the command parameter district, unnecessary byte regions, order writes the data field, and READ10 command specifies form is in proper order: the command id head, command sequence number, unnecessary byte regions, order writes the data field.
- 4 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: the command id head of the described new files specify form of creating in the read-write Logical Disk of USB mass memory unit is 0xx55aa55aa555342.
- 5 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: the command sequence of the described new files specify form of creating in the read-write Logical Disk of USB mass memory unit number is the unique sequence numbers of 16 bytes.
- 6 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: the specified length of the described new files specify form of creating in the read-write Logical Disk of USB mass memory unit is the odd-multiple of 512 bytes, 512 bytes, 1536 bytes or 2560 bytes.
- 7 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: the specified length of the described new files specify form of creating in the read-write Logical Disk of USB mass memory unit is 1536 bytes, then when sending the WRITE10 order, byte allocation is: the command id head, command sequence number, the command operation sign indicating number, the command parameter district, unnecessary byte regions accounts for 512 bytes altogether, unnecessary byte regions is a unappropriated unnecessary byte in 512 bytes, can be made as zero, order writes the data field and takies 1024 bytes; Sending the READ10 order, byte allocation is: command id head, command sequence number, and unnecessary byte regions accounts for 512 bytes, and unnecessary byte regions is a unappropriated unnecessary byte in 512 bytes, can be made as zero, and order reading of data district takies 1024 bytes.
- 8 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: USB mass memory unit master chip application logic flow process write order is: receive that WRITE10 order total data--judges whether to be that specified length data--judged result "No"--enter normal data write operation flow process, judged result "Yes"---judgement command id head, command sequence number, the command operation sign indicating number, in whole bytes in command parameter district whether the command id head is arranged, the command operation sign indicating number, the judged result "No"---enter normal data to write flow process, judged result: "Yes"---analysis command parameter, preserve its apparatus logic number and address and command sequence number, receive remaining byte data then--this command request of-processing, and reservation command parameter information, use in order to next bar read command--judge command process whether correct--judged result "No"---enter the command process error message is set, the judged result "Yes"---the execution result data are set for correctly.Read command is: receive READ10 order total data--judges whether to be specified length data--judged result "No"---enter normal data to read flow process, whether judged result "Yes"---judgment device logic number and address be number identical with the address with the write order apparatus logic of preserving, the judged result "No"--enter normal data read operation flow process, judged result "Yes"----carry out last and have the command request that identical apparatus logic number and address read order are preserved---send and contain the command id head, whole bytes in command sequence number and the unnecessary byte regions send to the data equipment port--the remaining byte data that warning order need be returned also sends to the designated equipment port---the execution result data are set for correct.
- 9 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: USB mass memory unit main control chip application program is when treatment S CSI order WRITE10, to needing the special control command of return data, the apparatus logic unit number (LUN) of this WRITE10 order indication, equipment read-write LBA (Logical Block Addressing) (LBA), command sequence number and command parameter should be saved in one or more special-purpose data variable.
- 10 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: during USB mass memory unit reading of data, the apparatus logic unit number (LUN) of the READ10 order that the apparatus logic unit number (LUN) and second of the WRITE10 order of the then necessary assurance first step goes on foot is identical, and the read-write LBA (Logical Block Addressing) (LBA) of the READ10 order that the read-write LBA (Logical Block Addressing) (LBA) that the WRITE10 of the first step orders and second goes on foot is identical or exist fixed function to concern.
- 11 carry out the method for command interaction and bidirectional data transfers according to application program and USB mass memory unit on claim 1 or the 3 described a kind of USB mass memory units, it is characterized in that: after the command process that USB mass memory unit main control chip is carried out is finished, close and delete the new file of creating in the read-write Logical Disk of USB mass memory unit immediately.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100125417A CN100419620C (en) | 2005-05-23 | 2005-05-23 | Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100125417A CN100419620C (en) | 2005-05-23 | 2005-05-23 | Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1869855A true CN1869855A (en) | 2006-11-29 |
CN100419620C CN100419620C (en) | 2008-09-17 |
Family
ID=37443533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100125417A Expired - Fee Related CN100419620C (en) | 2005-05-23 | 2005-05-23 | Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100419620C (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789019A (en) * | 2010-02-11 | 2010-07-28 | 株洲南车时代电气股份有限公司 | Method for controlling removable disk under Windows |
CN102203753A (en) * | 2011-05-23 | 2011-09-28 | 华为技术有限公司 | Data writing processing method, apparatus and terminal equipment |
CN102262600A (en) * | 2010-05-25 | 2011-11-30 | 安凯(广州)微电子技术有限公司 | Method and system for recognizing USB (Universal Serial Bus) equipment |
CN102487395A (en) * | 2010-12-01 | 2012-06-06 | 深圳市闪联信息技术有限公司 | Method, device and system for realizing data access |
CN103617389A (en) * | 2013-11-08 | 2014-03-05 | 上海天奕达网络科技有限公司 | Terminal rights management method and terminal device |
CN109165481A (en) * | 2018-06-22 | 2019-01-08 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.0 agreement TS2 training sequence |
CN109214144A (en) * | 2018-08-01 | 2019-01-15 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS2 training sequence |
CN109214143A (en) * | 2018-08-01 | 2019-01-15 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS1 training sequence |
CN110737483A (en) * | 2019-10-12 | 2020-01-31 | 重庆邮电大学 | Signaling and data transmission method based on Windows USB MassStorage class |
CN112231246A (en) * | 2020-10-31 | 2021-01-15 | 王志平 | Method for realizing processor cache structure |
CN113032854A (en) * | 2021-03-30 | 2021-06-25 | 杭州华澜微电子股份有限公司 | Electronic data safety transfer method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2522936Y (en) * | 2002-01-22 | 2002-11-27 | 茂杰国际有限公司 | Data safety device of USB storage medium read-write device |
KR100481506B1 (en) * | 2002-12-31 | 2005-04-07 | 삼성전자주식회사 | Personal hand held terminal capable of interfacing information with host and method thereof |
US7010638B2 (en) * | 2003-08-29 | 2006-03-07 | Texas Intruments Incorporated | High speed bridge controller adaptable to non-standard device configuration |
-
2005
- 2005-05-23 CN CNB2005100125417A patent/CN100419620C/en not_active Expired - Fee Related
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101789019A (en) * | 2010-02-11 | 2010-07-28 | 株洲南车时代电气股份有限公司 | Method for controlling removable disk under Windows |
CN102262600B (en) * | 2010-05-25 | 2013-12-25 | 安凯(广州)微电子技术有限公司 | Method and system for recognizing USB (Universal Serial Bus) equipment |
CN102262600A (en) * | 2010-05-25 | 2011-11-30 | 安凯(广州)微电子技术有限公司 | Method and system for recognizing USB (Universal Serial Bus) equipment |
CN102487395A (en) * | 2010-12-01 | 2012-06-06 | 深圳市闪联信息技术有限公司 | Method, device and system for realizing data access |
CN102203753B (en) * | 2011-05-23 | 2014-04-16 | 华为技术有限公司 | Data writing processing method, apparatus and terminal equipment |
WO2011137811A3 (en) * | 2011-05-23 | 2012-02-16 | 华为技术有限公司 | Method, device and terminal equipment for data writing processing |
WO2011137811A2 (en) * | 2011-05-23 | 2011-11-10 | 华为技术有限公司 | Method, device and terminal equipment for data writing processing |
CN102203753A (en) * | 2011-05-23 | 2011-09-28 | 华为技术有限公司 | Data writing processing method, apparatus and terminal equipment |
CN103617389A (en) * | 2013-11-08 | 2014-03-05 | 上海天奕达网络科技有限公司 | Terminal rights management method and terminal device |
CN109165481A (en) * | 2018-06-22 | 2019-01-08 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.0 agreement TS2 training sequence |
CN109214143A (en) * | 2018-08-01 | 2019-01-15 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS1 training sequence |
CN109214144A (en) * | 2018-08-01 | 2019-01-15 | 芯启源(上海)半导体科技有限公司 | The soft core property right protection of IP and infringement identification method based on USB3.2 agreement TS2 training sequence |
CN109214144B (en) * | 2018-08-01 | 2020-11-10 | 芯启源(上海)半导体科技有限公司 | IP soft core property protection and infringement identification method based on USB3.2 protocol TS2 training sequence |
CN109214143B (en) * | 2018-08-01 | 2020-11-10 | 芯启源(上海)半导体科技有限公司 | IP soft core property protection and infringement identification method based on USB3.2 protocol TS1 training sequence |
CN110737483A (en) * | 2019-10-12 | 2020-01-31 | 重庆邮电大学 | Signaling and data transmission method based on Windows USB MassStorage class |
CN110737483B (en) * | 2019-10-12 | 2023-02-24 | 重庆邮电大学 | Signaling and data transmission method based on Windows USB MassStorage class |
CN112231246A (en) * | 2020-10-31 | 2021-01-15 | 王志平 | Method for realizing processor cache structure |
CN113032854A (en) * | 2021-03-30 | 2021-06-25 | 杭州华澜微电子股份有限公司 | Electronic data safety transfer method |
Also Published As
Publication number | Publication date |
---|---|
CN100419620C (en) | 2008-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1869855A (en) | Method for command interaction and two-way data transmission on USB mass storage equipment by program and USB mass storage equipment | |
US8069317B2 (en) | Providing and utilizing high performance block storage metadata | |
US11200337B2 (en) | System and method for user data isolation | |
US6477544B1 (en) | Single instance store for file systems | |
EP2377063B1 (en) | Method and apparatus for providing access to files based on user identity | |
CN105339904B (en) | For storing and retrieving the method and system of data | |
EP1946238B1 (en) | Operating system independent data management | |
US8402269B2 (en) | System and method for controlling exit of saved data from security zone | |
Ferraiolo et al. | Rbac standard rationale: Comments on" a critique of the ansi standard on role-based access control" | |
US9817582B2 (en) | Offload read and write offload provider | |
US8321667B2 (en) | Security model for common multiplexed transactional logs | |
CA2623141A1 (en) | Content cryptographic firewall system | |
US20120311575A1 (en) | System and method for enforcing policies for virtual machines | |
CN1924814A (en) | Control method of application program and apparatus therefor | |
CN1867902A (en) | Emulated storage system | |
US20130269039A1 (en) | Data access control | |
CN1877525A (en) | Protocol scripting language for safe execution in embedded system | |
US8776057B2 (en) | System and method for providing evidence of the physical presence of virtual machines | |
CN1776679A (en) | Stacked file systems and methods | |
US20090293058A1 (en) | Virtual system and method of restricting use of contents in the virtual system | |
CN102663313B (en) | Method for realizing information security of computer system | |
CN114329366B (en) | Network disk file control method and device, network disk and storage medium | |
CN1877549A (en) | Method for automatic protection of U disc by using filtering driver and intelligent key device | |
US7996631B1 (en) | System and method for accessing storage devices attached to a stateless client | |
CN107391028B (en) | Virtual volume authority control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080917 Termination date: 20140523 |