This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Netgear Wireless MA311

Hi,

I have a wireless network at home based on the netgear products. I would like to use the netgear MA311 Wireless PCI Adapter in my firewall. Is that network card supported by Astaro?

./Anatol


This thread was automatically locked due to age.
Parents
  • Hi Anatol,

    currently not. Which chipset is build in this card (orinoco, prism2)? 

    Daniel
  • Hi there,
    I would like to use a MA311 too - since your first attempt was 6 month ago - any new results ? Any idea how to get the ASL installation-process to recognise the card ? I tried it with version 4.0 beta - but no success !!
    Hope you could give me some hints -
    regards
               Erich

    Ps.: by the way, I was told that the Netgear is using the Prism2 chipset     
  • Hi there
    Im currenly evaluating Astro 4.016, I have found that I can manualy configure (install kernel module and give an ipaddress to) an MA311 with the supplyed version of hostap. However can't work out how to configure it in the web interface.
    I have seen comments on these forums that seem to sudgest that you have to play a little to get some wireless cards to work with Astro.
    Richard  
  • Hello Richard !
    That’s true, spent some interesting day's and night's trying to get the Host AP working with ASL. If you could wait a little more, maybe I can give you some advise on Monday next week - trying to set up an AP with 4.016 during the weekend.
    I’ll keep you informed – stay tuned –
    Regards,
    Erich
       
  • To get webmin to allow you to configure your card you need a couple of things:

    the hostap_pci.o module file (copy it to /lib/modules/2.4/net)
    and load it by issuing the command
    modprobe hostap_pci
    this will install the module along with any dependency

    edit your /etc/itfhw.conf file with an entry such as this:

    [wlan0]
    type = wlan
    mac = xx:xx:xx:xx:xx:xx (put your card's MAC here)
    irq = y (put your card's IRQ here)
    desc = [unknown vendor / unknown chipset]

    you can find the mac by issuing the command
    ifconfig -a | grep wlan0


    to get your card's interupt issue the command 
    cat /proc/interrupts | grep wlan0

    you can check to see if the hostap_pci module is loaded by 
    typing the command

    lsmod | grep hostap

    you should see something like this

     lsmod | grep hostap
    hostap_crypt_wep        2880   1
    hostap_pci             33580   1
    hostap                 76324   0  [hostap_pci]
    hostap_crypt            1220   0  [hostap_crypt_wep hostap]


    Once you have all these things go to webmin and add a new card, you should see the wlan0 hardware and you can configure as an accesspoint or node.

    if you reboot you have to edit the itfhw.conf file since it is automatically created at boot by the script (/etc/rc.d/init_nics) and populated by the script (/usr/local/bin/setitfhw.pl)

    if there are any good shell scripters and perl scripters out there we could use your skills to enable this file to be updated properly at boot.
      
  • Great HowTo! Thanks for your help, Tester100!

    This works since version 4.016 (switch to HostAP driver), no previous version. Because of a lack of the ressource "time", this has not been scheduled for the next up2dates. It is not very hard to accomplish technically, but the testing effort needed would go beyond the scope. If you post your problems, issues and "it works with my card XYZ" statements here it would be helpful for the whole community!

    andreas  
Reply
  • Great HowTo! Thanks for your help, Tester100!

    This works since version 4.016 (switch to HostAP driver), no previous version. Because of a lack of the ressource "time", this has not been scheduled for the next up2dates. It is not very hard to accomplish technically, but the testing effort needed would go beyond the scope. If you post your problems, issues and "it works with my card XYZ" statements here it would be helpful for the whole community!

    andreas  
Children
  • Here is a heavily edited /usr/local/bin/setitfhw.pl file that will update /etc/itfhw.conf properly with all the necessary information to enable the configuration of a Prism based PCI card from webmin. 

    If you are using Madwifi Atheros drivers only and want to partially manage the configuration with Webmin change the type from eth to wlan.

    If there are any good perl scripters out there the sub_wlan portion needs some clean up to handle the PCI as well as PCCARD Prism cards.  Also, /etc/rc.d/init_nics needs some clean up work also.

    Anyone up to the task?

    #!/usr/bin/perl 
    ###############################################################################
    ##                                                                           ##
    ##  Copyright (C) 2000 Astaro AG                                             ##
    ##  For copyright information  ook at /doc/astaro-license.txt                ##
    ##  or http://www.astaro.com/doc/astaro-license.txt                          ##
    ##                                                                           ##
    ##  $Id: setitfhw.pl,v 1.21.2.3 2003/10/09 15:12:28 mgehrlein Exp $                  ##
    ##                                                                           ##
    ##  Maintainer: Markus Huber                        ##
    ##                                                                           ##
    ##                                                                           ##
    ###############################################################################
    use strict;
    main();

    #
    #detection for network cards only works
    #when the appropriate modules are loaded
    #and when there is an entrie for them in /etc/modules.conf
    #

    sub main{

      my %devData = ();
      my %gigData  = ();
      my %umlData = ();

      get_modules(\%devData,\%gigData,\%umlData);
      if(keys %umlData){
        setUmlDevice(\%umlData);
        exit;
      }
      getIfconfigInfo(\%devData);
      delete $devData{''} if exists $devData{''};
      getDouble(\%devData);
      getDeviceInfo(\%devData);
      if(keys %gigData){
        get_sysconnect_ioport(\%gigData);
        %devData = (%devData,%gigData);
        delete $devData{''} if exists $devData{''};
      }
      my %tmp = get_wlan();
      delete $tmp{''} if exists $tmp{''};
      %devData = (%devData,%tmp);
      set_data(\%devData);
    }



    sub set_data{

      my $dev_info = shift;
      my $file = '/etc/itfhw.conf';

      open(CONF,"> $file") or print STDERR  'cant write $file:$!';

      foreach(keys %{$dev_info}){

        if($$dev_info{$_}{'modul'} ne 'off'){


    #--begin--Clean up Webmin Hardware Information

    #     my $desc = '';
    #     $desc = exists $$dev_info{$_}{vend} ? $$dev_info{$_}{vend} : '[unknown vendor / ';
    #     $desc .= exists $$dev_info{$_}{name} ? $$dev_info{$_}{name} : 'unknown chipset] ';
          print CONF "[$_]\n";
          print CONF "type = $$dev_info{$_}{type}\n" if exists $$dev_info{$_}{type};

          my $desc = "$$dev_info{$_}{vend} $$dev_info{$_}{name}\n";
          print CONF "mac = $$dev_info{$_}{mac}\n" if exists $$dev_info{$_}{mac};
          print CONF "irq = $$dev_info{$_}{interrupt}\n" if exists $$dev_info{$_}{interrupt};

    #--end--Clean up Webmin Hardware Information





    #--begin--display additional NIC info

    #     print CONF "desc = $desc \n";
    #     if($$dev_info{$_}{'flag'} eq 0){
          print CONF "desc = $desc \n";

            {

            print CONF "io = $$dev_info{$_}{port}\n" if exists $$dev_info{$_}{port};
    print CONF "base = $$dev_info{$_}{base}\n" if (exists $$dev_info{$_}{base});
    print CONF "pcidev = $$dev_info{$_}{pcidev}\n" if (exists $$dev_info{$_}{pcidev});


    #--end--display additional NIC info



          }
          print CONF "\n\n";
        }
      }
      close(CONF)
    }



    sub getDeviceInfo{

      my $devData = shift;
      my $procDir = '/proc/bus/pci/';
      opendir(DIR,"$procDir") or die "cant open: $!";
      my $filename = '';
      while( defined(  $filename = readdir(DIR)) ){
        chomp($filename);
        next unless length $filename;
        next if $filename =~ /^\.$/g;
        next if $filename =~ /^\.\.$/g;
        next if $filename =~ /devices/g;
        if( $filename ){
          rec($filename,$procDir, $devData);
        }
      }
    }




    sub rec{

      my $subDir = shift;
      my $procDir = shift;
      my $devData = shift;
      my $pciInfo = '/usr/local/bin/pciinfo';
      my %hash = ();

      opendir(SubDIR,"$procDir/$subDir") or die "cant open";
      my $filename = '';
      while( defined(  $filename = readdir(SubDIR)) ){
        chomp($filename);
        next unless length $filename;
        next if $filename =~ /^\.$/g;
        next if $filename =~ /^\.\.$/g;
        if( $filename ){
          open(PIPE,"$pciInfo -c $procDir/$subDir/$filename |") or die "cant pipe\n";
          my $info = ; chomp($info); close(PIPE);
          if($info =~ /(Ethernet controller)/){
    open(PIPE,"$pciInfo -i $procDir/$subDir/$filename |") or die "cant pipe\n";
    my $interrupt = ; chomp($info); close(PIPE);

    open(PIPE,"$pciInfo -m $procDir/$subDir/$filename |") or die "cant pipe\n";
    my $module = ; chomp($info); close(PIPE);
    $module =~ /^.*?:\s+([A-Z0-9].*)$/gi;
    $module = $1;

    $interrupt  =~ /^.*?:\s+([A-Z0-9]+)/gi;
    $interrupt = hex $1;
    foreach(keys %{$devData}){
      if(($$devData{$_}{'interrupt'} eq $interrupt)and
        ($$devData{$_}{'modul'} eq $module
        )){
        $$devData{$_}{'pcidev'} = $filename;
        my @options = ("-v","-b","-d","-p");
        foreach my $opt (@options){
          open(PIPE,"$pciInfo $opt  $procDir/$subDir/$filename |") or die "cant pipe\n";
          my $info = ; chomp($info); close(PIPE);
          if($opt eq '-v' ){
    $info =~ /^.*?:\s+([A-Z0-9].*)$/gi;
    $$devData{$_}{'vend'} = $1;
          }
          if($opt eq '-b' and $$devData{$_}{'flag'} eq 0){
    $info =~ /^.*?:\s+([A-Z0-9]+)$/gi;
    $$devData{$_}{'base'} = $1;
          }
          if($opt eq '-d'){
    $info =~ /^.*?:\s+([A-Z0-9].*)$/gi;
    $$devData{$_}{'name'} = $1;
          }
          if($opt eq '-p'){
    $info =~ /^.*?:\s+([A-Z0-9]+)$/gi;
    $$devData{$_}{'port'} = $1;
          }
        }
      }
    }
          }


    #--begin--Added to properly update cards that are described as Network controllers instead of Ethernet Controllers

          if($info =~ /(Network controller)/){
            open(PIPE,"$pciInfo -i $procDir/$subDir/$filename |") or die "cant pipe\n";
            my $interrupt = ; chomp($info); close(PIPE);

            open(PIPE,"$pciInfo -m $procDir/$subDir/$filename |") or die "cant pipe\n";
            my $module = ; chomp($info); close(PIPE);
            $module =~ /^.*?:\s+([A-Z0-9].*)$/gi;
            $module = $1;

            $interrupt  =~ /^.*?:\s+([A-Z0-9]+)/gi;
            $interrupt = hex $1;
            foreach(keys %{$devData}){
              if(($$devData{$_}{'interrupt'} eq $interrupt)and


    #--begin--Added to properly update cards loaded by modules with different names, e.g Prism based cards loaded by hostap

    #           ($$devData{$_}{'modul'} eq $module

                ($$devData{$_}{'modul'} ne " "

    #--end--Added to properly update cards loaded by modules with different names, e.g Prism based cards loaded by hostap


                )){
                $$devData{$_}{'pcidev'} = $filename;
                my @options = ("-v","-b","-d","-p");
                foreach my $opt (@options){
                  open(PIPE,"$pciInfo $opt  $procDir/$subDir/$filename |") or die "cant pipe\n";
                  my $info = ; chomp($info); close(PIPE);
                  if($opt eq '-v' ){
                    $info =~ /^.*?:\s+([A-Z0-9].*)$/gi;
                    $$devData{$_}{'vend'} = $1;
                  }
                  if($opt eq '-b' and $$devData{$_}{'flag'} eq 0){
                    $info =~ /^.*?:\s+([A-Z0-9]+)$/gi;
                    $$devData{$_}{'base'} = $1;
                  }
                  if($opt eq '-d'){
                    $info =~ /^.*?:\s+([A-Z0-9].*)$/gi;
                    $$devData{$_}{'name'} = $1;
                  }
                  if($opt eq '-p'){
                    $info =~ /^.*?:\s+([A-Z0-9]+)$/gi;
                    $$devData{$_}{'port'} = $1;
                  }
                }
              }
            }
          }


    #--end--Added to properly update cards that are described as Network controllers instead of Ethernet Controllers


        }
      }
    }




    sub getDouble{

      my $devData = shift;
      my $irq = '';
      my $dev = '';
      my $mod = '';
      foreach my $one (keys %{$devData}){
        my $irq = $$devData{$one}{'interrupt'};
        my $dev = $$devData{$one}{'interface'};
        my $mod = $$devData{$one}{'mod'};
        foreach(keys %{$devData}){
          if(($irq eq $$devData{$_}{'interrupt'}) and
     ($dev ne $$devData{$_}{'interface'}) and
     ($mod eq $$devData{$_}{'module'})
    ){
    $$devData{$_}{'flag'} = 1;
          }
        }
      }
    }




    sub getIfconfigInfo{

      local $/ = '';
      my $devData = shift;
      open(IFCONFIG,"ifconfig -a |") or print STDERR  "cant pipe ifconfig:$!";
      foreach(){
        my @array = split('\n');
        my $tmp = '';
        foreach(@array){
           if((/^(eth.+?)\s+.*?HWaddr\s(.*?)\s/)){
     if(exists $$devData{$1}){
       my($interface,$hwadress) = ($1 ,$2);
       next if($interface =~ /:/g);
       $tmp = $interface;
       if(exists $$devData{$interface}){
         $$devData{$interface}{'mac'} = $hwadress;
       }
     }
           }
           if(/Interrupt[[[[[:(]]]]]\d+)/){
     $$devData{$tmp}{'interrupt'} = $1;
           }


    #--begin--Added to properly update PRISM WLAN Ethernet Controllers


           if((/^(wlan.+?)\s+.*?HWaddr\s(.*?)\s/)){
             if(exists $$devData{$1}){
               my($interface,$hwadress) = ($1 ,$2);
               next if($interface =~ /:/g);
               $tmp = $interface;
               if(exists $$devData{$interface}){
                 $$devData{$interface}{'mac'} = $hwadress;
               }
             }
           }
           if(/Interrupt[[[[[:(]]]]]\d+)/){
             $$devData{$tmp}{'interrupt'} = $1;
           }



    #--end--Added to properly update PRISM WLAN Ethernet Controllers



    #--begin--Added to properly update Atheros WLAN Ethernet Controllers


           if((/^(ath.+?)\s+.*?HWaddr\s(.*?)\s/)){
             if(exists $$devData{$1}){
               my($interface,$hwadress) = ($1 ,$2);
               next if($interface =~ /:/g);
               $tmp = $interface;
               if(exists $$devData{$interface}){
                 $$devData{$interface}{'mac'} = $hwadress;
               }
             }
           }
           if(/Interrupt[[[[[:(]]]]]\d+)/){
             $$devData{$tmp}{'interrupt'} = $1;
           }



    #--end--Added to properly update Atheros WLAN Ethernet Controllers


         }
      }
      close(IFCONFIG);
    }





    sub setUmlDevice{

      my $umlData = shift;
      my $file = '/etc/itfhw.conf';
      local $/ = '';
      open(IFCONFIG,"ifconfig -a |") or print STDERR  "cant pipe ifconfig:$!";
      my @array = ;
      foreach(@array){
        if($_ =~ /^eth.*/){
          /^(eth.*?) .*/;
          my $eth = $1;
          /Interrupt[[[[[:(]]]]].*)/;
          my $int = $1;
          /HWaddr (..:..:..:..:..:..)/;
          my $hw = $1;
          $$umlData{$eth}{interrupt} = $int;
          $$umlData{$eth}{mac} = $hw;
        }
      }
      close(IFCONFIG);
      open(FH,"> $file") or print STDERR  'cant write $file:$!';
      foreach(keys %{$umlData}){
          print FH "[$_]\n";
          print FH "desc = UserModeLinux (UML-Device)]\n";
          if($$umlData{$_}{mac} eq '00:00:00:00:00:00'){
    print FH "mac = FE:FD:00:00:00:00 \n";
          }
          else{
    print FH "mac = $$umlData{$_}{mac}\n";
          }
          print FH "irq = $$umlData{$_}{interrupt}\n";
          print FH "type = eth\n";
          print FH "io =  0\n";
          print FH "pcidev = 0 / 0 / 0";
          print FH "\n\n";
        }
    }





    sub get_modules{

      my $devData = shift;  my $gigData = shift;  my $umlData = shift;
      my $file = '/etc/modules.conf';

      open (MODULES, ") {
        chomp;
        if(/^.*?(eth\d+)\s+(\w.*)$/){
          next if $2 eq 'off';
          my ($eth , $modname) = ($1, $2);
          if($modname eq 'sk98lin'){
    $$gigData{$eth}{'interface'} = $eth;
    $$gigData{$eth}{'modul'} = $modname;
    $$gigData{$eth}{'type'} = 'eth';
    $$gigData{$eth}{'flag'} = 0;
          }
          elsif($modname eq 'uml'){
    $$umlData{$eth}{'interface'} = $eth;
    $$umlData{$eth}{'modul'} = $modname;
    $$umlData{$eth}{'type'} = 'eth';
    $$umlData{$eth}{'flag'} = 0;
          }
          else{
    $$devData{$eth}{'interface'} = $eth;
    $$devData{$eth}{'modul'} = $modname;
    $$devData{$eth}{'type'} = 'eth';
    $$devData{$eth}{'flag'} = 0;

          }
        }
      

    #--begin--Added to properly update PRISM WLAN Ethernet Controllers

        if(/^.*?(wlan\d+)\s+(\w.*)$/){
          next if $2 eq 'off';
          my ($wlan , $modname) = ($1, $2);
          $$devData{$wlan}{'interface'} = $wlan;
          $$devData{$wlan}{'modul'} = $modname;
          $$devData{$wlan}{'type'} = 'wlan';
          $$devData{$wlan}{'flag'} = 0;

        }


    #--end--Added to properly update PRISM WLAN Ethernet Controllers


    #--begin--Added to properly update ATHEROS WLAN Ethernet Controllers

        if(/^.*?(ath\d+)\s+(\w.*)$/){
          next if $2 eq 'off';
          my ($ath , $modname) = ($1, $2);
          $$devData{$ath}{'interface'} = $ath;
          $$devData{$ath}{'modul'} = $modname;
          $$devData{$ath}{'type'} = 'eth';
          $$devData{$ath}{'flag'} = 0;

        }


    #--end--Added to properly update ATHEROS WLAN Ethernet Controllers


    }
      close (MODULES);
    }





    sub get_sysconnect_ioport{


      my $gig_info = shift;
      my $file = '/proc/ioports';
      my %hash = ();
      open (IOPORTS, "){
        chomp;
        if(/Syskonnect/gc){
          my($tmp, $tmp1) = split(/ : /);
          my($s_ip,undef) = split(/-/,$tmp);
          $hash{$tmp}{'name'} = $tmp1;
          get_sysconnect_device(\%hash,$tmp,++$s_ip);
          get_sysconnect_info($gig_info,\%hash,$tmp);
        }
      }
      close(IOPORTS);
    }





    sub get_sysconnect_info{

      my $gig_info = shift;
      my $hash_ref = shift;
      my $key = shift;

      my $prog = '/usr/local/bin/get_pci_vendev';
      my $dev = 0;
      local $/ = '';
      open(FH_IF,"ifconfig -a |") or print STDERR  "cant pipe ifconfig:$!";
      my @array = ;
      foreach(@array){
        if(/(eth.+?)\s+/){
          $dev = $1;
          last if($dev =~ /:/g);
          my $tmp = 1 if exists $$gig_info{$dev};
          if(($tmp eq 1) and (/.*?Interrupt[[[[[:(]]]]]\d+).*/mg)){
            if($$hash_ref{$key}{interrupt} eq $1){
      /^(eth.+?)\s+.*?HWaddr\s(.*?)\s/;
      $$gig_info{$1}{mac} = $2;
      $$gig_info{$1}{vend} = '';
      $$gig_info{$1}{interrupt} = $$hash_ref{$key}{interrupt};
      $$gig_info{$1}{port} = $key;
      $$gig_info{$1}{slot} = $$hash_ref{$key}{slot};
      $$gig_info{$1}{dev_id} = $$hash_ref{$key}{dev_id};
              $$gig_info{$1}{ven_id} = $$hash_ref{$key}{ven_id};
              $$gig_info{$1}{func} = $$hash_ref{$key}{func};
      open(FH_VEN,"$prog $$hash_ref{$key}{ven_id} $$hash_ref{$key}{dev_id}|") or print STDERR  'cant pipe $prog:$!';
      my $tmp = ;close(FH_VEN);chomp($tmp);
      $$gig_info{$1}{name} = $tmp;
            }
          }
        }
      }
      close(FH_IF);
    }






    sub get_sysconnect_device{

      my $hash_ref = shift;
      my $key = shift;
      my $match_string = shift;
      my $file = '/proc/bus/pci/devices';
      open (FH_DEV, "){
        chomp;
        my @array=();
        if(/($match_string)/){
          @array = split(/\t/);
          $$hash_ref{$key}{interrupt}    = hex $array[2];
          $array[1] =~ m/^(.{4})(.{4})$/o && do {
    $$hash_ref{$key}{ven_id} = $1;
    $$hash_ref{$key}{dev_id} = $2;
          };
          $array[0] =~ m/^(..)(..)$/o && do {
    $$hash_ref{$key}{bus} = hex $1;
    $$hash_ref{$key}{slot} = (((hex $2) >> 3) & 0x1f);
    $$hash_ref{$key}{func} = ((hex $2) & 0x07);
          };
          close(FH_DEV);
          return;
        }
      }
    }






    sub get_wlan{

      my %hash = ();
      my $flag = 1;
      my $flag2 = 1;
      open(SH,"/proc/ioports");
      foreach(){
        if(/hostap_cs/i){
          if( -e "/proc/bus/pccard/drivers"){
            open(FH, "/bin/cat /proc/bus/pccard/drivers |");
            foreach(){
              if(/hostap_cs/){
                $flag = 0;
                $hash{'wlan0'}{'vend'} = '';
                $hash{'wlan0'}{'name'} = 'Wireless Lan hardware prism2 chipset';
                $hash{'wlan0'}{'type'} = 'wlan';
                last;
              }
            }
            close(FH);
            return if $flag;
            open(FH, "/proc/ioports");
            foreach(){
              chomp;
              if(/\s*([0-9a-f]{4})-([0-9a-f]{4}) : hostap_cs*/i){
                $hash{wlan0}{port} =   $1. "-" . $2;
                last;
              }
            }
            close(FH);
            open(FH, "/proc/interrupts");
            foreach(){
              chomp;
              if(/\s*(\d+):.*?hostap_cs*/i){
                $hash{wlan0}{interrupt} =   $1;
                return %hash;
              }
            }
          }
        }
      }
    }


         
  • Anyone available to update /etc/rc.d/accesspoint.sh and /etc/rc.d/accesspoint.sh and /etc/rc.d/init_nics to work with the updated setitfhw.pl  
  • I hope someone has had the same issue with the MA311.  I installed the MA311 and followed the instructions for modprobe etc.  Here's the issue.  The card doesn't seem to be transmitting data other than the ssid.  Do you think I miss configured something?  I know I'm creating a connection, I can see traffic coming in from the wireless client via the kernel log and the live log.  However, the client is showing no packets received.  Any Ideas?