Your own wlan access point

Plugging in devices such as LAN adapters, Wi-Fi cards, printers, etc. to Arch Linux ARM.

Re: Your own wlan access point

Postby pepedog » Fri Sep 17, 2010 4:01 pm

I am posting this-
wireless connected to a popcorn wifi stick (ar9170usb chipset) in AP mode plugged into a dockstar, out the eth0 to lan, thru main server, to here.
I guess it works.
Instructions to follow

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Your own wlan access point

Postby LaTristesse » Fri Sep 17, 2010 4:50 pm

I'm eagerly waiting ...
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Your own wlan access point

Postby pepedog » Fri Sep 17, 2010 5:43 pm

OK
pacman -U http://myplugbox.com/wireless/kernel/ke ... pkg.tar.xz
Don't forget to rename in /boot

cd /lib/firmware
wget http://myplugbox.com/wireless/kernel/carl9170-1.dsc
wget http://myplugbox.com/wireless/kernel/carl9170-1.fw
wget http://myplugbox.com/wireless/kernel/ca ... nodsc-1.fw

uncomment appropiate in /etc/conf.d/wireless-regdom

pacman -U http://myplugbox.com/shorewall-4.4.11.1 ... pkg.tar.xz
pacman -U http://myplugbox.com/wireless/hostapd/h ... pkg.tar.xz

My shorewall files now (192.168.3.0/24 is usb/lan dongle,192.168.4.0/24 is wireless)

masq
eth1 192.168.3.0/24,192.168.4.0/24

interfaces
net eth1 detect routefilter,blacklist,tcpflags,nosmurfs
loc eth0 detect dhcp
loc2 wlan0 detect dhcp

policy
loc net ACCEPT
loc fw ACCEPT
loc loc ACCEPT
loc all ACCEPT
loc2 net ACCEPT
loc2 fw ACCEPT
loc2 loc ACCEPT
loc2 all ACCEPT
fw loc ACCEPT
fw net ACCEPT
all all DROP info

zones
net ipv4
loc ipv4
loc2 ipv4
fw firewall

rules
DROP $FW net tcp 631
DROP $FW net udp 631
ACCEPT net fw udp 80,22,10000
ACCEPT net fw tcp 80,22,10000

shorewall.conf
STARTUP_ENABLED=yes
plus all other stuff, but this is important

pacman -S dnsmasq
My dnsmasq.conf file
dhcp-authoritative
dhcp-option=40,plubox
dhcp-option=42,0.0.0.0
dhcp-option=vendor:MSFT,2,1i
dhcp-range=eth0,192.168.3.50,192.168.3.149,255.255.255.0,12h
dhcp-range=wlan0,192.168.4.150,192.168.4.249,255.255.255.0,12h
domain=Arch Linux ARM install.lan
enable-tftp
interface=eth0
interface=wlan0
tftp-root=/var/ftpd

My /etc/hostapd/hostapd.conf file
interface=wlan0
driver=nl80211
ssid=Testnet
channel=1
hw_mode=g
auth_algs=1
wpa=3
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

my /etc/rc.conf file
MOD_AUTOLOAD="yes"
MODULES=(asix fuse !ar9170usb carl9170usb)
eth0="eth0 192.168.3.1 netmask 255.255.255.0 broadcast 192.168.3.255"
eth1="dhcp"
wlan0="wlan0 192.168.4.1 netmask 255.255.255.0 broadcast 192.168.4.255"
INTERFACES=(eth0 eth1 wlan0)
ROUTES=(!gateway)

These go in DAEMONS
dnsmasq shorewall hostapd

I think that is it, plug in stick and reboot

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Your own wlan access point

Postby LaTristesse » Fri Sep 17, 2010 5:57 pm

Thank you so much Dave. As soon as I'm home from work I will try it out and give some feedback.
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Your own wlan access point

Postby pepedog » Fri Sep 17, 2010 6:49 pm

OK, I did this writeup in a hurry,

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Your own wlan access point

Postby LaTristesse » Sat Sep 18, 2010 10:30 am

Here's my dmesg after I installed the firmware files:

$this->bbcode_second_pass_code('', 'eth0: link up, 100 Mb/s, full duplex, flow control disabled
usb 1-1.2: new high speed USB device using orion-ehci and address 4
usb 1-1.2: reset high speed USB device using orion-ehci and address 4
usbcore: registered new interface driver ar9170usb
usb 1-1.2: ar9170.fw firmware file not found, trying old firmware...
usbcore: registered new interface driver carl9170usb
usb 1-1.2: file with init values not found.
')

1. $this->bbcode_second_pass_quote('pepedog', 'O')K
pacman -U http://myplugbox.com/wireless/kernel/ke ... pkg.tar.xz
Don't forget to rename in /boot


I'm feeling a little silly here, but what do you mean by rename in /boot?

Here's what I got from commandline:

$this->bbcode_second_pass_code('', '(1/1) checking for file conflicts [######################################################################################] 100%
(1/1) removing kernel26-withlinux [######################################################################################] 100%
(1/1) installing kernel2.6.35.4-dockstar-pluswireless [######################################################################################] 100%
Notice
To make things safer, you will manually have to move/copy
/boot/uImage-dockstar to /boot/uImage.
')

Do I have to rename "uImage-dockstar" to "uImage"?

2. $this->bbcode_second_pass_quote('', 'u')ncomment appropiate in /etc/conf.d/wireless-regdom


There is no such file in this dir.
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm

Re: Your own wlan access point

Postby LaTristesse » Sat Sep 18, 2010 11:52 am

It works! Thanks again Dave. This is exactly what I was heading for. I really would like to know the details.

Here's my "iw list":

$this->bbcode_second_pass_quote('', '
')Wiphy phy0
Band 1:
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2288 bytes
Coverage class: 0 (up to 0m)
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* new_mpath
* set_mesh_params
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* remain_on_channel
* set_tx_bitrate_mask
* action
* set_wiphy_netns
* set_channel
* connect
* disconnect


I noticed a "mon.wlan0" device via "ifconfig" and I'm wondering what it is used for?

EDIT:

Can't access the internet over the wlan spot :cry: Any ideas?
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm
Top

Re: Your own wlan access point

Postby LaTristesse » Sat Sep 18, 2010 12:09 pm

$this->bbcode_second_pass_quote('pepedog', '
')my /etc/rc.conf file
MOD_AUTOLOAD="yes"
MODULES=(asix fuse !ar9170usb carl9170usb)
eth0="eth0 192.168.3.1 netmask 255.255.255.0 broadcast 192.168.3.255"
eth1="dhcp"
wlan0="wlan0 192.168.4.1 netmask 255.255.255.0 broadcast 192.168.4.255"
INTERFACES=(eth0 eth1 wlan0)
ROUTES=(!gateway)


Shouldn't "eth0" be eth0="dhcp" if I connect the dockstar over ethernet dhcp?
Last edited by LaTristesse on Sat Sep 18, 2010 12:45 pm, edited 1 time in total.
LaTristesse
 
Posts: 35
Joined: Mon Jul 26, 2010 8:57 pm
Top

Re: Your own wlan access point

Postby pepedog » Sat Sep 18, 2010 12:37 pm

$this->bbcode_second_pass_quote('LaTristesse', 'S')houldn't "eth0" be eth0="dhcp" if I'm connecting the dockstar over ethernet dhcp?

Maybe, I just posted my rc.conf and dnsmasq as guides?
My eth0 is wired lan
You probably want
rc.conf
eth0="dhcp"
wlan0="wlan0 192.168.4.1 netmask 255.255.255.0 broadcast 192.168.4.255"
INTERFACES=(eth0 wlan0)

and these shorewall files altered to this
masq
eth0 192.168.4.0/24

interfaces
net eth0 detect routefilter,blacklist,tcpflags,nosmurfs
loc wlan0 detect dhcp

policy
loc net ACCEPT
loc fw ACCEPT
loc loc ACCEPT
loc all ACCEPT
fw loc ACCEPT
fw net ACCEPT
all all DROP info

zones
net ipv4
loc ipv4
fw firewall

dnsmasq.conf file like this
dhcp-authoritative
dhcp-option=40,plubox
dhcp-option=42,0.0.0.0
dhcp-option=vendor:MSFT,2,1i
dhcp-range=wlan0,192.168.4.150,192.168.4.249,255.255.255.0,12h
domain=Arch Linux ARM install.lan
enable-tftp
interface=wlan0
tftp-root=/var/ftpd

Also I forgot
/etc/conf.d/iptables
IPTABLES_FORWARD=1 # enable IP forwarding?
which is quite important.

Easier to reboot than to restart services? I gather you figured out yImage rename?

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK
Top

Re: Your own wlan access point

Postby pepedog » Sat Sep 18, 2010 12:40 pm

Missed this-
$this->bbcode_second_pass_quote('', 'u')ncomment appropiate in /etc/conf.d/wireless-regdom
There is no such file in this dir.

what country did you pick up in dmesg?
ath: EEPROM regdomain: 0x833a
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x37
ath: Country alpha2 being used: GB
ath: Regpair used: 0x37
I see your dmesg before reboot, but ar9170 is blacklisted and you should have carl9170usb.

Dave
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK
Top

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 10 guests