When you change your autopilot from APM to PX4 or vice versa, FlytOS takes some time to get working. Have patience, and leave it on for 3-4 mins. Mind you, you would only need to wait once. This is a known bug and we are working on it. But, once it connects to PX4, the connection would remain stable, even after multiple reboots.
If flytconsole shows Disconnected, QGC won't work too.
Also, I hope you understand, that after booting up RPi, please wait for around a minute or two, before expecting Connected status in FlytConsole.