配置openwrt 为sta模式
a) 关闭wan口, 只留出两个lan口
b) windows系统的pc有线直连盒子的lan口(注意)
配置安装环境
a) 安装usb
1) opkg update
2)opkg list-installed | grep usb
3)opkg install kmod-usb-core
4)opkg install kmod-usb-storage
b) 配置防火墙
1) 在/etc/config/firewall文件中 to accept packets on on TCP port 9100:
#Allow attached network printer
config 'rule'
option 'src' 'lan'
option 'proto' 'tcp'
option 'dest_port' '9100'
option 'target' 'ACCEPT'
2)opkg install kmod-usb-printer 或者 opkg install kmod-lp
参看:[添加链接描述](https://openwrt.org/docs/guide-user/storage/usb-installing)
c) 在/etc/hotplug.d/usb/20-printer文件中添加以下内容
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
if [ "$PRODUCT" = "4f9/27/100" ]
then
case "$ACTION" in
add)
/etc/init.d/p910nd stop