From 4dc69f8e0eed0582dfa69914569eb1bea53897da Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 14 Dec 2017 23:14:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20at=202017=E5=B9=B4=2012=E6=9C=88=2014?= =?UTF-8?q?=E6=97=A5=20=E6=98=9F=E6=9C=9F=E5=9B=9B=2023:14:37=20CST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ireless wake-on-lan for Linux WiFi card.md | 107 ---------------- ...ireless wake-on-lan for Linux WiFi card.md | 116 ++++++++++++++++++ 2 files changed, 116 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md create mode 100644 translated/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md diff --git a/sources/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md b/sources/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md deleted file mode 100644 index 59478471b8..0000000000 --- a/sources/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md +++ /dev/null @@ -1,107 +0,0 @@ -translating by lujun9972 -How to configure wireless wake-on-lan for Linux WiFi card -====== -[![linux-configire-wake-on-wireless-lan-wowlan][1]][1] -Wake on Wireless (WoWLAN or WoW) is a feature to allow the Linux system to go into a low-power state while the wireless NIC remains active and stay connected to an AP. This quick tutorial shows how to enable WoWLAN or WoW (wireless wake-on-lan) mode with a wifi card installed in a Linux based laptop or desktop computer. - -Please note that not all WiFi cards or Linux drivers support the WoWLAN feature. - -## Syntax - -You need to use the iw command to see or manipulate wireless devices and their configuration on a Linux based system. The syntax is: -``` -iw command -iw [options] command -``` - -## List all wireless devices and their capabilities - -Type the following command: -``` -$ iw list -$ iw list | more -$ iw dev` -``` -Sample outputs: -``` -phy#0 - Interface wlp3s0 - ifindex 3 - wdev 0x1 - addr 6c:88:14:ff:36:d0 - type managed - channel 149 (5745 MHz), width: 40 MHz, center1: 5755 MHz - txpower 15.00 dBm - -``` - -Please note down phy0. - -## Find out the current status of your wowlan - -Open the terminal app and type the following command to tind out wowlan status: -`$ iw phy0 wowlan show` -Sample outputs: -`WoWLAN is disabled` - -## How to enable wowlan - -The syntax is: -`sudo iw phy {phyname} wowlan enable {option}` -Where, - - 1. {phyname} - Use iw dev to get phy name. - 2. {option} - Can be any, disconnect, magic-packet and so on. - - - -For example, I am going to enable wowlan for phy0: -`$ sudo iw phy0 wowlan enable any` -OR -`$ sudo iw phy0 wowlan enable magic-packet disconnect` -Verify it: -`$ iw phy0 wowlan show` -Sample outputs: -``` -WoWLAN is enabled: - * wake up on disconnect - * wake up on magic packet - -``` - -## Test it - -Put your laptop in suspend or sleep mode and send ping request or magic packet from your nas server: -`$ sudo sh -c 'echo mem > /sys/power/state'` -Send ping request from your nas server using the [ping command][3] -`$ ping your-laptop-ip` -OR [send magic packet using wakeonlan command][4] : -`$ wakeonlan laptop-mac-address-here -$ etherwake MAC-Address-Here` - -## How do I disable WoWLAN? - -The syntax is: -`$ sudo phy {phyname} wowlan disable -$ sudo phy0 wowlan disable` - -For more info read the iw command man page: -`$ man iw -$ iw --help` - - --------------------------------------------------------------------------------- - -via: https://www.cyberciti.biz/faq/configure-wireless-wake-on-lan-for-linux-wifi-wowlan-card/ - -作者:[Vivek Gite][a] -译者:[lujun9972](https://github.com/lujun9972) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://twitter.com/nixcraft -[1] https://www.cyberciti.biz/media/new/faq/2017/12/linux-configire-wake-on-wireless-lan-wowlan.jpg -[2] https://www.cyberciti.biz/tips/linux-send-wake-on-lan-wol-magic-packets.html -[3] //www.cyberciti.biz/faq/unix-ping-command-examples/ (See Linux/Unix ping command examples for more info) -[4] https://www.cyberciti.biz/faq/apple-os-x-wake-on-lancommand-line-utility/ diff --git a/translated/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md b/translated/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md new file mode 100644 index 0000000000..a9b58edbd8 --- /dev/null +++ b/translated/tech/20171213 How to configure wireless wake-on-lan for Linux WiFi card.md @@ -0,0 +1,116 @@ +如何为 Linux 无线网卡配置无线唤醒功能 +====== +[![linux-configire-wake-on-wireless-lan-wowlan][1]][1] +无线唤醒 (WoWLAN or WoW) 允许 Linux 系统进入低耗电模式的情况下保持无线网卡处于激活状态依然与热点连接。这篇教程演示了如何在一台安装无线网卡的 Linux 笔记本或桌面电脑上启用 WoWLAN / WoW 模式。 + +请注意,不是所有的无线网卡和 Linux 驱动程序都支持 WoWLAN。 + +## 语法 + +在 Linux 系统上,你需要使用 iw 命令来查看和操作无线设备及其配置。 其 syntax 为: +``` +iw command +iw [options] command +``` + +## 列出所有的无线设备及其功能 + +输入下面命令: +``` +$ iw list +$ iw list | more +$ iw dev +``` +输出为: +``` +phy#0 + Interface wlp3s0 + ifindex 3 + wdev 0x1 + addr 6c:88:14:ff:36:d0 + type managed + channel 149 (5745 MHz),width: 40 MHz, center1: 5755 MHz + txpower 15.00 dBm + +``` + +请记下这个 phy0。 + +## 查看 wowlan 的当前状态 + +打开终端并输入下面命令来查看无线网络的状态: +``` +$ iw phy0 wowlan show +``` +输出为: +``` +WoWLAN is disabled +``` + +## 如何启用 wowlan + +启用的语法为: +`sudo iw phy {phyname} wowlan enable {option}` +其中, + + 1。{phyname} - 使用 iw dev 来获取 phy 的名字。 + 2。{option} - 可以是 any, disconnect, magic-packet 等。 + + + +比如,我想为 phy0 开启 wowlan: +`$ sudo iw phy0 wowlan enable any` +或者 +`$ sudo iw phy0 wowlan enable magic-packet disconnect` +检查一下: +`$ iw phy0 wowlan show` +结果为: +``` +WoWLAN is enabled: + * wake up on disconnect + * wake up on magic packet + +``` + +## 测试一下 + +将你的笔记本挂起或者进入休眠模式,然后从 NAS 服务器上发送 ping 请求或 magic packet: +`$ sudo sh -c 'echo mem > /sys/power/state'` +从 NAS 服务器上使用 [ping command][3] 发送 ping 请求 +`$ ping your-laptop-ip` +也可以 [使用 wakeonlan 命令发送 magic packet][4]: +``` +$ wakeonlan laptop-mac-address-here +$ etherwake MAC-Address-Here +``` + +## 如何禁用 WoWLAN? + +语法为: +``` +$ sudo phy {phyname} wowlan disable +$ sudo phy0 wowlan disable +``` + +更多信息请阅读 iw 命令的 man 页: +``` +$ man iw +$ iw --help +``` + + +-------------------------------------------------------------------------------- + +via: https://www.cyberciti.biz/faq/configure-wireless-wake-on-lan-for-linux-wifi-wowlan-card/ + +作者:[Vivek Gite][a] +译者:[lujun9972](https://github.com/lujun9972) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://twitter.com/nixcraft +[1] https://www.cyberciti.biz/media/new/faq/2017/12/linux-configire-wake-on-wireless-lan-wowlan.jpg +[2] https://www.cyberciti.biz/tips/linux-send-wake-on-lan-wol-magic-packets.html +[3] //www.cyberciti.biz/faq/unix-ping-command-examples/ (See Linux/Unix ping command examples for more info) +[4] https://www.cyberciti.biz/faq/apple-os-x-wake-on-lancommand-line-utility/