用這個就是想無線打印,打印機也不連電腦共享,就連上openwrt。
首先是刷機:
我是W720N,https://openwrt.org/toh/tp-link/tl-wr720n,官方說支持到17.01.5。只是打印,就不再編譯了。
其次是中繼到原有的無線網絡,要求同網段。
https://bandwh.com/net/28.html openwrt通過中繼橋設置同網段無線中繼
https://oldwiki.archive.openwrt.org/doc/recipes/relayclient 帶有中繼(偽橋)的路由客戶端
也就是安裝luci-proto-relay 設置新接口中繼橋。
SSH登錄上去
更新組件包package
opkg update
安裝組件
opkg install luci-app-p910nd
opkg install kmod-usb-printer
到服務去打開打印服務器
windows添加tcp/ip打印機,192.168.1.1:9100 帶端口
手機可以用printbot 來打印,添加打印機 不需要填端口
詳細說明:
刷機:
就刷這個包
Step 1: Information to Note 注意事項
-
Your Main Router's WPA2 encryption key (aka "WiFi password")
-
Your Main Router's subnet (In my example, I will use 172.16.16.0/16 which means my subnet mask is 255.255.0.0)
-
Your Main Router's SSID (aka "WiFi network name")
- 找到你主路由的wifi密碼。或者說上級路由的wifi密碼
-
上級網絡的子網,我的實驗環境是 10.0.0.1/24,255.255.255.0
-
上級無線路由的無線名
Step 2: Initial Set-up 初始設置
-
Power on your Client Router
-
Connect an Ethernet (RJ45) cable from your Computer to your Client Router.
-
Set your computer to have a Static IP address of 192.168.1.5 and a Gateway of 192.168.1.1
-
In System > Administration, make sure you have the packages luci-proto-relay and relayd-bridge installed.
- 打開子路由電源。
- 使用網線連接電腦和子路由LAN口。
- 設置電腦IP地址:192.168.1.5,網關192.168.1.1。
- 通過Administration--Software--Installed packages確認已安裝uci-proto-relay and relayd-bridge。
- luci-proto-relay and relayd-bridge 可以在聯網以后檢查是否安裝。
Step 3: Joining the Main Router's WiFi
-
Open your browser, and go to http://192.168.1.1/
-
Go to the page Network > WiFi
-
Beside your preferred radio, such as Radio1 (801.11an), click Scan.
-
Select your Main Router's SSID (ex: Eagle)
-
Enter your PSK (Wi-Fi password).
-
Create a NEW Network called " wwan" or anything else you like (ex: " Quack")
-
Firewall-Zone should be set to " lan".
-
打開瀏覽器訪問 http://192.168.1.1/
-
進入網絡設置 Network > WiFi
-
在 802.11bgn (radio0),右邊 點擊Scan.
-
選擇你主路由的無線名,點擊右邊的Join Network。
-
在 .
-
" wwan" 或輸入你喜歡的名字。
-
Firewall-Zone 選擇" lan".
Step 4: Create the WiFi Client Interface 編輯WIFI客戶端類型
-
Go to the page Network > Interfaces
-
Edit the above interface (called " wwan", " Quack" or whatever you chose)
-
Set Protocol/Mode = DHCP Client
-
菜單 Network > Interfaces
-
編輯你的網絡(名字應該是" wwan", 或你自己設置的名字)
-
設置 Protocol/Mode = DHCP Client
- 這時候應該已經能上網了,安裝插件
- System--Software--Update lists 更新軟件包列表
- Available packages (luci-proto-relay) -- Install 安裝
- -- Install 安裝
- -- Install 安裝
Step 5: Create Bridge Interface 創建橋接
-
Go to the page Network > Interfaces
-
Create a new Interface called " stabridge"
-
Set Protocol/Mode = Relay Bridge
-
Relay between " lan" and " wwan", " Quack" or whatever you chose)
-
Local IPv4 Address for the Bridge = " 172.16.16.154"
-
進入 Network > Interfaces
-
創建一個新接口 Add new Interfaces --
-
設置 Protocol/Mode = Relay Bridge (中繼橋)
-
同時選擇" lan" 和" wwan", 或你自己定義的。
-
Local IPv4 Address 給橋設置IP地址 " 10.0.0.4"
Step 6: Update the "lan" Interface 編輯LAN類型
-
Go to the page Network > Interfaces
-
Beside " lan", click Edit.
-
Set IPv4 Gateway to the IP address of your Main Router (in my case, it's 172.16.16.1)
-
Set Custom DNS to also be the IP address of your Main Router (in my case, it's 172.16.16.1)
-
Under the section of DHCP Server, CHECK OFF " Ignore Interface"
-
Network > Interfaces
-
選擇" lan", 點擊 Edit.
-
設置 IPv4 Gateway 到你的主路由IP(在我這個示例中 10.0.0.1)
-
設置 Custom DNS 一樣到主路由IP(在我這個示例中 10.0.0.1)
-
DHCP Server - General Setup - Ignore interface Disable DHCP for this interface. 選購,關閉LAN接口的DHCP.
Step 7: Allow Firewall Forwarding 允許防火牆轉發
-
Go to the page Network > Firewall
-
Scroll down to "Zones". Beside " lan", click Edit.Set Forward = Accept. (Input & Output should already be set to Accept)
- Set Covered Network = "lan" (default) & "wwan", "Quack" or whatever you chose)
-
"Zones" - " lan", 點擊 Edit.
-
設置 Forward = Accept.
- 設置 Input = Accept
- 設置 output = Accept
-
勾選 Covered Network = " lan" 和 " wwan", 或你自定義的。
-
Network > Firewall
-
"Zones" - " lan", 點擊 Edit.設置 Forward = Accept.
- 設置 Input = Accept
- 設置 output = Accept
- 勾選 Covered Network = "lan" 和 "wwan", 或你自定義的。
Step 8: Set a DHCP Reservation in the Main Router's Settings 在主路由設置子路由靜態DHCP
-
In your Main Router, set a static DHCP reservation for your Client Router's MAC Address. Use the SAME IP address as in Step 5-5 (In my case, it would be 172.16.16.154)
- 在主路由綁定子路由的MAC地址到靜態DHCP 在我的例子是10.0.0.4
Step 9: Reboot Your Client Router 重啟子路由
-
Go to the page System > Reboot > Reboot Now
-
On your computer, clear your static IP settings, and let the IP be retrieved automatically.
-
Your Client Router should now be accessible at the address of 172.16.16.154 or whatever you chose.
-
Your computer should also have an IP address in the same subnet as your Main Router (In my case, it's 172.16.16.#
-
If you set your computer to the same static IP address settings as in Step 2-3, you should still be able to connect to the client router at 192.168.1.1
-
System > Reboot > Reboot Now
-
在電腦取消靜態IP,改為DHCP獲取IP地址
-
你應該可以通過橋地址 ,子路由靜態DHCP地址來訪問子路由
Step 10: Enable p910nd - Printer server 打開P910nd打印服務器
-
Services-p910nd - Printer server 勾選enable
sane-backends-all 這個包是掃描儀用的
SANE (Scanner Access Now Easy) is a universal scanner interface. . Metapackage for selecting all SANE Backends
------------恢復內容開始------------
用這個就是想無線打印,打印機也不連電腦共享,就連上openwrt。
首先是刷機:
我是W720N,https://openwrt.org/toh/tp-link/tl-wr720n,官方說支持到17.01.5。只是打印,就不再編譯了。
其次是中繼到原有的無線網絡,要求同網段。
https://bandwh.com/net/28.html openwrt通過中繼橋設置同網段無線中繼
https://oldwiki.archive.openwrt.org/doc/recipes/relayclient 帶有中繼(偽橋)的路由客戶端
也就是安裝luci-proto-relay 設置新接口中繼橋。
SSH登錄上去
更新組件包package
opkg update
安裝組件
opkg install luci-app-p910nd
opkg install kmod-usb-printer
到服務去打開打印服務器
windows添加tcp/ip打印機,192.168.1.1:9100 帶端口
手機可以用printbot 來打印,添加打印機 不需要填端口
詳細說明:
刷機:
就刷這個包
Step 1: Information to Note 注意事項
-
Your Main Router's WPA2 encryption key (aka "WiFi password")
-
Your Main Router's subnet (In my example, I will use 172.16.16.0/16 which means my subnet mask is 255.255.0.0)
-
Your Main Router's SSID (aka "WiFi network name")
- 找到你主路由的wifi密碼。或者說上級路由的wifi密碼
-
上級網絡的子網,我的實驗環境是 10.0.0.1/24,255.255.255.0
-
上級無線路由的無線名
Step 2: Initial Set-up 初始設置
-
Power on your Client Router
-
Connect an Ethernet (RJ45) cable from your Computer to your Client Router.
-
Set your computer to have a Static IP address of 192.168.1.5 and a Gateway of 192.168.1.1
-
In System > Administration, make sure you have the packages luci-proto-relay and relayd-bridge installed.
- 打開子路由電源。
- 使用網線連接電腦和子路由LAN口。
- 設置電腦IP地址:192.168.1.5,網關192.168.1.1。
- 通過Administration--Software--Installed packages確認已安裝uci-proto-relay and relayd-bridge。
- luci-proto-relay and relayd-bridge 可以在聯網以后檢查是否安裝。
Step 3: Joining the Main Router's WiFi
-
Open your browser, and go to http://192.168.1.1/
-
Go to the page Network > WiFi
-
Beside your preferred radio, such as Radio1 (801.11an), click Scan.
-
Select your Main Router's SSID (ex: Eagle)
-
Enter your PSK (Wi-Fi password).
-
Create a NEW Network called " wwan" or anything else you like (ex: " Quack")
-
Firewall-Zone should be set to " lan".
-
打開瀏覽器訪問 http://192.168.1.1/
-
進入網絡設置 Network > WiFi
-
在 802.11bgn (radio0),右邊 點擊Scan.
-
選擇你主路由的無線名,點擊右邊的Join Network。
-
在 .
-
" wwan" 或輸入你喜歡的名字。
-
Firewall-Zone 選擇" lan".
Step 4: Create the WiFi Client Interface 編輯WIFI客戶端類型
-
Go to the page Network > Interfaces
-
Edit the above interface (called " wwan", " Quack" or whatever you chose)
-
Set Protocol/Mode = DHCP Client
-
菜單 Network > Interfaces
-
編輯你的網絡(名字應該是" wwan", 或你自己設置的名字)
-
設置 Protocol/Mode = DHCP Client
- 這時候應該已經能上網了,安裝插件
- System--Software--Update lists 更新軟件包列表
- Available packages (luci-proto-relay) -- Install 安裝
- -- Install 安裝
- -- Install 安裝
Step 5: Create Bridge Interface 創建橋接
-
Go to the page Network > Interfaces
-
Create a new Interface called " stabridge"
-
Set Protocol/Mode = Relay Bridge
-
Relay between " lan" and " wwan", " Quack" or whatever you chose)
-
Local IPv4 Address for the Bridge = " 172.16.16.154"
-
進入 Network > Interfaces
-
創建一個新接口 Add new Interfaces --
-
設置 Protocol/Mode = Relay Bridge (中繼橋)
-
同時選擇" lan" 和" wwan", 或你自己定義的。
-
Local IPv4 Address 給橋設置IP地址 " 10.0.0.4"
Step 6: Update the "lan" Interface 編輯LAN類型
-
Go to the page Network > Interfaces
-
Beside " lan", click Edit.
-
Set IPv4 Gateway to the IP address of your Main Router (in my case, it's 172.16.16.1)
-
Set Custom DNS to also be the IP address of your Main Router (in my case, it's 172.16.16.1)
-
Under the section of DHCP Server, CHECK OFF " Ignore Interface"
-
Network > Interfaces
-
選擇" lan", 點擊 Edit.
-
設置 IPv4 Gateway 到你的主路由IP(在我這個示例中 10.0.0.1)
-
設置 Custom DNS 一樣到主路由IP(在我這個示例中 10.0.0.1)
-
DHCP Server - General Setup - Ignore interface Disable DHCP for this interface. 選購,關閉LAN接口的DHCP.
Step 7: Allow Firewall Forwarding 允許防火牆轉發
-
Go to the page Network > Firewall
-
Scroll down to "Zones". Beside " lan", click Edit.Set Forward = Accept. (Input & Output should already be set to Accept)
- Set Covered Network = "lan" (default) & "wwan", "Quack" or whatever you chose)
-
"Zones" - " lan", 點擊 Edit.
-
設置 Forward = Accept.
- 設置 Input = Accept
- 設置 output = Accept
-
勾選 Covered Network = " lan" 和 " wwan", 或你自定義的。
-
Network > Firewall
-
"Zones" - " lan", 點擊 Edit.設置 Forward = Accept.
- 設置 Input = Accept
- 設置 output = Accept
- 勾選 Covered Network = "lan" 和 "wwan", 或你自定義的。
Step 8: Set a DHCP Reservation in the Main Router's Settings 在主路由設置子路由靜態DHCP
-
In your Main Router, set a static DHCP reservation for your Client Router's MAC Address. Use the SAME IP address as in Step 5-5 (In my case, it would be 172.16.16.154)
- 在主路由綁定子路由的MAC地址到靜態DHCP 在我的例子是10.0.0.4
Step 9: Reboot Your Client Router 重啟子路由
-
Go to the page System > Reboot > Reboot Now
-
On your computer, clear your static IP settings, and let the IP be retrieved automatically.
-
Your Client Router should now be accessible at the address of 172.16.16.154 or whatever you chose.
-
Your computer should also have an IP address in the same subnet as your Main Router (In my case, it's 172.16.16.#
-
If you set your computer to the same static IP address settings as in Step 2-3, you should still be able to connect to the client router at 192.168.1.1
-
System > Reboot > Reboot Now
-
在電腦取消靜態IP,改為DHCP獲取IP地址
-
你應該可以通過橋地址 ,子路由靜態DHCP地址來訪問子路由
Step 10: Enable p910nd - Printer server 打開P910nd打印服務器
-
Services-p910nd - Printer server 勾選enable
https://openwrt.org/docs/guide-user/services/scanner_server/saned
掃描的說明文件
還沒搞定