Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5297761B2 - Write prevention adapter device for USB memory - Google Patents
[go: Go Back, main page]

JP5297761B2 - Write prevention adapter device for USB memory - Google Patents

Write prevention adapter device for USB memory Download PDF

Info

Publication number
JP5297761B2
JP5297761B2 JP2008276329A JP2008276329A JP5297761B2 JP 5297761 B2 JP5297761 B2 JP 5297761B2 JP 2008276329 A JP2008276329 A JP 2008276329A JP 2008276329 A JP2008276329 A JP 2008276329A JP 5297761 B2 JP5297761 B2 JP 5297761B2
Authority
JP
Japan
Prior art keywords
usb
write
usb memory
memory
host
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.)
Expired - Fee Related
Application number
JP2008276329A
Other languages
Japanese (ja)
Other versions
JP2010108017A (en
Inventor
文夫 大嶋
Original Assignee
株式会社ワイ・イー・データ
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 株式会社ワイ・イー・データ filed Critical 株式会社ワイ・イー・データ
Priority to JP2008276329A priority Critical patent/JP5297761B2/en
Publication of JP2010108017A publication Critical patent/JP2010108017A/en
Application granted granted Critical
Publication of JP5297761B2 publication Critical patent/JP5297761B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Description

本発明は、USBメモリへのデータ書き込みを防止するアダプタ装置に関する。特に例えば、Windows(登録商標)VISTA、XP、2000等のUSBマスストレージの標準ドライバを搭載したOSで動作するホストPC等と、USBマスストレージ規格に準じたUSBフラッシュメモリーまたはUSBメモリーカードリーダとの間に接続する、書き込み防止アダプタ装置に関するものである。   The present invention relates to an adapter device that prevents data writing to a USB memory. In particular, for example, a host PC that operates on an OS equipped with a standard USB mass storage driver such as Windows (registered trademark) Vista, XP, 2000, etc., and a USB flash memory or USB memory card reader conforming to the USB mass storage standard The present invention relates to a write-protection adapter device connected in between.

近年、USBフラッシュメモリー、USBフラッシュメモリーキー等と呼ばれる、ホストPCのUSBポートに直接接続することで、情報の読み書きができる可搬型の外部メモリーデバイスが普及してきている。プラグアンドプレイ機能を有するOS、例えば、Windows(登録商標)VISTA、XP、2000等のUSBマスストレージの標準ドライバを搭載したOSで動作するホストPCでは、そのUSBポートにUSBフラッシュメモリーキーを接続すると、OSの標準ドライバソフトで読み書きができるようになっている。   In recent years, portable external memory devices that can read and write information by connecting directly to a USB port of a host PC, called a USB flash memory, a USB flash memory key, etc., have become widespread. In a host PC operating on an OS having a plug and play function, for example, an OS equipped with a standard USB mass storage driver such as Windows (registered trademark) Vista, XP, 2000, etc., a USB flash memory key is connected to the USB port. The OS standard driver software can read and write.

USBフラッシュメモリーキーから写真データ等を読み出して、ホストPCを経由してプリンタで印刷する場合、USBフラッシュメモリーキーへの書き込みは不要である。ところがOSによっては、データファイルの読み出し操作を行っただけでも、最後のアクセス日時をUSBフラッシュメモリーキーのデータファイルに書き込みを行ってしまうので、誤操作によるデータが破壊したり、消去されてしまったりする危険がある。   When photo data or the like is read from the USB flash memory key and printed by a printer via the host PC, writing to the USB flash memory key is not necessary. However, depending on the OS, even if a data file read operation is performed, the last access date / time is written to the data file of the USB flash memory key, so that data due to an erroneous operation may be destroyed or erased. There is danger.

なお、このような事態を回避するため、USBフラッシュメモリーキーに書き込み禁止スイッチを設けた製品が市販されている。しかし、これらの製品は全体の市場のごく一部であり、書き込み禁止スイッチがついていないものが一般的となっている。   In order to avoid such a situation, a product in which a USB flash memory key is provided with a write-protect switch is commercially available. However, these products are only a part of the entire market, and those without a write-protect switch are common.

また、このような書き込み禁止スイッチ付きのUSBメモリでは、使用者が予め書き込み防止スイッチをONにしておかないと、書き込み防止機能を発揮しない。従って、スイッチをONにするのを忘れた場合、誤ってデータを消してしまう可能性がある。特に、USBメモリの扱いに不慣れな高齢者等では、小さいスイッチの操作や、その機能の理解が困難であり、書き込み防止機能を有効活用できないという問題もある。   In addition, in such a USB memory with a write-protect switch, the write-protect function cannot be exhibited unless the user turns on the write-protect switch in advance. Therefore, if the user forgets to turn on the switch, the data may be erased by mistake. In particular, elderly people who are unfamiliar with the handling of a USB memory have a problem that it is difficult to operate a small switch and understand its function, and the write prevention function cannot be effectively used.

本発明は、斯かる実情に鑑み、書き込み防止機能を有するUSBマスストレージデバイス用書き込み防止アダプタ装置を提供しようとするものである。   In view of such circumstances, the present invention intends to provide a write prevention adapter device for a USB mass storage device having a write prevention function.

本発明者の鋭意研究によって、上記目的は下記の手段によって達成される。   The above object can be achieved by the following means based on the earnest research of the present inventors.

(1)本発明は、USBメモリが有するUSBコネクタと係合し、該USBコネクタと電気的に接続されるメモリ側USBコネクタと、外部デバイスのUSBコネクタと係合し、該USBコネクタと電気的に接続されるデバイス側USBコネクタと、前記デバイス側USBコネクタを介して、前記外部デバイスとUSB規格に基づく信号の送受信を行い、該外部デバイスとのデータ通信を可能とする第1の通信制御手段と、前記メモリ側USBコネクタを介して、前記USBメモリとUSB規格に基づく信号の送受信を行い、該USBメモリとのデータ通信を可能とする第2の通信制御手段と、前記USBメモリを制御するとともに、該USBメモリから前記外部デバイスに送信する信号に、書き込み禁止フラグを付加する書き込み禁止フラグ付加手段と、を備えるUSBメモリ用書き込み防止アダプタ装置である。   (1) The present invention engages with a USB connector included in a USB memory and is electrically connected to the USB connector of the external device and a USB connector of an external device. A device-side USB connector connected to the device, and first communication control means for transmitting and receiving signals to and from the external device via the device-side USB connector and enabling data communication with the external device And a second communication control means for transmitting / receiving a signal based on the USB standard to / from the USB memory via the memory-side USB connector and enabling data communication with the USB memory, and controlling the USB memory In addition, a write prohibition flag for adding a write prohibition flag to a signal transmitted from the USB memory to the external device. And adding means, it is for USB memory write protection adapter device comprising a.

(2)本発明は、上記(1)に記載のUSBメモリ用書き込み防止アダプタ装置において、前記書き込み禁止フラグ付加手段は、前記外部デバイスから送信されるモードセンスコマンドを検出すると共に、前記モードセンスコマンドを前記USBメモリに転送し、更に、前記USBメモリから前記モードセンスコマンドに応答して送信されるモードパラメータリストに前記書き込み禁止フラグを付加してから、該モードパラメータリストを前記外部デバイスに転送することを特徴とする。   (2) According to the present invention, in the USB memory write prevention adapter device according to (1), the write prohibition flag adding means detects a mode sense command transmitted from the external device, and the mode sense command. Is transferred to the USB memory, and the write prohibit flag is added to the mode parameter list transmitted from the USB memory in response to the mode sense command, and then the mode parameter list is transferred to the external device. It is characterized by that.

(3)本発明は、上記(1)又は(2)に記載のUSBメモリ用書き込み防止アダプタ装置において、前記外部デバイスから受信した前記USBメモリへの書き込み命令を遮断するとともに、該外部デバイスに書き込みエラー信号を送信する書き込み検出手段を備えることを特徴とする。   (3) According to the present invention, in the USB memory write prevention adapter device according to the above (1) or (2), the write command to the USB memory received from the external device is blocked and the write to the external device is performed. Write detection means for transmitting an error signal is provided.

本発明によれば、外部デバイスからUSBメモリへの書き込みを防止し、誤動作によるデータの破壊又は消失を防止できるUSBメモリ用書き込み防止アダプタ装置を提供できるという優れた効果を奏し得る。   According to the present invention, it is possible to provide an excellent effect that it is possible to provide a USB memory write prevention adapter device that can prevent writing from an external device to a USB memory and prevent destruction or loss of data due to malfunction.

以下、本発明の実施の形態を添付図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the accompanying drawings.

<基本構成>   <Basic configuration>

まず、図1を用いて、本発明の第1実施形態に係るUSBメモリ用書き込み防止アダプタ装置1について説明する。なお、同図は、USBメモリ用書き込み防止アダプタ装置1と、パーソナルコンピュータ等の外部デバイス100(以下、ホストPCと言う)と、USBメモリ200の構成を示すブロック図である。   First, the USB memory write prevention adapter device 1 according to the first embodiment of the present invention will be described with reference to FIG. FIG. 2 is a block diagram showing the configuration of the USB memory write-protection adapter device 1, an external device 100 such as a personal computer (hereinafter referred to as a host PC), and the USB memory 200.

USBメモリ用書き込み防止アダプタ1は、CPU10と、USBホストコントローラ20(第2の通信制御手段と言うこともある)と、USBデバイスコントローラ30(第1の通信制御手段と言うこともある)と、ROM40と、RAM50と、メモリ側USBコネクタ60と、デバイス側USBコネクタ70と、を備えて構成さえている。なお、CPU10、USBホストコントローラ20、USBデバイスコントローラ30、ROM40、RAM50、メモリ側USBコネクタ60、デバイス側USBコネクタ70は、アドレスバス(図示省略)やデータバス(同じく図示省略)に接続され、それぞれのデバイス間でメモリアドレスやデータ等の送受信を行う。   The USB memory write prevention adapter 1 includes a CPU 10, a USB host controller 20 (sometimes referred to as second communication control means), a USB device controller 30 (sometimes referred to as first communication control means), The ROM 40, the RAM 50, the memory-side USB connector 60, and the device-side USB connector 70 are provided. The CPU 10, the USB host controller 20, the USB device controller 30, the ROM 40, the RAM 50, the memory side USB connector 60, and the device side USB connector 70 are connected to an address bus (not shown) and a data bus (also not shown), respectively. The memory address and data are transmitted and received between the devices.

CPU10は、中央演算処理装置であり、USBメモリ用書き込み防止アダプタ1の全体制御等を行う。具体的には、ホストPC100の要求信号に対して、USBメモリ200からデータを読み込んだり、USBホストコントローラ20及びUSBデバイスコントローラ30の制御などを行う。   The CPU 10 is a central processing unit, and performs overall control of the USB memory write prevention adapter 1. Specifically, in response to a request signal from the host PC 100, data is read from the USB memory 200, and the USB host controller 20 and the USB device controller 30 are controlled.

また、CPU10は、ホストPC100から受信したUSBメモリ200への書き込み信号(コマンド)を判断し、書き込み(ライト)コマンドである場合には、書き込み禁止フラグを設定および送信したり、又はホストPC100から受信した書き込みコマンドを削除するとともに、ホストPC100にエラーコマンドを送信する(詳細は後述)。   Further, the CPU 10 determines a write signal (command) to the USB memory 200 received from the host PC 100, and if it is a write (write) command, sets and transmits a write prohibit flag or receives it from the host PC 100. The write command is deleted, and an error command is transmitted to the host PC 100 (details will be described later).

USBホストコントローラ20は、CPU10とUSBメモリ200との間の通信制御を行うコントローラ用のICチップである。具体的には、USBホストコントローラ20は、CPU10がUSBメモリ200とデータ通信を行うために、USBメモリ200とUSB規格に基づいたUSBプロトコルの送受信を行い、通信を行うための制御を行う。   The USB host controller 20 is an IC chip for a controller that performs communication control between the CPU 10 and the USB memory 200. Specifically, in order for the CPU 10 to perform data communication with the USB memory 200, the USB host controller 20 performs transmission and reception of the USB protocol based on the USB standard with the USB memory 200 and performs control for communication.

USBデバイスコントローラ30は、CPU10とホストPC100との間の通信制御を行うコントローラ用のICチップである。具体的には、USBデバイスコントローラ30は、PC100との通信を行うために、ホストPC100とUSB規格に基づいたUSBプロトコルの送受信を行い、通信を行うための制御を行う。   The USB device controller 30 is an IC chip for a controller that performs communication control between the CPU 10 and the host PC 100. Specifically, in order to communicate with the PC 100, the USB device controller 30 performs transmission / reception of the USB protocol based on the USB standard with the host PC 100, and performs control for communication.

なお、本実施形態では、前述したUSB規格は、USB2.0に基づく標準規格に用いることが好適であるが、勿論、これに限定されるものではい。例えば、USB1.1又はUSB3.0その他のUSB規格でも好ましい。   In the present embodiment, the USB standard described above is preferably used as a standard based on USB 2.0, but of course it is not limited to this. For example, USB 1.1 or USB 3.0 and other USB standards are also preferable.

ROM40は、読み出し専用メモリ(READ ONLY MEMORY)である。ROM40は、USBメモリ用書き込み防止アダプタ1の基本動作を行うファームウエア(プログラム)や、USBホストコントローラ20やUSBデバイスコントローラ30の初期設定値などを記憶している。これによって、CPU10は、任意のタイミングでROM40から必要なプログラムを読み込んで実行することができる。   The ROM 40 is a read only memory (READ ONLY MEMORY). The ROM 40 stores firmware (program) for performing the basic operation of the USB memory write prevention adapter 1, initial setting values of the USB host controller 20 and the USB device controller 30, and the like. As a result, the CPU 10 can read and execute a necessary program from the ROM 40 at an arbitrary timing.

RAM50は、随時アクセスが可能なメモリ(Random Access Memory)である。RAM50は、CPU10の作業領域として機能するとともに、CPU10の指示に応じて、USBメモリ200から読み込んだデータを一時的に記憶するのに使用される。また、RAM50は、ホストPC100やUSBメモリ200から受け取ったコマンド(例えば、書き込み禁止コマンドや読込みコマンド等)を一時的に記憶する。   The RAM 50 is a memory (Random Access Memory) that can be accessed at any time. The RAM 50 functions as a work area for the CPU 10 and is used to temporarily store data read from the USB memory 200 in accordance with instructions from the CPU 10. In addition, the RAM 50 temporarily stores commands received from the host PC 100 or the USB memory 200 (for example, a write prohibit command or a read command).

メモリ側USBコネクタ60は、USBメモリ200に設けられているUSBプラグコネクタ220に係合することができるUSBレセプタクルコネクタである。なお、メモリ側USBコネクタ60は、A型端子のUSBレセプタクルコネクタであるが、A型端子に限定されるものではなく、例えば、ミニUSB端子その他の端子形状でも好ましい。   The memory-side USB connector 60 is a USB receptacle connector that can be engaged with a USB plug connector 220 provided in the USB memory 200. Note that the memory-side USB connector 60 is an A-type terminal USB receptacle connector, but is not limited to an A-type terminal. For example, a mini-USB terminal or other terminal shape is preferable.

デバイス側USBコネクタ70は、ホストPC100に設けられているUSBレセプタクルコネクタ120に係合することができるUSBプラグコネクタである。なお、デバイス側USBコネクタ70は、A型端子のUSBプラグコネクタであるが、A型端子に限定されるものではなく、例えば、ミニUSB端子その他の端子形状でも好ましい。   The device-side USB connector 70 is a USB plug connector that can be engaged with a USB receptacle connector 120 provided in the host PC 100. The device-side USB connector 70 is an A-type terminal USB plug connector, but is not limited to an A-type terminal. For example, a mini-USB terminal or other terminal shape is preferable.

USBメモリ200は、USBプラグコネクタ220を備えるフラッシュメモリである。   The USB memory 200 is a flash memory including a USB plug connector 220.

<動作フローチャート>   <Operation flowchart>

次に、USBメモリ用書き込み防止アダプタ1の基本動作について、図2に示されるフローチャートを用いて説明する。   Next, the basic operation of the USB memory write prevention adapter 1 will be described with reference to the flowchart shown in FIG.

まず、ステップS101では、CPU10は、USBメモリ用書き込み防止アダプタ1がホストPC100に差し込まれたか否かを判定する。USBメモリ用書き込み防止アダプタ1が差し込まれたと判定された場合には、ステップS102に進み、差し込まれていないと判定した場合には、処理を終了する。なお、USBメモリ用書き込み防止アダプタ1がホストPC100に差し込まれると、USBメモリ用書き込み防止アダプタ1は、ホストPC100から給電される。   First, in step S101, the CPU 10 determines whether or not the USB memory write prevention adapter 1 has been inserted into the host PC 100. If it is determined that the USB memory write prevention adapter 1 has been inserted, the process proceeds to step S102. If it is determined that the USB memory write prevention adapter 1 has not been inserted, the process ends. When the USB memory write prevention adapter 1 is inserted into the host PC 100, the USB memory write prevention adapter 1 is supplied with power from the host PC 100.

ステップS102では、CPU10は、各種デバイスの初期設定を行う。具体的には、CPU10は、ROM40からファームウェアを読み込んで実行するとともに、ROM40から各種初期データを読み込み、USBホストコントローラ20及びUSBデバイスコントローラ30の初期設定を行う。なお、この段階において、CPU10は、各種初期設定を行うのみで、ホストPC100やUSBメモリ200とのUSB通信は行わない。これにより、ホストPC100では、何ら特別な制御が行われないようになっており、単に、ホストPC110のUSBレセプタクルコネクタ120が、メモリ側USBコネクタ60まで延長されたに過ぎない状態となっている。   In step S102, the CPU 10 performs initial settings for various devices. Specifically, the CPU 10 reads and executes firmware from the ROM 40, reads various initial data from the ROM 40, and performs initial settings of the USB host controller 20 and the USB device controller 30. At this stage, the CPU 10 only performs various initial settings and does not perform USB communication with the host PC 100 or the USB memory 200. As a result, the host PC 100 does not perform any special control, and the USB receptacle connector 120 of the host PC 110 is simply extended to the memory-side USB connector 60.

ステップS103Aでは、CPU10は、USBメモリ200が差し込まれているか否かを判定する。ステップS103Aにおいて、CPU10は、USBメモリ200がUSBメモリ用書き込み防止アダプタ1に差し込まれていると判定された場合には、ステップS103Bに進んで、ファームウェアに基づいてホストPC100とUSBメモリ200の間のUSB通信を確立するための制御を行う。   In step S103A, the CPU 10 determines whether or not the USB memory 200 is inserted. In step S103A, if the CPU 10 determines that the USB memory 200 is inserted into the USB memory write prevention adapter 1, the CPU 10 proceeds to step S103B and determines between the host PC 100 and the USB memory 200 based on the firmware. Control for establishing USB communication is performed.

具体的にステップS103Bにおいて、CPU10は、USBデバイスコントローラ30をアクティブにし、ホストPC100から受信したディスクリプタ送信要求を、USBホストコントローラ20を介してUSBメモリ200に送信する。ここで、ディスクリプタとは、ホストPC100がUSBメモリ200を正しく認識するための、各USBデバイスが有するデータである。更にここでCPU10は、USBメモリ200から送信されるディスクリプタ情報を、USBホストコントローラ20を介して受信し、これをUSBデバイスコントローラ30を介してホストPC100に送信する。なお、ステップS103Aにおいて、CPU10は、USBメモリ200が差し込まれていないと判定した場合には、USBメモリ200が差し込まれるまで待つ。   Specifically, in step S103B, the CPU 10 activates the USB device controller 30, and transmits the descriptor transmission request received from the host PC 100 to the USB memory 200 via the USB host controller 20. Here, the descriptor is data included in each USB device for the host PC 100 to correctly recognize the USB memory 200. Further, the CPU 10 receives the descriptor information transmitted from the USB memory 200 via the USB host controller 20 and transmits it to the host PC 100 via the USB device controller 30. In step S103A, if the CPU 10 determines that the USB memory 200 is not inserted, the CPU 10 waits until the USB memory 200 is inserted.

次に、ステップS104Aにおいて、CPU10は、ホストPC100から受信したマスストレージコマンドやデータ、又はUSBメモリ200から受信したデータ等を受信し、ホストPC100からどのような種類のマスストレージコマンドが送られてきたか、又はUSBメモリ200からどのような応答があったかを判別する。これらの信号の中に、特別な信号が通過しないか否かを判断する。なお、本実施形態では、ホストPC100から送信されるマスストレージコマンドの種類を判別して、そこに特別なコマンドが含まれていないか監視するようにしている。つまり、以下に示す特別な応答を除き、USBメモリ200からの応答信号は、定常的に監視することは行わない。   Next, in step S104A, the CPU 10 receives the mass storage command and data received from the host PC 100 or the data received from the USB memory 200, and what type of mass storage command has been sent from the host PC 100. Or what kind of response is received from the USB memory 200. It is determined whether or not a special signal passes through these signals. In the present embodiment, the type of mass storage command transmitted from the host PC 100 is determined, and it is monitored whether or not a special command is included therein. That is, except for the special response described below, the response signal from the USB memory 200 is not constantly monitored.

ステップS104Aで、CPU10が、ステップS103で判別したマスストレージコマンドが特定のコマンド、具体的に本実施形態ではモードセンス(MODE SENSE)コマンドであると判断した場合には、ステップS104Bに進んで、そのコマンドをUSBメモリ200にそのまま送信すると共に応答監視フラグを立てて、ステップ104Cに進んでUSBメモリ200から次の応答信号が送信されるのを待機する。   If the CPU 10 determines in step S104A that the mass storage command determined in step S103 is a specific command, specifically, a mode sense (MODE SENSE) command in the present embodiment, the process proceeds to step S104B. The command is transmitted as it is to the USB memory 200 and a response monitoring flag is set, and the process proceeds to step 104C to wait for the next response signal to be transmitted from the USB memory 200.

ステップ104Cにおいて、CPU10は、USBメモリ200から送信される情報であるモードパラメータリスト(MODE PARAMETER LIST)を受信した場合、その中のモードパラメータヘッダー(MODE PARAMETER HEADER)のデバイススペシフィック・パラメータ(DEVICE SPECIFIC PARAMETER)のライトプロテクトビット(Write Protect Bit)を強制的に1にセットする。   In step 104C, when the CPU 10 receives a mode parameter list (MODE PARAMETER LIST), which is information transmitted from the USB memory 200, the device specific parameter (DEVICE SPECIFIC PARAMETER) in the mode parameter header (MODE PARAMETER HEADER) therein. ) Write protect bit (Write Protect Bit) is forcibly set to 1.

具体的にモードセンスコマンドは、モードセンス(6)コマンドと、モードセンス(10)コマンドの2つがある。CPU10が、USBメモリ200からモードセンス(6)コマンドに応じたモードパラメータヘッダー(6)を受け付けた場合には、モードパラメータヘッダー(6)のバイト−2(Byte−2)のビット−7(Bit−7)を1にセットする。CPU10が、USBメモリ200からモードセンス(10)コマンドに応じたモードパラメータヘッダー(10)を受け付けた場合には、モードパラメータヘッダー(10)のバイト−3(Byte−3)のビット−7(Bit−7)を1にセットする。   Specifically, there are two mode sense commands: a mode sense (6) command and a mode sense (10) command. When the CPU 10 receives the mode parameter header (6) corresponding to the mode sense (6) command from the USB memory 200, the bit-7 (Bit-2) of byte-2 (Byte-2) of the mode parameter header (6) -7) is set to 1. When the CPU 10 receives the mode parameter header (10) corresponding to the mode sense (10) command from the USB memory 200, the bit-7 (Bit-3) of byte-3 (Byte-3) of the mode parameter header (10) -7) is set to 1.

上記により、CPU10は、モードパラメータヘッダーを強制的に書き換えて書き込み禁止フラグをセットすることになる。その後、ステップ105に進んで、USBメモリ200の応答信号として、このモードパラメータヘッダーをホストPC100に送信する。これにより、ホストPC100は、USBメモリ200が書き込み禁止のメモリであると認識(誤認)する。   As described above, the CPU 10 forcibly rewrites the mode parameter header and sets the write prohibition flag. Thereafter, the process proceeds to step 105, and this mode parameter header is transmitted to the host PC 100 as a response signal of the USB memory 200. As a result, the host PC 100 recognizes (misidentifies) that the USB memory 200 is a write-protected memory.

