yasunari@sil:~$ cd /usr/local/src/ yasunari@sil:/usr/local/src$ ls kuro-rs yasunari@sil:/usr/local/src$ tar zcvf /tmp/kuro-rs_src.tar.gz kuro-rs kuro-rs/ kuro-rs/rs.h kuro-rs/rs_rec.c kuro-rs/rec kuro-rs/BUTTON_POWER kuro-rs/rs_send.c.orig kuro-rs/rs_send.c kuro-rs/send yasunari@sil:/usr/local/src$
Debian GNU/Linux 5.0 slam login: yasunari Password: Last login: Sun Jun 21 15:18:25 JST 2009 from uxl.yamasita.jp on pts/0 Linux slam 2.6.16.16-arm1 #69 Wed Oct 1 10:59:37 JST 2008 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. yasunari@slam:~$ cd /tmp yasunari@slam:/tmp$ ftp sil.yamasita.jp Connected to sil.yamasita.jp. 220 sil FTP server (GNU inetutils 1.5) ready. Name (sil.yamasita.jp:yasunari): 331 Password required for yasunari. Password: 230- Linux sil 2.6.16.16-arm1 #6 Fri Aug 31 13:07:15 JST 2007 armv5tejl 230- 230- The programs included with the Debian GNU/Linux system are free software; 230- the exact distribution terms for each program are described in the 230- individual files in /usr/share/doc/*/copyright. 230- 230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 230- permitted by applicable law. 230 User yasunari logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /tmp 250 CWD command successful. ftp> ls 200 PORT command sucessful. 150 Opening ASCII mode data connection for '/bin/ls'. total 56 drwxrwxrwt 2 root 6 Jun 21 04:47 .ICE-unix drwxrwxrwt 2 root 6 Jun 21 04:47 .X11-unix -rw-r--r-- 1 root 13797 Jun 21 20:30 fancontrol -rw-r--r-- 1 root 16378 Jun 21 06:22 hackdemaruroku.log -rw-r--r-- 1 yamasita 8823 Jun 21 15:17 kuro-rs_command.tar.gz -rw-r--r-- 1 yamasita 8895 Jun 21 20:29 kuro-rs_src.tar.gz 226 Transfer complete. ftp> bin 200 Type set to I. ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> mget *src* mget kuro-rs_src.tar.gz? y 200 PORT command sucessful. 150 Opening BINARY mode data connection for 'kuro-rs_src.tar.gz' (8895 bytes). ######## 226 Transfer complete. 8895 bytes received in 0.01 secs (587.4 kB/s) ftp> bye 221 Goodbye. yasunari@slam:/tmp$
yasunari@slam:/tmp$ su - root Password: slam:~# cd /usr/local/src/ slam:/usr/local/src# tar zxvf /tmp/kuro-rs_src.tar.gz kuro-rs/ kuro-rs/rs.h kuro-rs/rs_rec.c kuro-rs/rec kuro-rs/BUTTON_POWER kuro-rs/rs_send.c.orig kuro-rs/rs_send.c kuro-rs/send slam:/usr/local/src#
slam:/usr/local/src# cd kuro-rs/ slam:/usr/local/src/kuro-rs# ls BUTTON_POWER rec rs.h rs_rec.c rs_send.c rs_send.c.orig send slam:/usr/local/src/kuro-rs# cc rs_send.c -o rs_send slam:/usr/local/src/kuro-rs#
slam:/usr/local/src/kuro-rs# ./rs_send /usr/local/lib/kuro-rs/DST_BX500/BUTTON_P OWER 1 /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER - 1 - /dev/ttyUSB0 port open err [/dev/ttyUSB0] slam:/usr/local/src/kuro-rs#がー。
slam:/usr/local/src/kuro-rs# insmod /lib/modules/2.6.16.16-arm1/kernel/drivers/usb/serial/usbserial.ko slam:/usr/local/src/kuro-rs# insmod /lib/modules/2.6.16.16-arm1/kernel/drivers/usb/serial/ftdi_sio.ko slam:/usr/local/src/kuro-rs#
slam:/usr/local/src/kuro-rs# ./rs_send /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER 1 /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER - 1 - /dev/ttyUSB0 port open err [/dev/ttyUSB0] slam:/usr/local/src/kuro-rs#port open err?
slam:/usr/local/src/kuro-rs# tail -f /var/log/messages Jun 21 20:56:25 slam kernel: usbcore: registered new driver usbserial Jun 21 20:56:25 slam kernel: drivers/usb/serial/usb-serial.c: USB Serial Driver core Jun 21 20:56:35 slam kernel: drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device Jun 21 20:56:35 slam kernel: ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected Jun 21 20:56:35 slam kernel: drivers/usb/serial/ftdi_sio.c: Detected FT232BM Jun 21 20:56:35 slam kernel: usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0 Jun 21 20:56:35 slam kernel: usbcore: registered new driver ftdi_sio Jun 21 20:56:35 slam kernel: drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver slam:/usr/local/src/kuro-rs#ちゃんと認識している。
slam:/usr/local/src/kuro-rs# ls -l /dev/ttyU* ls: cannot access /dev/ttyU*: No such file or directory slam:/usr/local/src/kuro-rs#アタリ。
旧形 HS-DHGL (sil) で調べる。
yasunari@sil:~$ ls -l /dev/ttyUSB* crw-rw---- 1 root root 188, 0 Mar 2 2005 /dev/ttyUSB0 crw-rw---- 1 root root 188, 1 Mar 2 2005 /dev/ttyUSB1 crw-rw---- 1 root root 188, 10 Mar 2 2005 /dev/ttyUSB10 crw-rw---- 1 root root 188, 11 Mar 2 2005 /dev/ttyUSB11 crw-rw---- 1 root root 188, 12 Mar 2 2005 /dev/ttyUSB12 crw-rw---- 1 root root 188, 13 Mar 2 2005 /dev/ttyUSB13 crw-rw---- 1 root root 188, 14 Mar 2 2005 /dev/ttyUSB14 crw-rw---- 1 root root 188, 15 Mar 2 2005 /dev/ttyUSB15 crw-rw---- 1 root root 188, 2 Mar 2 2005 /dev/ttyUSB2 crw-rw---- 1 root root 188, 3 Mar 2 2005 /dev/ttyUSB3 crw-rw---- 1 root root 188, 4 Mar 2 2005 /dev/ttyUSB4 crw-rw---- 1 root root 188, 5 Mar 2 2005 /dev/ttyUSB5 crw-rw---- 1 root root 188, 6 Mar 2 2005 /dev/ttyUSB6 crw-rw---- 1 root root 188, 7 Mar 2 2005 /dev/ttyUSB7 crw-rw---- 1 root root 188, 8 Mar 2 2005 /dev/ttyUSB8 crw-rw---- 1 root root 188, 9 Mar 2 2005 /dev/ttyUSB9 yasunari@sil:~$メジャーが 188, マイナが 0 のキャラクタデバイス。
新型 HS-DHGL(slam) で作る。
slam:/usr/local/src/kuro-rs# cd /dev/ slam:/dev#mknod を使えば良いのは覚えているが、 1年に1回使うか使わないかなので、 使い方までは覚えていない。help!
slam:/dev# mknod --help Usage: mknod [OPTION]... NAME TYPE [MAJOR MINOR] Create the special file NAME of the given TYPE. -Z, --context=CTX set the SELinux security context of NAME to CTX Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set file permission bits to MODE, not a=rw - umask --help display this help and exit --version output version information and exit Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X, it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal; otherwise, as decimal. TYPE may be: b create a block (buffered) special file c, u create a character (unbuffered) special file p create a FIFO Report bugs toできた。. slam:/dev# mknod /dev/ttyUSB0 c 188 0 slam:/dev# ls -l /dev/ttyUSB0 crw-r--r-- 1 root root 188, 0 Jun 21 21:03 /dev/ttyUSB0 slam:/dev# chmod 664 !$ chmod 664 /dev/ttyUSB0 slam:/dev# ls -l !$ ls -l /dev/ttyUSB0 crw-rw-r-- 1 root root 188, 0 Jun 21 21:03 /dev/ttyUSB0 slam:/dev#
slam:/dev# cd /usr/local/src/kuro-rs/ slam:/usr/local/src/kuro-rs# slam:/usr/local/src/kuro-rs# !?POWER?:p ./rs_send /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER 1 slam:/usr/local/src/kuro-rs# !?POWER ./rs_send /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER 1 /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER - 1 - /dev/ttyUSB0 Send File : [/usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER] slam:/usr/local/src/kuro-rs#リトライしたのだろう、ちょっと時間がかかったが、 BS デジタルチューナの電源が入った。
slam:/usr/local/src/kuro-rs# ./rs_send /usr/local/lib/kuro-rs/DST_BX500/BUTTON_P OWER 1 /usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER - 1 - /dev/ttyUSB0 Send File : [/usr/local/lib/kuro-rs/DST_BX500/BUTTON_POWER] slam:/usr/local/src/kuro-rs#無事、電源が切れた。
|
|
← 第三世代 LinkStation ハックキットに開発環境のインストール |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 第三世代 LinkStation ハックキットでリモコン制御(4) |