| | 1 | = USB接続のカウンタ制御 : CentOS6.2での動作について = |
| | 2 | |
| | 3 | == ハードウェア == |
| | 4 | * DACS技研 DACS-2500D-CNT-ISO |
| | 5 | * http://www.dacs-giken.co.jp/d2500DCNT.html |
| | 6 | |
| | 7 | == 現象、問題点 == |
| | 8 | * CentOS 5 からは問題無く制御出来るが、CentOS 6 ではなぜか制御できない |
| | 9 | * DACS社のページにある通り、http://www.dacs-giken.co.jp/DA15Linux.pdf でチェック |
| | 10 | * カウンタをUSBで接続し、dmesg, lsmod で仮想COMドライバがロードされていることを確認。 |
| | 11 | {{{ |
| | 12 | # dmesg |
| | 13 | |
| | 14 | usb 3-1: new full speed USB device using uhci_hcd and address 2 |
| | 15 | usb 3-1: New USB device found, idVendor=0403, idProduct=6001 |
| | 16 | usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 |
| | 17 | usb 3-1: Product: DACS-2500 V1.0 |
| | 18 | usb 3-1: Manufacturer: DACS |
| | 19 | usb 3-1: configuration #1 chosen from 1 choice |
| | 20 | usbcore: registered new interface driver usbserial |
| | 21 | USB Serial support registered for generic |
| | 22 | usbcore: registered new interface driver usbserial_generic |
| | 23 | usbserial: USB Serial Driver core |
| | 24 | USB Serial support registered for FTDI USB Serial Device |
| | 25 | ftdi_sio 3-1:1.0: FTDI USB Serial Device converter detected |
| | 26 | usb 3-1: Detected FT232BM |
| | 27 | usb 3-1: Number of endpoints 2 |
| | 28 | usb 3-1: Endpoint 1 MaxPacketSize 64 |
| | 29 | usb 3-1: Endpoint 2 MaxPacketSize 64 |
| | 30 | usb 3-1: Setting MaxPacketSize 64 |
| | 31 | usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0 |
| | 32 | usbcore: registered new interface driver ftdi_sio |
| | 33 | ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver |
| | 34 | }}} |
| | 35 | {{{ |
| | 36 | # lsusb |
| | 37 | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
| | 38 | Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
| | 39 | Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
| | 40 | Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
| | 41 | Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
| | 42 | Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC |
| | 43 | }}} |
| | 44 | {{{ |
| | 45 | # lsmod |
| | 46 | Module Size Used by |
| | 47 | ftdi_sio 32115 0 |
| | 48 | usbserial 31340 1 ftdi_sio |
| | 49 | ............ |
| | 50 | }}} |
| | 51 | * Teminal を2つ開き |
| | 52 | {{{ |
| | 53 | 入力デバイスをリダイレクト |
| | 54 | # cat < /dev/ttyUSB0 |
| | 55 | }}} |
| | 56 | {{{ |
| | 57 | 出力デバイスをリダイレクト |
| | 58 | # cat > /dev/ttyUSB0 |
| | 59 | |
| | 60 | こちらのターミナルで |
| | 61 | W0000000 |
| | 62 | と入力すると、もう1つの端末でR0000000と表示されるはず |
| | 63 | }}} |
| | 64 | * この方法で、CentOS5では問題無く動作するが、CentOS6では何も表示されなかった |
| | 65 | |
| | 66 | == 対処方法 == |
| | 67 | * マシンを再起動した後は、USBカウンタをつないでから |
| | 68 | {{{ |
| | 69 | # modprobe -r ftdi_sio |
| | 70 | }}} |
| | 71 | と入力する(rootになってから)。一度だけやればOK。それだけ。 |
| | 72 | |
| | 73 | |
| | 74 | |
| | 75 | == 雑感 == |
| | 76 | |
| | 77 | |