WO2009125586A1 - デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置 - Google Patents

デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置 Download PDF

Info

Publication number
WO2009125586A1
WO2009125586A1 PCT/JP2009/001615 JP2009001615W WO2009125586A1 WO 2009125586 A1 WO2009125586 A1 WO 2009125586A1 JP 2009001615 W JP2009001615 W JP 2009001615W WO 2009125586 A1 WO2009125586 A1 WO 2009125586A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
function
usb
usb device
command processing
Prior art date
Application number
PCT/JP2009/001615
Other languages
English (en)
French (fr)
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 JP2010507154A priority Critical patent/JPWO2009125586A1/ja
Priority to CN200980111179.5A priority patent/CN101981556A/zh
Publication of WO2009125586A1 publication Critical patent/WO2009125586A1/ja
Priority to US12/898,282 priority patent/US20110022737A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Definitions

  • the present invention relates to a device control program and a device selection device, and more particularly to a device selection device having a USB (Universal Serial Bus) host function and a control technology for the device selection device.
  • USB Universal Serial Bus
  • USB host I / F an interface having a USB host function
  • PCs personal computers
  • multimedia devices such as AV (Audiovisual) devices.
  • USB devices are becoming connected to multimedia devices.
  • USB devices supporting only a single function have been connected to PCs and multimedia devices.
  • a USB memory device that supports only the storage function is connected to a PC, data is read and written between the PC and the USB memory device, or a USB memory device is connected to a multimedia device, I played or edited music data.
  • USB devices that support multiple functions with one device have become mainstream, and USB devices with multiple functions are also connected to PCs and multimedia devices.
  • a USB device a digital audio player having a storage function and a stream playback function is connected to a multimedia device, and music data stored in the digital audio player is streamed or music data is stored in the digital audio player.
  • Patent Document 1 A related technique is disclosed in Patent Document 1, for example.
  • FIG. 1 is a diagram showing a configuration example of a conventional permission list.
  • the permission list includes areas of a device number 101 indicating the number of devices, a permission device 102 that defines each permission device, and exception information 103.
  • the PC analyzes the device information of the USB device and compares it with the information in the permission list. As a result of verification, if the USB device has a function that the user wants to connect to, the connection to the PC is permitted, and if the device has the function that the user does not want to connect, the connection is restricted (for example, Patent Document 1).
  • Patent Document 1 since the device function determination using the permission list is used, if the connection conditions of the permission list are made in detail, the condition of the function that the user wants to use can be set in detail. As the list conditions become finer, the information amount of the permission device 102 and the exception information 103 increases, and a large memory area for storing the permission list is required.
  • Patent Document 1 in order to change a function that a user wants to use when a USB device is connected, it is necessary to update the permission list incorporated in the system in advance.
  • the permission list can be changed for each individual user.
  • an update by dedicated software is required. Therefore, a control program using a permission list can be realized in an environment where resources such as a PC are not limited, but can be realized in an embedded environment control program such as a multimedia device where resources are limited. Difficulties can be considered as challenges.
  • Patent Document 1 Another problem of Patent Document 1 is that detection of a function supported by a connected USB device is performed on the premise that only one type of class information is used and there is only one function.
  • class information in INTERFACE_DESCRIPTOR acquired from the USB device at the time of connection is used as information for detecting the function of a USB device.
  • FIG. 2 is a diagram showing the data structure of INTERFACE_DESCRIPTOR.
  • INTERFACE_DESCRIPTOR is composed of 9-byte data, and bInterfaceClass 201 includes class information.
  • the function corresponding to the device is detected using only the class information of bInterfaceClass 201.
  • a USB device that combines a plurality of types of class information and becomes a single function is connected, or a USB device whose function is detected in consideration of the command processing result for detecting the class information and the function is In the case of connection, in Patent Document 1, there is a possibility that the function of the USB device is misidentified.
  • the user can select the function that the user wants to use without using the permission list, and that the function supported by the USB device is not detected only by the class information.
  • the object of the present invention is to enable selection of USB device functions corresponding to a plurality of functions even in an environment where resources are limited.
  • a device control method includes a step of acquiring device information from a USB device, and a command process for issuing a command to the USB device in order to detect a function of the USB device from the acquired device information.
  • a computer-executable device control program includes a step of acquiring device information from a USB device, and a command to the USB device to detect the function of the USB device from the acquired device information. And determining whether or not command processing for issuing the command processing is necessary, performing the command processing when it is determined that the command processing is necessary, and based on the acquired device information and the result of the command processing And creating device list information that lists the function information of the USB device, and storing the device list information in a memory area.
  • the device selection device includes a computing device and a USB host controller that performs data transfer between the USB device and the computing device.
  • the arithmetic device acquires device information from the USB device, and determines whether command processing for issuing a command to the USB device is necessary to detect the function of the USB device from the acquired device information Device that performs the command processing when it is determined that the command processing is necessary, and lists the function information of the USB device based on the acquired device information and the result of the command processing. List information is created, and the device list information is stored in a memory area.
  • the function of the USB device corresponding to a plurality of functions. Since it is not necessary to execute dedicated software for selecting a function, the function can be selected even in an environment where resources are limited.
  • FIG. 1 is a diagram showing a configuration example of a conventional permission list.
  • FIG. 2 is a diagram illustrating the data structure of INTERFACE_DESCRIPTOR.
  • FIG. 3 is a block diagram showing the configuration of the device selection apparatus according to the embodiment of the present invention.
  • FIG. 4 is a flowchart illustrating an example of processing of the device selection apparatus of FIG.
  • FIG. 5 is a flowchart showing processing of the device information processing block.
  • FIG. 6 is a diagram illustrating an example of the data structure of DEVICE_DESCRIPTOR.
  • FIG. 7A is a diagram illustrating an example of configuration information when a device is configured with one configuration.
  • FIG. 7B is a diagram illustrating an example of configuration information when a device is configured with a plurality of configurations.
  • FIG. 7A is a diagram illustrating an example of configuration information when a device is configured with one configuration.
  • FIG. 7B is a diagram illustrating an example of configuration information when a device is configured with
  • FIG. 8 is a diagram illustrating an example of pattern information.
  • FIG. 9 is a flowchart showing the processing of the list processing block until the device list information is created.
  • FIG. 10 is a diagram illustrating an example of device list information.
  • FIG. 11 is a flowchart showing processing until the device selection apparatus controls the function selected by the user by presenting the function supported by the connected USB device to the user.
  • FIG. 12 is an example of screen display information presented to the user.
  • FIG. 13 is a flowchart showing the processing of the list processing block after the device list information is created.
  • FIG. 14 is a flowchart showing the processing of the class processing block.
  • the device selection device executes the control program, whereby the following steps a, b, c, and d are performed.
  • the device selection apparatus can detect information on the function supported by the USB device only by class information in INTERFACE_DESCRIPTOR, or information that cannot be detected as a function without combining a plurality of types of class information. Whether the information requires class processing and command processing for detecting the function is determined based on the pattern information for identifying the function of the device. As a result of the determination, when the function cannot be detected only by the class information in the INTERFACE_DESCRIPTOR, a command process for detecting the function is performed on the USB device (step a).
  • the function supported by the device is detected in consideration of the acquired device information and the command processing result.
  • the detected function is created in the memory area in the device selection device as device list information in which information presented to the user is associated with information managed in the control program (step b).
  • the device selection device acquires information to be presented to the user from the device list information, and uses the output device of the device selection device to identify the type of function supported by the USB device. Present to the user. The user selects a function that the user wants to use from the presented device functions by using the input device of the device selection device (step c).
  • the selected information is converted from device list information to information of internal management by the control program, and class processing necessary for controlling the function of the device selected by the user is selected.
  • the device selection apparatus After the class process is selected, the device selection apparatus performs a setting process for determining a function to be used for the USB device. After the setting process for the USB device is completed, the device selection device controls the USB device using the class process (step d).
  • the function of the USB device is not detected only by the class information in the INTERFACE_DESCRIPTOR, so that the function supported by the USB device can be recognized without misidentification. Further, by performing the processing of steps c and d, it is possible to present the function of the device that the user wants to use to the user, and the user can select the function and control only the selected function of the USB device. .
  • the corresponding function when the USB device is connected, the corresponding function can be explicitly presented to the user, so that the user can select the function he wants to use.
  • the function that the user does not want to use is not operated, and the malfunction caused by the user operation can be prevented.
  • USB device function determination a USB device that shows one function by combining a plurality of types of class information, or a USB device whose function is determined in consideration of command processing results for specifying class information and functions As described above, even when the function of the USB device cannot be detected only by the class information, it is possible to determine without misidentifying the function of the USB device.
  • FIG. 3 is a block diagram showing the configuration of the device selection apparatus according to the embodiment of the present invention.
  • the device selection device 301 includes a USB host controller 302, a data control device 303, a computing device 304, a memory area 305, an input / output device 306, an internal information storage area 307, an image / audio reproduction / recording device 308, and a USB connector 315. Connection and disconnection of the USB device are performed via the USB connector 315 of the device selection device 301.
  • the USB host controller 302 performs data transmission / reception processing to the USB device and data transmission / reception processing to the data control device 303.
  • the memory area 305 stores a control program 309 for controlling the device selection device 301.
  • the device list information 314 for temporarily storing functions supported by the connected USB device is temporarily stored in the control program. It is also used as a data area 310 for data stored in the.
  • the input / output device 306 presents the function supported by the USB device to the user and performs processing for allowing the user to select the function of the USB device.
  • the internal information storage area 307 is a memory area used when storing data sent from the USB device and data sent to the USB device.
  • the image / sound reproduction / recording apparatus 308 analyzes data sent from the USB device, and performs reproduction / recording processing in the device selection apparatus 301 as image / sound data.
  • the computing device (computer) 304 executes the control program 309 in the memory area 305 to control all devices in the device selection device 301 including the data control device 303 and access processing to the data storage area.
  • the data control device 303 is controlled by the arithmetic device 304 and controls the data of the USB host controller 302, data access to the memory area 305, control of the image / sound reproduction / recording device 308, data access to the internal information storage area 307, input Data control of the output device 306 is performed.
  • the control program 309 is mainly composed of three processing blocks: a device information processing block 311, a list processing block 312, and a class processing block 313.
  • the device information processing block 311 is a processing block that executes device information acquisition processing and command processing for function determination when a USB device is connected.
  • the list processing block 312 is a processing block for creating device list information 314 from device information acquired from the USB device, outputting the device list information 314 to the user, and determining corresponding class information from the function selected by the user.
  • the class processing block 313 has a function setting processing routine for the USB device and a class driver processing routine for operating the function selected by the user, and is a processing block for controlling the class driver processing.
  • the device selection apparatus 301 acquires functions supported by the USB device when the device selection apparatus 301 and the USB device are connected, and lists the functions of the USB device based on the acquired information.
  • the device list information 314 is stored, the function corresponding to the USB device is presented to the user based on the stored device list information 314, and the device selection device 301 controls the function of the USB device with the function selected by the user. .
  • the operation of the connected device apparatus 301 until the functions supported by the USB device are listed and stored as device list information 314, and the user corresponds to the USB device.
  • the operation until the device selection device 301 controls the function of the USB device according to the function selected by the user will be described separately.
  • FIG. 4 is a flowchart showing an example of processing of the device selection apparatus 301 in FIG. FIG. 4 shows processing until the USB device is connected to the device selection apparatus 301 and the functions supported by the USB device are listed.
  • the arithmetic unit 304 executes the device information processing block 311 in the control program 309. Thereby, the arithmetic device 304 acquires device information from the USB device when the USB device is connected to the device selection device 301.
  • step A42 the arithmetic unit 304 executes the list processing block 312 in the control program 309. As a result, the arithmetic unit 304 creates device list information 314 that lists information on the functions of the USB device from the acquired device information, and stores it in the memory area 305.
  • FIG. 5 is a flowchart showing processing of the device information processing block 311.
  • FIG. 5 corresponds to the process of step A41 for obtaining the device information of FIG.
  • FIG. 6 is a diagram illustrating an example of the data structure of DEVICE_DESCRIPTOR.
  • the DEVICE_DESCRIPTOR is composed of 18-byte data, and includes idVender 601 indicating the manufacturer ID, idProduct 602 indicating the product ID, and bNumConfigurations 603 indicating the configurable number of devices.
  • the USB host controller 302 When the USB device is connected to the device selection device 301, the USB host controller 302 becomes communicable with the USB device, and first acquires DEVICE_DESCRIPTOR in order to acquire the configuration information of the USB device (step B51).
  • the arithmetic unit 304 stores idVender601, idProduct602, and bNumConfigurations 603 included in the acquired DEVICE_DESCRIPTOR in the data area 310 (step B52).
  • the USB host controller 302 acquires CONFIGURATION_DESCRIPTOR in order to acquire detailed configuration information of the USB device (step B53).
  • the detailed configuration information of the USB device is configured by information called configuration, and the USB device has the number of configurations indicated by bNumConfigurations 603. There may be one configuration or multiple configurations.
  • the configuration is obtained by acquiring CONFIGURATION_DESCRIPTOR from the USB device. By acquiring CONFIGURATION_DESCRIPTOR, detailed configuration information of the USB device can be acquired.
  • FIG. 7A is a diagram illustrating an example of configuration information when a device is configured with one configuration.
  • FIG. 7B is a diagram illustrating an example of configuration information when a device is configured with a plurality of configurations.
  • the configuration information 701 in FIG. 7A and the configuration information 702 in FIG. 7B by acquiring the CONFIGURATION_DESCRIPTOR, the information of the INTERFACE_DESCRIPTOR can also be acquired, so that the configuration is configured. The number of interfaces and class information can be acquired.
  • the arithmetic unit 304 uses the value of bNumConfigurations 603 acquired in step B52 to determine whether or not all configurations have been acquired from the USB device (step B54).
  • the process returns to step B53.
  • the USB host controller 302 acquires CONFIGURATION_DESCRIPTOR from the USB device again to acquire the remaining configuration.
  • the arithmetic unit 304 analyzes all the acquired configurations and uses a function (hereinafter referred to as a special function) that cannot be detected only by class information. It is checked whether or not the device may have (step B55). The analysis in step B55 is performed based on special function pattern information included in the device information processing block 311.
  • FIG. 8 is a diagram showing an example of pattern information.
  • the pattern information 801 is composed of a special function name representing the name of the special function and a special condition for determining the special function.
  • the special condition describes conditions for determining a special function.
  • the special condition includes information that can be acquired from DEVICE_DESCRIPTOR and CONFIGURATION_DESCRIPTOR, and information that indicates command processing for detecting a special function of the USB device. Yes.
  • the pattern information 801 is included in advance in the device information processing block 311 according to the special function supported by the device selection apparatus 301.
  • the arithmetic unit 304 determines whether the USB device has a special function that cannot be detected only from the class information, in other words, sends a command to the USB device to detect the special function. It is determined whether or not command processing to be issued is necessary (step B56).
  • step B57 the processing flow of FIG. 5 ends.
  • the above is the processing flow of the device information processing block 311 that is executed by the arithmetic device 304 and acquires device information from the USB device.
  • FIG. 9 is a flowchart showing the processing of the list processing block 312 until the device list information 314 is created.
  • FIG. 9 corresponds to the process of step A42 in FIG.
  • the arithmetic unit 304 analyzes the INTERFACE_DESCRIPTOR information from the device information acquired in the process of FIG. 5 (step C91).
  • the arithmetic unit 304 acquires information on bInterfaceClass 201 that is class information from the analyzed INTERFACE_DESCRIPTOR information (step C92).
  • the arithmetic unit 304 determines whether or not the class information acquired in step C92 is class information corresponding to the special condition of the pattern information 801 in the device information processing block 311 (step C93).
  • the arithmetic unit 304 uses idVender 601, idProduct 602, command processing result, and class information stored in the data area 310. Then, the special function is selected from the pattern information 801 to detect the function of the USB device (step C94).
  • the arithmetic unit 304 detects the function of the USB device only with the class information (step C95).
  • the computing device 304 After step C94 or step C95, the computing device 304 creates device list information 314 that summarizes the functions of the USB device and stores it in the memory area 305 (step C96).
  • FIG. 10 is a diagram illustrating an example of the device list information 314.
  • the device list information 314 stored in the memory area 305 will be described with reference to FIG.
  • the device list information 314 includes internal management information managed within the control program 309 and user presentation information for displaying functions supported by the USB device for the user using the input / output device 306. Yes.
  • the internal management information includes an ID 1001 assigned to each function of the USB device, and class information 1002 of a class driver processing routine in the class processing block 313 necessary for device function control.
  • the ID 1001 and the class information 1002 are associated with each other. Managed.
  • the ID 1001 includes information that can be acquired by DEVICE_DESCRIPTOR, information that can be acquired by INTERFACE_DESCRIPTOR, and information that can be acquired by CONFIGURATION_DESCRIPTOR. Therefore, by analyzing the ID 1001, device configuration information such as the number of configurations and the number of interfaces as shown by the configuration information 701 and the configuration information 702 can be grasped.
  • the user presentation information is composed of a function name 1003 supported by the USB device. Since the internal management information and the user presentation information are associated by three pieces of information of ID 1001, class information 1002, and function name 1003, the search of the user presentation information from the internal management information and the search of the internal management information from the user presentation information are performed. Yes.
  • the device list information 314 is created in the memory area 305 by processing of the list processing block 312 corresponding to the function of the USB device when the USB device is connected to the device selection device 301. When the USB device is disconnected, the device list information 314 corresponding to the USB device is deleted from the memory area 305.
  • the arithmetic unit 304 After creating the device list information 314 in step C96, the arithmetic unit 304 checks the capacity of the memory area 305, and if the result of the memory capacity check is that there is a free area in the memory area 305, performs the following processing. If there is no free area in the area 305, the processing flow of FIG. 9 is terminated (step C97).
  • the size of the memory area 305 that stores the device list information 314 needs to be adjusted according to the system specifications.
  • a large memory area 305 for storing the device list information 314 is secured in advance, so that it is not necessary to search many functions of the USB device, and the memory to be used is limited. Secures a small memory area 305. If it is determined in step C97 that there is a free area in the memory area 305, the arithmetic unit 304 determines whether or not analysis of all INTERFACE_DESCRIPTOR information has been completed (step C98).
  • the arithmetic unit 304 returns to step C91 to perform an INTERFACE_DESCRIPTOR analysis process and add the functions supported by the USB device to the device list information 314. to add. If it is determined that analysis of all INTERFACE_DESCRIPTOR has been completed, the arithmetic unit 304 ends the processing flow of FIG. The above is the processing flow of the list processing block 312 which is executed by the arithmetic unit 304 and creates the device list information 314 based on the information acquired from the USB device.
  • FIG. 11 is a flowchart showing processing until the device selection apparatus 301 controls the function selected by the user by presenting the function supported by the connected USB device to the user.
  • the function supported by the USB device is presented to the user. That is, using the function name 1003 in the device list information 314, the input / output device 306 displays information on the function supported by the USB device (step D1101).
  • FIG. 12 is an example of screen display information 1201 presented to the user.
  • the arithmetic device 304 displays only the information of the function name 1003 in the device list information 314 as information on the function supported by the USB device.
  • the user selects a function from the presented screen display information 1201 using the input / output device 306 (step D1102).
  • the arithmetic device 304 replaces input information indicating the selected function input from the input / output device 306 with the class information 1002 using the device list information 314, and a class for controlling the function corresponding to the class information 1002
  • a class driver processing routine in the processing block 313 is selected (step D1103). That is, the arithmetic device 304 selects the function of the USB device based on the input information.
  • the arithmetic unit 304 sets the configuration information used for the USB device and validates the function of the selected USB device (step D1104). After the setting of the configuration information used for the USB device is completed, the arithmetic unit 304 starts class driver processing to control the function selected by the user, and controls the function of the USB device (step D1105).
  • the processing of steps D1101 to D1103 is performed by the arithmetic device 304 executing the list processing block 312 in the control program 309, and the processing of steps D1104 to D1105 is performed by the arithmetic device 304 executing the class processing block 313. Done.
  • FIG. 13 is a flowchart showing the processing of the list processing block 312 after the device list information 314 is created.
  • the list processing block 312 performs processing for presenting the USB device function to the user and causing the user to dynamically select the device function.
  • the arithmetic unit 304 acquires the function name 1003 from the device list information 314 (step E1301).
  • the acquired function name 1003 is transferred from the data control device 303 to the input / output device 306, and the input / output device 306 presents the acquired function name 1003 to the user as screen display information 1201 (step E1302).
  • the processing step E1302 allows the user to dynamically select the device function from the presented screen display information 1201.
  • the arithmetic unit 304 determines whether or not the user has selected a function using the input / output device 306 (step E1303).
  • processing step E1302 is performed again.
  • the data control device 303 transfers the function data selected by the user from the input / output device 306 to the arithmetic device 304 (step). E1304).
  • the computing device 304 analyzes the function data indicating the function selected by the user and the function name 1003 of the device list information 314, and converts the function data into class information 1002 of the device list information 314.
  • the arithmetic unit 304 selects a class driver processing routine in the class processing block 313 for controlling the function selected by the user according to the class information 1002 (step E1305).
  • the processing of steps E1301 to E1304 is performed by the arithmetic device 304 executing the list processing block 312 in the control program 309, and the processing of step E1305 is performed by the arithmetic device 304 executing the class processing block 313. .
  • FIG. 14 is a flowchart showing the processing of the class processing block 313.
  • the class processing block 313 performs class processing for setting the function selected by the user in the USB device and controlling the USB device. The process of FIG. 14 is performed after the process of FIG. 13 is completed.
  • the arithmetic unit 304 acquires a class driver processing routine in the class processing block 313 according to the class information 1002 of the device list information 314, and then includes a configuration including the function selected by the user from the ID 1001 corresponding to the class information 1002.
  • the ID 1001 includes information that can be acquired by DEVICE_DESCRIPTOR, information that can be acquired by INTERFACE_DESCRIPTOR, and information that can be acquired by CONFIGURATION_DESCRIPTOR, so that it is possible to search a configuration including the function of the USB device selected by the user ( Step F1401).
  • the USB host controller 302 issues the SET_CONFIGURATION in the class processing block 313 to the USB device regarding the configuration including the function that the user wants to use. (Step F1402).
  • the configuration specified by SET_CONFIGURATION becomes valid on the USB device side.
  • the arithmetic unit 304 determines whether or not the SET_CONFIGURATION has been successfully issued (step F1403).
  • the arithmetic unit 304 performs error processing and notifies the user that the USB device cannot be used by using the input / output unit 306.
  • the processing flow ends (step F1405). If it is determined that the SET_CONFIGURATION is issued successfully, the arithmetic unit 304 controls the function of the USB device by using a class driver processing routine corresponding to the function of the USB device included in the class processing block 313. Is started (step F1404).
  • the image / sound reproduction recording device 308 reproduces / records the image / sound information in the USB device or the data in the USB device is internally stored by the function of the USB device selected by the user.
  • the device selection apparatus 301 can perform control such as transferring data stored in the information storage area 307 or data stored in the internal information storage area 307 to the USB device.
  • the processing in FIG. 14 is performed by the arithmetic device 304 executing the class processing block 313.
  • the device selection device 301 presents the listed USB device functions to the user and controls the USB device selected by the user. To do. Therefore, the user can dynamically select the presented function.
  • the function of the USB device can be selected, so the present invention is useful for the device selection method and the like. It is also useful as a multimedia device such as a component stereo, a DVD (Digital Versatile Disc) player, an HDD (Hard Disk Drive) recorder, a digital television receiver or the like.
  • a multimedia device such as a component stereo, a DVD (Digital Versatile Disc) player, an HDD (Hard Disk Drive) recorder, a digital television receiver or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 複数機能に対応したUSBデバイスの機能の選択を可能にする。デバイス制御方法であって、USBデバイスからデバイス情報を取得するステップと、前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行うステップと、前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成するステップと、前記デバイスリスト情報をメモリ領域に保存するステップとを有する。

Description

デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置
 本発明は、デバイス制御プログラムおよびデバイス選択装置に関し、特に、USB(Universal Serial Bus)ホスト機能を有するデバイス選択装置、およびデバイス選択装置の制御技術に関する。
 近年、USBホスト機能を有したインタフェース(以下、USBホストI/F)は、パーソナルコンピュータ(以下、PC)だけでなく、AV(Audiovisual)機器などのマルチメディア機器にも標準のインタフェースとして搭載され普及が進んでいる。そのため、USBデバイスは、マルチメディア機器にも接続されるようになってきている。これまでPCやマルチメディア機器には、単一の機能のみに対応したUSBデバイスが接続され使用されていた。例えば、ストレージ機能のみに対応したUSBメモリデバイスをPCに接続し、データの読み込み書き込みをPCとUSBメモリデバイスとの間で行ったり、USBメモリデバイスをマルチメディア機器に接続し、USBメモリデバイス内の音楽データの再生や編集を行ったりしていた。
 しかし、USBデバイスの多機能化により、1つのデバイスで複数の機能に対応したUSBデバイスが主流となり、PCやマルチメディア機器にも複数の機能を有したUSBデバイスが接続されるようになってきている。例えば、USBデバイスとして、ストレージ機能とストリーム再生機能を有したデジタルオーディオプレーヤーをマルチメディア機器に接続し、デジタルオーディオプレーヤー内に格納されている音楽データのストリーム再生を行ったり、デジタルオーディオプレーヤーに音楽データを書き込んだりすることが可能になっている。関連する技術が、例えば、特許文献1に開示されている。
