universal serial bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준...

21
USB Ur Special Back-up 2008315971 임임임 2007314869 임임임 Ur Special Back Up

Upload: alvin-crawford

Post on 26-Dec-2015

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

USBUr Special Back-up

2008315971 임혁준2007314869 성노섭

Ur Special Back Up

Page 2: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Ur Special Back Up

Page 3: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Contents

I. Introduction of USB

II. Topology of USB

III. Hierarchy of USB Device

IV. Motivation

V. What is Ur Special Back-up

VI. Sequence of Back-up

VII. Class Diagram

VIII. Priority of Method

IX. Task Allocation

X. Difficulties of implementation

Ur Special Back Up

Page 4: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

1. Introduction

Ur Special Back Up

Page 5: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Introduction of USB

Universal Serial Bus

컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Ur Special Back Up

Page 6: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Topology of USB Bus

UsbHostController - On-borad - PCI cards

Ur Special Back Up

Page 7: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Hierarchy of USB Device

Ur Special Back Up

Page 8: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

2. Ur Special Back-up

Ur Special Back Up

Page 9: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Motivation

Ur Special Back Up

Page 10: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

What is Ur Special Back-up

SAVE

Ur Special Back Up

Page 11: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Get Busses Info

.

Get Mounted Busses

Lis-ten-ing

Get Newl

y Mounted

Busses

Get De-vice Info

.

Get GUID

File I/O

Back-up

Sequence of Back-up

Ur Special Back Up

Page 12: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Class DiagramRunUsbController

OBSERVATION_TIME : private static final intRunUSBControllerTest : publiclstDeviceNames : private static Listhost : private HostAboutMountedbusses : private static TextAreaAboutComer : public static TextAreaProcessing : public static TextAreaing : public static Checkboxal : public static ArrayListbtnExit : Button

actionPerformed : public voidsetupGui : public voidsetupTextGui : public voidprintUSBStack : private static voidprintDeviceDescriptor : public static voidprintDeviceDescriptorJUSB : public static voidprintConfigurationDescriptor : public static voidprintInterfaceDescriptors : public static voidprintConfigurationDescriptor2 : public static voidprintEndpointDescriptors : public static void

RunUsbControllerTest Root Bus 에 연결된 Usb Device 들의 정보 수집 및 출력

printUSBStack 버스에 연결된 USB Device 들의 port, uniqueID, driverKeyName,friendlyDeviceName 출력 , 장치를 JUSB, NON-JUSB 로 구분 .

printDeviceDescriptor idVendor, idProduct, Max Packet Size 등 특정 장치에 관한 세부적인정보 출력

printDeviceDescriptorJUSB장치가 JUSB driver 를 사용할 수 있을 경우 printDeviceDescriptor 정보와동일한 정보를 출력한다 .

printConfigurationDescriptorgetTotalLength, getNumInterfaces, getConfigurationValue, getAttributes 등의 정보를 출력한다 .

actionPerformedEXIT 버튼 클릭시 시스템을 종료한다 .

Ur Special Back Up

Page 13: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

printInterfaceDescriptors :Configuration 정보가 있는 경우 이 장치의 InterfaceClass,getInterfaceProtocol 등의 정보를 출력한다 .

printConfigurationDescriptor2 :JUSB driver 를 이용할 수 있는 경우 사용되며 내용은printInterfaceDescriptors 와 동일하다 .

printEndpointDescriptors :EndpointAddress, MaxPacketSize, Attribute 를 얻는다 .

setupGui :기본 frame 을 생성하고 이 위에 생성되는 객체의 글씨체 , 위치 등을설정 및 WindowListener 에 창 종료를 이벤트를 연결한다 .실행시 Bus 들의 정보를 출력한다 .

setupTextGui :USBListener 에 마운트 되는 device 정보와 파일 전송 시 파일전송목록을 표시한다 .

Class DiagramRunUsbController

OBSERVATION_TIME : private static final intRunUSBControllerTest : publiclstDeviceNames : private static Listhost : private HostAboutMountedbusses : private static TextAreaAboutComer : public static TextAreaProcessing : public static TextAreaing : public static Checkboxal : public static ArrayListbtnExit : Button

actionPerformed : public voidsetupGui : public voidsetupTextGui : public voidprintUSBStack : private static voidprintDeviceDescriptor : public static voidprintDeviceDescriptorJUSB : public static voidprintConfigurationDescriptor : public static voidprintInterfaceDescriptors : public static voidprintConfigurationDescriptor2 : public static voidprintEndpointDescriptors : public static void

Ur Special Back Up

Page 14: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

GetGUID

getGUID : public static Ar-rayList

getGUID :프로그램이 동작할 시에 할당된 GUID 정보에 USBListener 에 의해 추가 된 GUID정보를 비교하고 파일이 전송 될 GUID 정보를 얻기 위해 사용된다 .

Class Diagram

UsbCopyTo

CopyFrom : public static voidCopyTo : public static void

CopyFrom :원본파일이 위치한 곳의 정보와 저장할 곳의 위치 정보를 입력 받고 , 원본파일이위치한 곳의 위치에 폴더가 존재할 경우 하위 폴더를 탐색을 위해 CopyTo 메소드를 호출한다 .

CopyTo :CopyFrom 으로 부터 전달 받은 Path 정보를 바탕으로 원본파일 위치가 폴더일 경우폴더 아래 모든 파일을 복사하기 위해 CopyTo 메소드를 recursive 하게 호출한다 .

Ur Special Back Up

Page 15: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

ControllerUSBListener

bus : private Busal2 : static ArrayListal3 : static ArrayList

busAdded : public voidbusRemoved : public voiddeviceAdded : public voiddeviceRemoved : public voidprintUSBStack : private void

busAdded :USBListener 에서 새로운 Bus 장치가 Mount 되었을 경우에 대한 action 을 처리한다 .

busRemoved :USBListener 에서 새로운 Bus 장치가 Mount 되었을 경우에 대한 action 을 처리한다 .

deviceAdded :USBListener 에서 새로운 USB 가 Mount 되었을 경우에 대한 action 을 처리한다 .USB 장치가 새롭게 Mount 됨과 동시에 USB 에 저장된 모든 파일을 Hard-disk 로전송한다 .

deviceRemoved :USBListener 에서 USB 장치가 제거 되었을 경우에 대한 action 을 처리한다 .제거 된 장치 정보를 출력해 준다 .

printUSBStack :Device 정보를 출력한다 .

Class Diagram

Ur Special Back Up

Page 16: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

ControllerUSBListener Rating

busAddedbusRemoveddeviceAddeddeviceRemovedprintUSBStack

33121

Priority of Method

GetGUID Rating

getGUID 1 ★

UsbCopyTo Rating

CopyFrom CopyTo

12

RunUsbController Rating

actionPerformedsetupGui setupTextGuiaprintUSBStack printDeviceDescriptorprintDeviceDescriptorJUSBprintConfigurationDescriptorprintInterfaceDescriptorsprintConfigurationDescrip-tor2printEndpointDescriptors

6551 ★143332

Ur Special Back Up

Page 17: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

3. Conclusion

Ur Special Back Up

Page 18: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Task allocation

임혁준 - printUSBStack() * printDeviceDescriptor(); * printDeviceDescriptorJUSB() * printConfigurationDescriptor(); * printInterfaceDescriptors(); * printEndpointDescriptors();

성노섭 - setupGui(); - setupTextGui(); - getGUID() - CopyTo() - CopyFrom() - ControllerUSBListener * deviceRemoved() * deviceAddes()

Ur Special Back Up

Page 19: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Difficulties of Implementation

임혁준

1. USB 구조의 이해

2. 구조의 이해 후 구현에 있어서 Device Descriptor 를 얻기 위한

JAVA 예제가 전무한 것이 가장 힘들었다 .

3. Compile 시에 라이브러리와의 연동을 위해서 SYSTEM32 에 JUSB.SYS 를 복사하고 ,

장치정보를 등록하기 위해서 레지스트리에 PATH 정보를 등록

4. LISTENER 를 위해 정보를 추출해야 하는데 얻은 DEVICE DESCRIPTOR 의 정보를

하나씩 출력하면서 추적하는 것도 힘들었다 .”

Ur Special Back Up

Page 20: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Difficulties of Implementation

성노섭

1. LISTENER 의 구현을 위해서 필요한 정보의 획득

2. 그 후에 얻은 DEVICE 정보를 토대로 어떻게 전송을 할 것인가

3. USB 통신에서의 4 가지 방식 (bulk, interrupt, control, isomorphic) 중에서 일반적인

bulk 통신을 기반으로 파일전송을 시도했는데 , API 상으로는 구현되어 있지 않았다 .

4. 전송을 위해서 Mount 된 드라이버의 GUID 를 얻는 것이 선행되어야 했는데 ,

Device Descriptor 에서 얻은 Unique ID 에 그 정보가 있다는 것을 알았지만 ,

보안을 위해서 암호화되어 있었기 때문에 우회적인 방법의 탐색

Ur Special Back Up

Page 21: Universal Serial Bus 컴퓨터와 주변기기를 연결하는 데 쓰이는 입출력 표준 가운데 하나 (USB 1.0, 1.1, 2.0, 3.0 등 )

Thank you ~

Ur Special Back Up