github skizzophrenic/SquachWatch-CYD v1.10.0
SquachWatch-CYD v1.10.0 "Argus"

latest releases: v1.40.0, v1.39.0, v1.38.0...
one month ago

Argus. The watchman with a hundred eyes, who never had all of them shut at once. This release is the Bluetooth stack brought up to the current library, and with it a scanner that detects a device the moment it hears it instead of waiting to be told the rest. It follows Anubis by a day, because Anubis kept the board alive in a loud room by listening less, and this one keeps it alive while listening to everything.

The library. The Bluetooth stack moves from NimBLE-Arduino 1.4.3 to 2.5.1, the first library upgrade since the project began. The new one fixes the mechanism behind the loud-room crash at the source: a device the scanner has asked and not heard back from is now forgotten after 200 milliseconds instead of ten seconds, so the list of pending records stays at a few dozen however loud the room. Every path was re-proven on the bench: scanning, squad hellos, messages both ways, the invite handshake, and a full update over Bluetooth and over WiFi.

Detection at first sight. An active scan asks each device for more, and the old library would not report a device until the answer came. A device that never answers but keeps advertising restarted that wait every time, so it was never reported at all, and a phone-class tracker could sit in the room and never make the log. The board now detects on the first advert it hears and adds the name when the reply arrives. The active scan stays on up to 300 adverts a second, from 90, so names and squad messages come through in rooms that used to force it passive.

Proven against a fake college. A bench build feeds the stack hundreds of made-up trackers a second that never answer, the exact shape of the floor that killed the reporter's board, which no emitter on a desk can reproduce because an emitter two feet away always answers. At 200 a second in automatic mode the board ran a full minute with 37 KB free and every one of the 200 trackers a second logged. A real Flipper Zero, a NyanBOX and a HaleHound were thrown at it as well. Before the last fixes the same run died in under two seconds, and the reason was not the radio.

Detection work off the radio's task. Every new detection used to write the lifetime tally to flash twice and append a line to the SD card from the task that receives the adverts. A flash write stalls both cores, and in a room full of new trackers the radio queued behind the flash until the heap was gone. The tally is written from the main loop every five seconds now and the SD line waits its turn, so a busy room costs the radio nothing.

Safe mode retired. Anubis brought the board up passive with a dimmed screen after five short boots in a row, a crutch for a crash that is now fixed at the root, and the crutch is gone. What stays is the crash card on the splash after any crash, and a line that says how many boots in a row died under 90 seconds and to check the power. That card has an IGNORE button now, for a bench that reflashes or a desk where the cable got knocked twice: ten minutes off the splash, and never more than ten boots. The GUARD console command went with safe mode.

Desk mode. The clock sits higher with air under it, and the text on a device notification is set against the card's right edge so the icon on the left keeps its room whatever the name's length.

The actually-useful part

Added

  • Detection on the first advert heard, with the device's name added when its reply arrives.
  • An IGNORE button on the crash card's power line: ten minutes off the splash, at most ten boots.
  • SCAN ACTIVE, SCAN PASSIVE and SCAN AUTO on the console, to pin the scan for a bench.
  • A bench build that floods the stack with fake trackers (FLOOD N on the console).

Changed

  • NimBLE-Arduino 2.5.1, from 1.4.3.
  • A device that does not answer a scan request is forgotten after 200 ms, from ten seconds.
  • The active scan holds up to 300 adverts a second, from 90.
  • The lifetime tally is written to flash from the main loop every five seconds, and the SD log line is written from the main loop, not the radio's task.
  • Safe mode and the GUARD command are gone; the crash card and the boots-in-a-row count stay.
  • The desk clock sits higher; notification text is right-aligned on the card.

Fixed

  • A tracker that never answers a scan request was never detected in an active scan.
  • A device detected from its advert kept a nameless log entry when the reply with its name arrived.
  • The BLE SEEN rate on DIAGNOSTICS counted some adverts twice in an active scan.
  • The crash card's IGNORE could hide the power warning for good on a board with no time sync.
  • Tapping IGNORE fell through to the desk's BACK button.
  • A Bluetooth update reply was sent to the wrong connection on the new library.

Don't miss a new SquachWatch-CYD release

NewReleases is sending notifications on new releases.