thompsonplc
@lthompson · Mayıs 2025 tarihinde katıldı
Automation engineer · pharma · 14 years in the field
- Konular
- 7
- Yanıtlar
- 65
- Puan
- 0
Oluşturulan forum yanıtları
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Sahada hâlâ birkaç tane var. Aradaki fark DHCP’yi kimin yönettiğidir.wpa-conf ile ifupdown, wpa_supplicant’ı yapılandırmanızla başlatır ve ardından wlan0 üzerinde dhclient’ı kendisi çalıştırır. wpa_supplicant dosyadaki bloklardan bir ağ seçer, ifupdown hangisinin seçildiğini umursamaz. Basittir ve “yakındaki iki ağdan hangisi varsa ona bağlan” için yeterlidir.wpa-roam ile wpa_supplicant roaming modunda çalışır ve her bağlantı ile bağlantı kopmasında wpa_action’ı çağırır; bu da bir mantıksal arayüzü ayağa kaldırır. Her ağ bloğu, kullanılacak mantıksal arayüzün adını belirten bir id_str taşıyabilir; bu olmayan her ağ iface default arayüzüne düşer. Her ağ için farklı IP ayarları olması amaçlanmıştır. Sorun şu: wpa_action eski kiralamayı kaldırmak için bağlantı kopmasını görmek zorundadır. Cihaz taşındığında ve erişim noktası garip bir sırayla kaybolduğunda, hiçbir kiralamanın olmadığı bir bağlantıyla kalırsınız. Saha belirtiniz budur.İki DHCP ağı için wpa-conf ve öncelikleri kullanın:
# /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
}
Hermetry tarafında, ağlar arasında her geçiş MQTT oturumunu düşürür; bu yüzden istemcinizin geri çekilmeli (backoff) bir yeniden bağlanma yapmasını ve yeniden abone olmasını sağlayın. Cihazın çevrimdışı alarmı varsa, açık kalma süresini laboratuvardan parsele yürüme süresinden uzun ayarlayın, aksi halde her seferinde bir alarm alırsınız.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Breakout kartının seviye dönüştürücüsü hangi voltaja ayarlı? OpenMV 3.3 V ile çalışıyor, Edison breakout kartı ise jumper ile 5 V’a ayarlanabiliyor.
What voltage is the breakout’s level shifter set to? The OpenMV is 3.3 V, the Edison breakout can be jumpered for 5 V.
Yapay zekâ tarafından English dilinden çevrildi ·
İki farklı soru, bu yüzden iki cevap.SPECK ve SIMON neden küçük: ikisi de S-kutusu içermeyen ARX tasarımlarıdır (toplama, döndürme, XOR). AES, arama tabloları ya da oldukça karmaşık bayt yer değiştirmesi gerektirir; bu da 8 bitlik bir işlemcide flash ve RAM maliyeti getirir ve tablolarla yapılırsa zamanlama sızıntısına yol açar. SPECK’in turu birkaç 16/32/64 bitlik toplama, döndürme ve XOR işleminden ibarettir, bu yüzden tam bir uygulama birkaç yüz bayta sığar. İki tane olmasının nedeni farklı hedefler için ayarlanmış olmalarıdır: SIMON donanım için (çok az kapı), SPECK mikrodenetleyicilerde yazılım için. Ayrıca çok sayıda blok ve anahtar boyutunda gelirler (32/64’ten 128/256’ya kadar), bu da küçük paketler için kullanışlıdır. Teziniz için ISO standartlaştırma tartışması ve eksik tasarım gerekçesi de bir bölüm olmayı hak ediyor.TLS’in neden SPECK ile değiştirilemeyeceği: blok şifre tek bir yapı taşıdır. TLS anahtar değişimi, sunucu kimlik doğrulaması ve mesaj bütünlüğü sağlar; platform da kimlik bilginizi bu oturum içinde kontrol eder. Bir yükü SPECK ile şifreleyip gönderirseniz, yine biri sizinle bir anahtar üzerinde anlaşmak zorundadır ve broker opak bir veri yığını görür. Hermetry’de cihaz tarafı en az TLS 1.2 (tercihen 1.3) ile ileri gizlilik sağlayan paket takımlarını kullanır: AES-GCM veya ChaCha20-Poly1305; RSA anahtar değişimi yok, CBC yok. 1883 üzerinden düz MQTT yalnızca bir yönetici profil için Düz MQTT’yi açarsa çalışır ve dokümanlar bunu, özel ağda veya VPN üzerinde TLS yapamayan cihazlar için bir istisna olarak ele alır. 1883 testinizin reddedilmesinin nedeni budur. Tamamı cihaz taşıma güvenliği sayfasında yer alıyor.Pratik taraf: ESP32’nin AES donanımı vardır, TLS biraz RAM ve bağlantı başına bir saniye kadar el sıkışma süresi maliyeti getirir, sonrasında sensör hızlarında fark etmeyeceğiniz bir yük olmaz. ATmega ise dürüstçe bir sorundur. Ya ChaCha20-Poly1305 yaklaşımını kullanın (o da ARX’tir ve donanımsız da hızlıdır) ya da ATmega’nın TLS oturumunu tutan bir ağ geçidiyle konuşmasını sağlayın.
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.
For the next 30, think about OTA from day one and give each one a sticker with its device name. Climbing to 40 wall boxes to re-flash is a weekend gone.

