joaofl / hassio-addons

More add-ons for your Hass.io.
19 stars 25 forks source link

DHCP configuration doesn't work #6

Closed matthieup240 closed 3 years ago

matthieup240 commented 3 years ago

Hi,

Thanks for this new available version it's so cool !! I have many problems.

This is my own config :

ssid: my-network
wpa_passphrase: my_own_password
channel: '0'
address: 192.168.3.1
netmask: 255.255.255.0
broadcast: 192.168.3.254
interface: wlan0
allow_internet: true
enable_dhcp: true
  1. When I changed the DHCP config like my config above, the logs seems to not using my config, but the default config (192.168.2.1).
    Starting DHCP server...
    udhcpd config:
    start           192.168.2.100
    end             192.168.2.200
    max_leases      100
    opt dns         192.168.2.1
    opt subnet      255.255.255.0
    opt router      192.168.2.1
    opt lease       864000
    interface wlan0
    Disabling NAT
  2. If I don't change the channel to another digit than 0, there is an error on the logs :
wlan0: interface state UNINITIALIZED->ACS
wlan0: ACS-STARTED 
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan0: interface state ACS->DISABLED
wlan0: AP-DISABLED 
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan0: AP-DISABLED 
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: interface state DISABLED->DISABLED
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED 
wlan0: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan0 wasn't started
  1. I try to enable the internet access but when I'm connected on the wifi network, I can't access to the internet.

Does this module works only with a dongle or the rpi wireless has to works to ?

Thanks

joaofl commented 3 years ago

Hey @tux240 , thanks for reporting those issues. I was actually aware of the first and third points you mentioned, but not the second. Currently the IP settings are only applied to the hotspot, but not the DHCP server, which is an issue that I still did not have time to address. The internet "toggle" did work on my initial tests, but it seems to fail on some scenarios. Was not aware of the channel settings failing.

I'm not able to work on those right now, but will try to fix them asap. Try to stick to the default settings so that the addon remains usable for you, and Ill let you know once I had the fixes in place so you can help me test them ;)

matthieup240 commented 3 years ago

Hey, thanks for your answer and I'm ready to help you to test it :) Hope you will have the time soon :p

joaofl commented 3 years ago

@tux240 Ive put some effort on it this weekend, so now you should be able to configure your DHCP server more precisely. I changed a bit the iptables settings, and the internet enable/disable seems to work fine. And I was not able to reproduce the issue you had with setting channel != 0. For me it works fine. I guess it is chipset specific. Not sure how to debug this now.

Let me know if it works for you

matthieup240 commented 3 years ago

Thanks for your work ! I will try this new version. Actually, Supervisor doesn't display an update available.Have I to uninstall/install the addon or wait few minutes / hours to be available ?

joaofl commented 3 years ago

Usually if you click on the 3 dots at the upper right corner and click "update", it should fetch the latest commits and see the new release.


From: Matthieu @.***> Sent: Sunday, March 14, 2021 23:26 To: joaofl/hassio-addons Cc: João Loureiro; Comment Subject: Re: [joaofl/hassio-addons] DHCP configuration doesn't work (#6)

Thanks for your work ! I will try this new version. Actually, Supervisor doesn't display an update available.Have I to uninstall/install the addon or wait few minutes / hours to be available ? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

matthieup240 commented 3 years ago

Thanks, that is working like a charm. The best of the best would be to have the availability to hide the SSID haha. Thanks for your time!!

joaofl commented 3 years ago

Thanks, that is working like a charm.

Nice to hear that!

The best of the best would be to have the availability to hide the SSID haha.

Sounds like a good option to have. Maybe you can help me in this one and figure out which settings to pass to hostapd such that it hides the SSID. After that it should be easy to add it. Maybe you could give it a try and make a pull request with the changes ;)

I'm closing this issue since it got resolved, and we can make a new issue for the feature request. Mostly as a reminder.

matthieup240 commented 3 years ago

Hi, I did a Pull Request to adding the option :)