Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffac-ssid-changer broken for some devices on OpenWrt23 #39

Closed
Djfe opened this issue Oct 14, 2023 · 4 comments · Fixed by #114
Closed

ffac-ssid-changer broken for some devices on OpenWrt23 #39

Djfe opened this issue Oct 14, 2023 · 4 comments · Fixed by #114

Comments

@Djfe
Copy link

Djfe commented Oct 14, 2023

error in logread no hostapd-phy*, exiting with error code 2
https://github.com/freifunk-gluon/community-packages/blob/master/ffac-ssid-changer/shsrc/ssid-changer.sh#L13

The files in /var/run on the Ubiquiti UniFi 6 LR are called
hostapd-wl0.conf
hostapd-wl1.conf
now.

Let's see how upstream (Gluon) handles this change (phy's don't have to be called phy anymore) and then adapt the change to this package :)
freifunk-gluon/gluon#3020

@maurerle
Copy link
Member

Do you think it would be sufficient to use hostapd-* instead? which would probably be the easiest fix

@Djfe
Copy link
Author

Djfe commented Oct 17, 2023

I'm not sure whether that's a longterm fix

It's an easy fix and unlike Gluon it looks like this script doesn't parse the filename (at a quick glance) so it might be worth a try.
I don't know: is it certain, that all hostapd-* files are wifi related (like hostapd-phy* where)

@grische
Copy link
Contributor

grische commented Nov 19, 2023

Following djfe's comment, I guess this script should also use netfid's get_board_phy_name() here?
freifunk-gluon/gluon#3020 (comment)

@maurerle
Copy link
Member

maurerle commented Mar 20, 2024

So following the information from:
freifunk-gluon/gluon#3223

we should also use iwinfo.nl80211.phyname in the long run.

Still we have the problem of #93 which I did not yet investigate.

Further improvements to this are needed to proper handle wan radio #82

Hostapd

While it has also been discussed to find a proper way of changing the SSID.
That means, a way without changing the running config and change it back afterwards.
A way that turns off the OWE SSID instead of breaking it.

In the HostAP repo, there is a test to switch the SSID of a wifi:
https://w1.fi/cgit/hostap/commit/?id=709f18d501fbfc9dfd75aa205f506479f8f6db2d
Though I do not really understand how this works.

There is the python client which sends a cmd to a socket - basically something like this:

self.s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.dest = path
self.local = "/tmp/wpa_ctrl_" + str(os.getpid()) + '-' + str(counter)
counter += 1
self.s.bind(self.local)
self.s.connect(self.dest)
cmd = "SET ssid test-wpa2-psk-new"
self.s.send(cmd)

Yet I doubt this is helpful for us in any way.

Way forward

All in all I think it would be best to rewrite the ssid-changer.sh in lua once we have found a way to properly reload the config and change the SSID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants