logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.

Ethernet and Wifi at same time ?

posted in Uncategorized
Wednesday, January 11 2012, 04:30 PM
davigier
davigier
Offline
0
Hello, I am using an IGEPv2 revB board with kernel 2.6.37. I have configured /etc/network/interfaces so that both the Ethernet and the WLAN interfaces are given an IP address by the DHCP server: this works fine. However, I\\\'ve noticed that when I unplug the Ethernet cable, the WLAN interface no longer works: I can no longer ping the board on the WLAN IP address nor access the Internet from the board. I\\\'ve run ifconfig to check if I still have an IP address on the WLAN interface and it is the case... Does anyone know what could be going wrong ? It\\\'s as if the WLAN interface was re-routed through the Ethernet interface and since the Ethernet interface gets disconnected, I no longer have access to the Internet... Here is my /etc/network/interfaces file: [code] # The loopback interface auto lo iface lo inet loopback # Ethernet: auto eth0 iface eth0 inet dhcp # WLAN: auto wlan2 iface wlan2 inet dhcp pre-up iwconfig wlan2 essid wifi1 channel 6 pre-up wpa_supplicant -iwlan2 -c/etc/wpa_supplicant.conf & post-down killall -q wpa_supplicant [/code] and here is the result of ifconfig (same thing with Ethernet cable plugged in or after unplugging it, although the entries in /sys/class/net/eth0 do show that the cable is unplugged): [code] eth0 Link encap:Ethernet HWaddr B2:B0:14:B5:CD:DE inet addr:192.168.0.20 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:60 errors:0 dropped:1 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8877 (8.6 KiB) TX bytes:5056 (4.9 KiB) Interrupt:80 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1 errors:0 dropped:0 overruns:0 frame:0 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:86 (86.0 B) TX bytes:86 (86.0 B) wlan2 Link encap:Ethernet HWaddr 44:A7:CF:CB:60:BF inet addr:192.168.0.22 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2845 (2.7 KiB) TX bytes:1428 (1.3 KiB) [/code]
Responses (13)
  • Accepted Answer

    davigier
    davigier
    Offline
    Thursday, January 12 2012, 02:15 PM - #permalink
    0
    OK, I have narrowed my issue a bit: I had issues in the IP routing table... After unplugging the Ethernet cable, I need to issue a \\\"ifdown eth0\\\" and a \\\"route add default gw 192.168.0.254\\\" in order to tell the WLAN interface what route it needs to take. Is there a generic way of doing this automatically ? Another issue I found is that after replugging the Ethernet cable, there is no way to get a DHCP lease on the Ethernet interface again. Even an \\\"/etc/init.d/networking restart\\\" does not work: it only gives an IP address on the WLAN interface, but not on the Ethernet interface. I need to reboot the board completely in order to get an IP address on the Ethernet interface. Would there be an issue with the kernel ?
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Thursday, January 12 2012, 03:02 PM - #permalink
    0
    Quick update: I finally found where the issue of re-enabling Ethernet after a cable disconnect/reconnect is coming from: replugging the Ethernet cable is not detected.... /sys/proc/net/eth0/carrier stays at 0, and /sys/proc/net/eth0/operstate stays at down. How can Ethernet hotplugging be enabled ?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 13 2012, 10:23 AM - #permalink
    0
    Hello Davigier, We found a bug in the ethernet driver that is similar to your repot, are you using the last v2.6.37? Can you look if these patches are already applied on your kernel? 3d809fd932bb9e2a5c4b94abcde1a92c3f8c023d net/smsc911x: Remove energy detect conditionally compilation 227c2a0d8b522c84f5d77a72ed28e3a19734a6df net/smsc911x: Check if PHY is in operational mode before software reset 7d4bc1a67e38f6425f832bde165f407e1cac2734 net: phy: smsc: Move SMSC PHY constants to Regards, Javier
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Friday, January 13 2012, 12:03 PM - #permalink
    0
    Hi Javier, In effect, I didn\\\'t have the latest of the 3 patches. I\\\'ll try to re-compile and will let you know how it goes. Side question: when that eventually works, do you know a clever way to auto-ifup/ifdown the Ethernet interface when the cable is connected/disconnected and to update the routing table accordingly ? Thanks
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Friday, January 13 2012, 06:54 PM - #permalink
    0
    Hi Javier, I just tested with the latest patch: it still does not work. Same behavior... Is it working for you ? Thanks
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Tuesday, January 17 2012, 02:59 AM - #permalink
    0
    Hi Javier, As i said in previous post, the Carrier state of the Ethernet driver is still at 0 after a plug,out / plug in of the cable. The only way to have a correct status of the Ethernet driver is to boot igepv2 with Ethernet cable plug in. for memory we have applied the three patches. Is there specific compilation options to allow Ethernet hotpug or is this problem is,coming from the Ethernet driver for Linux 2.6.37?
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Tuesday, January 17 2012, 08:37 AM - #permalink
    0
    Hi Javier, As i said in previous post, the Carrier state of the Ethernet driver is still at 0 after a plug,out / plug in of the ethernet cable. The only way to have a correct status of the Ethernet driver is to boot igepv2 with Ethernet cable plug in: carier at 1 and operstate up for memory we have applied the three patches. Is there specific compilation options to allow Ethernet hotpug or is this problem is,coming from the Ethernet driver for Linux 2.6.37? Thanks for reply as soon as possible
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 17 2012, 09:34 AM - #permalink
    0
    Hello davigier, sorry for the delay. Is really strange that is not working for you. We have tested a lot and we found that this bug disappeared with this patch. The problem was that the libphy was configuring the NIC PHY in an energy detect mode and with the cable unpluged the PHY entered in an low power mode making the chip reset to fail. That patch brings the PHY to a normal operation by disabling the energy detect mode before the reset. Can you test to compile your kernel without PHY lib? Change: CONFIG_SMSC_PHY=y to this: # CONFIG_SMSC_PHY is not set in your .config file Also can you post the output of this command? [code] root@igep00x0:~# dmesg | grep SMSC [\\\\code] It should be something like this: [code] [ 1.568359] eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=0:01, irq=-1) [ 160.673278] net eth0: SMSC911x/921x identified at 0xdb07c000, IRQ: 336 [\\\\code] Regards, Javier
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Wednesday, January 18 2012, 03:20 PM - #permalink
    0
    Hi Javier, We deactivated the PHY lib as you said. It works exactly as before, same problems. Here is the result of dmesg: [code] root@igep0020:~# dmesg | grep SMSC [ 14.843963] net eth0: SMSC911x/921x identified at 0xdb07c000, IRQ: 336 [/code] There\\\'s nothing concerning \\\"eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=0:01, irq=-1)\\\" but I would suspect this to be normal since the PHY driver is deactivated... So, we\\\'re in a deadlock here... Thanks
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Friday, January 20 2012, 04:20 PM - #permalink
    0
    Hi Javier, I made the following to be sure that i did not do mistake: 1) I compile the latest kernel version: 2.6.37.1 with all patches taken from: wget [url=http://downloads.igep.es/sources/linux-omap-2.6.37.tar.gz]http://downloads.igep.es/sources/linux- ... .37.tar.gz[/url] 2) My cross-compiler was generated with buildroot 2011-11 for ARM cortex A8 and i used for Kernel Header linux 2.6.37 - the gcc compiler is gcc4.5.x - the binutils version is 2.21.1 3) I use the igep00x0_defconfig config file for kernel compilation without any modification. The compilation of the kernel is ok and I can boot from MMC on IGEPV2. 4) I only have a /etc/network/interfaces file for network configuration with the following: # The loopback interface auto lo iface lo inet loopback # Ethernet: allow-hotplug eth0 auto eth0 iface eth0 inet dhcp # WLAN: # carte wifi avec ip attribuee par dhcp #allow-hotplug wlan2 #auto wlan2 #iface wlan2 inet dhcp #pre-up iwconfig wlan2 essid bnext channel 6 #pre-up wpa_supplicant -iwlan2 -c/etc/wpa_supplicant.conf & #post-down killall -q wpa_supplicant 5) when I boot with ethernet cable plugged in, the network is well configured. If I plug the ethernet cable after boot of the igepv2 board, the network config don\\\'t work and no led are activated on the ethernet connector -> carrier is always 0. You told me in your previous post that it was working for you. Can you send me a Zimage for kernel (I don\\\'t think the problem came from File System) to let me test the igep board. Please I really need to solve this problem. Thank you
    The reply is currently minimized Show
  • Accepted Answer

    Monday, January 23 2012, 10:32 AM - #permalink
    0
    You can download the zImage from: [url=http://downloads.igep.es/binaries/kernel/v2.6.37-1/zImage-2.6.37-1.bin]http://downloads.igep.es/binaries/kerne ... 6.37-1.bin[/url] I\\\'ve the same issue, but in my case seems a problem with my switch as if I connect to another switch it works.
    The reply is currently minimized Show
  • Accepted Answer

    davigier
    davigier
    Offline
    Monday, January 23 2012, 11:59 AM - #permalink
    0
    Thank you for reply, After reading your post, i disconnect the board from freebox and connect to my router. It works also with my kernel compilation. So, with the router the carrier ON/OFF is always detected: - plug the cable after boot - plug/unplug cable after boot But with the freebox, it don\\\'t works and the behaviour is very strange: -1: I boot the igepv2 board -2: I plug the ethernet cable connected to the freebox -> don\\\'t work -3: I unplug the cable from freebox and plug in the router -> it works -4: I unplg the cable from router and plug in freebox -> it works all the time -5: I unplug/plug the cable from the freebox -> it works some time what i can say is that i never have hotplug ethernet problem with my freebox. Do you have an idea about that? thank you
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 25 2012, 09:35 AM - #permalink
    0
    No, But is an issue which we have to dig a little deeper, at this moment I\\\'m not sure if it\\\'s a problem with my swicth or a problem with the IGEP board. In that case I suspect the problem is related to the energy detection patches.
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat