"""Simple program to demo how to use meshtastic library.
   To run: python examples/info.py
"""

import meshtastic
import meshtastic.serial_interface

from enum import Enum

interface = meshtastic.serial_interface.SerialInterface()
node = interface.getNode('^local')

print(node.localConfig.network)

if node.localConfig.network.wifi_enabled:
    print("wifi enabled!")

print ("SSID: " + str(node.localConfig.network.wifi_ssid))
print ("PSK: " + str(node.localConfig.network.wifi_psk))
print ("NTP Server: " + str(node.localConfig.network.ntp_server))

interface.close()
