Lantronix SGX 5150 User Guide - Page 76

Using XML, Python, IDE, PyNPP, NppFTP

Page 76 highlights

9: Administration  To enter the wlan0 link state change command level: enable > config > action > wlan0 link state change  To enter device temperature change command level: enable > config > action > device temperature change  To enter on scheduled reboot command level: enable > config > action > on scheduled reboot Using XML  Include in your file:  Include in your file:  Include in your file:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129

9: Administration
SGX 5150 IoT Device Gateway User Guide
76
To enter the wlan0 link state change command level:
enable > config > action >
wlan0 link state change
To enter device temperature change
command level:
enable > config > action >
device temperature change
To enter on scheduled reboot command level:
enable > config > action > on
scheduled reboot
Using XML
Include in your file:
<configgroup name = "action" instance = "eth0 link
state change">
Include in your file:
<configgroup name = "action" instance = "wlan0 link
state change">
Include in your file:
<configgroup name = "device temperature change"
Include in your file:
<configgroup name = "action" instance = "on scheduled reboot">
Python
Python™ is a dynamic, object-oriented programming language that can be used for developing a
wide range of software applications. The Lantronix SGX 5150 includes the installation of Python
interpreter, making it easy to load and run custom Python scripts on your device.
The version of Python programming language installed on the Lantronix SGX 5150 comes with
"batteries included" by having the Python language's standard library.
In addition, the developer
can take advantage of thousands of available third party packages to speed up development.
IDE
Python scripts can be written with any text editor. If using Windows for development, Notepad++ is
a powerful choice as this text editor includes traditional IDE features such as syntax highlighting
and automatic indentation (
http://notepad-plus-plus.org/
).
Notepad++ also includes the ability to
customize through plugins. Some interesting plugins for the development of Python scripts for the
Lantronix SGX 5150 platform include the following:
PyNPP:
https://github.com/mpcabd/PyNPP
This plugin allows the user to use keystrokes to launch the open Python script in the local
Python interpreter for debugging and testing.
NppFTP:
http://sourceforge.net/projects/nppftp/
This plugin provides a one-click upload of a file to an FTP server. Debugging and testing on
the SGX 5150 easier because SGX 5150 products have an FTP server through which to
upload files into the file system.