Author Topic: [SOLVED] wlan0 Status: down, internal (now work with hostapd v2.0 too)  (Read 11405 times)

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Hi.

Cant find possibility turn it on?

Idea is create "home server/router/firewall" on one box. Lan0 is up and not jet configured to "External", because then i dont have any webremote access to server, only ssh.
ifconfig shows:
Code: [Select]
eth0      Link encap:Ethernet  HWaddr 74:d0:2b:*:*:*
          inet addr:192.168.100.10  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:877 errors:0 dropped:0 overruns:0 frame:0
          TX packets:839 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:204059 (204.0 KB)  TX bytes:196347 (196.3 KB)
          Interrupt:20 Memory:f7e00000-f7e20000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2392 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2392 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:536219 (536.2 KB)  TX bytes:536219 (536.2 KB)

wlan0     Link encap:Ethernet  HWaddr 24:0a:64:*:*:*
          inet addr:192.168.111.1  Bcast:192.168.111.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan is ath9k chipset.

How to get this wlan0 to work?
« Last Edit: January 24, 2014, 08:01:15 pm by datas0ft »
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

robb

  • Guest
Re: wlan0 Status: down, internal
« Reply #1 on: January 21, 2014, 03:30:21 pm »
When I search on atheros chipset and ubuntu, I see a lot of problems. Maybe you should consider to get another interface that uses a chipset that is supported better by ubuntu.

julio

  • Guest
Re: wlan0 Status: down, internal
« Reply #2 on: January 21, 2014, 03:54:52 pm »
if wlan0 as accesspoint: hostapd
i have same configuration: eth0 external, wlan0 internal as accesspoint with Atheros AR9280 (ath9k).
« Last Edit: January 21, 2014, 03:59:49 pm by Julio »

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: wlan0 Status: down, internal
« Reply #3 on: January 21, 2014, 04:20:23 pm »
When I search on atheros chipset and ubuntu, I see a lot of problems. Maybe you should consider to get another interface that uses a chipset that is supported better by ubuntu.
Then i must change motherboard. Or add another interface to USB port and again then on start point when i must change motherboard.
Actually this wifi works itself good (also on debian wheezy) and supported on drivers side normally.
if wlan0 as accesspoint: hostapd
i have same configuration: eth0 external, wlan0 internal as accesspoint with Atheros AR9280 (ath9k).
Yes i want wlan0 as accesspoint. Must i install hostapd manually (over ssh)? I tought this is covered by zentyal itself.
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

robb

  • Guest
Re: wlan0 Status: down, internal
« Reply #4 on: January 21, 2014, 05:10:12 pm »
Don't you have an option to add a 2nd wired network card?

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: wlan0 Status: down, internal
« Reply #5 on: January 21, 2014, 08:12:39 pm »
Don't you have an option to add a 2nd wired network card?
No. And actually i dont want too, because then idea is just pointless (make home server/wifi router/firewall/NAS on one box).

But for me is strange that this hostapd still not included to Zentyal.
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: wlan0 Status: down, internal
« Reply #6 on: January 21, 2014, 08:38:19 pm »
if wlan0 as accesspoint: hostapd
i have same configuration: eth0 external, wlan0 internal as accesspoint with Atheros AR9280 (ath9k).
Did you used some guide to set up your hostapd?
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

julio

  • Guest
Re: wlan0 Status: down, internal
« Reply #7 on: January 21, 2014, 11:34:24 pm »
small guide (very basic settings)

1. install hostapd, iw, crda:
Code: [Select]
  sudo apt-get update && sudo apt-get install hostapd iw crda

2. make new hostapd config file with "minimal" settings:
Code: [Select]
  sudo nano /etc/hostapd/hostapd.conf

  #insert following contents: (please check and customize following settings: interface, country_code, ht_capab!!!, channel, your_ssid, your_password)

  interface=wlan0
  driver=nl80211

  logger_syslog=-1
  logger_syslog_level=2
  logger_stdout=-1
  logger_stdout_level=2
  dump_file=/tmp/hostapd.dump
  ctrl_interface=/var/run/hostapd
  ctrl_interface_group=0

  ieee80211n=1
  wme_enabled=1
  wmm_enabled=0
  ieee80211d=1
  country_code=DE

  #command: iw list
  #Card:Atheros AR9280 (ath9k)
  #HT20/HT40
  #SM Power Save disabled
  #RX HT40 SGI
  #TX STBC
  #RX STBC 1-stream
  #Max AMSDU length: 3839 bytes
  #DSSS/CCK HT40
  #Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
  #Minimum RX AMPDU time spacing: 8 usec (0x06)
  #HT TX/RX MCS rate indexes supported: 0-15
  ht_capab=[HT40-][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-3839][DSSS_CCK-40][MAX-RX-AMPDU-65535][MIN-RX-AMPDU-8]
  hw_mode=g
  channel=12

  ssid=your_ssid
  wpa_passphrase=your_password
  wpa=2
  wpa_key_mgmt=WPA-PSK
  wpa_pairwise=CCMP TKIP
  rsn_pairwise=CCMP
  auth_algs=2

3. customize your "/etc/default/hostapd" settings
Code: [Select]
  sudo nano /etc/default/hostapd
  change line #DAEMON_CONF="" to DAEMON_CONF="/etc/hostapd/hostapd.conf"
  change line #DAEMON_OPTS="" to DAEMON_OPTS="-ddt"

4. set dhcp settings (wlanX) in Zentyal gui
  Default gateway, Search domain, Primary nameserver, NTP server, WINS server to Zentyal -> press Change
  DHCP ranges: 192.168.111.100 to 192.168.111.110
  Dynamic DNS Options - Dynamic DNS: enabled -> press Change -> press Save settings

5. start your hostapd service (keep your fingers crossed  :D)
Code: [Select]
  sudo /etc/init.d/hostapd start

6. check hostapd connections
Code: [Select]
  tail -f /var/log/syslog | grep hostapd:
« Last Edit: January 23, 2014, 10:41:50 pm by Julio »

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: wlan0 Status: down, internal
« Reply #8 on: January 22, 2014, 09:59:51 am »
* Starting advanced IEEE 802.11 management hostapd                      [fail]

And in syslog nothing about hostapd.

EDIT: Removed copy/paste typos at hostapd.conf and hostapd started correctly.
hostapd.conf can be verifed with command: sudo hostapd -d /etc/hostapd/hostapd.conf
« Last Edit: January 22, 2014, 10:13:17 am by datas0ft »
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: wlan0 Status: down, internal
« Reply #9 on: January 22, 2014, 10:43:15 am »
Ok, all works now like must be!

eth0 set to "External" and wlan0 is internal network.

Only i must tweak little this hostapd.conf to get full speed (n mode) and not ask every time again password, when known interface connects.
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

julio

  • Guest
Re: [SOLVED] wlan0 Status: down, internal
« Reply #10 on: January 22, 2014, 11:44:58 am »
N-mode: ieee80211n=1, wme_enabled=1, hw_mode=g, but is on!
Password: windows/linux (client) wifi password saved??
« Last Edit: January 22, 2014, 11:57:31 am by Julio »

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] wlan0 Status: down, internal
« Reply #11 on: January 23, 2014, 10:07:59 am »
Julio look to this guy hostapd conf. Good comments and explanations. What you think?
Yes he have placed HT-20 and my card (hope you to) not start with this. And yes , i changed it to line provided with you.

But anyway my card show out g network, but let make speeds for n. This is not more problem. One thing what wonder me is that when i do "sudo hostapd -d /etc/hostapd/hostapd.conf" before i start hostapd, i see this error:
Code: [Select]
nl80211: Added 802.11b mode based on 802.11g information
Failed to update rate sets in kernel module
Maybe change to newer hostapd, current on zentyal is v0.7.3 and on hostapd webpage it is v2.0? And old stable was v1.1.
« Last Edit: January 24, 2014, 07:58:32 pm by datas0ft »
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

julio

  • Guest
Re: [SOLVED] wlan0 Status: down, internal
« Reply #12 on: January 23, 2014, 02:50:32 pm »
try with version 2.0:

Code: [Select]
sudo apt-get purge hostapd
sudo apt-get update && sudo apt-get install libnl1 libnl-dev zlib1g-dev libssl-dev wpasupplicant iw wireless-tools build-essential
cd ~/Downloads
wget http://hostap.epitest.fi/releases/hostapd-2.0.tar.gz
tar -xvf hostapd-2.0.tar.gz
cd ~/Downloads/hostapd-2.0/hostapd
cp defconfig .config
nano .config
---->change line "#CONFIG_IEEE80211N=y" to "CONFIG_IEEE80211N=y"
---->save ctrl-o, exit ctrl-x
make
sudo make install
wget http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/hostapd/trusty/download/head:/init.d-20090808052831-i1ybiy734fz9bbih-150/init.d
sudo cp init.d /etc/init.d/hostapd
sudo chmod +x /etc/init.d/hostapd
sudo nano /etc/init.d/hostapd
---->change line "PATH=/sbin:/bin:/usr/sbin:/usr/bin" to "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin"
---->change line "DAEMON_SBIN=/usr/sbin/hostapd" to "DAEMON_SBIN=/usr/local/bin/hostapd"
---->save ctrl-o, exit ctrl-x
sudo update-rc.d hostapd defaults 21 19
sudo hostapd -dd /etc/hostapd/hostapd.conf
sudo /etc/init.d/hostapd start
« Last Edit: January 24, 2014, 12:00:21 am by Julio »

datas0ft

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] wlan0 Status: down, internal
« Reply #13 on: January 23, 2014, 09:28:38 pm »
All went good. No more errors on sudo hostapd -d /etc/hostapd/hostapd.conf ... but I cant start now hostapd: sudo: /etc/init.d/hostapd: command not found. I did all what you put inside code tag.
Zentyal (only remote) on ASUS Z87I-PRO
Core version: 3.5.2

julio

  • Guest
Re: [SOLVED] wlan0 Status: down, internal
« Reply #14 on: January 23, 2014, 10:38:05 pm »
one command missing... :-\
Code: [Select]
sudo chmod +x /etc/init.d/hostapd