特開2006-185218号公報
 このような複数機能に対応したUSBデバイスをマルチメディア機器に接続する場合には、接続時に有効となる機能が予め決定されていることが多く、接続時にユーザが使用したい機能が必ずしも選択できるとは限らない。
 また、複数機能に対応したUSBデバイスを、USBホストI/Fを搭載したPCに接続した場合には、ユーザが使いたい機能のみが選択されるのではなく、PCが対応している機能すべてが有効となる。よって、ユーザが使用したくない機能も使用可能な状態となっていることが多く、ユーザが使用したくない機能を誤って操作してしまうこともあり誤動作の原因となりかねない。
 上記の問題を解決するために、PCに接続して利用されるUSBデバイスの機能を制限する方法として、許可リストを使用した方法が用いられている。図1は、従来の許可リストの構成例を示す図である。許可リストは、デバイスの数を示すデバイス数101、各許可デバイスを規定する許可デバイス102、例外情報103の領域を有する。USBデバイスが接続されると、PCはUSBデバイスのデバイス情報を解析し、前記許可リストの情報と照合を行う。照合の結果、ユーザが接続を望む機能を有したUSBデバイスであればPCへの接続を許可し、ユーザが接続を望まない機能を有したデバイスであれば接続を制限する仕組みである(例えば、特許文献1参照)。
 しかし、特許文献1では、許可リストを使用したデバイスの機能判別を使用しているため、許可リストの接続条件を細かに作れば、よりユーザが使いたい機能の条件を詳細に設定できるが、許可リストの条件が細かくなると、許可デバイス102や、例外情報103の情報量が増加し、許可リストを保存するメモリ領域が多く必要となる。
 また、特許文献1では、USBデバイス接続時にユーザが使いたい機能を変更するためには、予めシステムに組み込まれている許可リストの自体の更新が必要となる。許可リストの変更は、個々のユーザごとに変更を行うことが可能であるが、ユーザごとの許可リストの更新を行うためには、専用のソフトウェアによる更新が必要となる。よって、PCのようなリソースが限られていない環境では、許可リストを使用した制御プログラムの実現が可能であるが、リソースが限られているマルチメディア機器のような組込み環境の制御プログラムでは実現が困難なことが課題として考えられる。
 特許文献1の別の課題として、接続されたUSBデバイスが対応している機能の検出を、1種類のクラス情報のみを使用し、1機能しかないという前提で行っているということが挙げられる。特許文献1では、USBデバイスの機能を検出している情報は、接続時にUSBデバイスから取得したINTERFACE_DESCRIPTOR内のクラス情報を使用している。
 図2は、INTERFACE_DESCRIPTORのデータ構造を示す図である。INTERFACE_DESCRIPTORは9バイトのデータで構成され、bInterfaceClass201にクラス情報が含まれている。特許文献1では、bInterfaceClass201のクラス情報のみを使用して、デバイスの対応している機能が検出される。例えば、複数の種類のクラス情報が組み合わさって1つの機能になるUSBデバイスが接続された場合や、クラス情報と機能を検出するためのコマンド処理結果を考慮して機能が検出されるUSBデバイスが接続された場合は、特許文献1では、USBデバイスの機能を誤認してしまう可能性がある。
 そこで、許可リストを使わずにユーザが使いたい機能を選べること、およびUSBデバイスが対応している機能を、クラス情報だけで検出しないことが望まれる。
 本発明は、リソースが限られた環境においても、複数機能に対応したUSBデバイスの機能の選択を可能にすることを目的とする。
 本発明の実施形態によるデバイス制御方法は、USBデバイスからデバイス情報を取得するステップと、前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行うステップと、前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成するステップと、前記デバイスリスト情報をメモリ領域に保存するステップとを有する。
 これによると、必要に応じてUSBデバイスに対してコマンドが発行されるので、クラス情報のみによることなく、USBデバイスの機能を誤りなく認識することが可能になる。
 本発明の実施形態によるコンピュータで実行可能なデバイス制御プログラムは、USBデバイスからデバイス情報を取得するステップと、前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行うステップと、前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成するステップと、前記デバイスリスト情報をメモリ領域に保存するステップとを有する。
 本発明の実施形態によるデバイス選択装置は、演算装置と、USBデバイスと前記演算装置との間のデータ転送を行うUSBホストコントローラとを有する。前記演算装置は、前記USBデバイスからデバイス情報を取得し、前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行い、前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成し、前記デバイスリスト情報をメモリ領域に保存する。
 本発明の実施形態によると、複数機能に対応したUSBデバイスの機能の選択が可能になる。機能の選択のために専用のソフトウェアを実行する必要もないので、リソースの限られた環境でも機能の選択が可能になる。
