New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Laura T.

thompsonplc

@lthompson · Joined May 2025

Newcomer

Automation engineer · pharma · 14 years in the field

Topics
7
Replies
65
Points
0
Newcomer10 points to Member

Forum Replies Created

Viewing 5 posts – 61 through 65 (of 65 total)

Went with the PLC discrepancy bit, 3 s timer, plus the local trip. Hermetry alarms on sf1.discrepancy == true for all six supply fans through one profile rule. Tested by forcing the aux input and got the alarm and the e-mail within seconds. Kept your JSON version in my notes for the sites where I can’t touch the PLC program.

♥ 1

We still have a few of these in the field. The difference is who drives DHCP.

With wpa-conf, ifupdown starts wpa_supplicant with your config and then runs dhclient on wlan0 itself. wpa_supplicant picks a network from the blocks in the file, ifupdown doesn’t care which one. Simple, and enough for “connect to whichever of these two is around”.

With wpa-roam, wpa_supplicant runs in roaming mode and calls wpa_action on every connect and disconnect, which then brings up a logical interface. Each network block can carry an id_str that names the logical interface to use, and anything without one falls to iface default. It’s meant for different IP settings per network. The catch is that wpa_action must see the disconnect to take the old lease down; when the node is carried away and the AP disappears in a funny order, you end up associated with no lease. That’s your field symptom.

For two DHCP networks use wpa-conf and priorities:

# /etc/network/interfaces
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

# /etc/wpa_supplicant/wpa_supplicant.conf
network={
    ssid="LAB-WIFI"
    psk="..."
    priority=10
}
network={
    ssid="FIELD-AP"
    psk="..."
    priority=5
}

On the Hermetry side, each move between networks drops the MQTT session, so make your client reconnect with backoff and resubscribe. If the node has an offline alarm, set its open-after time longer than a walk from the lab to the plot or you’ll get one every trip.

Accepted solution♥ 4

Two different questions, so two answers.

Why SPECK and SIMON are small: both are ARX designs (add, rotate, xor) with no S-boxes. AES needs lookup tables or a fairly involved byte substitution, which costs flash and RAM on an 8-bit part and leaks timing if you do it with tables. SPECK’s round is a handful of 16/32/64-bit adds, rotates and xors, so a full implementation fits in a few hundred bytes. There are two because they were tuned for different targets: SIMON for hardware (very few gates), SPECK for software on microcontrollers. They also come in many block and key sizes (32/64 up to 128/256), which is handy for tiny packets. For your thesis, the ISO standardisation fight and the missing design rationale are worth a chapter too.

Why you can’t swap TLS for SPECK: a block cipher is one building block. TLS gives you key exchange, server authentication and message integrity, and the platform checks your credential inside that session. If you encrypt a payload with SPECK and send it, someone still has to agree a key with you and the broker would see an opaque blob. On Hermetry the device side is TLS 1.2 minimum (1.3 preferred) with forward-secret suites: AES-GCM or ChaCha20-Poly1305, no RSA key exchange, no CBC. Plain MQTT on 1883 only works if an admin switches Plain MQTT on for the profile, and the docs treat that as an exception for devices that can’t do TLS on a private network or VPN. That’s why your 1883 test was refused. It’s all on the device transport security page.

Practical side: the ESP32 has AES hardware, TLS costs you a bit of RAM and a second or so of handshake per connection, and after that it’s nothing you’d notice at sensor rates. The ATmega is the honest problem. Either use ChaCha20-Poly1305 thinking (it’s ARX too and fast without hardware), or let the ATmega talk to a gateway that holds the TLS session.

Accepted solution♥ 6
Viewing 5 posts – 61 through 65 (of 65 total)