Skip to content

field_note · · 5 min

The connector command sheet: every network and PowerShell command from the site visit, ready to copy

The commands from one day of bringing an attendance terminal online, one per block with a copy button: the office PC in PowerShell, the connector's own commands, a laptop on the same network, and the checks that a release is really live. Example addresses throughout; swap in your own.

Part 11 of the fifth-protocol series, and the companion to the field handbook, which explains why each command was the right one. This page is only the commands, one per block, each with a Copy button.

The values are examples. Replace them with yours before running anything:

In the commandsMeansExample used here
terminal addressthe attendance terminal on the office LAN192.168.1.50
laptop addressthe laptop serving a build on the same LAN192.168.1.20
portthe terminal's port5005
connector.exethe connector file you are installingconnector.exe
<ConnectorWindow>the file name of the connector's setup windowyour installer's name
<hash>the SHA-256 printed where the file was built64 hex characters
<server>your platform's public addressyour own domain

On the office PC

PowerShell, opened as Administrator, in the order they were used.

Close a hidden setup window. The connector's background service has a different file name, so it keeps reading while the window is closed.

terminal
taskkill /IM <ConnectorWindow>* /F

Who is connected to the terminal right now. ESTABLISHED on :5005 means a program on this PC is connected now; TIME_WAIT means a connection that already finished.

terminal
netstat -an | findstr 192.168.1.50

Find the vendor's own attendance program, if one is installed and running.

terminal
Get-Process | Where-Object Name -match "att|time|fk" | Select-Object Name, Path

Download a build from the laptop into the Downloads folder.

terminal
Invoke-WebRequest http://192.168.1.20:8765/connector.exe -OutFile "$env:USERPROFILE\Downloads\connector.exe" -UseBasicParsing

Check it is the file that was built. Compare with the hash printed on the laptop.

terminal
(Get-FileHash "$env:USERPROFILE\Downloads\connector.exe").Hash

Open it.

terminal
Start-Process "$env:USERPROFILE\Downloads\connector.exe"

All of the above in one line. It refuses to open a file whose hash does not match.

terminal
taskkill /IM <ConnectorWindow>* /F; $f="$env:USERPROFILE\Downloads\connector.exe"; iwr http://192.168.1.20:8765/connector.exe -OutFile $f -UseBasicParsing; if ((Get-FileHash $f).Hash -eq "<hash>") { Start-Process $f } else { "WRONG FILE - stop" }

What was actually used: four short typed lines

Pasting into the PC was not possible, so the version used on the day was short enough to type.

Go to the top of the drive, so the path is short.

terminal
cd \

Fetch the file. Type curl.exe with the extension: in Windows PowerShell, plain curl is an alias for Invoke-WebRequest, which takes different arguments.

terminal
curl.exe -o c.exe http://192.168.1.20:8765/c.exe

Run it with no arguments and it prints its help instead of opening a window.

terminal
.\c.exe

Open the setup window, the same as a double-click.

terminal
.\c.exe setup

The connector's own commands

Run from the folder the connector is in. Each is one line.

Open the setup window.

terminal
.\connector.exe setup

Pair this PC with the six-digit code shown in the platform.

terminal
.\connector.exe pair 123456

Read the terminals and keep sending, in this window, until stopped.

terminal
.\connector.exe run

Start with Windows from now on, as a background service.

terminal
.\connector.exe install

Stop starting with Windows.

terminal
.\connector.exe uninstall

What this PC is doing: paired or not, terminals, last read, service state.

terminal
.\connector.exe status

Punches the platform could not accept, kept on this PC. --retry sends them once more.

terminal
.\connector.exe parked --retry

Look for terminals on the office network.

terminal
.\connector.exe search

Check this PC's network, with a fix for each problem found.

terminal
.\connector.exe doctor

Send traffic through the office proxy, or off to remove it.

terminal
.\connector.exe proxy http://proxy.example:8080
terminal
.\connector.exe proxy off

Also search these office networks (comma-separated; "" removes them).

terminal
.\connector.exe extranets 192.168.2.0/24,10.0.0.0/24

The machine link block, for IT: a small range for terminals on factory addresses, or auto to let the connector pick.

terminal
.\connector.exe link 10.20.30.0/28
terminal
.\connector.exe link auto

Which version this is.

terminal
.\connector.exe version

On a laptop on the same network

macOS, in Terminal.

My address on this network.

terminal
ipconfig getifaddr en0

Is the terminal there at all. Two pings, three seconds at most.

terminal
ping -c 2 -t 3 192.168.1.50

Does its port listen. Opens a TCP connection and closes it, sending nothing.

terminal
nc -z -G 3 192.168.1.50 5005

Talk to it, read only. The probe can send only hello, count and block requests; anything else stops it before the network.

terminal
go run ./cmd/probe 192.168.1.50

Serve a build to the PC on the office address only, for a few minutes.

terminal
python3 -m http.server 8765 --bind 192.168.1.20

Check the laptop serves it, from the laptop itself. --noproxy skips a local proxy that would otherwise answer for its own LAN address.

terminal
curl --noproxy '*' -s -o /dev/null -w "%{http_code} %{size_download}\n" http://192.168.1.20:8765/c.exe

Stop serving as soon as the install is confirmed.

terminal
pkill -f "http.server 8765"

A pretend terminal on this computer for three minutes, punching every five seconds, to test against before touching a real one.

terminal
devsim fk --listen 127.0.0.1:15005 --every 5s --for 3m

Is the release really live

Run from anywhere. A release counts as live only when what the server hands out is byte for byte what was built.

The checksums the server is serving.

terminal
curl -s https://<server>/downloads/<app>/SHA256SUMS

The hash of one file as served, to compare with the line above.

terminal
curl -s https://<server>/downloads/<app>/connector.exe | shasum -a 256

Is the server up. 200 means yes.

terminal
curl -s -o /dev/null -w "%{http_code}" https://<server>/up

Uploading the files and checking the server from the inside were done with the hosting provider's own tools; those steps are described in the release post without commands, because they depend on the host.

Working through something like this? I help teams ship AI and cloud systems that hold up, and cost what they should.