なお、ステップS104Aにおいて、ホストPC100から送信されるマスストレージコマンドが通常のコマンド(監視対象外の信号)の場合は、ステップS104Dに進んで、USBメモリ200の応答信号をそのままホストPC100に転送し、ステップS104EにおいてUSBメモリ200の応答信号を受信して、更にステップS105に進んで、この応答信号をそのままホストPC100に転送する。これにより、通常のコマンドにおける処理速度の低下を極力抑制することが可能となっている。例えばステップS104Aにおいて、CPU10は、ホストPC100から受信したコマンドが、データ読み込みコマンドである場合は、ステップS104Dに進んでそのデータ読み込みコマンドをUSBメモリ200に送信する。更にステップS104Eにおいて、CPU10は、USBメモリ200から対応するデータを受信して、ステップS105で、ホストPC100にデータを転送して処理を終了する。   In step S104A, if the mass storage command transmitted from the host PC 100 is a normal command (a signal that is not monitored), the process proceeds to step S104D, and the response signal of the USB memory 200 is transferred to the host PC 100 as it is. In step S104E, the response signal of the USB memory 200 is received, and the process further proceeds to step S105, and this response signal is transferred to the host PC 100 as it is. Thereby, it is possible to suppress a decrease in processing speed in a normal command as much as possible. For example, in step S104A, if the command received from the host PC 100 is a data read command, the CPU 10 proceeds to step S104D and transmits the data read command to the USB memory 200. In step S104E, the CPU 10 receives the corresponding data from the USB memory 200, transfers the data to the host PC 100 in step S105, and ends the process.

