About tCPA NetworkInfo
# NetworkInfo App
The COCUS NetworkInfo app provides useful information about the current network connection
as well as the current geolocation.
This information is displayed to the user and accessible through a HTTP API.
## HTTP API Reference
While the COCUS NetworkInfo app is running, a web server listens on port `14242` for HTTP requests and provides all
displayed information in CSV format. All CSV responses include the current unix timestamp as first column and a line
break after the last column. The columns are separated by a single `,`.
The following queries are supported:
* `/csv/plmn`: Returns the identifier of the public land mobile network (PLMN) and the RAT type. The PLMN identifier
consists of the Mobile Country Code (MCC) and the Mobile Network Code (MNC). The MCC for Germany is 262 and the MNC
for Vodafone Germany is 02, so the PLMN identifier for the Vodafone Germany network is 26202. The RAT type is one of
`2G`, `3G`, `4G` or `WIFI`.
* `/csv/network`: Returns the current signal strength in dBm, the network type (e.G. `HSDPA`, `HSPA+`, `LTE`) and the
WAN IP address.
* `/csv/location`: Returns the radio network controller (RNC) identifier, the cell id, the location area code (LAC) and
the WIFI SSID.
* `/csv/gps`: Returns latitude and longitude.
* `/csv`: Returns all of the responses above, separated by `;`.
### Example:
$ adb shell
shell@trlte:/ $ curl localhost:14242/csv/plmn
1467895562.83,26202,4G
shell@trlte:/ $ curl localhost:14242/csv/network
1467895564.48,-73,LTE,0.0.0.0
shell@trlte:/ $ curl localhost:14242/csv/location
1467895565.59,178,65037,44112,"COCUS"
shell@trlte:/ $ curl localhost:14242/csv/gps
1467895568.14,51.2363318,6.7337373
xshell@trlte:/ $ curl localhost:14242/csv
1467895569.69,26202,4G
;1467895569.70,-77,LTE,0.0.0.0
;1467895569.70,178,65037,44112,"COCUS"
;1467895569.70,51.2363318,6.7337373