図1は、従来の許可リストの構成例を示す図である。 図2は、INTERFACE_DESCRIPTORのデータ構造を示す図である。 図3は、本発明の実施形態によるデバイス選択装置の構成を示すブロック図である。 図4は、図3のデバイス選択装置の処理の例を示すフローチャートである。 図5は、デバイス情報処理ブロックの処理を示すフローチャートである。 図6は、DEVICE_DESCRIPTORのデータ構造の例を示す図である。 図7(a)は、デバイスが1つのコンフィグレーションで構成されている場合の構成情報の例を示す図である。図7(b)は、デバイスが複数のコンフィグレーションで構成されている場合の構成情報の例を示す図である。 図8は、パターン情報の例を示す図である。 図9は、デバイスリスト情報を作成するまでのリスト処理ブロックの処理を示すフローチャートである。 図10は、デバイスリスト情報の例を示す図である。 図11は、ユーザに、接続されたUSBデバイスが対応している機能を提示し、ユーザが選択した機能をデバイス選択装置が制御するまでの処理を示すフローチャートである。 図12は、ユーザに提示される画面表示情報の例である。 図13は、デバイスリスト情報が作成された後のリスト処理ブロックの処理を示すフローチャートである。 図14は、クラス処理ブロックの処理を示すフローチャートである。
 (概要)
 デバイス選択装置に複数機能に対応したUSBデバイスが接続されると、デバイス選択装置が制御プログラムを実行することにより、以下のステップa,b,cおよびdの処理が行われる。
 USBデバイスが接続された場合、USBデバイスが対応している機能を検出するために、USBデバイスからデバイス情報を取得する。デバイス選択装置は、取得したデバイス情報より、USBデバイスが対応している機能の情報が、INTERFACE_DESCRIPTOR内のクラス情報のみで検出できる情報か、複数の種類のクラス情報を組み合わせなければ機能として検出できない情報か、クラス情報と機能を検出するためのコマンド処理が必要な情報なのか、デバイスの機能を識別するためのパターン情報を基に判別を行う。判別の結果、INTERFACE_DESCRIPTOR内のクラス情報のみで機能が検出できない場合に関しては、機能を検出するためのコマンド処理をUSBデバイスに対して行う(ステップa)。
 次に、取得したデバイス情報とコマンド処理の結果を考慮して、デバイスが対応している機能を検出する。検出された機能は、ユーザに提示する情報と制御プログラム内部で管理する情報が対応付けられたデバイスリスト情報としてデバイス選択装置内のメモリ領域に作成される(ステップb)。
 デバイスリスト情報が正常に作成された場合、デバイス選択装置は、デバイスリスト情報からユーザに提示する情報を取得し、USBデバイスが対応している機能の種類をデバイス選択装置の出力装置を使用してユーザに提示する。ユーザは提示されたデバイスの機能から、ユーザが使用したい機能をデバイス選択装置の入力装置を使用して選択する(ステップc)。
 選択された情報は、制御プログラムにより、デバイスリスト情報から内部管理の情報に変換され、ユーザが選択したデバイスの機能を制御するために必要なクラス処理が選択される。クラス処理が選択された後、デバイス選択装置は、USBデバイスに対して、使用する機能を決定するための設定処理を行う。USBデバイスに対して設定処理が完了した後は、デバイス選択装置は、クラス処理を使用してUSBデバイスの制御を行う(ステップd)。
 ステップaおよびbの処理を行うことにより、USBデバイスの機能はINTERFACE_DESCRIPTOR内のクラス情報のみでは検出されないので、USBデバイスが対応している機能を誤認することなく認識することが可能になる。また、ステップcおよびdの処理を行うことにより、ユーザが使用したいデバイスの機能をユーザに提示し、ユーザが機能を選択して、USBデバイスの選択された機能だけを制御することが可能となる。
 以上の処理によると、管理する情報はデバイスリスト情報のみであり、使用するUSBデバイスの機能はユーザが選択するので、ユーザが接続したい機能の条件を細かく設定した許可リストの作成、および許可リストを変更するための専用ソフトウェアの実装が必要でなくなる。そのためリソースの節約が可能であり、リソースが限られた組込み環境でも実装が可能である。
 USBのデバイスの機能選択については、USBデバイスが接続された時に、対応している機能を明示的にユーザに提示できるため、ユーザに使いたい機能を選択させることが可能になる。また、USBデバイス接続時にユーザが使いたい機能のみが選択され有効になるため、ユーザが使いたくない機能が操作されることがなくなり、ユーザ操作による誤動作を予防することが可能である。
 USBデバイスの機能判別については、複数の種類のクラス情報が組み合わさって1つの機能を示すUSBデバイスや、クラス情報と機能を特定するためのコマンド処理結果を考慮して機能が決定されるUSBデバイスのように、USBデバイスの機能がクラス情報のみで検出できない場合についても、USBデバイスの機能を誤認することなく判別することが可能になる。
 (実施形態)
 以下、本発明の実施形態を図面に基づいて詳細に説明する。
 図3は、本発明の実施形態によるデバイス選択装置の構成を示すブロック図である。デバイス選択装置301は、USBホストコントローラ302、データ制御装置303、演算装置304、メモリ領域305、入出力装置306、内部情報格納領域307、画像・音声再生録音装置308、およびUSBコネクタ315を含む。USBデバイスの接続と切断は、デバイス選択装置301のUSBコネクタ315を介して行われる。
 図3に示すデバイス選択装置301の各構成要素の主機能を説明する。USBホストコントローラ302は、USBデバイスがUSBコネクタ315と接続された場合、USBデバイスへのデータ送受信処理、データ制御装置303へのデータ送受信処理を行う。
 メモリ領域305にはデバイス選択装置301を制御する制御プログラム309が格納され、接続されたUSBデバイスの対応している機能を一時的に保存するためのデバイスリスト情報314、制御プログラムの処理で一時的に保存されるデータのためのデータ領域310としても使用される。
 入出力装置306は、ユーザに対してUSBデバイスが対応している機能を提示し、ユーザによりUSBデバイスの機能を選択させるための処理を行う。内部情報格納領域307は、USBデバイスから送られてくるデータやUSBデバイスに送るデータを保存する場合に使用されるメモリ領域となる。画像・音声再生録音装置308は、USBデバイスから送られてくるデータの解析を行い、画像・音声データとしてデバイス選択装置301内で再生録音処理を行う。
 演算装置(コンピュータ)304は、メモリ領域305内の制御プログラム309を実行してデータ制御装置303を始めデバイス選択装置301内のすべての装置の制御、およびデータの保存領域に対するアクセス処理を行う。
 データ制御装置303は、演算装置304によって制御され、USBホストコントローラ302のデータ制御、メモリ領域305へのデータアクセス、画像・音声再生録音装置308の制御、内部情報格納領域307へのデータアクセス、入出力装置306のデータ制御を行う。
 制御プログラム309は、主にデバイス情報処理ブロック311、リスト処理ブロック312、クラス処理ブロック313の3つの処理ブロックによって構成される。デバイス情報処理ブロック311は、USBデバイスが接続された時に、デバイス情報取得処理、機能判別のためのコマンド処理を実行する処理ブロックである。リスト処理ブロック312はUSBデバイスより取得したデバイス情報からデバイスリスト情報314の作成、ユーザへのデバイスリスト情報314の出力処理、ユーザが選択した機能から対応するクラス情報を決定する処理ブロックである。クラス処理ブロック313は、USBデバイスに対して使用する機能の設定処理ルーチンと、ユーザが選択した機能を動作させるためのクラスドライバ処理ルーチンとを有し、クラスドライバ処理を制御する処理ブロックである。
 本実施形態では、デバイス選択装置301は、デバイス選択装置301とUSBデバイスが接続された際に、USBデバイスが対応している機能を取得し、取得した情報を基にUSBデバイスの機能をリスト化しデバイスリスト情報314として保存し、保存したデバイスリスト情報314を基にユーザにUSBデバイスが対応している機能を提示し、ユーザが選択した機能でデバイス選択装置301がUSBデバイスの機能の制御を行う。
 USBデバイスとデバイス選択装置301が接続された際の、USBデバイスが対応している機能をリスト化しデバイスリスト情報314として保存するまでの接続デバイス装置301の動作と、ユーザにUSBデバイスの対応している機能を提示し、ユーザが選択した機能でデバイス選択装置301がUSBデバイスの機能の制御を行うまでの動作を分けて説明する。
 図4は、図3のデバイス選択装置301の処理の例を示すフローチャートである。図4では、USBデバイスがデバイス選択装置301に接続され、USBデバイスが対応している機能がリスト化されるまでの処理が示されている。ステップA41では、演算装置304は、制御プログラム309内のデバイス情報処理ブロック311を実行する。これにより、演算装置304は、USBデバイスがデバイス選択装置301に接続された場合に、USBデバイスからデバイス情報の取得を行う。
 次に、ステップA42では、演算装置304は、制御プログラム309内のリスト処理ブロック312を実行する。これにより、演算装置304は、取得されたデバイス情報からUSBデバイスの機能の情報をリスト化したデバイスリスト情報314を作成し、メモリ領域305に保存する。
 図5は、デバイス情報処理ブロック311の処理を示すフローチャートである。図5は、図4のデバイス情報の取得を行うステップA41の処理に相当する。図6は、DEVICE_DESCRIPTORのデータ構造の例を示す図である。DEVICE_DESCRIPTORは、18バイトのデータで構成され、メーカーのIDを示すidVendor601、製品のIDを示すidProduct602、デバイスの構成可能な数を示すbNumConfigurations603を含んでいる。
 USBデバイスがデバイス選択装置301に接続された場合、USBホストコントローラ302は、USBデバイスと通信可能な状態となり、USBデバイスの構成情報を取得するため、最初にDEVICE_DESCRIPTORを取得する(ステップB51)。
 演算装置304は、取得したDEVICE_DESCRIPTORに含まれるidVendor601、idProduct602、およびbNumConfigurations603をデータ領域310に保存する(ステップB52)。
 次に、USBホストコントローラ302は、USBデバイスの詳細な構成情報を取得するために、CONFIGURATION_DESCRIPTORを取得する(ステップB53)。
 USBデバイスの詳細な構成情報は、コンフィグレーションという情報で構成されており、USBデバイスは、bNumConfigurations603が示す数だけコンフィグレーションを保有している。コンフィグレーションは1つの場合もあれば、複数の場合もある。コンフィグレーションは、USBデバイスから、CONFIGURATION_DESCRIPTORを取得することで得られる。CONFIGURATION_DESCRIPTORを取得することにより、USBデバイスの詳細な構成情報を取得することができる。
 図7(a)は、デバイスが1つのコンフィグレーションで構成されている場合の構成情報の例を示す図である。図7(b)は、デバイスが複数のコンフィグレーションで構成されている場合の構成情報の例を示す図である。図7(a)の構成情報701、図7(b)の構成情報702の例のように、CONFIGURATION_DESCRIPTORを取得することにより、INTERFACE_DESCRIPTORの情報も取得することができるため、コンフィグレーションを構成しているインタフェースの数とクラス情報の取得が行える。
 CONFIGURATION_DESCRIPTORの取得が完了すると、演算装置304は、ステップB52で取得したbNumConfigurations603の値を使用して、すべてのコンフィグレーションをUSBデバイスから取得したか否かの判定を行う(ステップB54)。
 USBデバイスが構成情報702のように複数のコンフィグレーションで構成されていて、すべてのコンフィグレーションを取得することができていないと判定された場合には、ステップB53に戻る。この場合、USBホストコントローラ302は、残りのコンフィグレーションを取得するためにUSBデバイスから再度CONFIGURATION_DESCRIPTORを取得する。
 すべてのコンフィグレーションが取得できていると判定された場合には、演算装置304は、取得したすべてのコンフィグレーションを解析し、クラス情報のみでは検出できない機能(以下では、特殊機能と称する)をUSBデバイスが有している可能性があるか否かを調べる(ステップB55)。ステップB55の解析は、デバイス情報処理ブロック311が有している特殊機能のパターン情報に基づいて行われる。
 図8は、パターン情報の例を示す図である。パターン情報801は、特殊機能の名前を表す特殊機能名と、特殊機能を決定するための特殊条件で構成されている。特殊条件には、特殊機能を決定するための条件が記載され、特殊条件は、DEVICE_DESCRIPTORとCONFIGURATION_DESCRIPTORから取得できる情報と、USBデバイスの特殊機能を検出するためのコマンド処理を示す情報とで構成されている。パターン情報801はデバイス選択装置301で対応する特殊機能に応じてデバイス情報処理ブロック311内に予め含まれている。
 ステップB55の解析処理の結果を用いて、演算装置304は、クラス情報のみからは検出できない特殊機能をUSBデバイスが有するか否か、言い換えると、特殊機能を検出するために、USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行う(ステップB56)。
 コマンド処理が必要でないと判定された場合には、図5の処理フローは終了する。コマンド処理が必要であると判定された場合、すなわち、クラス情報からは検出できない機能をUSBデバイスが有する場合には、演算装置304は、パターン情報801に記載されている特殊条件からコマンド処理を選択してUSBデバイスにコマンド処理を行い、処理結果をデータ領域310に保存する(ステップB57)。ステップB57の処理が行われた後に、図5の処理フローは終了する。以上が、演算装置304によって実行され、USBデバイスからデバイス情報を取得する、デバイス情報処理ブロック311の処理フローである。
 図9は、デバイスリスト情報314を作成するまでのリスト処理ブロック312の処理を示すフローチャートである。図9は、図4のステップA42の処理に相当する。演算装置304は、図5の処理で取得したデバイス情報から、INTERFACE_DESCRIPTOR情報を解析する(ステップC91)。演算装置304は、解析したINTERFACE_DESCRIPTOR情報からクラス情報であるbInterfaceClass201の情報を取得する(ステップC92)。
 演算装置304は、ステップC92で取得したクラス情報が、デバイス情報処理ブロック311内のパターン情報801の特殊条件に該当するクラス情報か否かの判定を行う(ステップC93)。
 ステップC92で取得したクラス情報が特殊条件に該当するクラス情報であると判定された場合は、演算装置304は、データ領域310に保存されているidVendor601、idProduct602、コマンド処理結果およびクラス情報を使用して、パターン情報801から特殊機能を選択してUSBデバイスの機能を検出する(ステップC94)。
 ステップC92で取得したクラス情報が特殊条件に該当しないと判定された場合は、演算装置304は、クラス情報のみでUSBデバイスの機能を検出する(ステップC95)。
 ステップC94またはステップC95の処理の後、演算装置304は、USBデバイスの機能をまとめたデバイスリスト情報314を作成し、メモリ領域305に保存する(ステップC96)。
 図10は、デバイスリスト情報314の例を示す図である。メモリ領域305に保存されるデバイスリスト情報314について図10を用いて説明する。デバイスリスト情報314は、制御プログラム309内部で管理する内部管理情報と、入出力装置306を使用してユーザのためにUSBデバイスが対応している機能を表示するためのユーザ提示情報で構成されている。
 内部管理情報は、USBデバイスの各機能に割り当てられたID1001と、デバイスの機能制御に必要なクラス処理ブロック313内のクラスドライバ処理ルーチンのクラス情報1002とを含み、ID1001とクラス情報1002とは関連づけて管理される。ID1001は、DEVICE_DESCRIPTORで取得できる情報と、INTERFACE_DESCRIPTORで取得できる情報と、CONFIGURATION_DESCRIPTORで取得できる情報とで構成される。よって、ID1001を解析することにより、構成情報701や構成情報702で示したようなコンフィグレーションの数やインタフェースの数などの、デバイスの構成情報が把握できるようになっている。
 ユーザ提示情報は、USBデバイスが対応している機能名1003で構成されている。内部管理情報とユーザ提示情報は、ID1001、クラス情報1002、機能名1003の3つの情報で対応付けられているため、内部管理情報からユーザ提示情報の検索、ユーザ提示情報から内部管理情報の検索が行える。
 デバイスリスト情報314は、デバイス選択装置301にUSBデバイスが接続された時に、USBデバイスの機能に対応してリスト処理ブロック312の処理によりメモリ領域305に作成される。USBデバイスが切断された場合には、そのUSBデバイスに対応するデバイスリスト情報314がメモリ領域305から削除される。
 ステップC96でデバイスリスト情報314の作成を行った後に、演算装置304は、メモリ領域305の容量チェックを行い、メモリ容量チェックの結果、メモリ領域305に空き領域があれば次の処理を行い、メモリ領域305に空き領域がない場合は図9の処理フローを終了する(ステップC97)。
 デバイスリスト情報314を保存するメモリ領域305のサイズについては、システム仕様に応じて調整する必要がある。USBデバイスの機能を多く検索する必要がある場合は、予めデバイスリスト情報314を保存するメモリ領域305を多く確保し、USBデバイスの機能を多く検索する必要がなく、使用するメモリを少なく抑えたい場合は、メモリ領域305を少なく確保する。ステップC97の処理で、メモリ領域305に空き領域があると判定された場合には、演算装置304は、すべてのINTERFACE_DESCRIPTOR情報の解析は完了したか否かの判定を行う(ステップC98)。
 まだ、すべてのINTERFACE_DESCRIPTOR検索が終わっていないと判定された場合には、演算装置304は、ステップC91に戻って、INTERFACE_DESCRIPTORの解析処理を行い、USBデバイスが対応している機能をデバイスリスト情報314に追加する。すべてのINTERFACE_DESCRIPTORの解析が終わっていると判定された場合には、演算装置304は、図9の処理フローを終了する。以上が、演算装置304によって実行され、USBデバイスから取得した情報に基づいてデバイスリスト情報314を作成する、リスト処理ブロック312の処理フローである。
 これまで、USBデバイスがデバイス選択装置301に接続された際の、USBデバイスが対応している機能をリスト化するまでのデバイス選択装置301の動作を図4、図5、図9を用いて説明を行った。USBデバイスの機能がINTERFACE_DESCRIPTOR内のクラス情報のみでは検出されない場合であっても、図4、図5、図9に示す処理フローを行うことにより、機器が対応している機能を誤認することなく検出することができる。
 次に、図11の処理が行われる。図11は、ユーザに、接続されたUSBデバイスが対応している機能を提示し、ユーザが選択した機能をデバイス選択装置301が制御するまでの処理を示すフローチャートである。デバイスリスト情報314の作成が完了した場合、USBデバイスが対応している機能がユーザに提示される。すなわち、デバイスリスト情報314内の機能名1003を使用して、USBデバイスが対応している機能の情報を、入出力装置306が表示する(ステップD1101)。
 図12は、ユーザに提示される画面表示情報1201の例である。図12のように、演算装置304は、USBデバイスが対応している機能の情報として、デバイスリスト情報314内の機能名1003の情報のみを表示させる。ユーザは提示された画面表示情報1201から、入出力装置306を使用して機能を選択する(ステップD1102)。演算装置304は、入出力装置306から入力された、選択された機能を示す入力情報を、デバイスリスト情報314を用いてクラス情報1002に置き換え、クラス情報1002に対応する機能を制御するためのクラス処理ブロック313内のクラスドライバ処理ルーチンを選択する(ステップD1103)。すなわち、演算装置304は、入力情報に基づいてUSBデバイスの機能を選択する。
 クラスドライバ処理ルーチンが選択されると、演算装置304は、USBデバイスに使用するコンフィグレーション情報の設定を行い、選択されたUSBデバイスの機能を有効にする(ステップD1104)。USBデバイスに使用するコンフィグレーション情報の設定が完了した後、演算装置304は、ユーザが選択した機能を制御するためにクラスドライバ処理を開始し、USBデバイスの機能を制御する(ステップD1105)。ステップD1101~D1103の処理は、演算装置304が制御プログラム309内のリスト処理ブロック312を実行することによって行われ、ステップD1104~D1105の処理は、演算装置304がクラス処理ブロック313を実行することによって行われる。
 図13は、デバイスリスト情報314が作成された後のリスト処理ブロック312の処理を示すフローチャートである。リスト処理ブロック312は、ユーザにUSBデバイスの機能を提示し、ユーザに動的にデバイスの機能を選択させる処理を行う。
 まず、演算装置304は、デバイスリスト情報314から機能名1003を取得する(ステップE1301)。取得された機能名1003はデータ制御装置303より入出力装置306に転送され、入出力装置306が取得された機能名1003を画面表示情報1201としてユーザに提示する(ステップE1302)。処理ステップE1302により、ユーザは提示された画面表示情報1201からデバイスの機能を動的に選択することができる。ステップE1302の処理の後、演算装置304は、入出力装置306によりユーザが機能を選択したか否かの判定を行う(ステップE1303)。
 ユーザからの機能の選択がないと判定された場合には、処理ステップE1302を再び行う。ユーザからの機器の機能選択が入出力装置306に行われたと判定された場合には、データ制御装置303は、ユーザが選択した機能データを、入出力装置306から演算装置304に転送する(ステップE1304)。
 演算装置304は、ユーザに選択された機能を示す機能データとデバイスリスト情報314の機能名1003の解析を行い、機能データをデバイスリスト情報314のクラス情報1002に変換する。演算装置304は、ユーザが選択した機能を制御するためのクラス処理ブロック313内のクラスドライバ処理ルーチンを、クラス情報1002に従って選択する(ステップE1305)。ステップE1301~E1304の処理は、演算装置304が制御プログラム309内のリスト処理ブロック312を実行することによって行われ、ステップE1305の処理は、演算装置304がクラス処理ブロック313を実行することによって行われる。
 図14は、クラス処理ブロック313の処理を示すフローチャートである。クラス処理ブロック313は、USBデバイスにユーザが選択した機能の設定を行い、USBデバイスを制御する、クラス処理を行う。図14の処理は、図13の処理が完了した後に行われる。
 まず、演算装置304は、デバイスリスト情報314のクラス情報1002に従ってクラス処理ブロック313内のクラスドライバ処理ルーチンを取得した後、クラス情報1002に対応しているID1001から、ユーザが選択した機能を含むコンフィグレーションを特定する。ID1001は、DEVICE_DESCRIPTORで取得できる情報と、INTERFACE_DESCRIPTORで取得できる情報と、CONFIGURATION_DESCRIPTORで取得できる情報とで構成されるため、ユーザが選択したUSBデバイスの機能を含むコンフィグレーションを検索することが可能である(ステップF1401)。
 ユーザが選択した、USBデバイスの機能を含むコンフィグレーションの検索が完了すると、USBホストコントローラ302は、ユーザが使用したい機能を含むコンフィグレーションに関して、クラス処理ブロック313内のSET_CONFIGURATIONをUSBデバイスに対して発行する(ステップF1402)。USBデバイスに対してSET_CONFIGURATIONを発行することにより、SET_CONFIGURATIONで指定されたコンフィグレーションがUSBデバイス側で有効となる。ステップF1402の処理の後、演算装置304は、SET_CONFIGURATIONの発行が成功したか否かの判定を行う(ステップF1403)。
 SET_CONFIGURATIONの発行が失敗したと判定された場合には、演算装置304は、エラー処理を行いユーザにUSBデバイスが使用できないことを入出力装置306を使用してユーザに通知し、クラス処理ブロック313の処理フローは終了する(ステップF1405)。SET_CONFIGURATIONの発行が成功したと判定された場合には、演算装置304は、クラス処理ブロック313が有しているUSBデバイスの機能に対応したクラスドライバ処理ルーチンを使用して、USBデバイスの機能の制御を開始する(ステップF1404)。
 USBデバイスの制御が開始されると、ユーザが選択したUSBデバイスの機能により、USBデバイス内の画像・音声情報を画像・音声再生録音装置308が再生・録音したり、USBデバイス内のデータが内部情報格納領域307に格納されたり、内部情報格納領域307に格納されているデータをUSBデバイスに転送するなどの制御が、デバイス選択装置301で可能となる。図14の処理は、演算装置304がクラス処理ブロック313を実行することによって行われる。
 このように、図11、図13、図14の処理を行うことにより、デバイス選択装置301は、リスト化したUSBデバイスの機能をユーザに提示し、USBデバイスの、ユーザによって選択された機能を制御する。したがって、ユーザは、提示された機能を動的に選択することが可能となる。
 本発明の多くの特徴及び優位性は、記載された説明から明らかであり、よって添付の特許請求の範囲によって、本発明のそのような特徴及び優位性の全てをカバーすることが意図される。更に、多くの変更及び改変が当業者には容易に可能であるので、本発明は、図示され記載されたものと全く同じ構成及び動作に限定されるべきではない。したがって、全ての適切な改変物及び等価物は本発明の範囲に入るものとされる。
 以上説明したように、本発明の実施形態によると、USBデバイスの機能の選択が可能になるので、本発明は、デバイス選択方法等について有用である。コンポーネントステレオ、DVD(Digital Versatile Disc)プレーヤー、HDD(Hard Disk Drive)レコーダー、デジタルテレビジョン受像機等のマルチメディア機器としても有用である。
