Template:NetworkServerConfig: Difference between revisions
From Phidgets Support
No edit summary |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
There are two different ways to configure the Phidget Network Server: | There are two different ways to configure the Phidget Network Server: | ||
*via the Phidget Control Panel (for Windows and macOS users). This provides a simple way for you to make changes to the Phidget Network Server, however, not all settings are available. | *via the Phidget Control Panel (for Windows and macOS users). This provides a simple way for you to make changes to the Phidget Network Server, however, not all settings are available. | ||
*modifying the Phidget Network Server configuration file directly | *modifying the Phidget Network Server configuration file directly. | ||
Line 22: | Line 22: | ||
===Settings=== | ===Settings=== | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
enabled: true | enabled: true | ||
Line 37: | Line 37: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
auth { | auth { | ||
Line 54: | Line 54: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
pidfile: '/var/run/phidget22networkserver.pid' | pidfile: '/var/run/phidget22networkserver.pid' | ||
Line 68: | Line 68: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
logging { | logging { | ||
Line 123: | Line 123: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
network { | network { | ||
Line 146: | Line 146: | ||
!colspan="2"|network { | !colspan="2"|network { | ||
|- | |- | ||
|keepalive||the server is constantly sending keepalive packets to the client, if it doesn't get a response in the ''keepalive'' | |keepalive||the server is constantly sending keepalive packets to the client, if it doesn't get a response in the ''keepalive'' milliseconds, it will close the connection (0 turns off, so server won't send keep alive) | ||
|- | |- | ||
|resolveaddrs||if addresses should be resolved to names (affects performance) | |resolveaddrs||if addresses should be resolved to names (affects performance) | ||
Line 170: | Line 170: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
feature { | feature { | ||
Line 206: | Line 206: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
filter { | filter { | ||
Line 256: | Line 256: | ||
{| | {| | ||
|style="width:62%"|<syntaxhighlight> | |style="width:62%"|<syntaxhighlight lang=bash> | ||
phidget{ | phidget{ | ||
www { | www { | ||
Line 311: | Line 311: | ||
|address||address to bind | |address||address to bind | ||
|- | |- | ||
|port|| | |port||specify your port | ||
|- | |- | ||
!colspan="2"|publish { | !colspan="2"|publish { | ||
Line 324: | Line 324: | ||
|- | |- | ||
|passwd||the server password | |passwd||the server password | ||
|} | |} | ||
|} | |} |
Latest revision as of 19:47, 7 October 2020
Configuring the Phidget Network Server
There are two different ways to configure the Phidget Network Server:
- via the Phidget Control Panel (for Windows and macOS users). This provides a simple way for you to make changes to the Phidget Network Server, however, not all settings are available.
- modifying the Phidget Network Server configuration file directly.
Find the configuration file on your machine by referencing the following table:
Operating System | Location | File |
Linux | /etc/phidgets/ | phidget22networkserver.pc |
Windows | C:/ProgramData/Phidgets | phidget22networkserver.pc |
macOS | /Library/Preferences/Phidget22NetworkServer/ | phidget22networkserver.pc |
Now that you have the configuration file on hand, we will go through each setting and describe it.
Settings
phidget{
enabled: true
}
|
|
phidget{
auth {
password: 'temp123'
}
}
|
|
phidget{
pidfile: '/var/run/phidget22networkserver.pid'
}
|
|
phidget{
logging {
level: info
file: 'c:/tmp/networkserver.log'
maxfiles: 4
maxsize: 1048576
network {
enabled: true
port: 5771
}
source {
phidget22net {
level: info
}
_phidget22usb {
level: info
}
_phidget22match {
level: error
}
_phidget22channel {
level: error
}
_phidget22bridge {
level: error
}
_phidget22disp {
level: error
}
}
}
}
|
The use of level throughout this section refers to log level. See the Phidget Control Panel logging section for more information.
|
phidget{
network {
keepalive: 30000
ipv4 {
address: localhost
port: 5661
}
datagram {
enabled: true
}
publish {
enabled: true
name: 'Phidget22 Server'
}
resolveaddrs: false
}
}
|
|
phidget{
feature {
control {
enabled: true
}
stats {
enabled: true
}
dictionary {
enabled: true
directory: '/etc/phidgets/dictionary.d'
}
}
}
|
|
phidget{
filter {
enabled: true
clients {
default: allow
allow {
enabled: false
verbose: false
list: ['192.168.2.159', '192.168.3.120' ]
}
deny {
enabled: false
verbose: false
list: ['192.168.2.158', '192.168.3.119' ]
}
}
}
}
|
|
phidget{
www {
enabled: true
serverhost: 'my-pc'
docroot: '/var/phidgets/www'
mimetypes: '/etc/phidgets/mimetypes.kv'
logging {
level: debug
accesslog: '/var/log/phidget22access.log'
}
network {
cachectrl: nocache
ipv4 {
address: 192.168.1.1
port: 8080
}
publish {
enabled: true
name: 'Phidget22 Server'
}
}
phidgets {
enabled: true
passwd: 'temp123'
}
}
}
|
|