<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WSL2连接FishBot小车遇到的通信问题及个人解决方案]]></title><description><![CDATA[<h1>问题描述</h1>
<p dir="auto">Win11+WSL2+Ubuntu22.04.5 LTS环境下，无法连接FishBot小车的主控板和雷达版，表现为MicroRos接收不到数据，<code>ros2 node list</code>无节点，雷达板<code>nc -l 8889</code>监听不到端口信息等。</p>
<h1>问题分析</h1>
<p dir="auto">实质上是网络问题，我在实际中遇到的问题有两点：一是WSL2的网络模式与防火墙问题，二是路由器的双频合一（或多频合一）的设置问题。</p>
<h1>解决方法</h1>
<ol>
<li>小车若连接路由器，一定要<strong>关闭路由器的双频合一功能</strong>，并使小车连接2.4G频段。</li>
<li>打开“网络和Internet设置”，修改当前网络的配置文件类型为<strong>专用网络</strong>。公用网络的防火墙比较严格。<br />
<img src="/forum/assets/uploads/files/1765504884877-fa96f7e8-1b49-4312-bb27-0159cfe855b2-image.png" alt="fa96f7e8-1b49-4312-bb27-0159cfe855b2-image.png" class=" img-fluid img-markdown" /></li>
<li>修改<code>.wslconfig</code>配置文件，位于<code>C:\Users\&lt;你的用户名&gt;\.wslconfig</code>，没有的话就手动创建一个，WSL2启动时会自动读取。在其中添加以下内容：</li>
</ol>
<pre><code>[wsl2]
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
</code></pre>
<p dir="auto">此处是设置WSL2为镜像网络模式，让WSL2的IP地址与宿主机相同，并告诉WSL允许防火墙规则生效。<br />
4. 手动放行MicroRos代理的端口，和雷达板需要的端口：<br />
（1）允许Ping入站：</p>
<pre><code class="language-PowerShell">New-NetFirewallRule -DisplayName "WSL2 ICMP Inbound" -Direction Inbound -Action Allow -Protocol ICMPv4 -Enabled True
</code></pre>
<p dir="auto">（2）允许 Micro-ROS Agent 端口 (UDP 8888)：</p>
<pre><code class="language-PowerShell">New-NetFirewallRule -DisplayName "Micro-ROS Agent UDP" -Direction Inbound -Action Allow -Protocol UDP -LocalPort 8888 -Enabled True
</code></pre>
<p dir="auto">（3）允许 雷达版 端口 (TCP 8889)：</p>
<pre><code class="language-PowerShell">New-NetFirewallRule -DisplayName "Lidar TCP 8889" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8889 -Enabled True
</code></pre>
<p dir="auto">放行端口后也是成功接收到了数据。<br />
以上是我在使用WSL2连接小车时遇到的问题，以及解决的方法，希望对大家有所帮助。</p>
]]></description><link>https://fishros.org.cn/forum/topic/4669/wsl2连接fishbot小车遇到的通信问题及个人解决方案</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 22:13:18 GMT</lastBuildDate><atom:link href="https://fishros.org.cn/forum/topic/4669.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Dec 2025 02:24:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WSL2连接FishBot小车遇到的通信问题及个人解决方案 on Thu, 07 May 2026 03:36:40 GMT]]></title><description><![CDATA[<p dir="auto">按照此文章操作，除了路由器双频合一没有关闭（公司的路由器不敢乱动），验证了不用关闭双频合一WSL2也可以接收到MicroRos数据</p>
]]></description><link>https://fishros.org.cn/forum/post/19619</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19619</guid><dc:creator><![CDATA[779522054]]></dc:creator><pubDate>Thu, 07 May 2026 03:36:40 GMT</pubDate></item><item><title><![CDATA[Reply to WSL2连接FishBot小车遇到的通信问题及个人解决方案 on Fri, 12 Dec 2025 08:50:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fishros.org.cn/forum/uid/2">@小鱼</a> 感谢鱼哥<img src="https://fishros.org.cn/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60b.png?v=4lf04vikhdr" class="not-responsive emoji emoji-android emoji--yum" style="height:23px;width:auto;vertical-align:middle" title=":yum:" alt="😋" /></p>
]]></description><link>https://fishros.org.cn/forum/post/19347</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19347</guid><dc:creator><![CDATA[chasexliu]]></dc:creator><pubDate>Fri, 12 Dec 2025 08:50:24 GMT</pubDate></item><item><title><![CDATA[Reply to WSL2连接FishBot小车遇到的通信问题及个人解决方案 on Fri, 12 Dec 2025 06:37:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fishros.org.cn/forum/uid/28711">@chasexliu</a> <img src="https://fishros.org.cn/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44d.png?v=4lf04vikhdr" class="not-responsive emoji emoji-android emoji--+1" style="height:23px;width:auto;vertical-align:middle" title=":+1:" alt="👍" /></p>
]]></description><link>https://fishros.org.cn/forum/post/19344</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19344</guid><dc:creator><![CDATA[小鱼]]></dc:creator><pubDate>Fri, 12 Dec 2025 06:37:12 GMT</pubDate></item></channel></rss>