Skip to main content

imp.net.getserverinterfaces()

Retrieve the network interface sequence used for connection attempts on multi-interface devices

Availability

Device (from impOS™ 42)

Returns

Array of strings — the current network connection interface sequence

Description

This is draft documentation which covers impOS™ functionality that, though currently in internal development, has been made available to a number of customers for testing purposes only. Both the functionality described here and the documentation itself are subject to change, including breaking changes, and may differ significantly from their final release versions.


This method returns the sequence of network interfaces that impOS™ is currently using to manage connection attempts. If impOS fails to connect using the current network interface, it will move on to the next interface in sequence. It returns to the start of the list if it fails to make a connection with the last interface in the sequence.

The sequence is provided as an array of Network Interface Identifiers. These include:

  • "wifi", "ethernet", "cell" — General identifiers indicating the type of interface. For imps with, for example, a single Ethernet port, "ethernet" will reference that port. If you are working with an imp with multiple Ethernet ports under impOS control, then "ethernet" will reference the first of these ports.
  • "wl0", "wl1", "wl2", etc. — Specific WiFi interfaces, as many as there are WiFi interfaces under impOS control. If there is only one such interface available, then "wl0" and "wifi" will both identify that interface.
  • "eth0", "eth1", "eth2", etc. — Specific Ethernet interfaces, as many as there are Ethernet interfaces under impOS control. If there is only one such interface available, then "eth0" and "ethernet" will both identify that interface.
  • "cell0", "cell1", "cell2", etc. — Specific cellular interfaces, as many as there are cellular interfaces under impOS control. If there is only one such interface available, then "cell0" and "cell" will both identify that interface.

You can specify your own network interface sequence using imp.net.setserverinterfaces().