找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 6680|回复: 6

如何文件永久写入路由器中(Tomato-1.28.2890-R1-8M)?

[复制链接]
发表于 2016-9-9 21:05 | 显示全部楼层 |阅读模式
这几天在研究将RG100E-AA作HP 1020打印机作打印服务器的问题,发现要通过命令将固件“sihp1020.dl”和“usb_printerid”发送到打印机才行。于是刷了“Tomato-1.28.2890-R1-8M.trx”,通过winscp将上面两个文件写入jffs,说是只读,不能写。于是将文件写入到tmp中,成功,能正确发送固件到打印机。
问题是路由器重启后,“sihp1020.dl”和“usb_printerid”消失,导致无法将固件发送到打印机而失败。
本人菜鸟一枚,手头也有TTL线,不知如何才能将那两个文件永久写入路由器中?
请求指点,不用感激!


系统:

本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2016-9-9 21:09 | 显示全部楼层
参考教程:http://tomatousb.org/tut:loading ... ware-hotplug-script

Some printers (based on ZjStream or XQX stream protocol) - mostly manufactured by HP, i.e. HP LaserJet 1018/1020/1022/P2035/P1005/P1006/P1007/P1008/P1505/P1505n/P2014/P2014n, HP LaserJet Pro P1102/P1102w/P1566/P1606dn and some others - require a firmware to be loaded on the power up. You can configure the Tomato router to automatically upload firmware to the printer using Hotplug script.

Download the firmware for your printer from here, or go to http://foo2zjs.rkkda.com/ or http://foo2xqx.rkkda.com/, and follow instructions to build the firmware yourself.
Store the firmware file on JFFS partition on your router, or on the attached USB drive. Then configure the router to automatically upload firmware to the printer using Hotplug script.

First of all you will have to grab your printer's Product ID. Go to 'USB and NAS'->'USB Support' and paste this script in the 'Hotplug script' section:

echo $(date)" Action: "$ACTION" Product: "$PRODUCT" Interface: "$INTERFACE >> /var/log/hotplug
Press 'Save' and plug your printer into the USB port.

Log in to your router's console and display hotplug log:

cat /var/log/hotplug
Now you will have to change previous script to:

if [ $PRODUCT = "previously_grabbed_product_id" ]; then
    if [ $ACTION = "add" ]; then
        sleep 1
        cat path_to_your_printers_firmware > /dev/usb/lp0
    fi
fi
Remember to update product id and path to your printer's firmware.

当中提到将固件保存在jffs中,就是不知如何操作
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-9-9 21:14 | 显示全部楼层
试过winscp、telnet、secureCRT,均失败


显示:Read-only file system

本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-9-9 21:30 | 显示全部楼层
貌似我的固件jffs2关闭了。你看看是否可以启用jffs2.假如不行的话,你得在开机启动的时候wget那几个程序,放在tmp目录。

点评

好的,谢谢!  详情 回复 发表于 2016-9-9 23:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-9-9 23:21 | 显示全部楼层
佐须之男 发表于 2016-9-9 21:30
貌似我的固件jffs2关闭了。你看看是否可以启用jffs2.假如不行的话,你得在开机启动的时候wget那几个程序, ...

好的,谢谢!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-9-10 18:51 | 显示全部楼层
改刷tomato_dual_1.28(tomato-K26USB-1.28.0542-MIPSR1-8M.trx)固件了,成功设置打印服务:
https://www.right.com.cn/forum/f ... p;extra=#pid1398284
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-9-28 21:04 | 显示全部楼层
路由器的内存空间有限的,而且系统设定了只读权限是不可以写入的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-19 14:35

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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