更にステップS104Aで、CPU10が、ステップS103で判別したマスストレージコマンドが特定のコマンド、具体的に本実施形態ではデータ書き込みコマンドであると判断した場合には、ステップS104Fに進む。このステップS104Fでは、CPU10は、データ書き込みコマンドをUSBメモリ200に送信することなく、データ書き込みコマンドを削除する。つまり、CPU10は、データ書き込みコマンドに基づく、USBメモリ200への書き込みは行わない。更にステップS104Gにおいて、CPU10は、ホストPC100に送信するための書き込みエラーコマンドを生成する。具体的に、CPU10は、ホストPC100から送信されてRAM50に一時的に保管されたコマンドが、USB規格に基づくライトコマンド(Write Cmmand)、フォーマットユニットコマンド(Format Unit Command)等のデータ書き込みコマンドである場合、USBメモリ200にこれらのマスストレージコマンドを送信しない。なお、USB規格のライトコマンドの中には、ライト(6)コマンド、ライト(10)コマンド、ライト(12)コマンド等の種類があるが、これらはすべてホストPC100からUSBメモリ200に対するデータ書き込みコマンドを意味している。   Further, in step S104A, if the CPU 10 determines that the mass storage command determined in step S103 is a specific command, specifically, a data write command in the present embodiment, the process proceeds to step S104F. In step S104F, the CPU 10 deletes the data write command without transmitting the data write command to the USB memory 200. That is, the CPU 10 does not write to the USB memory 200 based on the data write command. Further, in step S104G, the CPU 10 generates a write error command for transmission to the host PC 100. Specifically, in the CPU 10, the command transmitted from the host PC 100 and temporarily stored in the RAM 50 is a data write command such as a write command (Write Command) or a format unit command (Format Unit Command) based on the USB standard. In this case, these mass storage commands are not transmitted to the USB memory 200. Note that the USB standard write commands include a write (6) command, a write (10) command, and a write (12) command, all of which are data write commands to the USB memory 200 from the host PC 100. I mean.

このようにデータ書き込みコマンドを削除(停止)する一方、CPU10は、ホストPC100に送信するためのライトプロテクトエラー(Write Protect Error)のステータス信号を生成する。その後、ステップS105に進んで、このライトプロテクトエラーステータス信号をホストPC100に送信する。   While deleting (stopping) the data write command in this manner, the CPU 10 generates a write protect error (Write Protect Error) status signal to be transmitted to the host PC 100. Thereafter, the process proceeds to step S105, and this write protect error status signal is transmitted to the host PC 100.

上記の構成によって、ホストPC100は、USBメモリ200へのデータ書き込みが行われないことを認識することができる。また、仮に、ホストPC100がデータ書き込みを行おうとしても、強制的に書き込みエラーとなって、USBメモリ200の情報を保護することが可能となる。   With the above configuration, the host PC 100 can recognize that data writing to the USB memory 200 is not performed. Further, even if the host PC 100 attempts to write data, a write error is forcibly made, and the information in the USB memory 200 can be protected.

なお、上記ステップS104A、S104Bによる制御処理を行う機能ブロックを、書き込み禁止フラグ設定手段と言うことがある。また上記ステップS104E、S104Fによる制御処理ブロックを書き込み検出手段と言うことがある。また、上記ステップ104C、S104Dによる制御ブロックを、信号通過手段ということがある。   The functional block that performs the control process in steps S104A and S104B may be referred to as a write prohibition flag setting unit. The control processing block in steps S104E and S104F may be referred to as write detection means. In addition, the control block in steps 104C and S104D may be referred to as signal passing means.

また、本実施形態では、ステップS104Cにおいて、CPU10が、USBメモリ200からの受信信号(プロトコル)中のフラグのみを書き換える場合を示したが、CPU10が自らからホストPC100への応答信号を生成して、USBメモリ200が書き込み禁止状態であることをホストPC100に誤認させるようにしてもよい。   In the present embodiment, the CPU 10 rewrites only the flag in the received signal (protocol) from the USB memory 200 in step S104C. However, the CPU 10 generates a response signal from itself to the host PC 100. The host PC 100 may be misidentified that the USB memory 200 is in a write-protected state.

以上の処理を、USBメモリ用書き込み防止アダプタ1がホストPC100から抜かれるまで繰り返す。   The above processing is repeated until the USB memory write prevention adapter 1 is removed from the host PC 100.

したがって、ホストPC100は、USBメモリ用書き込み防止アダプタ1を介してUSBメモリ200が差し込まれた場合には、USBメモリ用書き込み防止アダプタ1から書き込み防止フラグを受信し、USBメモリ200が書き込み禁止のメモリであると認識する。これにより、ホストPC100は、USBメモリ200にデータの書き込みを行うことはない。上記の構成によって、書き込み防止手段を有さない(通常の)USBメモリ200は、USBメモリ用書き込み防止アダプタ1を介してホストPC100へ差し込まれることにより、内部のメモリに記憶しているデータを誤動作により破壊したり、または消失してしまうのを防止することができる。   Therefore, when the USB memory 200 is inserted through the USB memory write prevention adapter 1, the host PC 100 receives the write prevention flag from the USB memory write prevention adapter 1, and the USB memory 200 is a write prohibited memory. Recognize that As a result, the host PC 100 does not write data to the USB memory 200. With the above configuration, the (normal) USB memory 200 having no write prevention means is inserted into the host PC 100 via the USB memory write prevention adapter 1 so that the data stored in the internal memory malfunctions. Can be prevented from being destroyed or lost.

換言すると、USBメモリ用書き込み防止アダプタ1は、ホストPC100に書き込み禁止フラグを送信することによって、ホストPC100にUSBメモリ200が書き込み禁止であると誤認させ、USBメモリ200へのデータ書き込みを防止することができる   In other words, the USB memory write prevention adapter 1 causes the host PC 100 to mistakenly recognize that the USB memory 200 is write-protected by sending a write prohibition flag to the host PC 100, thereby preventing data writing to the USB memory 200. Can

更に、USBメモリ用書き込み防止アダプタ1は、ホストPC100から、送信されたUSBメモリ200へのデータ書き込み信号(コマンド)を排除するので、USBメモリ200にデータが書き込まれることはなく、誤動作によるデータの破壊や消失を防止することができる。   Further, the USB memory write prevention adapter 1 eliminates the data write signal (command) sent from the host PC 100 to the USB memory 200, so that data is not written to the USB memory 200, and data due to malfunctions is not written. Destruction and disappearance can be prevented.

また、USBメモリ用書き込み防止アダプタ1は、ホストPC100にデータ書き込みが行われなかったことを示す、書き込みエラーコマンドを送信する。したがって、ホストPC100は、USBメモリ200にデータが書き込まれない状態であることを認識することができる。換言すると、USBメモリ用書き込み防止アダプタ1は、ホストPC100の書き込みコマンドを遮断し、ホストPC100にUSBメモリ200が書き込み禁止のUSBメモリであることを誤認させることができる。   Further, the USB memory write prevention adapter 1 transmits a write error command indicating that no data has been written to the host PC 100. Therefore, the host PC 100 can recognize that data is not written in the USB memory 200. In other words, the USB memory write prevention adapter 1 can block the write command of the host PC 100 and cause the host PC 100 to mistakenly recognize that the USB memory 200 is a write-protected USB memory.

なお、本実施形態では、ファームウェアを記憶するROM40は、フラッシュROM、MASK−ROM、EPROMなどの記憶装置を用いても好ましい。   In the present embodiment, it is preferable to use a storage device such as a flash ROM, MASK-ROM, or EPROM as the ROM 40 for storing firmware.

