-
Notifications
You must be signed in to change notification settings - Fork 22
/
mtda.ini
264 lines (235 loc) · 8.96 KB
/
mtda.ini
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# ---------------------------------------------------------------------------
# Sample configuration file for MTDA
# ---------------------------------------------------------------------------
#
# This software is a part of MTDA.
# Copyright (C) 2024 Siemens Digital Industrial Software
#
# ---------------------------------------------------------------------------
# SPDX-License-Identifier: MIT
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# General settings
# ---------------------------------------------------------------------------
[main]
# Name of our agent on the network (defaults to hostname)
# name = hello-mtda
# Debug level, use 0 for no debug prints, up to 3 for more
debug = 0
# change to 'yes' for 'storage mount' to use fuse (experimental)
# this requires https://github.com/madscientist42/partitionfs
# and fuseext2 / fusefat
fuse = no
# ---------------------------------------------------------------------------
# Support for posting console output to pastebin
# ---------------------------------------------------------------------------
# [pastebin]
# api-key = 1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# endpoint = http://pastebin.com/api/api_post.php
# ---------------------------------------------------------------------------
# Remote settings
# ---------------------------------------------------------------------------
# Set "control" to the TCP/IP port number for the control interface
# Set "console" to the TCP/IP port number for the console I/O interface
# Set "host" to the remote agent IP address or hostname
# ---------------------------------------------------------------------------
# Note: the "host" setting is ignored when daemonized
# ---------------------------------------------------------------------------
[remote]
control = 5556
console = 5557
host = localhost
# ---------------------------------------------------------------------------
# Timeout settings
# ---------------------------------------------------------------------------
# The following timeouts may be configured:
# - lock : session lock timeout
# - power : auto power-off when there are no active sessions
# - session: session activity timeout
# ---------------------------------------------------------------------------
# Note: all timeouts are in minutes
# ---------------------------------------------------------------------------
[timeouts]
lock = 5
power = 60
session = 5
# ---------------------------------------------------------------------------
# UI settings
# ---------------------------------------------------------------------------
# Set "prefix" to the key which should be followed by command key for
# controling from interactive console.Default value used for prefix is
# ctrl-a Note:Supported are values between ctrl-a to ctrl-z with
# exception of ctrl-m
# ---------------------------------------------------------------------------
[ui]
# prefix = ctrl-a
# ---------------------------------------------------------------------------
# Web service settings
# ---------------------------------------------------------------------------
# Uncomment the following to enable remote access to the console using a web
# browser. Use 0.0.0.0 as the host address to allow access from anywhere (use
# with caution).
# ---------------------------------------------------------------------------
# [www]
# host = 127.0.0.1
# port = 5000
# ---------------------------------------------------------------------------
# Console settings
# ---------------------------------------------------------------------------
# Set "variant" to specify how to access the console interface of the device.
# Use one of:
# - docker
# - qemu
# - serial
# - telnet
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[console]
variant=serial
port=/dev/ttyUSB0
rate=115200
# define a telnet console
# [console]
# variant=telnet
# host=192.168.2.176
# port=5000
# whether to prefix console output with timestamps
timestamps = no
# when to start/stop the stopwatch:
# start as soon we get the U-Boot banner
# and stop when we get a login prompt
time-from = U-Boot
time-until = login:
# ---------------------------------------------------------------------------
# Power Control settings
# ---------------------------------------------------------------------------
# Set "variant" to specify which power control device to use. Use one of:
# - aviosys_8800
# - anel
# - docker
# - gpio
# - pduclient
# - qemu
# - usbrelay
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[power]
variant=aviosys_8800
# variant=anel
# host=192.168.0.20
# plug=5
# user=admin
# password=anel
# port_in=77
# port_out=75
# variant=gpio
# gpio=gpiochip0@203
# enable=high
# variant=pduclient
# daemon=134.86.60.40
# hostname=134.86.254.45
# port=14
# variant=qemu
# bios=OVMF.fd
# machine=pc
# memory=2048
# storage=ssd.img
# variant=usbrelay
# lines=959BI_1
# variant=docker
# image=debian
# command=bash
# ---------------------------------------------------------------------------
# Shared Storage settings
# ---------------------------------------------------------------------------
# Set "variant" to specify which shared storage device to use. Use one of:
# - docker
# - qemu
# - samsung
# - usbsdmux
# - usbf
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
[storage]
variant=usbf
#driver=g_multi
# variant=docker
# variant=qemu
# file=usb.img
# ---------------------------------------------------------------------------
# USB settings
# ---------------------------------------------------------------------------
# Set "ports" to specify how many USB ports may be switched ON/OFF
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
#[usb]
#ports=1
# ---------------------------------------------------------------------------
# USB Port #1 settings
# ---------------------------------------------------------------------------
# Set "class" as a user-defined key to identify connected devices
# Set "variant" to designate the USB switch device attached to this USB port
# Use one of the following:
# - gpio ("pin" needs to be set)
# ---------------------------------------------------------------------------
# Note: this section is ignored when connecting to a remote agent
# ---------------------------------------------------------------------------
#[usb1]
#class=MSC
#variant=gpio
#pin=26
#enable=high
# ---------------------------------------------------------------------------
# USB Gadgets
# ---------------------------------------------------------------------------
# [keyboard]
# variant=hid
# device=/dev/hidg0
# ---------------------------------------------------------------------------
# Video capture
# ---------------------------------------------------------------------------
# [video]
# variant=ustreamer
# device=/dev/video0
# resolution=1280x780
# port=8080
# ---------------------------------------------------------------------------
# Scripts to execute on state changes
# ---------------------------------------------------------------------------
# Simple python scripts may be used on "power on" and "power off" events. The
# following script shows how to enter the BIOS menu using the HID keyboard
# controller and navigate (blindly) in the UI to select the second boot media
# ---------------------------------------------------------------------------
# [scripts]
# power on:
# import time
# time.sleep(5)
# mtda.keyboard.esc(5)
# time.sleep(0.5)
# mtda.keyboard.right()
# mtda.keyboard.enter()
# time.sleep(0.5)
# mtda.keyboard.down()
# mtda.keyboard.enter()
# mtda.keyboard.idle()
# ---------------------------------------------------------------------------
# Similar power on script for qemu using the (serial) console interface
# instead of the keyboard interface. This script also demonstrates use of
# environment variables ("boot-from-usb")
# ---------------------------------------------------------------------------
# [scripts]
# power on:
# if 'boot-from-usb' in env and env['boot-from-usb'] == '1':
# ... import time
# ... time.sleep(10)
# ... mtda.console_send('\x1b')
# ... time.sleep(1)
# ... mtda.console_send('\x1b[B\x1b[B')
# ... mtda.console_send('\r')
# ... time.sleep(1)
# ... mtda.console_send('\x1b[B\x1b[B\x1b[B\x1b[B\x1b[B\x1b[B')
# ... mtda.console_send('\r')
# ---------------------------------------------------------------------------