File: wifi_get_set.py

package info (click to toggle)
gtk-meshtastic-client 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,056 kB
  • sloc: python: 4,794; xml: 64; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""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()