Problemas con hostapd

5 envíos / 0 nuevos
Último envío
#1 Lun, 18/06/2018 - 20:35
6uow
Imagen de 6uow
Desconectado/a
se unió: 13/06/18

Problemas con hostapd

Estado: 
[ACTIVO]

Hola foro, mi segundo topico por aca.

 

Resulta que estoy siguiendo una guia para activar hostapd en mi equipo debian.

https://linuxiswonderful.wordpress.com/2016/06/20/wifi-access-point-and-station-on-same-chip/

 

Los requerimientos de red los cubre la tarjeta que tengo, permite el modo de interface ap y ap/vlan como pide el tutorial

tambien tiene la combinacion correcta de modos para tener dos redes corriendo en la interfaz como muestra el tutorial en una imagen.

Los driver del kernel son soportados tambien, es decir el mac80211.

 

el problema que tengo es en el momento de correr el hostapd, que me dice que no puede iniciar el beacon.

 

Les dejo la informacion que da la terminal.

 

root@D-serv:/home/manuel# hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface sw_ap with hwaddr 5a:e4:51:44:b8:0c and ssid "somenet"
Failed to set beacon parameters
Interface initialization failed
sw_ap: interface state UNINITIALIZED->DISABLED
sw_ap: AP-DISABLED
sw_ap: Unable to setup interface.
sw_ap: interface state DISABLED->DISABLED
sw_ap: AP-DISABLED
hostapd_free_hapd_data: Interface sw_ap wasn't started
nl80211: deinit ifname=sw_ap disabled_11b_rates=0
root@D-serv:/home/manuel#

 

 

Mi sistema es el ultimo debian,

 

Distributor ID:    Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:    9.4
Codename:    stretch

 

 

agradezco la ayuda

Mar, 19/06/2018 - 14:15
caliban
Imagen de caliban
Conectado
moderador
se unió: 14/01/16

Quizá obtengas  mas datos de la falla  lanzando el demonio en modo debug , (-dd)

He visto un bug reportado  pero creo que ya lo han arreglado 

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854719

Mar, 19/06/2018 - 17:38
6uow
Imagen de 6uow
Desconectado/a
se unió: 13/06/18

Esto es lo que dice la terminal al correrlo con -dd

 

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface sw_ap in phy phy0
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Setup AP(sw_ap) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x19c2028
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x19c2028 match=
nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x19c2028 match=
nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x19c2028 match=
nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x19c2028 match=
nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x19c2028 match=
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x19c2028 match=
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x19c2028 match=
nl80211: Add own interface ifindex 5
nl80211: if_indices[16]: 5
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=US (DFS-FCC)
nl80211: 2402-2472 @ 40 MHz 30 mBm
nl80211: 5170-5250 @ 80 MHz 23 mBm
nl80211: 5250-5330 @ 80 MHz 23 mBm (DFS)
nl80211: 5490-5730 @ 160 MHz 23 mBm (DFS)
nl80211: 5735-5835 @ 80 MHz 30 mBm
nl80211: 57240-63720 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=30 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=30 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
  * freq=2412
  * vht_enabled=0
  * ht_enabled=0
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x19c1990 (sw_ap), first=1)
sw_ap: Flushing old station entries
nl80211: flush -> DEL_STATION sw_ap (all)
sw_ap: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2412
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 7a 16 18 bf e0 8b 7a 16 18 bf e0 8b 00 00 02 00
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface sw_ap with hwaddr 7a:16:18:bf:e0:8b and ssid "somenet"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     63 61 73 61 6a 61 6e 65 74                        casajanet       
PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=60): 80 00 00 00 ff ff ff ff ff ff 7a 16 18 bf e0 8b 7a 16 18 bf e0 8b 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 09 63 61 73 61 6a 61 6e 65 74 01 08 82 84 8b 96 0c 12 18 24 03 01 01
nl80211: Beacon tail - hexdump(len=73): 2a 01 04 32 04 30 48 60 6c dd 1a 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 02 00 00 50 f2 01 00 50 f2 02 7f 08 00 00 00 02 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=5
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=9):
     63 61 73 61 6a 61 6e 65 74                        casajanet       
  * beacon_int=100
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x3
nl80211: wpa_version=0x1
nl80211: key_mgmt_suites=0x3
nl80211: pairwise_ciphers=0x8
nl80211: group_cipher=0x8
nl80211: beacon_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
nl80211: proberesp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
nl80211: assocresp_ies - hexdump(len=10): 7f 08 00 00 00 02 00 00 00 40
nl80211: Beacon set failed: -16 (Device or resource busy)
Failed to set beacon parameters
sw_ap: Flushing old station entries
nl80211: flush -> DEL_STATION sw_ap (all)
sw_ap: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2412
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 7a 16 18 bf e0 8b 7a 16 18 bf e0 8b 00 00 03 00
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 (sw_ap) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
hostapd_free_hapd_data(sw_ap)
Interface initialization failed
sw_ap: interface state UNINITIALIZED->DISABLED
sw_ap: AP-DISABLED
sw_ap: Unable to setup interface.
hostapd_interface_deinit_free(0x19c0cd8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x19c0cd8)
sw_ap: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss sw_ap
sw_ap: Deauthenticate all stations
nl80211: send_mlme - da= ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2412
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 7a 16 18 bf e0 8b 7a 16 18 bf e0 8b 00 00 03 00
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
sw_ap: AP-DISABLED
hostapd_cleanup(hapd=0x19c1990 (sw_ap))
hostapd_free_hapd_data: Interface sw_ap wasn't started
hostapd_interface_deinit_free: driver=0x583640 drv_priv=0x19c2308 -> hapd_deinit
nl80211: deinit ifname=sw_ap disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=5)
netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Unsubscribe mgmt frames handle 0x8914a8a1 (deinit)
hostapd_interface_free(0x19c0cd8)
hostapd_interface_free: free hapd 0x19c1990
hostapd_cleanup_iface(0x19c0cd8)
hostapd_cleanup_iface_partial(0x19c0cd8)
hostapd_cleanup_iface: free iface=0x19c0cd8
 

De lo que parece que lo importante, o donde esta el error es en :

 

 

nl80211: Beacon set failed: -16 (Device or resource busy)

 

Estoy buscando ese problema en google.

 

Mar, 19/06/2018 - 20:18
6uow
Imagen de 6uow
Desconectado/a
se unió: 13/06/18

Parece que no deshabilite bien la coneccion actual, intentare eso.

Mié, 20/06/2018 - 12:13
caliban
Imagen de caliban
Conectado
moderador
se unió: 14/01/16

Asegurate que no tengas networkmanager en funcionamiento

Fijate en esto ,quizá puedas solucionar tu problema 

He encontrado una referencia de debian en español

https://wiki.debian.org/es/Compartir_red_fisica_con_WiFi

Es vieja , pero sirve como referencia , solo hay que tener en cuenta por ejemplo que para manejar el demonio de red , bajo 

systemd  sera     networking.service , (start , stop   etc) y del mismo modo los otros servicios