301 デバイス選択装置
302 USBホストコントローラ
303 データ制御装置
304 演算装置
305 メモリ領域
306 入出力装置
309 制御プログラム
314 デバイスリスト情報
1002 クラス情報
1003 機能名

Claims (8)

  1.  USB(Universal Serial Bus)デバイスからデバイス情報を取得するステップと、
     前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行うステップと、
     前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成するステップと、
     前記デバイスリスト情報をメモリ領域に保存するステップとを備える
    デバイス制御方法。
  2.  請求項1に記載のデバイス制御方法において、
     前記デバイスリスト情報を用いて前記USBデバイスの機能を表示するステップと、
     入力情報に基づいて、前記USBデバイスの機能を選択するステップと、
     前記選択されたUSBデバイスの機能を有効にするステップとを更に備える
    デバイス制御方法。
  3.  請求項2に記載のデバイス制御方法において、
     前記選択されたUSBデバイスの機能を示すデータを、前記選択されたUSBデバイスの機能が対応するクラス情報に変換するステップを更に備える
    デバイス制御方法。
  4.  請求項3に記載のデバイス制御方法において、
     前記USBデバイスに選択された機能の設定を行い制御する、クラス処理を行うステップを更に備える
    デバイス制御方法。
  5.  請求項1に記載のデバイス制御方法において、
     前記コマンド処理を行うステップは、前記取得されたデバイス情報のクラス情報からは検出できない機能を前記USBデバイスが有する場合に、前記コマンド処理を行う
    デバイス制御方法。
  6.  請求項1に記載のデバイス制御方法において、
     前記デバイスリストでは、前記USBデバイスの機能を表示するための情報と管理情報とが対応付けられている
    デバイス制御方法。
  7.  USBデバイスからデバイス情報を取得するステップと、
     前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行うステップと、
     前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成するステップと、
     前記デバイスリスト情報をメモリ領域に保存するステップとを有し、
    コンピュータで実行可能なデバイス制御プログラム。
  8.  演算装置と、
     USBデバイスと前記演算装置との間のデータ転送を行うUSBホストコントローラとを備え、
     前記演算装置は、
     前記USBデバイスからデバイス情報を取得し、
     前記取得されたデバイス情報から、前記USBデバイスの機能を検出するために前記USBデバイスにコマンドを発行するコマンド処理が必要か否かの判定を行い、前記コマンド処理が必要であると判定された場合に前記コマンド処理を行い、
     前記取得されたデバイス情報および前記コマンド処理の結果に基づいて、前記USBデバイスの機能の情報をリスト化したデバイスリスト情報を作成し、
     前記デバイスリスト情報をメモリ領域に保存する
    デバイス選択装置。
