❓ Problem

It's difficult to check the status of laboratory research tools that are operated from non-networked, vendor-supplied PCs. Is the tool still running? Is it stopped because of an error message? Are my samples ruined? WHO KNOWS⁉

These "air-gapped" PCs are notoriously old and rarely maintained, meaning connecting them to the network and conducting updates provides countless ways to break its working configuration with the tool (drivers, OS, software, etc...), not to mention the increase in overhead maintaining networked PCs.

✔ Solution

Use a SAM32 to "peak" at the screen: using Adafruit IO to trigger the screenshot and host the image for private and secure viewing. In order to keep the PC (mostly) isolated from the network, all WIFI data transfer will occur on the SAM32.

🗺Overall Approach


  1. The SAM32 will plug into a USB port of the PC and mount as a mass-storage device (flash drive), and keyboard.
  2. When prompted on Adafruit IO, the SAM32 will send keystrokes to the PC to take a screenshot (WIN key + PRINT SCRN).
  3. SAM32 then opens command prompt and runs a batch script.
  4. Batch script uses ImageMagick to compress/resize the most recent file in screenshot directory and save it as a base64-encoded text file. Text file is copied to the SAM32.
  5. SAM32 sends encoded image to Adafruit IO and resets the dashboard toggle.
  6. Adafruit IO displays image as JPEG on dashboard

Required Software/Hardware


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e06ec8d6-a7b3-4f87-aed3-f16ef3ea41c9/banner.jpg

Setup


  1. Download portable version of ImageMagick (ImageMagick-7.0.8-53-portable-Q16-x86). Unzip the folder and save to %USERPROFILE%\\ImageMagick-7.0.8-53-portable-Q16-x86 directory on the target computer.
  2. Copy text from the batch file above and save it as ss.bat in %USERPROFILE%\\ss.bat directory on the target computer.
  3. Configure the SAM32 for easy internet access by programming the onboard ESP32 with the ESP32SPI firmware as described here.