lynchlab
@aoife_l22 · Mitglied seit April 2025
Engineering student · university
- Themen
- 15
- Antworten
- 79
- Punkte
- 0
Erstellte Forenantworten
Von English mit KI übersetzt ·
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Nur Wi-Fi, überhaupt kein Bluetooth-Eintrag.
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Only Wi-Fi, no Bluetooth entry at all.
Von English mit KI übersetzt ·
Es ist installiert, sonst würde bluetoothctl nicht laufen.
It’s installed, bluetoothctl wouldn’t run otherwise.
Von English mit KI übersetzt ·
Könntest du den Pi zwischen den Positionsabfragen wie beim ESP32 in den Tiefschlaf versetzen?
Could you put the Pi into deep sleep between fixes like an ESP32?
Why does the reference matter so much? Couldn’t it use the internal 1.1 V bandgap?
Von English mit KI übersetzt ·
Leider nicht überall dasselbe Netzwerk. Zwei Gebäude hängen an einer separaten IoT-SSID, ein Labor hat einen eigenen Router, und die Passwörter werden jedes Semester gewechselt. Außerdem müssen die Tokens ohnehin für jeden Knoten unterschiedlich sein.
Not the same network everywhere sadly. Two buildings are on a separate IoT SSID, one lab has its own router, and the passwords get rotated each term. Plus the tokens have to be different per node anyway.
Liam’s half right. avr-libc’s printf family is built without float support by default to save flash, so %f prints ?. You can link the float version (-Wl,-u,vfprintf -lprintf_flt) but it costs about 1.5 KB of flash and the Arduino IDE makes the flags annoying.
What I do on Nanos is convert the floats with dtostrf first, then format strings:
char ts[8], hs[8], buf[96];
dtostrf(t, 0, 2, ts); // width 0 = no padding
dtostrf(h, 0, 1, hs);
snprintf(buf, sizeof(buf), "{"temp_c":%s,"rh":%s,"seq":%lu}", ts, hs, seq);
Or send integers: temp_c10 as 2154 and scale it back later. Same quota, zero float formatting. Also check for NaN when the SHT31 read fails: dtostrf prints nan, which isn’t valid JSON, and the whole message gets stored as raw text. Skip the key when the read fails.
That field is the TSF, it’s the access point’s own uptime counter in microseconds. Not a date or time.
Both fixed. The society bought the isolated carrier for the pH circuit and the 0.3 jumps are gone. The JSON rule with the any group saved fine, and the pump ran three times today without a single alarm. Then I dropped the probe in pH 4 buffer to test and it opened after five minutes, as expected.
Von English mit KI übersetzt ·
Wirklich hilfreich, danke. Der Vorgesetzte hat „Public CA auf der Karte, Geheimnisse in verschlüsseltem NVS“ akzeptiert. Den X.509-Teil hat mir eine Woche gespart, ich hatte schon angefangen, eine CA mit openssl zu erzeugen. Komischerweise habe ich letzte Woche die Karte für eine zweite Platine geklont, und die Daten waren lückenhaft – genau das Takeover-Problem.
Really helpful, thank you. Supervisor accepted „public CA on card, secrets in encrypted NVS“. The X.509 bit saved me a week, I had already started generating a CA with openssl. Funny enough I had cloned the card for a second board last week and the data was patchy, it was exactly the takeover thing.
Why not torque mode with a low limit? Then hitting the end stop wouldn’t hurt.
Von English mit KI übersetzt ·
Wir haben unser Abschlussprojekt zu genau diesem Thema gemacht (Smart Meter über 2G, wir haben unseren eigenen Verkehr mitgeschnitten). Alles, was Laura gesagt hat, stimmt. So würde ich in Ihrer Situation vorgehen, in dieser Reihenfolge.Erstens: Profil aufteilen. Legen Sie für die 38 TLS-Geräte ein neues Profil an und belassen Sie es bei der Voreinstellung, also nur TLS auf 8883. Verschieben Sie die Geräte dorthin. Geräte in diesem Profil können sich über 1883 überhaupt nicht anmelden, sodass selbst wenn jemand daran herumprobiert, nichts unverschlüsselt übertragen wird.Zweitens: Die 12 alten Geräte bekommen ein eigenes Profil, in dem einfaches MQTT erlaubt ist, und Sie sperren es konsequent ab:
- Erlaubte Netze: Tragen Sie nur den Adressbereich ein, aus dem der Verkehr Ihres Netzbetreibers kommt. Fragen Sie den Netzbetreiber nach einem privaten APN, wenn möglich, dann ist es sein privater Bereich. Alles von außerhalb wird abgelehnt (CONNACK 5).
- Ohne TLS erlaubte Befehle: Lassen Sie die Liste leer oder nehmen Sie höchstens
sys.infoauf. Niemalssys.reboot. Andere Befehle warten nur auf eine TLS-Sitzung, die diese Geräte nie haben werden, und laufen deshalb ab. - Erlaubte Authentifizierung: Nur Access-Token, falls das alles ist, was sie verwenden.
Drittens: Rotieren Sie das Token des Schranks, den der Tester mitgeschnitten hat, und ehrlicherweise alle 12, denn sie übertragen seit zwei Jahren unverschlüsselt über das Internet.Firmware-Updates und Geräteeinstellungen werden ohnehin nie unverschlüsselt gesendet, Sie geben diese also nicht preis. Alles oben Genannte steht auf dieser Seite: Device transport security. Für die IT lautet die ehrliche Antwort: „38 sind durchgehend verschlüsselt, 12 nicht und werden abgeschottet, bis sie ersetzt sind“.
Did our final-year project on almost exactly this (smart meters over 2G, we sniffed our own). Everything Laura said. Here’s what I’d do in your position, in this order.
First, split the profile. Make a new profile for the 38 TLS units and leave it on the default, TLS only on 8883. Move them over. That profile’s devices can’t log in on 1883 at all, so even if somebody pokes at them nothing goes in clear.
Second, the 12 old ones get their own profile with plain MQTT allowed, and you lock it down hard:
- Allowed networks: put in only the address range your operator’s traffic comes from. Ask the operator for a private APN if you can, then it’s their private range. Anything outside gets refused (CONNACK 5).
- Commands allowed without TLS: leave it empty, or at most
sys.info. Neversys.reboot. Other commands just wait for a TLS session, which these units will never have, so they expire. - Allowed authentication: only access token if that’s all they use.
Third, rotate the token of the cabinet the tester captured, and honestly all 12, because they’ve been crossing the internet in clear for two years.
Firmware updates and device settings are never sent in clear anyway, so you’re not leaking those. Everything above is on this page: Device transport security. For IT, the honest answer is „38 are encrypted end to end, 12 are not and are fenced in until they’re replaced“.
Von English mit KI übersetzt ·
Der Energiesparmodus war aktiviert. Ich habe die conf-Datei hinzugefügt, NetworkManager neu gestartet, und seitdem ist er jetzt seit 3 Tagen ununterbrochen online, seitdem gibt es auch keinen keepalive_timeout mehr im Log-Tab. SSH reagiert ebenfalls sofort, was ich gar nicht mit dem Problem in Verbindung gebracht hatte. Danke, Ciaran!
Power save was on. Added the conf file, restarted NetworkManager, and it’s been online for 3 days straight now, no keepalive_timeout in the Log tab since. SSH is instant too, which I hadn’t even realised was related. Thank you Ciaran!
Von English mit KI übersetzt ·
Gestern zum Laufen gebracht, alle im Labor sind begeistert. Ich musste die IT nicht um Hilfe bitten, das war ein Gewinn. Nur eine Sache: Zuerst habe ich status=active verwendet, und nach einem Neustart wiederholte er bestätigte Alarme immer wieder, weil mein seen-set leer war. Dann habe ich auf OPEN umgestellt, wie Sie geschrieben hatten. Außerdem musste ich die Gerätenamen von „frz-03“ in „freezer three“ ändern, weil piper „frz“ als „frz“ ausgesprochen hat.
Got it running yesterday, everyone in the lab loves it. Had to ask IT nothing, which was a win. Only thing: I first used status=active and it kept repeating acknowledged alarms after a restart because my seen-set was empty, switched to OPEN like you wrote. Also had to change device names from „frz-03“ to „freezer three“ because piper read it as „frz“.
Von English mit KI übersetzt ·
Er ist headless, es gibt gar keinen Bildschirm. Ich habe das Blanking trotzdem vorsichtshalber ausgeschaltet, ohne Änderung.
It’s headless, no screen at all. I turned blanking off anyway just in case, no change.
Von English mit KI übersetzt ·
Ich habe mich letztes Jahr für ein Labor mit dem Edison-Breakout herumgeschlagen. Das Öffnen von /dev/ttyMFD1 reicht auf dieser Platine nicht aus: Die Pins 0 und 1 laufen über einen Pin-Multiplexer und die Pegelwandler, und solange diese nicht eingerichtet sind, ist die UART gar nicht an die Header-Leiste angeschlossen, die Pins sind reines GPIO. Deshalb lässt sie sich problemlos öffnen, liest aber nichts.Der einfache Weg ist die mraa-Bibliothek, die beim Öffnen der UART über ihre Board-Nummer den Mux für Sie setzt:
import mraa
u = mraa.Uart(0) # pins 0/1 on the Arduino breakout, sets the mux
u.setBaudRate(115200)
u.setMode(8, mraa.UART_PARITY_NONE, 1)
while True:
if u.dataAvailable(1000):
line = u.readStr(64).strip() # "caps_ok=1823;caps_rej=12"
vals = dict(kv.split("=") for kv in line.split(";"))
# add to the payload the Edison already sends:
payload["caps_ok"] = int(vals["caps_ok"])
payload["caps_rej"] = int(vals["caps_rej"])
Prüfen Sie außerdem, ob die Verkabelung gekreuzt ist: OpenMV TX an RX des Edison (Pin 0), OpenMV RX an TX des Edison (Pin 1). Pin 0 ist auf dem Breakout RX, also tauschen Sie die Leitungen, falls Ihre Verkabelung genau so ausgeführt ist, wie Sie sie beschrieben haben.
I fought the Edison breakout for a lab last year. Opening /dev/ttyMFD1 isn’t enough on that board: pins 0 and 1 go through a pin multiplexer and the level shifters, and until those are set up the UART isn’t connected to the header at all, the pins are plain GPIO. That’s why it opens fine and reads nothing.
The easy way is the mraa library, which sets the mux for you when you open the UART by its board number:
import mraa
u = mraa.Uart(0) # pins 0/1 on the Arduino breakout, sets the mux
u.setBaudRate(115200)
u.setMode(8, mraa.UART_PARITY_NONE, 1)
while True:
if u.dataAvailable(1000):
line = u.readStr(64).strip() # "caps_ok=1823;caps_rej=12"
vals = dict(kv.split("=") for kv in line.split(";"))
# add to the payload the Edison already sends:
payload["caps_ok"] = int(vals["caps_ok"])
payload["caps_rej"] = int(vals["caps_rej"])
Also check the wiring is crossed: OpenMV TX to the Edison’s RX (pin 0), OpenMV RX to the Edison’s TX (pin 1). Pin 0 is RX on the breakout, so if what you wrote is exactly how it’s wired, swap them.

