I have configured OpenWRT as an access point and it is working fine as expected i.e. I can connect to it wirelessly and can get the IP via DHCP from pfSense router.
Now I wish to create a Guest network. I have already created VLAN10 for it on the pfSense, configured DHCP and firewall rules etc.
Then I created the same VLAN10 on my managed Cisco switch and tagged it to the port where OpenWRT AP is connected.
In the OpenWRT router, I just have br-lan at this point.
I then created the VLAN using: Network -> Interfaces -> Devices tab -> Add Device Configuration ... -> Device type = Vlan802.1q, Base device = Switch port lan1 (because LAN1 is connected to my router.
Back to Network -> Interfaces -> Add New Interface ... -> give it a name, select Device to be the = Software VLAN: "LAN1.10" -> Create Interface
It creates the interface with no issues and gets the DHCP IP address from the pfSense router correctly from the VLAN10 interface.
Now when I create the wireless interface and assigns this interface in the settings and connect to it, the pfSense router doesn't assign an IP to the connecting device...
I don't know why? I get some 169 IP which means that it failed to get an IP from VLAN10 on pfSense.
I think your Wifi is not bridged properly because of missing device section
I tested the guest CLI script on my 1-port router (21.02) and this resulted: