使用usb hp writer 8200刻录机的方法
今天刚搞定的,转一份英文的说明。USB-CD Writer HOWTO
Report: How to use the HP CD-Writer Plus 8210e (USB-Interface) with Linux
Author: Thomas Jaeger
Email: <hunter_at_whopper.de>
Version: V1.1
Table of contents
1. Intro
1.0 The risk is yours...
1.1 Prerequisites
1.2 First steps
1.3 Preparing Linux
1.4 Next steps
1.5 It's time to hotplug
1.6 Testing
1.7 Mr Kirk: "Mr Zulu, please power up the laser gun..."
1.8 The End
1.9 Links
1. Intro
This is a short report with all the details how I managed to get my HP CD-Writer Plus 8210e (USB-interface) running with Linux. You will find all neccessary steps I used to connect my HP8210e via USB to Linux. I am afraid for some of you I have bad news: There are at least one or more other HP CD-Writers available (e.g. HP8230e) which have a slightly different interface (only God knows why!) and at the moment there is no support for them. But there is still hope: Someone told me that there is already code in the kernel tree (>=V2.4.0-test8) which deals with these different interfaces but for some mysterious reason this code is not compiled in during kernel config. If the situation improves I will adapt my little report.
1.0 The risk is yours...
I cannot promise that the information in this report will be of any help to you. Neither can there be any guarantee that all this will work with your system. Following anything in this document means that you do this completly at your on risk.
1.1 Prerequisites
Linux kernel tree >= V2.4.0-test8
cdrecord V1.10a4
usbmgr V0.3.5
modutils-2.3.15 or better (very important!)
PC with USB-Interface
HP CD-Writer Plus 8210e
1.2 First steps
Please check your PC BIOS-Setup whether your USB-Interface is enabled. If you are using MS Win... on the same PC and your USB-CD-Writer is running fine, there should be no need to check the BIOS-Setup.
1.3 Preparing Linux
You should be 100% familar how to configure a new Linux kernel, compile and install it. Don't do this if you are new to this. You might loose your existing Linux kernel configuration, might not be able to boot again and then you are trapped.....
I am using a complete modular Linux kernel configuration. Therefore you should also be familar with the programs "insmod", "lsmod", "modprobe", "depmod" from the modutils-package.
1.3.1 menuconfig
These are the options I selected during the kernel configuration process:
Code maturity level options-->-
[*] Prompt for development and/or incomplete code/drivers
Loadable module support--->
[*] Enable loadable module support
[*] Set version information on all module symbols
[*] Kernel module loader
Block devices--->
<M> Loopback device support
SCSI support--->
<M> SCSI support
<M> SCSI disk support
<M> SCSI CD-ROM support
[*] Enable vendor-specific extensions (for SCSI CDROM)
(2) Maximum number of CDROM devices that can be loaded as modules
<M> SCSI generic support
[*] Enable extra checks in new queueing code
[*] Verbose SCSI error reporting (kernel size +=12K)
[*] SCSI logging facility
SCSI low-level drivers--->
deactivate any SCSI-Device you don't have!
File systems--->
<M> ISO 9660 CDROM file system support
[*] Microsoft Joliet CDROM extensions
[*] /proc file system support
<M> UDF file system support (read only)
USB support--->
<M> Support for USB
[*] USB verbose debug messages
[*] Preliminary USB device filesystem
[*] Enforce USB bandwidth allocation (EXPERIMENTAL)
--- USB Controllers
<M> UHCI (Intel PIIX4, VIA, ...) support
< > OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
Select the correct USB Controller for your System!!!!!!
<M> USB Mass Storage support
That are all kernel options relevant for running my HP CD-Writer Plus 8210e with Linux kernel V2.4.0-test8. Some of the options for verbose debug/error messages are not really neccessary but they help finding problems. So if everything is running fine these options can be switched off.
Warning: You have to be familar with the process to compile and install a new kernel and new modules. If anything goes wrong or you did skip any neccessary step (e.g. setting up LILO) you might not be able to boot anymore. I mentioned it before: You are doing this completely at your own risk!!!
1.3.2 Installation
After compiling the kernel and the modules install everything. You should check the modules directory for the following modules:
cd /lib/modules/2.4.0-test8
cd kernel
ls fs/isofs
isofs.o
ls drivers/cdrom
cdrom.o
ls drivers/scsi
scsi_mod.osd.osg.osr_mod.o
ls drivers/usb
storageusb-uhci.ousbcore.o
ls drivers/usb/storage
usb-storage.o
Reboot!
1.4 Next steps
Get the usbmgr-package. Untar it and read the README file. Do "make" in the source directory. Then do "make install". Now we have to configure the usbmgr config file cd /etc/usbmgr Edit the file usbmgr.conf
a) remove the "#" in the section HOST CONTROLLER in front of one of the "host" choices. For my PC with Intel-chipset the correct line is: host usb-uhci
b) Add the following 3 lines at the end of the section STORAGE vendor 0x3f0 product 0x107 module scsi_mod, sr_mod, usb-storage
Now you have to run the "update_usbdb" program: update_usbdb usbmgr.conf
Now you can start "usbmgr". The program will go into the background so there is no output at all. You can check the "messages"-file with: tail -n50 /var/log/messages
The output to look should look like:
Sep 15 12:55:28 usbmgr: start 0.3.5
Sep 15 12:55:28 usbmgr: open error "/etc/usbmgr/preload.conf"
Sep 15 12:55:28 kernel: usb.c: registered new driver usbdevfs
Sep 15 12:55:28 kernel: usb.c: registered new driver hub
Sep 15 12:55:28 kernel: usb-uhci.c: $Revision: 1.237 $ time 11:07:02 Sep 10 2000
Sep 15 12:55:28 kernel: usb-uhci.c: High bandwidth mode enabled
Sep 15 12:55:28 kernel: usb-uhci.c: USB UHCI at I/O 0xfce0, IRQ 10
Sep 15 12:55:28 kernel: usb-uhci.c: Detected 2 ports
Sep 15 12:55:28 kernel: usb.c: new USB bus registered, assigned bus number 1
Sep 15 12:55:28 kernel: usb.c: USB new device connect, assigned device number 1
Sep 15 12:55:28 kernel: usb.c: kmalloc IF c2e1f760, numif 1
Sep 15 12:55:28 kernel: usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
Sep 15 12:55:28 kernel: usb.c: USB device number 1 default language ID 0x0
Sep 15 12:55:28 kernel: Product: USB UHCI Root Hub
Sep 15 12:55:28 kernel: SerialNumber: fce0
Sep 15 12:55:28 kernel: hub.c: USB hub found
Sep 15 12:55:28 kernel: hub.c: 2 ports detected
Sep 15 12:55:28 kernel: hub.c: ganged power switching
Sep 15 12:55:28 kernel: hub.c: standalone hub
Sep 15 12:55:28 kernel: hub.c: global over-current protection
Sep 15 12:55:28 kernel: hub.c: power on to power good time: 2ms
Sep 15 12:55:28 kernel: hub.c: hub controller current requirement: 0mA
Sep 15 12:55:28 kernel: hub.c: port 1 is removable
Sep 15 12:55:28 kernel: hub.c: port 2 is removable
Sep 15 12:55:28 kernel: hub.c: local power source is good
Sep 15 12:55:28 kernel: hub.c: no over-current condition exists
Sep 15 12:55:28 kernel: hub.c: enabling power on all ports
Sep 15 12:55:28 kernel: usb.c: hub driver claimed interface c2e1f760
Sep 15 12:55:28 kernel: usb.c: kusbd: /sbin/hotplug add 1
Sep 15 12:55:28 kernel: usb.c: kusbd policy returned 0x0
Sep 15 12:55:28 usbmgr: "usb-uhci" was loaded
Sep 15 12:55:28 usbmgr: mount /proc/bus/usb
Sep 15 12:55:28 usbmgr: USB device is matched the configuration
Sep 15 12:55:28 usbmgr: "none" isn't loaded
There are two other checks to do:
a) cat /proc/interrupts
CPU0
0: 991954 XT-PICtimer
1: 19880 XT-PICkeyboard
2: 0 XT-PICcascade
8: 2 XT-PICrtc
9: 14 XT-PICCirrus Logic PD 6832, Cirrus Logic PD 6832 (#2)
10: 42 XT-PICusb-uhci
12: 243881 XT-PICPS/2 Mouse
13: 0 XT-PICfpu
14: 16314 XT-PICide0
NMI: 0
ERR: 0
Result: usb-uhci has to show up connected to an interrupt: Here it is: int10
b) lsmod
usb-uhci 21708 0(unused)
usbcore 49856 1
nfsd 69928 4(autoclean)
lockd 49340 1(autoclean)
sunrpc 58244 1(autoclean)
unix 1437237(autoclean)
Result: The modules "usb-uhci" and "usbcore" should be there...
1.5. It's time to hotplug...
Power up your HP CD-Writer Plus 8210e and plug the USB-cable into your PC USB interface. This should trigger the usbmgr to load the nessesary modules for the CD-Writer. For a first check: tail -n50 /var/log/messages The new output generated by the hotplug event should look like:
Sep 15 13:13:07 kernel: hub.c: port 1 connection change
Sep 15 13:13:07 kernel: hub.c: portstatus 101, change 1, 12 Mb/s
Sep 15 13:13:08 kernel: hub.c: portstatus 103, change 0, 12 Mb/s
Sep 15 13:13:08 kernel: usb.c: USB new device connect, assigned device number 2
Sep 15 13:13:08 kernel: usb.c: kmalloc IF c2e1f660, numif 1
Sep 15 13:13:08 kernel: usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
Sep 15 13:13:08 kernel: usb.c: USB device number 2 default language ID 0x409
Sep 15 13:13:08 kernel: Manufacturer: Shuttle Technology Inc.
Sep 15 13:13:08 kernel: Product: HP USB CD-Writer Plus
Sep 15 13:13:08 kernel: usb.c: unhandled interfaces on device
Sep 15 13:13:08 kernel: usb.c: USB device 2 (prod/vend 0x3f0/0x107) is not claimed [..]
Sep 15 13:13:08 kernel: Length = 18
Sep 15 13:13:08 kernel: DescriptorType = 01
Sep 15 13:13:08 kernel: USB version = 1.00
Sep 15 13:13:08 kernel: Vendor:Product = 03f0:0107
Sep 15 13:13:08 kernel: MaxPacketSize0 = 64
Sep 15 13:13:08 kernel: NumConfigurations = 1
Sep 15 13:13:08 kernel: Device version = 2.00
Sep 15 13:13:08 kernel: Device Class:SubClass:Protocol = 00:00:00
Sep 15 13:13:08 kernel: Per-interface classes
Sep 15 13:13:08 kernel: Configuration:
Sep 15 13:13:08 kernel: bLength = 9
Sep 15 13:13:08 kernel: bDescriptorType = 02
Sep 15 13:13:08 kernel: wTotalLength = 0027
Sep 15 13:13:08 kernel: bNumInterfaces = 01
Sep 15 13:13:08 kernel: bConfigurationValue = 01
Sep 15 13:13:08 kernel: iConfiguration = 03
Sep 15 13:13:08 kernel: bmAttributes = 40
Sep 15 13:13:08 kernel: MaxPower = 0mA
Sep 15 13:13:08 kernel:
Sep 15 13:13:08 kernel: Interface: 0
Sep 15 13:13:08 kernel: Alternate Setting:0
Sep 15 13:13:08 kernel: bLength = 9
Sep 15 13:13:08 kernel: bDescriptorType = 04
Sep 15 13:13:08 kernel: bInterfaceNumber = 00
Sep 15 13:13:08 kernel: bAlternateSetting = 00
Sep 15 13:13:08 kernel: bNumEndpoints = 03
Sep 15 13:13:08 kernel: bInterface Class:SubClass:Protocol = ff:00:00
Sep 15 13:13:08 kernel: iInterface = 04
Sep 15 13:13:08 kernel: Endpoint:
Sep 15 13:13:08 kernel: bLength = 7
Sep 15 13:13:08 kernel: bDescriptorType = 05
Sep 15 13:13:08 kernel: bEndpointAddress = 01 (out)
Sep 15 13:13:08 kernel: bmAttributes = 02 (Bulk)
Sep 15 13:13:08 kernel: wMaxPacketSize = 0040
Sep 15 13:13:08 kernel: bInterval = 00
Sep 15 13:13:08 kernel: Endpoint:
Sep 15 13:13:08 kernel: bLength = 7
Sep 15 13:13:08 kernel: bDescriptorType = 05
Sep 15 13:13:08 kernel: bEndpointAddress = 82 (in)
Sep 15 13:13:08 kernel: bmAttributes = 02 (Bulk)
Sep 15 13:13:08 kernel: wMaxPacketSize = 0040
Sep 15 13:13:08 kernel: bInterval = 00
Sep 15 13:13:08 kernel: Endpoint:
Sep 15 13:13:08 kernel: bLength = 7
Sep 15 13:13:08 kernel: bDescriptorType = 05
Sep 15 13:13:08 kernel: bEndpointAddress = 83 (in)
Sep 15 13:13:08 kernel: bmAttributes = 03 (Interrupt)
Sep 15 13:13:08 kernel: wMaxPacketSize = 0002
Sep 15 13:13:08 kernel: bInterval = 20
Sep 15 13:13:08 kernel: usb.c: kusbd: /sbin/hotplug add 2
Sep 15 13:13:08 kernel: usb.c: kusbd policy returned 0x0
Sep 15 13:13:08 usbmgr: USB device is matched the configuration
Sep 15 13:13:08 kernel: usb.c: registered new driver usb-storage
Sep 15 13:13:08 kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Sep 15 13:13:08 kernel: scsi : 1 host.
Sep 15 13:15:55 kernel: Vendor: HP Model: CD-Writer+ 8200 Rev: 1.0f
Sep 15 13:15:55 kernel: Type: CD-ROM ANSI SCSI revision:02
Sep 15 13:15:55 kernel: Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
Sep 15 13:15:55 kernel: sr0: scsi3-mmc drive: 8x/24x writer cd/rw xa/form2 cdda tray
Sep 15 13:15:55 kernel: Uniform CD-ROM driver Revision: 3.11
Sep 15 13:13:08 kernel: WARNING: USB Mass Storage data integrity not assured
Sep 15 13:13:08 kernel: USB Mass Storage device found at 2
Sep 15 13:13:08 kernel: usb.c: usb-storage driver claimed interface c2e1f660
Sep 15 13:13:08 kernel: USB Mass Storage support registered.
Sep 15 13:13:08 usbmgr: "scsi_mod" was loaded
Sep 15 13:13:08 usbmgr: "sr_mod" was loaded
Sep 15 13:13:08 usbmgr: "usb-storage" was loaded
Please check the line: USB device 2 (prod/vend 0x3f0/0x107)... first. Only if you have the same ID (0x3f0/0x107) you have got the HP8210e. If you get the ID 0x3f0/0x207 then you have the HP8230e which is not supported at the moment. I told you about this at the beginning of this report...
The last 12 lines are the important ones. After the line: "scsi: 1 host:" there has to be the information about the HP CD-Writer (see above). The line "Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0" tells you that the CD-Writer has been found via the scsi/usb interface and the device can be accessed via /dev/sr0. On other Linux distributions it might be /dev/scd0 as well. On my SuSE system V6.3 I have /dev/sr? and /dev/scd? both using the same major and minor device numbers. I don't know were the decison is made to use either /dev/sr? or /dev/scd?. Just watch the output in the messages file (see above).
With my PC (maybe too old or too slow), I noticed that the identification process does not work perfectly every time. So if there is no Vendor info it might be necessary to unplug the CD-Writer and replug it again. Normally after the 2nd or 3rd try it works just fine.
1.6 Testing
A first real test is to put a normal CD-ROM into the drive and to mount it: mount -r -t iso9660 /dev/sr0 /mnt ls -l /mnt Result: The ls command should show the contents of the CD-ROM
Next test should be with cdrecord: (The cdrtools-1.10a04 package has to be installed first) cdrecord -scanbus The result is:
Cdrecord 1.10a04 (i586-pc-linux-gnu) Copyright (C) 1995-2000 J&#246;rg Schilling
Linux sg driver version: 3.1.16
Using libscg version 'schily-0.4'
scsibus0:
0,0,0 0) 'HP ' 'CD-Writer+ 8200 ' '1.0f' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
More detailed information can be obtained with: cdrecord -prcap -inq dev=0,0,0 The result is:
Cdrecord 1.10a04 (i586-pc-linux-gnu) Copyright (C) 1995-2000 J&#246;rg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.16
Using libscg version 'schily-0.4'
Device type : Removable CD-ROM
Version : 2
Response Format: 1
Vendor_info : 'HP '
Identifikation : 'CD-Writer+ 8200 '
Revision : '1.0f'
Device seems to be: Generic mmc CD-RW.
Drive capabilities, per page 2A:
Does read CD-R media
Does write CD-R media
Does read CD-RW media
Does write CD-RW media
Does not read DVD-ROM media
Does not read DVD-R media
Does not write DVD-R media
Does not read DVD-RAM media
Does not write DVD-RAM media
Does support test writing
Does read Mode 2 Form 1 blocks
Does read Mode 2 Form 2 blocks
Does read digital audio blocks
Does restart non-streamed digital audio reads accurately
Does not support BURN-Proof (Sanyo)
Does read multi-session CDs
Does read fixed-packet CD media using Method 2
Does not read CD bar code
Does not read R-W subcode information
Does read raw P-W subcode data from lead in
Does return CD media catalog number
Does return CD ISRC information
Does not support C2 error pointers
Does not deliver composite A/V data
Does play audio CDs
Number of volume control levels: 256
Does support individual volume control setting for each channel
Does support independent mute setting for each channel
Does not support digital output on port 1
Does not support digital output on port 2
Loading mechanism type: tray
Does support ejection of CD via START/STOP command
Does not lock media on power up via prevent jumper
Does allow media to be locked in the drive via PREVENT/ALLOW command
Is not currently in a media-locked state
Does not support changing side of disk
Does not have load-empty-slot-in-changer feature
Does not support Individual Disk Present feature
Maximum readspeed in kB/s: 4234
Current readspeed in kB/s: 4234
Maximum write speed in kB/s: 706
Current write speed in kB/s: 706
Buffer size in KB: 2048
1.7 Mr Kirk: "Mr Zulu, please power up the laser gun..."
Now it's time to use the laser gun. I use the current cdrtools-1.10a04 package. Take a look in the README file first. For a first test you could do: (Insert a new CD-R first) mkisofs -L -l -J -r file1 file2 dir1 dir2 | cdrecord -v -pad -eject -dummy -nofix fs=4m speed=4 dev=0,0,0 -
This command will create an iso9660 image with the files/directories "file1", "file2", "dir1" and "dir2" with joliet and rockridge extensions and will pipe the output directly to the "cdrecord" program. Cdrecord will be verbose (-v), will fill up the last sector (-pad ), will eject the written CD, will do a test write (i.e. the laser is off), will not fi nalize the CD (-nofix), will use 4MByte of RAM as buffer, will use speed = 4x and will use the scsi-device 0,0,0. Please note the important dash "-" at the end. It tells cdrecord to accept data via the pipe. Check whether the dummy write runs without any problems, especially that the fifo buffer does not run out of data. Keep in mind: The max capacity of an CD-ROM is about 650MB. Check first the amount of data you want to write on the CD-R.
A real write command would be: mkisofs -L -l -J -r file1 file2 dir1 dir2 | cdrecord -v -pad -eject fs=4m speed=4 dev=0,0,0 -
The options you have to remove are: -dummy -nofix
You can also use a new CD-RW: mkisofs -L -l -J -r file1 file2 dir1 dir2 | cdrecord -v -pad -eject blank=fast fs=4m speed=4 dev=0,0,0 -
This will also create an iso9660 image. To my knowledge there is at the moment no UDF-write support for CD-RWs with linux. The option blank=fast will erase all data on the CD-RW first!!!!!
All other details how to use mkisofs and cdrecord can be found in the man pages.
Never play around with the USB hotplug (better: hot unplug feature) of the CD-Writer. You will loose data, damage the CD and even lock up your linux system. Remove any CD before unplugging.
1.8. The End
So far I had no problems at all burning CDs with the HP CD-Writer Plus 8210e connected to Linux. Performance and stability is good. I started to play with kisocd (V0.6.3) but there is one important option: You have to start kisocd with the option -c109 otherwise it will not generate the neccessary options for mkisofs which is part of cdrecord (V1.10a4). Ohterwise you will get error messages. With kisocd burning CDs is as easy as drag&drop...
Have fun...
1.9 Links
Linux USB-ProjectLinux-CD-Writing-HOWTO 长篇大论,没心情看…… 用2.6.x的内核或许会简单些。 其实只要抓住重点就不觉得长.
我用的是2.6.3的内核
只要内核支持,还有usbmgr 里有很多usb设备的配置(数码相机,扫描仪等).
再在刻录软件中设置就行了.我用的是k3b 把重点写个中文的文档好了,服务大家嘛。 :mrgreen: 谁有for MDK的支持中文的cdrtools啊??
以前用公社的那个,在fc下编译正常,现在换MDK了,编译总是无法生成支持gb2312编码的mkisofs……达人们给个rpm吧。 我啥都不知道直接把光驱插上去就认了
页:
[1]