| 4 Jun 2021 |
hexa | that maps well to the raspberry pi 4, and in there somewhere a cypress engineer says that AP mode is not a priority | 21:57:16 |
hexa | and from my experience it doesn't work too well | 21:57:23 |
hexa | after some time clients will get disconnected and be unable to reconnect | 21:57:34 |
ElvishJerricco | hexa: Thanks, I've got it working now. FYI I don't intend to use this in any capacity; I'm just learning how to build router like things with nixos. | 23:02:37 |
hexa | awesome, don't let me stop you | 23:02:58 |
hexa | my recommendation is to go with systemd-networkd fwiw | 23:03:06 |
hexa | leave the scripted networking behind, it has no future | 23:03:15 |
ElvishJerricco | hexa: I absolutely would if I had any idea how to use it for this :P | 23:03:30 |
hexa | there's alot to learn from nixos/tests/systemd-networkd* | 23:04:03 |
ElvishJerricco | Is it possible for the pi to just bridge wlan0 with eth0 and still get its own IP on eth0? i.e. allow others to connect to an upstream NAT via the pi as an access point, but still let people on the network communicate with the pi? | 23:05:47 |
mutantmell | I want to say it is, but I'm not 100% sure - I have a similar setup on one of my machines that runs as a VM host that bridges eth0, and it's still network accessible. | 23:08:30 |
mutantmell | That said, I'm new enough to this that I don't know for sure :) | 23:08:55 |
hexa | it is, use the bridge option in hostapd.conf | 23:13:04 |
hexa | and configure ip addresses on the bridge | 23:13:18 |
ElvishJerricco | As in put useDHCP on the bridge interface, not the eth0 interface? | 23:21:13 |
hexa | possibly | 23:23:28 |
ElvishJerricco | So I've got this:
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = false;
networking.interfaces.wlan0.useDHCP = false;
networking.interfaces.br0.useDHCP = true;
networking.bridges.br0.interfaces = ["eth0" "wlan0"];
networking.useNetworkd = true;
services.hostapd = {
enable = true;
interface = "wlan0";
hwMode = "g";
ssid = "My Pi Network";
wpaPassphrase = "foobarbaz";
extraConfig = ''
disable_pmksa_caching=0
wpa_pairwise=CCMP
rsn_pairwise=CCMP
'';
};
And iOS seems to be able to authenticate, but can't access the internet.
| 23:39:17 |
ElvishJerricco | Oof, TIL Element does not shrink down those code blocks into a scrolling thingy | 23:40:16 |
ElvishJerricco | The pi itself is able to access the internet | 23:40:53 |
| 5 Jun 2021 |
hexa | right, so since it's bridged you don't need to enable forwarding | 00:08:09 |
hexa | what does "can't access the internet" exactly mean? | 00:08:34 |
hexa | does DHCP work? | 00:08:40 |
treed | It's a scrolling pane for me in Element | 00:14:11 |
ElvishJerricco | hexa: No, dhcp does not appear to work | 00:24:31 |
hexa | tcpdump the wireless interface, see if dhcp requests arrive | 00:24:51 |
hexa | then tcpdump the bridge to make sure the requests arrive there as well | 00:25:05 |
ElvishJerricco | iOS joins the network but then the dhcp server never says there was any request | 00:25:14 |
hexa | ahh stop | 00:25:18 |
hexa | set bridge=br0 in hostapd extraConfig | 00:25:32 |
ElvishJerricco | Ah, right | 00:25:46 |