forked from huataihuang/cloud-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7f19a3
commit 90c4e86
Showing
23 changed files
with
170 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.. _pixel_minicom: | ||
|
||
====================================== | ||
使用Pixel运行minicom(串口调试服务器) | ||
====================================== | ||
|
||
和 :ref:`pixel_uart` 相反(方向),我想使用 :ref:`pixel_4` 作为一个 :ref:`mobile_pixel_dev` ,通过 :ref:`pi_5_uart` 访问树莓派终端。这样,在旅途中,即使没有显示器,我也能够连接和使用 :ref:`pi_5` 进行 :ref:`mobile_work` 。 | ||
|
||
硬件设备 | ||
=========== | ||
|
||
- 具有控制器的USB拨号modem(也就是 ``Raspberry Pi 5代 UART串口通信模块调试器`` ,我在淘宝上买的) | ||
- OTG转接头(我在淘宝上买了一个绿联usb转type-c otg转接头) | ||
|
||
软件 | ||
====== | ||
|
||
- 先安装 :ref:`termux` | ||
- 在 ``termux`` 中安装 ``socat`` 和 ``minicom`` | ||
|
||
.. literalinclude:: pixel_minicom/socat_minicom | ||
:caption: 在 :ref:`termux` 中安装 ``socat`` 和 ``minicom`` | ||
|
||
- 在Android系统的Play Store中安装一个名为 ``TCPUART`` 的应用程序 | ||
|
||
运行 | ||
======== | ||
|
||
- 打开 ``termux`` 程序,执行以下命令,在 ``/ataa/data/com.termux/files/home/minicom/`` 目录(目录提前创建好)下创建一个 ``ttyS0`` 设备,连接到TCP服务器(也就是Android系统中的 ``TCPUART`` 创建的TCP服务: | ||
|
||
.. literalinclude:: pixel_minicom/socat_connect | ||
:caption: 使用 ``socat`` 连接串口设备文件和TCP服务器 | ||
|
||
- 再在 ``termux`` 中执行 ``minicom`` : | ||
|
||
.. literalinclude:: pixel_minicom/minicom | ||
:caption: 使用 ``minicom`` 连接桥接的TTY设备 | ||
|
||
参考 | ||
======= | ||
|
||
- `Minicom on apk <https://www.reddit.com/r/androidapps/comments/uksj8g/minicom_on_apk/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
minicom -D /data/data/com.termux/files/home/minicom/ttyS0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
socat /data/data/com.termux/files/home/minicom/ttyS0,b115200,raw,echo=0 TCP:192.168.1.5:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
apt install socat minicom |
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions
5
source/linux/network/hostapd/index.rst → source/linux/network/hostap/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.. _intro_hostap: | ||
|
||
======================== | ||
HostAP简介 | ||
======================== | ||
|
||
HostAP | ||
=========== | ||
|
||
``HostAP`` 是Linux的IEEE 80.211 设备驱动,它适用于使用过时的Conexant(以前称为Intersil) Prism 2/2.5/3 芯片组的网卡,并支持Host AP模式,这样无线网卡就能作为无线AP来使用。HostAP驱动代码由Jouni Malinen编写,并在Linux 2.6.14时引入到内核主线。 | ||
|
||
.. warning:: | ||
|
||
根据 `HostAP维护者申明,2016年9月开始,内核HostAP 驱动已经被标记为过时 <https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ffd74aca44b70a2564da86e8878c1dd296009ffb>`_ ,后续 ``需要采用替代hostap的解决方案`` | ||
|
||
.. _hostapd: | ||
|
||
hostapd | ||
=========== | ||
|
||
``hostapd`` (host access point daemon) 即主机无线AP服务,是一个将主机网卡作为无线AP和认证服务器的用户空间daemon,一共有3个实现: | ||
|
||
- `Jouni Malinen's hostapd <https://w1.fi/hostapd/>`_ 可参考内核无线文档 `hostapd Linux documentation page <https://wireless.wiki.kernel.org/en/users/documentation/hostapd>`_ | ||
- OpenBSD's hostapd | ||
- Devicescape's hostapd | ||
|
||
Jouni Malinen's Hostapd | ||
-------------------------- | ||
|
||
**这应该是我们最常使用的Linux上HostAP管理工具** | ||
|
||
无线软件堆栈指南 | ||
================== | ||
|
||
`Infineon英飞凌公司 <https://www.infineon.com/>`_ (前身是西门子半导体,1999年独立。无线解决方案部于2010年8月出售给intel) 在开发社区知识库提供了一片非常详尽的 `HostApd setup in Linux <https://community.infineon.com/t5/Knowledge-Base-Articles/HostApd-setup-in-Linux/ta-p/246026#.>`_ ,这篇文档属于英飞凌公司提供的 `AN232689 - Wi-Fi software user guide <https://www.infineon.com/dgdl/Infineon-AN232689_-_Wi-Fi_software_user_guide-ApplicationNotes-v01_00-EN.pdf>`_ (非常专业和详尽的Linux无线软件堆栈指南) 的 4.2 章节。 | ||
|
||
参考 | ||
========= | ||
|
||
- `Wikipedia: HostAP <https://en.wikipedia.org/wiki/HostAP>`_ | ||
- `Wikipedia: hostapd <https://en.wikipedia.org/wiki/Hostapd>`_ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Linux网络 | |
iproute2/index | ||
iptables/index | ||
socat.rst | ||
hostapd/index | ||
hostap/index | ||
dpdk/index | ||
ethtool/index | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
.. _socat: | ||
|
||
================= | ||
socat 多用途转发 | ||
================= | ||
============ | ||
socat | ||
============ | ||
|
||
``socat`` 是一个神奇的工具,我是在想要 :ref:`pixel_minicom` 来作为控制台访问 :ref:`pi_5_uart` (这样我可以不需要连接显示器就能够看到 :ref:`pi_5` 的终端进行交互) 发现这个工具的。 | ||
|
||
参考 | ||
======= | ||
|
||
- `Serial to Ethernet or WiFi bridge with Linux socat <https://www.digi.com/support/knowledge-base/serial-to-ethernet-or-wifi-bridge-with-linux-socat>`_ | ||
- `TCP to virtual serial port with socat <https://superuser.com/questions/1764202/tcp-to-virtual-serial-port-with-socat>`_ | ||
- `Getting started with socat, a multipurpose relay tool for Linux <https://www.redhat.com/sysadmin/getting-started-socat>`_ | ||
- `socat: Linux / UNIX TCP Port Forwarder <https://www.cyberciti.biz/faq/linux-unix-tcp-port-forwarding/>`_ | ||
- `Getting started with socat, a multipurpose relay tool for Linux <https://www.redhat.com/sysadmin/getting-started-socat>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Wi-Fi无线网络 | |
:maxdepth: 1 | ||
|
||
wi-fi_direct.rst | ||
wi-fi_software.rst | ||
|
||
.. only:: subproject and html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _wi-fi_software: | ||
|
||
==================== | ||
Wi-Fi无线网络软件 | ||
==================== | ||
|
||
英飞凌公司提供的 `AN232689 - Wi-Fi software user guide <https://www.infineon.com/dgdl/Infineon-AN232689_-_Wi-Fi_software_user_guide-ApplicationNotes-v01_00-EN.pdf>`_ (非常专业和详尽的Linux无线软件堆栈指南) | ||
|
||
我后续会系统学习了解一下(挖坑) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
raspbian_static_ip.rst | ||
dhcpcd.rst | ||
router/index | ||
wifi/index | ||
|
||
.. only:: subproject and html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _pi_wifi: | ||
|
||
================================= | ||
树莓派Wi-Fi无线 | ||
================================= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
pi_wi-fi_direct.rst | ||
pi_wi-fi_ad_hoc.rst | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _pi_wi-fi_ad_hoc: | ||
|
||
=========================== | ||
树莓派构建无线ad hoc网络 | ||
=========================== | ||
|
||
参考 | ||
======= | ||
|
||
- `Wikipedia: Wireless ad hoc network <https://en.wikipedia.org/wiki/Wireless_ad_hoc_network>`_ | ||
- `wireless ad hoc network (WANET) <https://www.techtarget.com/searchmobilecomputing/definition/ad-hoc-network>`_ (Wireless ad hoc network, Mobile ad hoc network, 缩写WANET, MANET) 最有名的MANET实现是苹果公司的"隔空投送" (AirDrop) | ||
|
||
- `GitHub: seemoo-lab/opendrop <https://github.com/seemoo-lab/opendrop>`_ 实现了开源的Apple AirDrop ( `Open Wireless Link项目 <https://owlink.org/>`_ ) | ||
|
||
- `KDE Connect <https://kdeconnect.kde.org/>`_ | ||
- `GSConnect <https://extensions.gnome.org/extension/1319/gsconnect/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. _pi_wi-fi_direct: | ||
|
||
================================ | ||
树莓派Wi-Fi Direct无线直连(p2p) | ||
================================ | ||
|
||
目标 | ||
======== | ||
|
||
- 实现树莓派和 :ref:`android` (有案例) :ref:`iphone` (有可能不行)手机连接,实现文件传输 | ||
|
||
.. note:: | ||
|
||
`树莓派论坛: We need a WiFi Direct guide <https://forums.raspberrypi.com/viewtopic.php?t=282553>`_ 的讨论提到建议采用 ad hoc 网络 ( `Wikipedia: Wireless ad hoc network <https://en.wikipedia.org/wiki/Wireless_ad_hoc_network>`_ 来取代Wi-Fi Direct | ||
|
||
iOS已经支持 ad-hoc ,而 Android不支持(不知道现在如何?) | ||
|
||
参考 | ||
====== | ||
|
||
- `Set up WiFi direct (p2p) between a dedicated pair of Raspberry Pi 3 B+ (one as the Group Owner, the other as the client) <https://raspberrypi.stackexchange.com/questions/114012/set-up-wifi-direct-p2p-between-a-dedicated-pair-of-raspberry-pi-3-b-one-as-t>`_ 其中介绍了 `德州仪器: WiLink8 Linux Advanced Demons <https://www.ti.com/lit/ug/swru576/swru576.pdf?ts=1726911018874#Connect_in_Pin_.28PIN_Number.29_where_EVM_.231_is_defined_as_the_group_owner>`_ 介绍了详细的P2P模式,可以作为技术参考 |