PCT/JP2009/001615 2008-04-07 2009-04-07 デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置 WO2009125586A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010507154A JPWO2009125586A1 (ja) 2008-04-07 2009-04-07 デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置
CN200980111179.5A CN101981556A (zh) 2008-04-07 2009-04-07 设备控制方法、设备控制程序以及设备选择装置
US12/898,282 US20110022737A1 (en) 2008-04-07 2010-10-05 Device control method and device selecting apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008099081 2008-04-07
JP2008-099081 2008-04-07

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/898,282 Continuation US20110022737A1 (en) 2008-04-07 2010-10-05 Device control method and device selecting apparatus

Publications (1)

Publication Number Publication Date
WO2009125586A1 true WO2009125586A1 (ja) 2009-10-15

Family

ID=41161722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/001615 WO2009125586A1 (ja) 2008-04-07 2009-04-07 デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置

Country Status (4)

Country Link
US (1) US20110022737A1 (ja)
JP (1) JPWO2009125586A1 (ja)
CN (1) CN101981556A (ja)
WO (1) WO2009125586A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013542483A (ja) * 2010-08-30 2013-11-21 クアルコム,インコーポレイテッド 仮想usb複合デバイスの列挙
JP2016521423A (ja) * 2013-06-20 2016-07-21 ▲華▼▲為▼終端有限公司Huawei Device Co., Ltd. データカード、並びにデータカード切り替え方法及び装置
JP2017078940A (ja) * 2015-10-20 2017-04-27 セイコーエプソン株式会社 電子装置、及び、その制御方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6476781B2 (ja) * 2014-11-17 2019-03-06 セイコーエプソン株式会社 情報処理装置、情報処理装置を制御する方法、コンピュータープログラム
US10515025B2 (en) * 2016-08-08 2019-12-24 Cirrus Logic, Inc. Communication protocol adapter

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08274930A (ja) * 1995-03-29 1996-10-18 Brother Ind Ltd ファクシミリ機能表示方法、ファクシミリ機能取得装置、ファクシミリ装置およびファクシミリシステム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3641169B2 (ja) * 1999-08-06 2005-04-20 株式会社エヌ・ティ・ティ・ドコモ Usb対応電子機器
US7127678B2 (en) * 2000-12-21 2006-10-24 Microsoft Corporation System and method to specify device specific user interface information in the firmware of a USB device
JP2005100064A (ja) * 2003-09-24 2005-04-14 Canon Inc 画像処理装置、画像処理方法およびプログラム
JP4896397B2 (ja) * 2004-12-28 2012-03-14 富士通株式会社 プログラム、制限方法及びコンピュータ
JP4725397B2 (ja) * 2006-04-05 2011-07-13 セイコーエプソン株式会社 Usb複合デバイス,usb通信システム,及びusb通信方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08274930A (ja) * 1995-03-29 1996-10-18 Brother Ind Ltd ファクシミリ機能表示方法、ファクシミリ機能取得装置、ファクシミリ装置およびファクシミリシステム

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013542483A (ja) * 2010-08-30 2013-11-21 クアルコム,インコーポレイテッド 仮想usb複合デバイスの列挙
US8850082B2 (en) 2010-08-30 2014-09-30 Qualcomm Incorporated Virtual USB compound device enumeration
JP2016521423A (ja) * 2013-06-20 2016-07-21 ▲華▼▲為▼終端有限公司Huawei Device Co., Ltd. データカード、並びにデータカード切り替え方法及び装置
JP2017078940A (ja) * 2015-10-20 2017-04-27 セイコーエプソン株式会社 電子装置、及び、その制御方法

Also Published As

Publication number Publication date
CN101981556A (zh) 2011-02-23
JPWO2009125586A1 (ja) 2011-07-28
US20110022737A1 (en) 2011-01-27

Similar Documents

Publication Publication Date Title
US20090024757A1 (en) Automatic Protocol Determination For Portable Devices Supporting Multiple Protocols
US7600150B2 (en) Data auto backup system and method
KR20050088458A (ko) 사전-구성 백업 dvd-rw
JP2007035010A (ja) 高速データアクセスメモリよりオペレーションシステムコアプログラムをロードしてコンピュータプログラムをインスタント起動実行する方法
WO2009125586A1 (ja) デバイス制御方法、デバイス制御プログラムおよびデバイス選択装置
US8265454B2 (en) Video/audio playback apparatus
WO2011130975A1 (zh) 一种linux系统数据卡设备端口识别的方法及装置
KR100781512B1 (ko) 임베디드 디바이스에서 재생 가능한 멀티미디어 파일을선별하여 재생하는 장치 및 방법
CN101535974A (zh) 远程控制存储在设备上的内容的回放
US20060280488A1 (en) Reproduction apparatus
CN100565455C (zh) 多媒体电脑系统及快速启始该系统播放多媒体数据的方法
KR100758219B1 (ko) 유에스비 장치의 동작을 통제하는 방법
WO2005015385A1 (ja) メモリ装置、データ処理用のプログラムを記録した記録媒体、そのプログラム、データ処理システム及びデータ処理方法
JP2007172082A (ja) 制御装置およびコピー制御方法
US20070067566A1 (en) External storage device for controlling computer and method thereof
JP4331750B2 (ja) ビデオ録画または再生のためのリムーバブルメディア装置
KR100754195B1 (ko) 멀티미디어 장치의 데이터 백업 방법
EP2046016B1 (en) Video processing system and method thereof
US20060002245A1 (en) Content storage apparatus and method, and content storage system
US20090187685A1 (en) Information recording apparatus
JP2004118437A (ja) 再生装置及び再生方法
CN100498706C (zh) 以内建操作系统的数据碟片快速启始电脑装置的方法
US20110055853A1 (en) Operating method and system utilizing the same
JP2012242942A (ja) Hub装置の制御方法およびhub装置
CN100451963C (zh) 由高速数据存取存储器载入操作系统核心程序以快速启动执行电脑程序的方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980111179.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09729640

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010507154

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09729640

Country of ref document: EP

Kind code of ref document: A1