# Laptop as an Access Point

## Paris Heng

Dear friends ,

I am currently doing my assignment on building an access point on laptop using Linux.

I have search for the driver for access point, that is HostAP. This HostAP required Prism Chipset in order to run.

Do you all know any other driver that can make my laptop become an access point?

I am trying very hard to search it. Please assist, thousand thank.

----------

## didymos

No, you don't need HostAP.  You need hostapd, which works with a few different chipsets.  See here:

http://hostap.epitest.fi/hostapd/

You can actually get it to work with other chipsets than those listed on the homepage, but you'll have to search out info for those. I'm only familiar with hostapd+madwifi.  Intel offers patches so it'll work with their adapters, I do know that, but they're a bit old.

----------

## richard.scott

also check out the madwifi-ng drivers. They work with Atheros chipset PCMCIA cards.

I have a linksys card that works a treat, you just have to be careful on firmware versions as for me, the card I have on a v5 is different to the v7 chipset. v7 works and v5 does not!  :Smile: 

There is a Compatibility listing on the Madwifi homepage that may help.

----------

## Paris Heng

 *didymos wrote:*   

> No, you don't need HostAP.  You need hostapd, which works with a few different chipsets.  See here:
> 
> http://hostap.epitest.fi/hostapd/
> 
> You can actually get it to work with other chipsets than those listed on the homepage, but you'll have to search out info for those. I'm only familiar with hostapd+madwifi.  Intel offers patches so it'll work with their adapters, I do know that, but they're a bit old.

 

Dear sir,

Very glad to hear from you. 

(1) 

Do you mean i can set-up the laptop as the access-point using the Atheros based Wifi chipset (PCMCIA) + Madwifi driver + Hostapd ?

Only 3 components?

It is using Hostapd, and not Host AP ? That mean we use the Madwifi driver instead of the Host AP driver? It is like that?

(2) Do sir know about IAPP (802.11 f) , it is use for inter AP to communicate.

Hope sir can assist me on building the Access Point first. Because buying the correct chipset is quite troublesome. Most the shop selling the newest kind of Wifi card.

Please assist, thousand thank.

----------

## didymos

Yes, you should be able to.  My personal machine is also a wireless AP, using an Atheros card with madwifi and hostapd.  Hostapd includes a driver for madwifi, which you can enable on Gentoo with a USE flag.

As to IAPP, I'm afraid I know next to nothing about it.  I don't really have any use for it, so I haven't looked into it.  As far as the card to buy, go to this page for known-compatible hardware:

http://madwifi.org/wiki/Compatibility

Personally, I have a Trendnet TEW-443PI which is a PCI card.  They make a notebook version, called the TEW-441PC, which should work just as well.  Both NICs are on the compatibility list.

----------

## Paris Heng

 *didymos wrote:*   

> Yes, you should be able to.  My personal machine is also a wireless AP, using an Atheros card with madwifi and hostapd.  Hostapd includes a driver for madwifi, which you can enable on Gentoo with a USE flag.
> 
> As to IAPP, I'm afraid I know next to nothing about it.  I don't really have any use for it, so I haven't looked into it.  As far as the card to buy, go to this page for known-compatible hardware:
> 
> http://madwifi.org/wiki/Compatibility
> ...

 

Dear sir again,

I have few more questions. 

(1) With this 3 components --> Atheros card with madwifi and hostapd. 

         (i)   How to set all the things become a AP?  because I am not using Host AP in this case.

         (ii)  It is by key-in (set based on the Master Mode) -->  wlanconfig ap0 create wlandev wifi0 wlanmode ap ? ...etc 

http://www.meshnode.org/wiki/index.php/Madwifi-Wlanconfig

         (iii) How to check the laptop already become an AP? How to validate the function? 

     * This are the 3 [(i) to (iii)] most essential items i need to know.

(2) Since sir are using Gentoo, because Gentoo is a bit hard to install. It is possible for me to use Ubuntu 7.04? It is OK?

(3) If i use Gentoo, may I opt for Gentoo 2007.0 Minimal ? Will the Madwifi  and all other things can run? or I need the Universal one?

(4) What is the meaning of "Gentoo with a USE flag" mentioned.

I really appreciate the information you provide me so far and willing to spend your time.

----------

## richard.scott

 *Paris Heng wrote:*   

> Dear sir again,
> 
> I have few more questions. 
> 
> (1) With this 3 components --> Atheros card with madwifi and hostapd. 
> ...

 

The ability to make an AP with hostapd and madwifi-ng drivers is not Gentoo specific so you should be ok with Ubuntu if the packages are available.

If you are unsure how to install Gentoo have a look at the Handbook. There is a section in there that will explain the USE flags.

You can install Gentoo via either the Minimal CD or the Universal one.  However, I think you will most likely need the Universal CD to do an install of Gentoo via the GUI interface.

----------

## Paris Heng

Dear Mr. didymos,

How about this one? Please someone assist me on the below questions.

-------------   With this 3 components --> Atheros card with madwifi and hostapd.

(i) How to set all the things become a AP? because I am not using Host AP in this case.

(ii) It is by key-in (set based on the Master Mode) --> wlanconfig ap0 create wlandev wifi0 wlanmode ap ? ...etc

http://www.meshnode.org/wiki/index.php/Madwifi-Wlanconfig

(iii) How to check the laptop already become an AP? How to validate the function?

Thanx

----------

## didymos

Just go to:

http://madwifi.org/wiki/UserDocs/SimpleAccessPoint

 and 

http://madwifi.org/wiki/UserDocs/HostAP

I don't know how Ubuntu does networking, as I've never used it.

----------

## Paris Heng

Thank you sir, I just bought a Atheros' chipsets (DWL-G650)

DWL-G650 

Chipset:	               AR5212 (b/g)

URL:	                        ttp://www.dlink.com/products/?pid=11

Interface:	              Cardbus

Antenna Connector:	No ext connector, but U.FL connector on top of board.

Device Information:	PCI ID 168c:0013

Subsystem:	           D-Link System Inc: Unknown device 3202

Notes:	                       Various different versions are available (see below)

Notes:	                       Works on Slackware 11.0 Kernel 2.6.19.1

Firmware Compatibility:

Hardware	Firmware	Status

B1	2.20	Works

B2	2.20	Works

B2	2.23	Works

B3	2.36	Works

B4	2.42	Works

B5	2.54	Works

C2	3.1.6	Works

C3	4.11	Works

C3	4.30	Works

C4	4.30	Works	(08/07/2006)

C4	4.31	Works

Ref: http://madwifi.org/wiki/Compatibility/D-Link

>> What is the meaning of Firmware Compatibility: as stated above? Because I brought the card with C4 4.31.

----------

## Monkeh

Revision of the card and any firmware present on it. They often change things (up to and including the entire card) between revisions.

----------

## Paris Heng

 *Monkeh wrote:*   

> Revision of the card and any firmware present on it. They often change things (up to and including the entire card) between revisions.

 

I see, so do i need to install the firmware? or just have do like this as below?

Solution 1

This first solution involves deleting tiacx111c16 from /lib/firmware/[kernel version]/acx/default, which links to /lib/firmware/[kernel version]/acx/2.3.1.31/tiacx111c16 (the broken firmware), and replace it with a link to /lib/firmware/[kernel version]/acx/1.2.1.34/tiacx111c16 (the working one). To do this open a terminal window and type:

sudo rm /lib/firmware/[kernel version]/acx/default/tiacx111c16

Replace [kernel version] with your kernel version, obviously. The system will ask you for your password. Enter it. Now type:

sudo ln -s /lib/firmware/[kernel version]/acx/1.2.1.34/tiacx111c16 /lib/firmware/[kernel version]/acx/default/tiacx111c16

Eject the card, reinsert it, and thats it. It should be working properly now.

Note: To find out your kernel version, type echo `uname -r` at the terminal.

Solution 2

I think this solution is easier, but youll have to reboot your PC. Again, open a terminal, and type:

sudo pico /etc/modprobe.d/options

Your system will ask your password; provide it. Now add the following line to the file youre editing:

options acx firmware_ver=1.2.1.34

Press Control+x to exit, and press Y to save the changes. Reboot the computer, and youre done.

I think thats it. Feel free to comment if you have any observations or corrections to make.

Reference: http://guillermoesteves.com/blog/2006/06/08/how-to-get-a-d-link-dwl-g650-wi-fi-adapter-to-work-in-ubuntu-linux-6-06

----------

## Monkeh

 *Paris Heng wrote:*   

>  *Monkeh wrote:*   Revision of the card and any firmware present on it. They often change things (up to and including the entire card) between revisions. 
> 
> I see, so do i need to install the firmware? or just have do like this as below?

 

Just install madwifi-ng, madwifi-ng-tools, and hostapd, and then follow the instructions on the madwifi site..

----------

## Akaihiryuu

HostAP and hostapd are easily confused (I confused them myself at first).  HostAP is both a driver and access point software for Prism based cards.  hostapd is access point software ONLY and works with a variety of different drivers.  The two projects aren't related despite the similar name.

----------

## Paris Heng

Ok, thank Mr. Monkeh.   :Very Happy: 

----------

## Monkeh

 *Akaihiryuu wrote:*   

> HostAP and hostapd are easily confused (I confused them myself at first).  HostAP is both a driver and access point software for Prism based cards.  hostapd is access point software ONLY and works with a variety of different drivers.  The two projects aren't related despite the similar name.

 

Actually, they are related. They're by the same person. HostAP is the driver, and hostapd is software for advanced functions (WPA for example). wpa_supplicant is also made by the same guy.

----------

## Akaihiryuu

Ah ok, I stand corrected.  But regardless, HostAP and hostapd are different programs.

----------

## Paris Heng

Do any of you know the ways to take out only the "access point kernel"  from the main Linux Kernel. In my case here, I installed the Madwifi + Hostapd. Meaning to extract some portion of the kernel from the main kernel. 

Then, this so called "access point kernel" will become a standalone kernel, that can be loaded-in and boot from other media, like compact flash and Bootable USB pendrive, etc. By this way, I can build another access point using small mini motherboard with DC or AC supply. 

Picture 1 (Embedded AP - using Compact Flash): http://www.cheapnet.net/~mike/soekris/4511_large.jpg

Picture 2 (Embedded AP - using Hard Drive): http://www.christianscheurer.ch/sitegraph/projectpicts/soko-intern.jpg

Reference: http://www.soekris.com/

----------

## Paris Heng

The terms Madwifi and Madwifi-ng are the same right?

----------

## Paris Heng

Please assist, I having error when installing the Madwifi-0.9.3.1. , what is the error?

Start from here....

root@heng:/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1# make

Checking requirements... ok.

Checking kernel configuration... ok.

make -C /lib/modules/2.6.20-15-generic/build SUBDIRS=/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1 modules

make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'

  HOSTCC  /home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:26:19: error: stdio.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:27:19: error: errno.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:28:20: error: getopt.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:29:20: error: string.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:30:20: error: stdlib.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:32:23: error: sys/fcntl.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:33:22: error: sys/stat.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: In function 'uudecode_usage':

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:37: warning: implicit declaration of function 'printf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:37: warning: incompatible implicit declaration of built-in function 'printf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: At top level:

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:40: error: expected ')' before '*' token

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:70: error: expected ')' before '*' token

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: In function 'main':

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: 'FILE' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: (Each undeclared identifier is reported only once

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: for each function it appears in.)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: 'src_stream' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:122: error: 'dst_stream' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:122: error: 'NULL' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:130: warning: implicit declaration of function 'getopt'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:134: error: 'optarg' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:138: warning: implicit declaration of function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:138: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:141: error: 'optind' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:142: error: 'stdin' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:144: warning: implicit declaration of function 'fopen'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: warning: implicit declaration of function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: error: 'stderr' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: warning: implicit declaration of function 'strerror'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: error: 'errno' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: warning: format '%s' expects type 'char *', but argument 4 has type 'int'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:148: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:152: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:156: warning: implicit declaration of function 'get_line_from_file'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:156: warning: assignment makes pointer from integer without a cast

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:157: warning: implicit declaration of function 'strncmp'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:164: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:165: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:168: warning: implicit declaration of function 'strtoul'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:170: warning: implicit declaration of function 'strchr'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:170: warning: incompatible implicit declaration of built-in function 'strchr'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:172: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:173: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:178: warning: implicit declaration of function 'strcmp'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:179: error: 'stdout' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_WRONLY' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_CREAT' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_TRUNC' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:186: error: 'O_EXCL' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:188: warning: implicit declaration of function 'open'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXU' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXG' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXO' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:191: warning: implicit declaration of function 'fdopen'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:193: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:194: warning: format '%s' expects type 'char *', but argument 4 has type 'int'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:195: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:199: warning: implicit declaration of function 'read_stduu'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:201: warning: implicit declaration of function 'fclose'

make[3]: *** [/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode] Error 1

make[2]: *** [/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal] Error 2

make[1]: *** [_module_/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1] Error 2

make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'

make: *** [modules] Error 2

root@heng:/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1# make

Checking requirements... ok.

Checking kernel configuration... ok.

make -C /lib/modules/2.6.20-15-generic/build SUBDIRS=/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1 modules

make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'

  HOSTCC  /home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:26:19: error: stdio.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:27:19: error: errno.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:28:20: error: getopt.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:29:20: error: string.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:30:20: error: stdlib.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:32:23: error: sys/fcntl.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:33:22: error: sys/stat.h: No such file or directory

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: In function 'uudecode_usage':

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:37: warning: implicit declaration of function 'printf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:37: warning: incompatible implicit declaration of built-in function 'printf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: At top level:

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:40: error: expected ')' before '*' token

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:70: error: expected ')' before '*' token

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c: In function 'main':

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: 'FILE' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: (Each undeclared identifier is reported only once

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: for each function it appears in.)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:121: error: 'src_stream' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:122: error: 'dst_stream' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:122: error: 'NULL' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:130: warning: implicit declaration of function 'getopt'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:134: error: 'optarg' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:138: warning: implicit declaration of function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:138: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:141: error: 'optind' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:142: error: 'stdin' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:144: warning: implicit declaration of function 'fopen'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: warning: implicit declaration of function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:146: error: 'stderr' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: warning: implicit declaration of function 'strerror'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: error: 'errno' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:147: warning: format '%s' expects type 'char *', but argument 4 has type 'int'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:148: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:152: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:156: warning: implicit declaration of function 'get_line_from_file'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:156: warning: assignment makes pointer from integer without a cast

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:157: warning: implicit declaration of function 'strncmp'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:164: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:165: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:168: warning: implicit declaration of function 'strtoul'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:170: warning: implicit declaration of function 'strchr'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:170: warning: incompatible implicit declaration of built-in function 'strchr'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:172: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:173: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:178: warning: implicit declaration of function 'strcmp'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:179: error: 'stdout' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_WRONLY' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_CREAT' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:182: error: 'O_TRUNC' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:186: error: 'O_EXCL' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:188: warning: implicit declaration of function 'open'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXU' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXG' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:189: error: 'S_IRWXO' undeclared (first use in this function)

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:191: warning: implicit declaration of function 'fdopen'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:193: warning: incompatible implicit declaration of built-in function 'fprintf'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:194: warning: format '%s' expects type 'char *', but argument 4 has type 'int'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:195: warning: incompatible implicit declaration of built-in function 'exit'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:199: warning: implicit declaration of function 'read_stduu'

/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode.c:201: warning: implicit declaration of function 'fclose'

make[3]: *** [/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal/uudecode] Error 1

make[2]: *** [/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1/ath_hal] Error 2

make[1]: *** [_module_/home/heng/Desktop/MADWIFI/madwifi-0.9.3.1] Error 2

make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'

make: *** [modules] Error 2

----------

## Monkeh

.. Why are you trying to build against headers? And on top of that, why are you trying to build by hand?

And no, madwifi and madwifi-ng are not the same.

----------

## didymos

 *Monkeh wrote:*   

> .. Why are you trying to build against headers? .

 

Wha... huh?  You mean kernel headers, right? Because, building against some sort of  headers is usually required.  Of course, the more salient point is your second: 

Paris Heng, don't you use Ubuntu?  Just follow this: http://madwifi.org/wiki/UserDocs/Distro/Ubuntu

----------

## Monkeh

 *didymos wrote:*   

>  *Monkeh wrote:*   .. Why are you trying to build against headers? . 
> 
> Wha... huh?  You mean kernel headers, right? Because, building against some sort of  headers is usually required.  Of course, the more salient point is your second: 
> 
> Paris Heng, don't you use Ubuntu?  Just follow this: http://madwifi.org/wiki/UserDocs/Distro/Ubuntu

 

Look at the output. He's building against kernel headers, not kernel sources. You need sources.

He's using Ubuntu for this? Argh. *leaves thread*

----------

## Paris Heng

 *Monkeh wrote:*   

>  *didymos wrote:*    *Monkeh wrote:*   .. Why are you trying to build against headers? . 
> 
> Wha... huh?  You mean kernel headers, right? Because, building against some sort of  headers is usually required.  Of course, the more salient point is your second: 
> 
> Paris Heng, don't you use Ubuntu?  Just follow this: http://madwifi.org/wiki/UserDocs/Distro/Ubuntu 
> ...

 

Yes. I am using Ubuntu 7.04. How to build against sources? Please assist.

----------

## didymos

Well, I missed the /usr/src/linux-headers--2.6.20-15-generic, you missed the Ubuntu.  Actually, I'm not even sure he is using it. He just asked if he could use Ubuntu.  OK, wait...

Yep, Ubuntu: http://packages.ubuntu.com/feisty/devel/linux-headers-2.6.20-15-generic

[edit]Gah, again.  I check a thread, reply, then find another reply from before I checked the thread.  Frak.

----------

## didymos

 *Paris Heng wrote:*   

> Yes. I am using Ubuntu 7.04. How to build against sources? Please assist.

 

Ok, why do you need to build this yourself? You can get madwifi packages for Ubuntu.  Also, if you want to know how to build from source on Ubuntu, then you may want to try the Ubuntu forums.  I've never used Ubuntu, but being built on Debian, which I have used, I know the way you build from source and install sources is completely different from Gentoo.  I imagine Ubuntu has it's own variations on that as well.

Anyway, here, try this:

https://help.ubuntu.com/community/WifiDocs/Driver/Madwifi

----------

## Paris Heng

Here to install the Madwifi way in the way of Ubuntu. I am very sorry that I not using Gentoo, does  feel that i am hijacking into this forum, i am quite sorry.

http://ubuntuforums.org/showthread.php?t=485579&highlight=madwifi

----------

## Paris Heng

Now i am able to connect to the internet using my madwifi driver and Atheroes chipset. 

(1) Now i in the state of building the access point using Hostapd. 

What i need somemore?

(2) Do i need Bridging? I need to Bridging the wired & wireless segments, so the mobile user can connect to me (Laptop with access point functionality), then i need to bridge to the LAN segment using my Ethernet card,  eth0. How to do so?

(3) And the wpa_supplicant necessary for me to installed?

http://gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point_With_Gentoo#Bridging_the_wired_.26_wireless_segments

 :Very Happy: 

----------

## didymos

Well, the system config file for networking on Ubuntu is different.  I found this:

https://help.ubuntu.com/community/NetworkConnectionBridge

and this

https://help.ubuntu.com/community/NetworkMonitoringBridge

and I got this:

```

auto br0

iface br0 inet dhcp

  pre-up ifconfig eth0 down

  pre-up ifconfig ath0 down

  pre-up brctl addbr br0

  pre-up brctl addif br0 eth0

  pre-up brctl addif br0 ath0

  pre-up ifconfig eth0 0.0.0.0

  pre-up ifconfig ath0 0.0.0.0

  post-down ifconfig eth0 down

  post-down ifconfig ath0 down

  post-down ifconfig br0 down

  post-down brctl delif br0 eth0

  post-down brctl delif br0 ath0

  post-down brctl delbr b0

```

You could also give the bridge a static IP, if you want.  I don't know how you currently configure the LAN segment, so I can't really be more specific.  You'll need to enable ethernet bridging in the kernel, or maybe Ubuntu already does that.  You'll want iptables if you need to do IP masquerading/NAT for the wireless station.  There's also ebtables, but I've never needed it for my setup, which isn't too complicated.

Another piece of the puzzle is the routing.  If you go static, then the bridge IP will be the gateway for any wireless station.  If you run a DHCP server, then it can tell the station what to use. In either case the AP needs to have IP forwarding enabled. To be the AP, you don't need wpa_supplicant, just hostapd. 

But all this is pretty general stuff.  The reason I suggested you try the Ubuntu forums is not so much that I have a problem with you "hijacking" these forums, but that people in the Ubuntu forums are much more likely to know what they're doing when it comes to Ubuntu-specific configuration.  I know how to do all this on Gentoo, or manually from the command line, and I can find stuff like the above, but a well-versed Ubuntu user is a much better source of advice.

----------

## Paris Heng

 *didymos wrote:*   

> Well, the system config file for networking on Ubuntu is different.  I found this:
> 
> https://help.ubuntu.com/community/NetworkConnectionBridge
> 
> and this
> ...

 

Thank a lot for your information, it just the forum of Ubuntu, nobody reply on what i am posting. So , a bit frustration .

(1) This my pre-setup illustration,

try:- http://www.geocities.com/fy_heng/ and clcik on NM.bmp, this is my network illustration. 

(2) I am testing using Wired Network (Ethernet Network) first, then later i am about to use the Wireless Network. From the figure, i set the laptop with access point capability by using D-Link PCMCIA DWL-G650 (Atheroes Chipset) + Madwifi driver + Madwifi-Utilitis + Hostapd (which I not install yet).

(3) Once I set-up the access point using Hostapd, the Mobile Node (MN) need to connect to the Internet using my laptop AP. 

My problems now is to enable the (MN) to connect to the Wired Segment  through my laptop wireless access point.

It is what i need for this is the bridging between the Wired segment and the Wireless Segment? I found out the 2 links you sent me before this is very useful. In general, is that all i need to follow on this 2 following links? Any other task i need to done instead of this?:-

https://help.ubuntu.com/community/NetworkConnectionBridge

https://help.ubuntu.com/community/NetworkMonitoringBridge

(4) For you information, my current configure Ethernet LAN segment is the Home ADSL Router which is the gateway to my ISP (see illustration). 

(5) In general, what is iptables and masquerading/NAT? (I will explore on it) Do i really need it?

(6) How to set AP (my laptop) to have IP forwarding enabled?

(7) I plan to use freeRADIUS server or WinRadius (in Windows platform) , then still i need to setup the DHCP server?

If i need to setup the DHCP server, where should i set it? In my laptop (AP)? or setup a new PC which act as a DHCP server?

For your information, i am well in Cisco router networking, it is my very first to try on Linux platform. Hope you can provide me more information, although i am not using Gentoo distro.

Anyway, Thank You very much, Sir!!

----------

## Paris Heng

Dear Mr.didymos,

Any comment from you? Thank you

----------

## Paris Heng

Dear Mr.didymos,

(1) As you experienced in Madwifi + Hostapd, can you assist me again with this Hostapd installation? I really don't know how to install it, but some web http://wiki.teuwen.org/HostApInstall do help. But i having problem below (statement taken from  READ ME file in Hostapd)

"madwifi driver for cards based on Atheros chip set (ar521x)

	(http://sourceforge.net/projects/madwifi/)

	Please note that you will need to add the correct path for

	madwifi driver root directory in .config (see defconfig file for

	an example: CFLAGS += -I<path>)"

What is the meaning of the above statement?

(2) After all, do i need to make it to be Master mode in the madwifi driver? 

wlanconfig ath0 create wlandev wifi0 wlanmode  ap

Hope u can help me.

----------

