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
91 stars 64 forks source link

Improvements/collaboration #9

Open joaofl opened 3 years ago

joaofl commented 3 years ago

Hi.

Similarly to you I have started a fork of the hotspot addon as well (https://github.com/joaofl/hassio-addons), that extends the and improves the functionalities of the first hostapd I know about. Like dhcp, blocking/allowing internet, hide ssid, and some others. I've been using and maintaining it for some time now. But since the last hassio supervisor was deployed, I've been having trouble using external wifi dongles (namely the ralink one).

I decided to give a try on yours, but apparently you have the exact same problem, which is the drivers are not found. Even though, on my addon, I explicitly fetch and install many wifi usb common drivers.

Do you have any clue on how to attack this problem? Have you tested your addon with different USB dongles?

The fact is that the RPI onboard wifi is extremely unstable and unreliable as a hotspot. That is well known, but people cant do much about it because of the closed source nature of it.

mattlongman commented 3 years ago

Hi @joaofl!

I hadn't noticed the issue with the external dongles. I'll see if I can dig a few out and see what happens.

For your testing, are you using HAOS or Debian 10 with HA Supervised?

I'll run a test of the built-in adapter too and see how long before I start seeing issues (I've just pushed the version from dev with internet access, so I'll connect my phone - should get a good idea of when it starts to fail).

You mentioned you've also added MAC address filtering - I've noticed that it's a lot more stable if I allow the couple of addresses that need access (stability + quicker connection time). Have you noticed the same?

You put collaboration in the subject, and I guess you just mean on this problem, but had you thought of merging these into one repo?

mattlongman commented 3 years ago

Also, when I was updating the forum thread for this, I noticed another similar add-on from @ldrago63 (repo, Home Assistant thread).

Perhaps we could make a lot of progress on stability (plus struggling with over a certain number of clients) if we're working on the same thing?

mattlongman commented 3 years ago

Have you tested your addon with different USB dongles?

I've dug out a couple of dongles. One is dead, the other is really old and can't find a driver for.

Got a more modern one on the way to test.

ldrago63 commented 3 years ago

Hi,

I have test my addon on raspberry 3, 4 and I think @P4uLT tested it on NAS with dongle with success.

As mentionned by @mattlongman, @keanew will test with dongle and post status on https://github.com/ldrago63/my-hassio-addons/issues/2.

joaofl commented 3 years ago

I'm running HAOS on a RPI4. Specifically:

  OS Version:               Home Assistant OS 6.1
  Home Assistant Core:      2021.7.4

Since I upgraded to 6, I keep getting this issues while trying to initialize the wlan interface:

ifdown: interface wlp1s0u1u2 not configured
ip: ioctl 0x8914 failed: No such file or directory

And the syslog looks like

[160768.970223] ieee80211 phy2: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[160768.970293] rt2800usb 1-1.2:1.0: Direct firmware load for rt2870.bin failed with error -2
[160768.970307] ieee80211 phy2: rt2x00lib_request_firmware: Error - Failed to request Firmware

This issues is usually associated with the absence of the device driver, but on my addon, I get it installed at the addon install time, by installing the package : linux-firmware-other, that does populate the desired drivers (including the rt2870.bin file).

And the exact same script would do the job on the OS < 6. I observe this behavior on both mine and your addon.

I like the idea of merging efforts. We could give it a shot. When you find the time, please take a look at my current run.sh and configs available. That is probably where the most happens.

I have not experienced the MAC filtering diffs actually. My addon does not implement that (since I never needed it).

keanew commented 3 years ago

Hi,

I have the same problem. After a long search maybe there is a fix on the Home Assistant OS 6.2 released today.

Wait & see ?

keanew commented 3 years ago

Hi,

With the Home Assistant OS 6.2 (beta version when I've tested), the dongle is recognized. And I can connect more than 8 devices! Great! 👍

I like the idea of merging yours differents forks. I'm using the @joaofl's addon but I like the idea of using static ips (as the idrago63's one). But my dongle didn't work on the @ldrago63's addon despite the 6.2 version.

joaofl commented 3 years ago

Indeed, upgrading to OS 6.2 solved the problem on the https://github.com/joaofl/hassio-addons . As @keanew mentioned, the kernel modules were added to kernel, and its back to life.