找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 9999|回复: 18

将RT-N16打造成《多媒体机顶盒》

[复制链接]
发表于 2012-11-20 22:31 | 显示全部楼层 |阅读模式
本帖最后由 athlong 于 2012-11-23 11:55 编辑

本文章属原创。保留所有权。首发于恩山。如转载,请说明出处,并保留本段说明文字

首先基于原版固体开始搞
1.安装python。
telnet 上路由器,输入你的用户名及密码
admin@RT-N16:/tmp/home/root# ipkg install python
Installing python (2.5-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/python_2
.5-1_mipsel.ipk
Installing python25 (2.5.6-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/python25
_2.5.6-2_mipsel.ipk
Installing readline (6.1-2) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/readline
_6.1-2_mipsel.ipk
Installing bzip2 (1.0.6-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/bzip2_1.
0.6-1_mipsel.ipk
Installing libdb (4.2.52-3) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/libdb_4.
2.52-3_mipsel.ipk
Installing sqlite (3.7.14-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/sqlite_3
.7.14-1_mipsel.ipk
Installing ncursesw (5.7-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ncursesw
_5.7-1_mipsel.ipk
Configuring bzip2
update-alternatives: Linking //opt/bin/bzip2 to /opt/bin/bzip2-bzip2
Configuring libdb
Configuring ncursesw
Configuring python
Configuring python25
Configuring readline
Configuring sqlite
Successfully terminated.
admin@RT-N16:/tmp/home/root# python
Python 2.5.6 (r256:88840, Feb 17 2012, 21:29:31)
[GCC 4.1.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 2+3
5
>>>
至此python运行环境完美安装。到这里你就可以开发python程序了
想学python的同学有一台路由器即可。python,Linux果真强大
接下来试试python写的下载youku视频脚本。
admin@RT-N16:/tmp/mnt/sda/lixian# youku.py
Traceback (most recent call last):
  File "youku.py", line 7, in <module>
    import json
ImportError: No module named json

运行失败,可见2.5版本未对json模块支持,所以升级到2.7.3再测试
admin@RT-N16:/tmp/mnt/sda/asusware/bin# python2.7
Python 2.7.3 (default, Apr 12 2012, 16:54:39)
[GCC 4.1.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
admin@RT-N16:/tmp/mnt/sda/lixian# python2.7 youku.py http://v.youku.com/v_show/i
d_XNDc3MzY0MzY4.html?f=18576784
Downloading 澶栦氦閮ㄦ柊鍙戣█浜哄崕鏄ヨ幑棣栨?浜?浉 搴旂瓟鑷??鑾疯偗瀹?鍖?
浜?偍鏃?121120.mp4 ...
13% [=====                                   ] 1/1
可能由于编码问题,导致文件名可能乱码,不过不打仅,此为测试


到这里其实我们可以写出离线下载YOUKU视频的小软件了。
当然这不是我们的最终目标。但亦可做为一个分支项目进行。




















本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
发表于 2012-11-20 22:51 | 显示全部楼层
实在看不明白。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2012-11-20 23:08 | 显示全部楼层
qsamxp 发表于 2012-11-20 22:51
实在看不明白。。

其实华硕的官方固件也是支持扩展功能的。原生自带http服务器且支持asp和PHP。
稍微配置一下就是一台web服务器。可扩展性很大。
它可以用http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable源的安装包。所以理论上和openwrt一样可自己扩展固件的功能。
本篇想研究的是另一个方向,就是将路由打造成《多媒体中心》
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-11-22 22:16 | 显示全部楼层
athlong 发表于 2012-11-20 23:08
其实华硕的官方固件也是支持扩展功能的。原生自带http服务器且支持asp和PHP。
稍微配置一下就是一台web服 ...

唔明白...可否作詳細解釋
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-11-22 23:45 | 显示全部楼层
很强悍!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-11-23 13:18 | 显示全部楼层
如果你这样打造我个人感觉没这个必要。实现BT和离线下载的功能就够用了,YOUKU的视频不清楚。有条件的童鞋最好上Android的电视,路由器共享的方式播放就可以了。流媒体服务也是很好的功能。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-10 08:38 | 显示全部楼层
qsamxp 发表于 2012-11-23 13:18
如果你这样打造我个人感觉没这个必要。实现BT和离线下载的功能就够用了,YOUKU的视频不清楚。有条件的童鞋最 ...

求详细教程!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-10 18:06 | 显示全部楼层
求安装php网站的环境
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-10 21:22 | 显示全部楼层
必须顶
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-14 14:27 | 显示全部楼层
athlong 发表于 2012-11-20 23:08
其实华硕的官方固件也是支持扩展功能的。原生自带http服务器且支持asp和PHP。
稍微配置一下就是一台web服 ...

麻烦怎么稍微配置就可以当web服务器,求教程,谢谢!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-14 15:08 | 显示全部楼层
灰常强大 可惜木机器
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-21 15:50 | 显示全部楼层
高手才能这样玩,呵呵
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2012-12-25 06:44 来自手机 | 显示全部楼层
学习了。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-1-24 10:31 | 显示全部楼层
在云里、在雾里
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-8-4 10:01 | 显示全部楼层
对于刚用此路由的人来说,觉得这个路由很高深。原厂固件就有很多功能。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 05:29

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表