LAN Connection
Requires the feature "ethernet".
The ethernet module and appropriate hardware allow connection to a LAN.
Not supported on this hardware!
ethernet/state
The state of the LAN/Ethernet connection.
{
"connection_state": 3,
"connection_start": 4241,
"connection_end": 0,
"ip": "192.168.1.129",
"subnet": "255.255.255.0",
"full_duplex": true,
"link_speed": 100
}
| Name | Description |
|---|---|
connection_stateint | Connection state.
|
ipstring | IP of the device in the connected network. 0.0.0.0 if no connection exists. |
subnetstring | Subnet mask used by the device in the connected network. 0.0.0.0 if no connection exists. |
full_duplexbool | true for a full-duplex connection, otherwise false |
link_speedint (Mbit/s) | Negotiated connection speed.
|
connection_startint (ms) | Time in milliseconds when a connection was last established. |
connection_endint (ms) | Time in milliseconds when a connection was last disconnected. |
ethernet/config
The LAN/Ethernet connection configuration.
# $HOST e.g. warp2-AbCd
Read
curl http://$HOST/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
curl http://$HOST/ethernet/config -d '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
With MQTT on $PREFIX/ethernet/config_update
mosquitto_pub -h $BROKER -t $PREFIX/ethernet/config_update -m '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
| Name | Description |
|---|---|
enable_ethernetbool | Indicates whether a LAN connection should be established.
|
ipstring | IP address the device should use. This entry and the following are optional and can be set to "0.0.0.0" if the address configuration should be obtained automatically via DHCP. |
gatewaystring | Gateway address the device should use. |
subnetstring | Subnet mask the device should use. |
dnsstring | DNS server address the device should use. |
dns2string | Alternative DNS server address the device should use. |
ethernet/state
The state of the LAN/Ethernet connection.
{
"connection_state": 3,
"connection_start": 4241,
"connection_end": 0,
"ip": "192.168.1.129",
"subnet": "255.255.255.0",
"full_duplex": true,
"link_speed": 100
}
| Name | Description |
|---|---|
connection_stateint | Connection state.
|
ipstring | IP of the device in the connected network. 0.0.0.0 if no connection exists. |
subnetstring | Subnet mask used by the device in the connected network. 0.0.0.0 if no connection exists. |
full_duplexbool | true for a full-duplex connection, otherwise false |
link_speedint (Mbit/s) | Negotiated connection speed.
|
connection_startint (ms) | Time in milliseconds when a connection was last established. |
connection_endint (ms) | Time in milliseconds when a connection was last disconnected. |
ethernet/config
The LAN/Ethernet connection configuration.
# $HOST e.g. warp3-AbCd
Read
curl http://$HOST/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
curl http://$HOST/ethernet/config -d '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
With MQTT on $PREFIX/ethernet/config_update
mosquitto_pub -h $BROKER -t $PREFIX/ethernet/config_update -m '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
| Name | Description |
|---|---|
enable_ethernetbool | Indicates whether a LAN connection should be established.
|
ipstring | IP address the device should use. This entry and the following are optional and can be set to "0.0.0.0" if the address configuration should be obtained automatically via DHCP. |
gatewaystring | Gateway address the device should use. |
subnetstring | Subnet mask the device should use. |
dnsstring | DNS server address the device should use. |
dns2string | Alternative DNS server address the device should use. |
ethernet/state
The state of the LAN/Ethernet connection.
{
"connection_state": 3,
"connection_start": 4241,
"connection_end": 0,
"ip": "192.168.1.129",
"subnet": "255.255.255.0",
"full_duplex": true,
"link_speed": 100
}
| Name | Description |
|---|---|
connection_stateint | Connection state.
|
ipstring | IP of the device in the connected network. 0.0.0.0 if no connection exists. |
subnetstring | Subnet mask used by the device in the connected network. 0.0.0.0 if no connection exists. |
full_duplexbool | true for a full-duplex connection, otherwise false |
link_speedint (Mbit/s) | Negotiated connection speed.
|
connection_startint (ms) | Time in milliseconds when a connection was last established. |
connection_endint (ms) | Time in milliseconds when a connection was last disconnected. |
ethernet/config
The LAN/Ethernet connection configuration.
# $HOST e.g. wem-AbCd
Read
curl http://$HOST/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
curl http://$HOST/ethernet/config -d '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
With MQTT on $PREFIX/ethernet/config_update
mosquitto_pub -h $BROKER -t $PREFIX/ethernet/config_update -m '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
| Name | Description |
|---|---|
enable_ethernetbool | Indicates whether a LAN connection should be established.
|
ipstring | IP address the device should use. This entry and the following are optional and can be set to "0.0.0.0" if the address configuration should be obtained automatically via DHCP. |
gatewaystring | Gateway address the device should use. |
subnetstring | Subnet mask the device should use. |
dnsstring | DNS server address the device should use. |
dns2string | Alternative DNS server address the device should use. |
ethernet/state
The state of the LAN/Ethernet connection.
{
"connection_state": 3,
"connection_start": 4241,
"connection_end": 0,
"ip": "192.168.1.129",
"subnet": "255.255.255.0",
"full_duplex": true,
"link_speed": 100
}
| Name | Description |
|---|---|
connection_stateint | Connection state.
|
ipstring | IP of the device in the connected network. 0.0.0.0 if no connection exists. |
subnetstring | Subnet mask used by the device in the connected network. 0.0.0.0 if no connection exists. |
full_duplexbool | true for a full-duplex connection, otherwise false |
link_speedint (Mbit/s) | Negotiated connection speed.
|
connection_startint (ms) | Time in milliseconds when a connection was last established. |
connection_endint (ms) | Time in milliseconds when a connection was last disconnected. |
ethernet/config
The LAN/Ethernet connection configuration.
# $HOST e.g. wem2-AbCd
Read
curl http://$HOST/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
curl http://$HOST/ethernet/config -d '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
With MQTT on $PREFIX/ethernet/config_update
mosquitto_pub -h $BROKER -t $PREFIX/ethernet/config_update -m '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
| Name | Description |
|---|---|
enable_ethernetbool | Indicates whether a LAN connection should be established.
|
ipstring | IP address the device should use. This entry and the following are optional and can be set to "0.0.0.0" if the address configuration should be obtained automatically via DHCP. |
gatewaystring | Gateway address the device should use. |
subnetstring | Subnet mask the device should use. |
dnsstring | DNS server address the device should use. |
dns2string | Alternative DNS server address the device should use. |
ethernet/state
The state of the LAN/Ethernet connection.
{
"connection_state": 3,
"connection_start": 4241,
"connection_end": 0,
"ip": "192.168.1.129",
"subnet": "255.255.255.0",
"full_duplex": true,
"link_speed": 100
}
| Name | Description |
|---|---|
connection_stateint | Connection state.
|
ipstring | IP of the device in the connected network. 0.0.0.0 if no connection exists. |
subnetstring | Subnet mask used by the device in the connected network. 0.0.0.0 if no connection exists. |
full_duplexbool | true for a full-duplex connection, otherwise false |
link_speedint (Mbit/s) | Negotiated connection speed.
|
connection_startint (ms) | Time in milliseconds when a connection was last established. |
connection_endint (ms) | Time in milliseconds when a connection was last disconnected. |
ethernet/config
The LAN/Ethernet connection configuration.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
curl http://$HOST/ethernet/config -d '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/ethernet/config
{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}
Write
With MQTT on $PREFIX/ethernet/config_update
mosquitto_pub -h $BROKER -t $PREFIX/ethernet/config_update -m '{
"enable_ethernet": true,
"ip": "0.0.0.0",
"gateway": "0.0.0.0",
"subnet": "0.0.0.0",
"dns": "0.0.0.0",
"dns2": "0.0.0.0"
}'
| Name | Description |
|---|---|
enable_ethernetbool | Indicates whether a LAN connection should be established.
|
ipstring | IP address the device should use. This entry and the following are optional and can be set to "0.0.0.0" if the address configuration should be obtained automatically via DHCP. |
gatewaystring | Gateway address the device should use. |
subnetstring | Subnet mask the device should use. |
dnsstring | DNS server address the device should use. |
dns2string | Alternative DNS server address the device should use. |