Wifi disconnects on WPA renewal when bridging wlan0 and eth0

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Wifi disconnects on WPA renewal when bridging wlan0 and eth0

Postby QnD » Wed Nov 20, 2013 10:50 am

Hi,

I am currently trying to use my RPi to establish a WLAN bridge for my TV, i.e. the TV is connected via LAN to the RPi which connects via WLAN to the router.
Everything is working well so far, except that my connection is dropped regularly. After some investigation I found out that these connection drops occur when the router renews the WPA2-AES key. I tried different renewal intervals - the timings match perfectly.
This problem is not present when the bridge is deactivated. Somehow it seems that bridging blocks the EAS packets from being recognized by wpa_supplicant. While the wpa_supplicant log shows messages for the key renewal, no messages are shown when run in bridged mode.
Of course the problem could be

My network setup uses netctl with the following profiles:
wlan:
$this->bbcode_second_pass_code('', '
Description='Home network'
Interface=wlan0
Connection=wireless
Security=wpa
ESSID='myessid'
Key='mypassword'
IP=no
')

when wlan is up I start the bridge with this profile:
$this->bbcode_second_pass_code('', '
Description="Bridge connection"
Interface=br0
Connection=bridge
BindsToInterfaces=(eth0 wlan0)
IP=static

Address='192.168.1.111/24'
Gateway='192.168.1.1'
DNS=('192.168.1.1')
')

My WLAN-adapter is
$this->bbcode_second_pass_code('', '
ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
')
... but I believe this is a software problem as everything works fine without bridges.


My version of Arch is from last week, updates were downloaded yesterday. If this helps I can attach the output log from wpa_supplicant.

Anyone who knows how to solve this problem or what I can do to further tackle this problem? Every hint would be appreciated.

Thanks in advance
Joachim
QnD
 
Posts: 2
Joined: Tue Nov 19, 2013 11:51 pm

Re: Wifi disconnects on WPA renewal when bridging wlan0 and

Postby QnD » Fri Nov 22, 2013 3:51 pm

Just a quick update on my problem - the issue is not solved yet for me but maybe it helps others.

Meanwhile I found out that apparently I executed the netctl profiles in the wrong order. I found other sources that deal with this issue (for example here: http://ubuntuforums.org/showthread.php?t=1692292 ).

So what I think I need to do is to tell the wpa_supplicant that wlan0 is part of a bridge but this needs to be done after the bridge is created (as there is no br0 interface otherwise).

So my current approach is:
$this->bbcode_list('1')
  • Start the bridge profile first as specified in the previous post. This brings up eth0 and (the unconfigured) wlan0.
  • Do "brctl setfd br0 0". I do not know how this helps exactly. The source above mentioned that this is neccessary to make this work (anyone an idea how this could help?)
  • Start the wlan profile. The problems here are that the netctl "wireless" script does not have a special option for telling wpa_supplicant that therer is a bridge, but it has a general field WPAOptions where you can pass command line arguments. The other problem is that the script will refuse to alter wlan0 as it is already up. You can however override this with the option "ForceConnection=yes" (I think it's "yes"... or maybe "1"... just anything other than "no" I guess).

  • So the new wpa-wlan-Script looks like this:
    $this->bbcode_second_pass_code('', '
    Description='Home network'
    Interface=wlan0
    Connection=wireless
    Security=wpa
    ESSID='myessid'
    Key='mypassword'
    IP=no
    ForceConnection='yes'
    WPAOptions='-b br0'
    ')

    However - this still does not work. Meanwhile I start to believe that this might be a hardware issue. I've tried with another WLAN usb adapter. At least the last profile activates without errors, as opposed to using the edimax stick where the script fails with a message that it cannot authenticate. But still I cannot ping somewhere :(.

    Any further ideas? I'm really starting to get stuck on this...

    Thanks in advance
    Joachim
    QnD
     
    Posts: 2
    Joined: Tue Nov 19, 2013 11:51 pm

    Re: Wifi disconnects on WPA renewal when bridging wlan0 and

    Postby sdjf » Sun Nov 24, 2013 2:36 am

    run route and ifconfig commands to make sure the network interfaces are up.
    sdjf
     
    Posts: 178
    Joined: Wed May 08, 2013 1:55 pm


    Return to Raspberry Pi

    Who is online

    Users browsing this forum: No registered users and 6 guests