Home Contents | # rawio:ttnPeers | Rawio | Core4 Lua Event System

## SYNOPSIS

list = handle:ttnPeers()

## DESCRIPTION

Query the list of running peers on the TTN network.

Returns a table with up to 31 entries. There is a numbered entry for each station that is online, indexed by the station's TTN network ID. For example, if peers exist at ID 3,4 and 7, then the table has entries at the integer keys 3,4 and 7.

{ { features = …, -- Integer bit mask indicating protocol features version = "…", -- Protocol version mac = "…:…:…:…:…:…" -- MAC address }, { -- Empty table indicates peer exists, }, -- but there is no information available yet. … -- One entry for each peer }

The features value has no specific feature bits designed yet.

Peers where no information is available yet are reported with an empty table in the list. This indicates the peer exists and is able to transport regular data, but no property information has been queried yet.

Peer property information becomes available some time after the bus goes online. It can take several seconds to populate the full table in order to conserve bandwidth. The information in this table is considered for diagnostics use, updates have low priority.

## RETURN VALUE

On success, returns a table. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().