數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#1 2008-12-10 23:23:46

ardayang
精靈
註冊日期: 2008-05-25
文章數: 104
目前積分 :   

ATI Remote Control USB遙控器 遙控500gP執行程式

請下載lirc-0.8.2-atilibusb.tar.gz(asus wl500gp oleg 1.9.2.7-10)
有興趣的人請先參考看看.
http://blog.roozeec.fr/images/atiremctrl.png

以下為胡搞瞎搞的過程,請不吝指教,謝謝!(請各位先進提供正確的方法或修正建議,本文將不定期修正.)

1.建立編譯的環境:
ipkg install buildroot
ipkg install make
ipkg install automake
ipkg install autoconf

2.下載lirc-0.8.2.tar.gzlirc_0.8.2-6.tar.gz,並解壓縮(我是用winzip解壓縮,不會用tar,請會用tar解成功的人,教我一下,謝謝!)
解壓縮後,會產生lirc-0.8.2目錄.進入lirc-0.8.2目錄後,執行./configure -h ,可以看到相關參數設定.
執行./configure --with-driver=atilibusb建立make所需的Makefile.
接下來執行make ,開始編譯各相關程式.
完成後,會在daemons目錄產生lircd、lircmd及irrecord等3個檔案;在tools目錄產生irexec、irsend、lircrcd、ircat、irpty、irw、mode2等6個檔案.
執行make install 會將編譯好的檔案放到相關的目錄,但因為./configure --with-driver=atilibusb時未加入相關檔案之路徑參數,故需自行搬到適當的目錄,否則重開後,make install 產生的檔案都會不見.

3.插入ati rf usb接收器,lsusb可以看到ID 0bc7:0004 X10 Wireless Technology, Inc. X10 Receiver裝置.

4.執行irrecord -H atilibusb lircd.conf製作ati rf遙控器按鍵的對應碼.
Please send the finished config files to so that I
can make them available to others. Don't forget to put all information
that you can get about the remote control in the header of the file.

Press RETURN to continue.
此時按Enter鍵.

Hold down an arbitrary button.
此時按住遙控器任一按鍵不放,直到......跑完才放開.

Please enter the name for the next button (press to finish recording)
此時鍵入按鍵名稱(如power)後,按Enter鍵.

Now hold down button "power".
此時按住遙控器power鍵,直到此鍵完成錄製.
以此類推,完成後,不需入按鍵名稱,直接按Enter鍵,等待離開,即完成對應碼錄製.

可以cat lircd.conf看一下剛才產生的內容.

5.啟動lircd主程式.
執行lircd -h 可以看到相關參數設定.
執行lircd -H ?可以看到支援的驅動裝置atilibusb.
執行lircd -H atilibusb lircd.conf 正式啟動lirc.

6.測試遙控器按鍵是否已正常啟動.
執行irw後,再按遙控器按鍵,如power鍵,則會出現對應的按鍵資訊,就成功了.
ctrl+c結束測試.

7.製作irexec遙控執行程式所需的設定檔lircrc.
nano lircrc
--------------------------------------
#### irexec ####
begin
prog = irexec
button = power
config = ez-setup
end

begin
prog = irexec
button = play
config = lcd4linux
end

begin
prog = irexec
button = stop
config = killall lcd4linux
end
--------------------------------------

8.執行irexec -d lircrc後,即大功告成,按下遙控器對應按鍵play,即可依config = lcd4linux設定啟動lcd4linux程式,按下遙控器對應按鍵stop,即可依config = killall lcd4linux設定關閉lcd4linux程式.

待研究的部份:
1.如何將make install產生檔案,直接放到/opt下正常的目錄.
2.如何封裝成ipk檔,以方便安裝.
3.lircmd、irsend、lircrcd、ircat、irpty、mode2之指令如何正確使用.
4.如何加入其他編譯時需要用到linux kernel sources的驅動程式,如:serial、iguanaIR等驅動模組.(因為atilibusb剛好不需要linux kernel sources,所以本案才可完成編譯)
5.克服第4點的問題後,要研究如何讓wl500gP發射紅外線,控制電器產品.

參考資料:
What is LIRC ?
Telecommande ATI remote Wonder sous Ubuntu
Linux LIRC (2)



最後修改: ardayang (2008-12-20 17:36:10)


離線

 

#2 2008-12-10 23:53:53

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: ATI Remote Control USB遙控器 遙控500gP執行程式

感謝分享 thankgod
看來 ATI remote 又要大賣,趕快去搶一支吧 dev




技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

相關討論主題

主題 回覆 點閱 最後發表
0 10684 2011-11-16 21:54:17 作者 ardayang
transmission-remote 作者 tankjaw
1 10142 2011-02-22 10:44:16 作者 tankjaw

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed