Detect Which Network Interface is Active

In Device OS 5.6.0 and later you can use Particle.connectionInterface() to find which interface the cloud is using for the cloud connection.

Prior to that you could query to see what interface is up (Ethernet.ready(), Cellular.ready(), etc.) but there wasn't a good way to see which one was used by the cloud if multiple interfaces were up.

1 Like