また、デバイス側USBコネクタ70は、A型端子に限定されるものではなく、例えば、B型端子のUSBレセプタクルコネクタを使用し、ホストPC100に設けられているA型端子のUSBレセプタクルコネクタと、A−B変換USBケーブルで接続しても好ましい。   The device-side USB connector 70 is not limited to an A-type terminal. For example, a USB receptacle connector having a B-type terminal is used, and an A-type terminal USB receptacle connector provided in the host PC 100 and an A-type terminal are used. It is also preferable to connect with a -B conversion USB cable.

また、本実施形態は、ホストPC100に設けられているA型端子のUSBレセプタクルコネクタ120に、USBメモリ用書き込み防止アダプタ1に設けられたA型端子のデバイス側USBプラグコネクタ70を直接差し込む構造としている。勿論、これに限定されるものではなく、例えば、USBデバイスコントローラ30とデバイス側USBコネクタ70をUSB延長ケーブルで接続しても好ましい。同様に、USBホストコントローラ20とメモリ側USBコネクタ60の間をUSBケーブルで延長して接続しても好ましい。   Further, in the present embodiment, a device-side USB plug connector 70 of the A type terminal provided in the USB memory write prevention adapter 1 is directly plugged into the USB receptacle connector 120 of the A type terminal provided in the host PC 100. Yes. Of course, it is not limited to this, For example, it is preferable to connect the USB device controller 30 and the device-side USB connector 70 with a USB extension cable. Similarly, it is preferable to connect the USB host controller 20 and the memory-side USB connector 60 by extending with a USB cable.

本実施形態では、ホストPC100は、USBレセプタクルコネクタ120を備えるパーソナルコンピュータ等であるが、勿論、これに限定されるものではない。例えば、双方向の情報通信が可能なKIOSK端末(マルチメディアステーション(Multimedia Station)と言うこともある)に用いても好適である。また、KIOSK端末に設けられた前面パネルにUSBメモリ200を接続するためのUSBメモリ用書き込み防止アダプタ1を使用する場合、USBメモリ用書き込み防止アダプタ1にUSBプラグコネクタを有するケーブルを設け、KIOSK端末に設けられたUSBレセプタクルコネクタに差し込んで接続しても好ましい。   In the present embodiment, the host PC 100 is a personal computer or the like provided with the USB receptacle connector 120, but it is of course not limited thereto. For example, it is also suitable for use in a KIOSK terminal capable of bidirectional information communication (sometimes referred to as a multimedia station). Further, when the USB memory write prevention adapter 1 for connecting the USB memory 200 to the front panel provided in the KIOSK terminal is used, the USB memory write prevention adapter 1 is provided with a cable having a USB plug connector, and the KIOSK terminal. It is also preferable to connect it by inserting it into a USB receptacle connector provided in the connector.

更に本実施形態では、ホストPC100の信号を検出して、これをトリガーにUSB書き込み禁止フラグをセットしたり、書き込みエラー信号を生成したりする場合を示したが、本発明はこれに限定されない。例えば、USBメモリ200側の応答信号を検出して、これが書き込み許可/禁止を意味するヘッダーである場合に、このヘッダーに書き込み禁止フラグを付加したりしても良い。   Furthermore, in the present embodiment, a case where a signal of the host PC 100 is detected and a USB write prohibition flag is set or a write error signal is generated using this as a trigger has been shown, but the present invention is not limited to this. For example, when a response signal on the USB memory 200 side is detected and this is a header indicating write permission / prohibition, a write prohibition flag may be added to the header.

尚、本発明のUSBメモリ用書き込み防止アダプタは、上記した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。   Note that the USB memory write-protection adapter of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the present invention.

本発明のUSBメモリ用書き込み防止アダプタ装置は、USBメモリのデータ保護の技術分野、特にUSBメモリへのデータ書き込みを防止する分野に利用することができる。   The USB memory write prevention adapter device of the present invention can be used in the technical field of data protection of a USB memory, particularly in the field of preventing data writing to a USB memory.

第1実施形態に係るUSBメモリ用書き込み防止アダプタ1、ホストPC100及びUSBメモリ200の全体構造を示すブロック図である。1 is a block diagram showing the overall structure of a USB memory write prevention adapter 1, a host PC 100, and a USB memory 200 according to a first embodiment. 第1実施形態に係るUSBメモリ用書き込み防止アダプタ1の基本動作を示すフローチャートである。It is a flowchart which shows the basic operation | movement of the write-protect adapter 1 for USB memories which concerns on 1st Embodiment.

符号の説明Explanation of symbols

1 USBメモリ用書き込み防止アダプタ
10 CPU
20 USBホストコントローラ
30 USBデバイスコントローラ
40 ROM
50 RAM
60 メモリ側USBコネクタ
70 デバイス側USBコネクタ
100 ホストPC
200 USBメモリ
1 USB memory write protection adapter 10 CPU
20 USB host controller 30 USB device controller 40 ROM
50 RAM
60 Memory side USB connector 70 Device side USB connector 100 Host PC
200 USB memory

Claims (2)

USBメモリが有するUSBコネクタと係合し、該USBコネクタと電気的に接続されるメモリ側USBコネクタと、
外部デバイスのUSBコネクタと係合し、該USBコネクタと電気的に接続されるデバイス側USBコネクタと、
前記デバイス側USBコネクタを介して、前記外部デバイスとUSB規格に基づく信号の送受信を行い、該外部デバイスとのデータ通信を可能とする第1の通信制御手段と、
前記メモリ側USBコネクタを介して、前記USBメモリとUSB規格に基づく信号の送受信を行い、該USBメモリとのデータ通信を可能とする第2の通信制御手段と、
前記USBメモリを制御するとともに、該USBメモリの書き込みの可否の状態によらず、該USBメモリから前記外部デバイスに送信する信号に、書き込み禁止フラグを付加する書き込み禁止フラグ付加手段と、を備え、
前記書き込み禁止フラグ付加手段は、前記外部デバイスから送信されるモードセンスコマンドを検出すると共に、前記モードセンスコマンドを前記USBメモリに転送し、更に、前記USBメモリから前記モードセンスコマンドに応答して送信されるモードパラメータリストの一部に前記書き込み禁止フラグを書き込んだ後、該モードパラメータリストを前記外部デバイスに転送し、前記外部デバイスに前記USBメモリが書き込み禁止であることを認識させることを特徴とする、
USBメモリ用書き込み防止アダプタ装置。
A memory-side USB connector that engages with a USB connector included in the USB memory and is electrically connected to the USB connector;
A device-side USB connector that engages with a USB connector of an external device and is electrically connected to the USB connector;
First communication control means for performing transmission and reception of signals based on the USB standard with the external device via the device-side USB connector and enabling data communication with the external device;
A second communication control means for performing transmission / reception of signals based on the USB standard with the USB memory via the memory-side USB connector, and enabling data communication with the USB memory;
Write prohibition flag adding means for controlling the USB memory and adding a write prohibition flag to a signal transmitted from the USB memory to the external device regardless of whether the USB memory can be written.
The write prohibition flag adding means detects a mode sense command transmitted from the external device, transfers the mode sense command to the USB memory, and further transmits from the USB memory in response to the mode sense command. After writing the write prohibition flag in a part of the mode parameter list to be executed, the mode parameter list is transferred to the external device, and the external device is made aware that the USB memory is write prohibition. To
Write prevention adapter device for USB memory.
前記外部デバイスから受信した前記USBメモリへの書き込み命令を遮断するとともに、該外部デバイスに書き込みエラー信号を送信する書き込み検出手段を備えることを特徴とする、
請求項1に記載のUSBメモリ用書き込み防止アダプタ装置。
A write detection means for blocking a write command to the USB memory received from the external device and transmitting a write error signal to the external device is provided.
The USB memory write prevention adapter device according to claim 1 .
JP2008276329A 2008-10-28 2008-10-28 Write prevention adapter device for USB memory Expired - Fee Related JP5297761B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008276329A JP5297761B2 (en) 2008-10-28 2008-10-28 Write prevention adapter device for USB memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008276329A JP5297761B2 (en) 2008-10-28 2008-10-28 Write prevention adapter device for USB memory

Publications (2)

Publication Number Publication Date
JP2010108017A JP2010108017A (en) 2010-05-13
JP5297761B2 true JP5297761B2 (en) 2013-09-25

Family

ID=42297444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008276329A Expired - Fee Related JP5297761B2 (en) 2008-10-28 2008-10-28 Write prevention adapter device for USB memory

Country Status (1)

Country Link
JP (1) JP5297761B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4551643B2 (en) * 2002-05-29 2010-09-29 株式会社ハギワラシスコム USB printer and USB scanner
JP2006023980A (en) * 2004-07-08 2006-01-26 Matsushita Electric Ind Co Ltd Memory controller, memory card, access device, and memory card state switching method
JP4452158B2 (en) * 2004-11-10 2010-04-21 シャープ株式会社 Nonvolatile memory system
JP2006155029A (en) * 2004-11-26 2006-06-15 Matsushita Electric Ind Co Ltd Hard disk control device
JP4009315B1 (en) * 2007-02-14 2007-11-14 有限会社トゥールビヨン Security adapter
JP5080833B2 (en) * 2007-03-16 2012-11-21 株式会社バッファロー Memory device and manufacturing method thereof

Also Published As

Publication number Publication date
JP2010108017A (en) 2010-05-13

Similar Documents

Publication Publication Date Title
US9104895B2 (en) Method for accessing a portable data storage medium with auxiliary module and portable data storage medium
TW200949605A (en) Peripheral device locking mechanism
EP1310908A3 (en) Portable storage medium based on universal serial bus standard
EP1496436B1 (en) Method and apparatus for autoreset of a usb smart card device in a mute mode
CN101526926A (en) Digital key method and system
JP2010262335A (en) External memory data reader with computer virus infection preventive function, and external memory data reading method with computer virus infection preventive function
EP2704021B1 (en) SRAM handshake
JP6986835B2 (en) Electronic information storage, data processing methods, and data processing programs
JP5293231B2 (en) IC chip, IC card, issuing device, issuing method and issuing system
JP5297761B2 (en) Write prevention adapter device for USB memory
CN101187912A (en) Memory card system and method for transmitting its host identification information
JP2010511934A (en) Portable module interface that prevents time-out by dummy block
JP5163522B2 (en) USB storage device, host computer, USB storage system, and program
KR102424293B1 (en) Storage system and method for performing secure write protect thereof
JP3655597B2 (en) Electronic device, electronic card, and card identification method
JP4759048B2 (en) Control system
CN101221547B (en) Memory card having multiple interfaces, reset control method thereof
US10318463B2 (en) Interface controller, external electronic device, and external electronic device control method
KR20080044502A (en) Memory card system and its password transfer method
WO2006092042A1 (en) A method and protocol for transmitting extended commands to usb devices
CN100592314C (en) A kind of mobile storage card access overtime protection method
JP5241065B2 (en) Apparatus and method for checking whether data stored in external memory is changed
EP2629222A1 (en) Portable, protected data storage device
JP2012027667A (en) Portable electronic device, ic card, and control method for portable electronic device
JP2006350881A (en) Memory card control device and memory card control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120802

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120807

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121002

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130409

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130515

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130604

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130617

R150 Certificate of patent or registration of utility model

Ref document number: 5297761

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees