2010년 5월 27일 목요일

Using an Ubuntu Powered Laptop as Access Point

Would you like to share your wired internet connection to others via the wireless card built into your laptop? I needed a way to get alot of other devices around my house online without having a wireless router handy, instead I found out how to create an access point via the Broadcom BCM4311 (Rev. 1) wireless card that is built into my Aspire 4520 laptop. You may be able to apply this tutorial to other cards as well.

As I said this may work for other cards as well, in fact my tutorial is based off this one for wireless cards with Atheros chipsets.

First off you need to get the driver and firmware for your Broadcom by running this command:

sudo apt-get install b43-fwcutter

Next install the extra packages for creating the access point:

sudo apt-get install bridge-utils hostapd

Now add the following to /etc/network/interfaces by running “sudo nano /etc/network/interfaces”:

auto eth0 wlan0 br0
iface eth0 inet manual
up /sbin/ifconfig eth0 up
down /sbin/ifconfig eth0 down
iface wlan0 inet manual
up /sbin/ifconfig wlan0 up
down /sbin/ifconfig wlan0 down
iface br0 inet static
address [your IP here]
netmask [your netmask here]
gateway [your gateway here]
bridge_ports eth0 wlan0

*Please note the only other thing in your /etc/network/interfaces file should be the local (lo) setup and loopback address (127.0.0.1). If your ethernet port gets it’s address via DHCP then use “iface br0 inet dhcp” instead and leave out the address, netmask and gateway information.

Next back up your default hostapd config file that gives alot of extra information that you may need later:

sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.conf.bkk

Next run “sudo nano /etc/hostapd/hostapd.conf” and add the following to the file:

driver=nl80211
interface=wlan0
bridge=br0
hw_mode=b
ssid=[your SSID here]
channel=1

*If you want WPA encryption please read the original tutorial, I did not use it so I cannot vouch for it.

Next run “sudo nano /etc/default/hostapd” and uncomment the ‘RUN DAEMON=”no”‘ line (remove the ‘#’ in front)

All you have to do now is run “sudo shutdown -r now” to restart and begin enjoying your new access point.

*Please be aware that the text used on this blog might make zeros(0) look like lowercase oh’s(o) please take care when reading either of these.

reference from : http://paragonofcomputing.wordpress.com/2010/01/12/using-an-ubuntu-powered-laptop-as-access-point/

2010년 5월 26일 수요일

노트북 무선랜을 AP로(미해결)

Compaq presarion B1907TU

Wireless Network
02:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

Hardware Driver 설치
Broadcom B43 wireless driver 또는 Broadcom STA wireless driver

Broadcom B43 wireless driver인 경우 wlan0
Broadcom STA wireless driver인 경우 eth1

마스터 모드로 만들어주기 위해
sudo iwconfig wlan0 mode master

실패
Master mode를 지원하지 않는 것 같다는...

관련자료를 참고하여 hostapd를 이용한 설정(테스트 전)
1) 패키지 다운로드
sudo apt-get install b43-fwcutter
sudo apt-get install bridge-utils hostapd

2) 브릿지 설정
/etc/network/interfaces 편집
auto eth0 wlan0 br0
iface eth0 inet manual
up /sbin/ifconfig eth0 up
down /sbin/ifconfig eth0 down
iface wlan0 inet manual
up /sbin/ifconfig wlan0 up
down /sbin/ifconfig wlan0 down
iface br0 inet static
address 192.168.*.*
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0 wlan0

3) hostapd 설정
sudo mv /etc/hostapd/hostapd.conf /etc/hostapd/hostapd.conf.bkk 백업

/etc/hostapd/hostapd.conf 편집
driver=nl80211
interface=wlan0
bridge=br0
hw_mode=b
ssid=Trojan-Win32
channel=1

4) 재실행
sudo shutdown -r now

5) hostapd 실행
sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf

관련 자료

Using an Ubuntu Powered Laptop as Access Point

How to convert an $800 laptop into a $40 wireless router

HOW TO : Wifi Access Point with hostap + hostapd + freeradius + mysql backend Part 1

HOW TO : Wifi Access Point with hostap + hostapd + freeradius + mysql backend Part 2


Ubuntu 사운드카드 설정

Compaq presarion B1907TU

Sound Card:
00:14.2 Audio device: ATI Technologies Inc IXP SB4x0 High Definition Audio Controller (rev 01)

Wireless Network
02:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

Sound 카드 설정
sudo vi /etc/modprobe.d/alsa-base.conf

마지막 라인에 아래 옵션 추가
options snd-hda-intel model=will enable_msi=1

reboot


헤드폰에서는 소리가 나지만 스피커에서는 소리가 나지 않음(미결)