Tuesday, February 12, 2008

Gentoo madwifi ad-hoc


Need too figure out, when the AP`s is gone (lol), actually i just borrow it, and the time limit is finish. So, to connect my ipod touch (ex1a) to internet theres only one way(in iPhone u can use GPRS), using Wifi Ad-Hoc connection sharing with my laptop. Hmm.. let see (simple ICS)

iPod Touch (wifi) -----> (ath0:madwifi)laptop(eth0) ----->inet

like a pain in the a**, when u try to iwconfig [dev] mode Ad-Hoc and it didnt work at all, yeah.. madwifi support wlanconfig, so create some VAP for it. short Instruction .. below

~ # wlanconfig ath0 destroy
~ # wlanconfig ath0 create wlandev wifi0 wlanmode adhoc
~ # iwconfig ath0 essid venom channel 2
u can set ENC key for WEP or WPA
~ # ifconfig ath0 192.168.0.52 netmask 255.255.255.0
~ # echo "1" > /proc/sys/net/ipv4/ip_forward

Open your ipod touch wifi configuration, and set the essid to venom, put a static IP (set laptop ath0 as the gateway, dont forget to set DNS also).

If u need to combine it with dhcp (for your wifi client),

iPod Touch (wifi:dhcp-client) -----> (ath0:madwifi:dhcp-server)laptop(eth0) ----->inet

just install dnsmasq package, so..
~# emerge dnsmasq
~# vi /etc/dnsmasq.conf
Add this line to enable dhcp:
dhcp-range=192.168.0.50,192.168.0.150,12h
Restrict dnsmasq to just the LAN interface
interface=ath0
~# rc-update add dnsmasq default
~# /etc/init.d/dnsmasq start

Its not only for Gentoo, but for General usage of madwifi.
hope it help(nothing special), have phun!


No comments:

Post a Comment