You appear to be stuck at a very basic level, and having some basic understanding of the Aruba architecture is a big benefit to get this to work.
I have had an issue in the past with Android devices that disconnected which was caused by the gateway IP that was supplied (in my case it was IPv6 and SLAAC, but I'd assume it is similar with IPv4 and DHCP) was not reachable because I had a typing error in what I configured. From your configuration I see something weird in the vlan 40 config:
interface vlan 40
ip address 10.20.12.2 255.255.255.0
ip helper-address 10.20.12.1
no suppress-arp
I would not expect a dhcp relay (ip helper) to point in the subnet. What is issuing IP addresses in that VLAN 40? And what is expected to be the default gateway? What I would do is put one of the other interfaces of your controller in VLAN 40, make sure the port is trusted, and connect a client to see if it can connect. What most times helps me is to run a wireshark/tcpdump from the client to validate connectivity.
What also could be an issue is that you configured 'guest' as the initial role in the aaa profile. The guest role has limited access. You can verify what role a user got with the 'show user' command. And with 'show rights guest' you can see what access rules are in there.
As this is a lot of information, it may make sense to get you guided by an experienced engineer. ArubaOS is very powerful. Most things are not rocket science, but it makes sense to realize how the configuration parts connect together.