Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, I am using the ath5k driver from the following compat package: compat-wireless-3.6-rc6-1. I have been trying to change the channel and mode used by issuing commands such as: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    12

    iw can't configure interface even when down


    Hi all,

    I am using the ath5k driver from the following compat package: compat-wireless-3.6-rc6-1.

    I have been trying to change the channel and mode used by issuing commands such as:

    iw dev wlan0 set channel 7
    iw dev wlan0 set type adhoc

    but I keep on getting the following error:

    command failed: Device or resource busy (-16)

    but this is even after I have set the wlan0 to be down:

    ifconfig wlan0 down

    I am really stymied. Any help would be greatly appreciated.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Have you tried passing the --debug flag to iw, to see if it tells you anything helpful? I ran it on my box, and i get a bunch of packet header info, along with .error = 0 "Success", which is what I want, I guess.

    Are you using the latest version of iw?

    Anything helpful in dmesg ouput?

  3. #3
    Just Joined!
    Join Date
    Aug 2012
    Posts
    12
    Thanks Atreyu,

    I managed to fix it by downgrading the ath5k driver to the version found in compat-wireless-3.5.

    What I am trying to do now is remove my wireless interface wlan0 from the bridge. This is what I have done so far:


    # The loopback network interface
    auto lo
    iface lo inet loopback

    auto tap0 br0
    iface br0 inet static
    address 173.16.210.42
    netmask 255.255.255.0
    gateway 173.16.210.1
    bridge_ports eth0 eth1 eth2 tap0
    bridge_stp off
    bridge_maxwait 1
    # bridge_hw 00:00:00:00:00:00

    iface eth0 inet manual


    iface eth1 inet manual

    iface eth2 inet manual

    auto wlan0
    iface wlan0 inet static
    address <a new ip range>
    netmask <netmask for the new ip range>

    iface tap0 inet manual
    pre-up /usr/sbin/openvpn --dev tap0 --mktun

    Apparently though I need to make sure "LINUX work as router to allow IP traffic pass through their interfaces"

    I am not sure how to do this for my wireless interface wlan0... any suggestions?

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by theTimes View Post
    Apparently though I need to make sure "LINUX work as router to allow IP traffic pass through their interfaces"

    I am not sure how to do this for my wireless interface wlan0... any suggestions?
    that basically requires TCP forwarding, but why do you think you need to do that?

    anyway, to port traffic from one interface to the other, I usually do something like this:

    Code:
    #!/bin/bash
    
    # enable Proxy ARP
    echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
    echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
    
    # enable TCP forwarding
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    # tell how to get to one network from the other (not sure which way you're going)
    ip route add x.x.x.0/24 dev eth1
    
    # instead of using ip route, use iptables for more sophisticated control
    # and anyway would be required if you have or want to have a firewall running

  5. #5
    Just Joined!
    Join Date
    Aug 2012
    Posts
    12
    Quote Originally Posted by atreyu View Post
    that basically requires TCP forwarding, but why do you think you need to do that?

    anyway, to port traffic from one interface to the other, I usually do something like this:

    Code:
    #!/bin/bash
    
    # enable Proxy ARP
    echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
    echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
    
    # enable TCP forwarding
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    # tell how to get to one network from the other (not sure which way you're going)
    ip route add x.x.x.0/24 dev eth1
    
    # instead of using ip route, use iptables for more sophisticated control
    # and anyway would be required if you have or want to have a firewall running
    What I am doing is running the batmand routing protocol on PC engine's Alix boards.When running the protocol daemon, it requires the wireless interface to be passed to it as a command line argument like so:

    batmand wlan0

    This begins the daemon using that interface. Before running it, I had set a specific channel and set the card to work in adhoc mode. This protocol uses UDP packets to send topology information (a batman packet) to other nodes in the area. Essentially these nodes need to send and receive to each other.

    I had naively thought that simply passing a correctly configured interface would be enough - I didn't realise I had to do a little extra..

    I will get going with your suggestion above, thanks so much for the help!

    I am going to give your suggestion I try now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •