嵌入式爱好者

查看: 17082|回复: 1

[Linux] 连了一下wifi,其它的两个网口怎么不能用了呢

[复制链接]

20

主题

34

帖子

101

积分

扫一扫,手机访问本帖
发表于 2021-4-22 14:42:25 | 显示全部楼层 |阅读模式
本帖最后由 mao0504 于 2021-4-22 14:45 编辑
  1. root@ok5718-idk:/mnt/nfs/OK5718-SDK-V1.0# ifconfig
  2. <b>eth0 </b>     Link encap:Ethernet  HWaddr 90:9A:77:90:32:10
  3.           inet addr:192.168.1.232  Bcast:192.168.1.255  Mask:255.255.255.0
  4.           inet6 addr: fe80::929a:77ff:fe90:3210%763860/64 Scope:Link
  5.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  6.           RX packets:5079 errors:0 dropped:0 overruns:0 frame:0
  7.           TX packets:2364 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1000
  9.           RX bytes:706302 (689.7 KiB)  TX bytes:381472 (372.5 KiB)
  10.           Interrupt:92

  11. <b>eth1</b>      Link encap:Ethernet  HWaddr 90:9A:77:90:32:11
  12.           UP BROADCAST MULTICAST  MTU:1500  Metric:1
  13.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  14.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  15.           collisions:0 txqueuelen:1000
  16.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  17. <b>lo </b>       Link encap:Local Loopback
  18.           inet addr:127.0.0.1  Mask:255.0.0.0
  19.           inet6 addr: ::1%763860/128 Scope:Host
  20.           UP LOOPBACK RUNNING  MTU:65536  Metric:1
  21.           RX packets:896 errors:0 dropped:0 overruns:0 frame:0
  22.           TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
  23.           collisions:0 txqueuelen:1
  24.           RX bytes:288124 (281.3 KiB)  TX bytes:288124 (281.3 KiB)

  25. <b>wlan0 </b>    Link encap:Ethernet  HWaddr 34:20:03:94:8F:D8
  26.           UP BROADCAST MULTICAST  MTU:1500  Metric:1
  27.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  28.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  29.           collisions:0 txqueuelen:1000
  30.           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
复制代码
cd /home/forlinx/cmd ; ./wifi.sh-i wlan0 -s MERCURY_XT -p 1234567890;ifconfig;ping 192.168.1.2

  1. root@ok5718-idk:/home/forlinx/cmd# ifconfig
  2. <b>lo</b>        Link encap:Local Loopback
  3.           inet addr:127.0.0.1  Mask:255.0.0.0
  4.           inet6 addr: ::1%763860/128 Scope:Host
  5.           UP LOOPBACK RUNNING  MTU:65536  Metric:1
  6.           RX packets:917 errors:0 dropped:0 overruns:0 frame:0
  7.           TX packets:917 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1
  9.           RX bytes:289960 (283.1 KiB)  TX bytes:289960 (283.1 KiB)

  10. <b>wlan0 </b>    Link encap:Ethernet  HWaddr 34:20:03:94:8F:D8
  11.           inet addr:192.168.1.112  Bcast:192.168.1.255  Mask:255.255.255.0
  12.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  13.           RX packets:31 errors:0 dropped:7 overruns:0 frame:0
  14.           TX packets:40 errors:0 dropped:1 overruns:0 carrier:0
  15.           collisions:0 txqueuelen:1000
  16.           RX bytes:7948 (7.7 KiB)  TX bytes:8228 (8.0 KiB)
复制代码



回复

使用道具 举报

0

主题

236

帖子

752

积分

A40i/T3/T507/T527通行证i.MX6Q通行证i.MX6UL通行证i.MX8MM通行证RK3568通行证RK3399通行证LS1028A通行证LS1012A通行证LS1043A\46A通行证TCU通行证FDU产品通行证FCU1401通行证FCU1301通行证FCU11xx通行证FCU1201通行证FCU2301/FCU2302通行证FCU2401通行证5G转接卡通行证AM5718通行证Hi3519A通信证AM335x通行证i.MX RT通行证XX18通行证AM62x资料下载

发表于 2021-4-23 08:27:42 | 显示全部楼层
修改/home/forlinx/cmd/wifi.sh
ifconfig -a|grep eth0 |grep -v grep  > /dev/null
if [ $? -eq 0 ]
then
        ifconfig eth0 down > /dev/null
fi

ifconfig -a|grep eth1 |grep -v grep  > /dev/null
if [ $? -eq 0 ]
then
        ifconfig eth1 down > /dev/null
fi
将ifconfig eth0/eth1 down 注释掉
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-20 01:19

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表