Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    【FAQ】全志R329如何解决无法将wlan0加到br-lan这个网桥上面的问题?

    其它全志芯片讨论区
    r329 faq 网络 技术支持
    1
    1
    1628
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • q1215200171
      budbool LV 9 last edited by

      问题背景

      硬件:R329+ Wi-Fi模组(RTL8723ds)
      软件:Tina3.0及以上
      操作:无线wlan0桥接到有线eth0

      问题简述

      将wlan0添加到br-lan这个网桥里面,但是加不进去,提示brctl: bridge br-lan: Operation not supported。

      root@TinaLinux:/# brctl addif br-lan wlan0
      brctl: bridge br-lan: Operation not supported
      root@TinaLinux:/# brctl show
      bridge name bridge id STP enabled interfaces
      br-lan 7fff.fe2bf4a14158 no eth0
      usb0
      

      问题分析

      需求:usb dongle盒子, 该盒子只有一个hdmi口和usb口(无电源线、无网口),usb口兼具供电和上网的功能。r329这边配置usb网口,将usb dongle盒子的usb口插到r329上面,r329生成usb0网卡,此时只要能将usb0和wlan0添加到一个网桥下,那么usb dongle盒子就能直接通过r329连接的wifi获取到ip并上网了。

      分析:当设备为client或者adhoc以及wds时,对应的无线接口是无法加入到桥接中去的。
      执行root@TinaLinux:/# brctl addif br-lan wlan0
      brctl: bridge br-lan: Operation not supported

      通过报错信息目前跟踪到:

      tina-r329/lichee/linux-4.9/net/bridge/br_if.c +513
      511 /* No bridging devices that dislike that (e.g. wireless) */
      512 if (dev->priv_flags & IFF_DONT_BRIDGE)
      513 return -EOPNOTSUPP;
      

      可以发现是不支持桥接的标志导致的。

      解决办法

      直接把 tina-r329/lichee/linux-4.9/net/bridge/br_if.c +513

      @511 /* No bridging devices that dislike that (e.g. wireless) */
      512 if (dev->priv_flags & IFF_DONT_BRIDGE)
      513 return -EOPNOTSUPP;@
      

      这个判断取消掉后可以执行桥接的命令
      在kernel下打上附件的patch后,按照如下流程测试正常。

      1.R329_V1 wifi无线连接到ap route1.(可以不获取ip地址)

      2.R329_v1 上执行桥接:

      brctl addbr br-lan //添加一个br-lan网桥
      brctl addif br-lan wlan0 //把wlan0添加到br-lan网桥
      brctl addif br-lan eth0 //把eth0添加到br-lan网桥
      

      3.R329_V1和R329_v2通过有线连接RGMI(吉比特接口)接口.

      4.R329_V1获取ip地址: udhcpc -i br-lan

      验证:R329_V2能正常上网。ping www.baidu.com

      注:具体模组之间可能存在差异,请咨询wifi原厂协助。

      桥接命令正常.png

      附件: 0001-network-bridge-test.patch

      1 Reply Last reply Reply Quote Share 0
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策