mattlongman / Hassio-Access-Point

Hass.io addon to let you create a WiFi access point, perfect for using WiFi devices on off-grid installations.
MIT License
81 stars 62 forks source link

AP not starting up. #14

Open ArneNaessens opened 2 years ago

ArneNaessens commented 2 years ago

Hello,

Im having some trouble with the addon not starting up This is a install of home assistant supervised on Debian 10.

LOG:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Hass.io Access Point Addon
# Setup interface:
Add to /etc/network/interfaces: iface wlp2s0 inet static
Run command: nmcli dev set wlp2s0 managed no
Run command: ip link set wlp2s0 down
Add to /etc/network/interfaces: address 192.168.4.1
Add to /etc/network/interfaces: netmask 255.255.255.0
Add to /etc/network/interfaces: broadcast 192.168.4.255
Run command: ip link set wlp2s0 up
ip: ioctl 0x8914 failed: No such file or directory
# Setup hostapd:
Add to hostapd.conf: ssid=Hoender2
Add to hostapd.conf: wpa_passphrase=********
Add to hostapd.conf: channel=6
Add to hostapd.conf: ignore_broadcast_ssid=0
Add to hostapd.conf: macaddr_acl=0
ifconfig: ioctl 0x8914 failed: No such file or directory
Add to hostapd.conf: interface=wlp2s0
# DHCP enabled. Setup dnsmasq:
Add to dnsmasq.conf: dhcp-range=192.168.4.10,192.168.4.200,12h
Add to dnsmasq.conf: interface=wlp2s0
Add custom DNS: dhcp-option=6,8.8.8.8,8.8.4.4
## Starting dnsmasq daemon
## Starting hostapd daemon
Configuration file: /hostapd.conf
rfkill: Cannot open RFKILL control device
Could not set interface wlp2s0 flags (UP): No such file or directory
nl80211: Could not set interface 'wlp2s0' UP
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlp2s0: interface state UNINITIALIZED->DISABLED
wlp2s0: AP-DISABLED 
wlp2s0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlp2s0 wasn't started
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Config file:

ssid: Hoender2
wpa_passphrase: Hoendernet26
channel: '6'
address: 192.168.4.1
netmask: 255.255.255.0
broadcast: 192.168.4.255
interface: wlp2s0
hide_ssid: '0'
dhcp: '1'
dhcp_start_addr: 192.168.4.10
dhcp_end_addr: 192.168.4.200
allow_mac_addresses: []
deny_mac_addresses: []
debug: 1
hostapd_config_override: []
client_internet_access: '0'
client_dns_override:
  - 8.8.8.8
  - 8.8.4.4

ip a output after starting plugin

3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 06:74:77:dd:eb:10 brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.1/24 brd 192.168.4.255 scope global wlp2s0
       valid_lft forever preferred_lft forever

Can you help me? If you need any further information ill be happy to provide it for you.

ArneNaessens commented 2 years ago

EDIT: Console was gettings spammed with the following error: firmware: failed to load rt2860.bin (-2) After installing and rebooting firmware-ralink with following guide https://wiki.debian.org/rt2800pci#Installation the error went away still no luck getting it started.

LOG After edit:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Hass.io Access Point Addon
# Setup interface:
Add to /etc/network/interfaces: iface wlp2s0 inet static
Run command: nmcli dev set wlp2s0 managed no
Run command: ip link set wlp2s0 down
Add to /etc/network/interfaces: address 192.168.4.1
Add to /etc/network/interfaces: netmask 255.255.255.0
Add to /etc/network/interfaces: broadcast 192.168.4.255
Run command: ip link set wlp2s0 up
# Setup hostapd:
Add to hostapd.conf: ssid=Hoender2
Add to hostapd.conf: wpa_passphrase=********
Add to hostapd.conf: channel=6
Add to hostapd.conf: ignore_broadcast_ssid=0
Add to hostapd.conf: macaddr_acl=0
Add to hostapd.conf: interface=wlp2s0
# DHCP enabled. Setup dnsmasq:
Add to dnsmasq.conf: dhcp-range=192.168.4.10,192.168.4.200,12h
Add to dnsmasq.conf: interface=wlp2s0
Add custom DNS: dhcp-option=6,8.8.8.8,8.8.4.4
## Starting dnsmasq daemon
## Starting hostapd daemon
Configuration file: /hostapd.conf
rfkill: Cannot open RFKILL control device
Driver does not support configured HT capability [DSSS_CCK-40]
wlp2s0: interface state UNINITIALIZED->DISABLED
wlp2s0: AP-DISABLED 
wlp2s0: Unable to setup interface.
wlp2s0: interface state DISABLED->DISABLED
wlp2s0: AP-DISABLED 
wlp2s0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlp2s0 wasn't started
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
ArneNaessens commented 2 years ago

I noticed the error Driver does not support configured HT capability [DSSS_CCK-40] i checked my card and it only supports HT40 and HT20.

I added "hostapd_config_override": ["ht_capab=[HT20]"] to my config but it still gives the same error. Am i adding overrides wrong?

ArneNaessens commented 2 years ago

Any update?

mattlongman commented 2 years ago

Hi @ArneNaessens - I've not been able to get this to work with external adapters for a while. There has been some discussion on similar addons (such as https://github.com/joaofl/hassio-addons and https://github.com/ldrago63/my-hassio-addons). See this issue for details.

Looking at external adapters is the next thing on my list when I get time, but until then, perhaps look at one of these other addons.

ArneNaessens commented 2 years ago

Thank you for the alternatives. I'll go check them out aswel.

Just a note i'm not using external adapters. This is an internal wifi card.

hellresistor commented 2 years ago

FYI I am using Debian 11 aarch64 for RPI4 4/8GB with HA Supervised and this addon working very good with onboard Wifi. not try with external device