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 commands | Means | Example used here |
|---|---|---|
| terminal address | the attendance terminal on the office LAN | 192.168.1.50 |
| laptop address | the laptop serving a build on the same LAN | 192.168.1.20 |
| port | the terminal's port | 5005 |
connector.exe | the connector file you are installing | connector.exe |
<ConnectorWindow> | the file name of the connector's setup window | your installer's name |
<hash> | the SHA-256 printed where the file was built | 64 hex characters |
<server> | your platform's public address | your 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.
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.
netstat -an | findstr 192.168.1.50
Find the vendor's own attendance program, if one is installed and running.
Get-Process | Where-Object Name -match "att|time|fk" | Select-Object Name, Path
Download a build from the laptop into the Downloads folder.
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.
(Get-FileHash "$env:USERPROFILE\Downloads\connector.exe").Hash
Open it.
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.
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.
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.
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.
.\c.exe
Open the setup window, the same as a double-click.
.\c.exe setup
The connector's own commands
Run from the folder the connector is in. Each is one line.
Open the setup window.
.\connector.exe setup
Pair this PC with the six-digit code shown in the platform.
.\connector.exe pair 123456
Read the terminals and keep sending, in this window, until stopped.
.\connector.exe run
Start with Windows from now on, as a background service.
.\connector.exe install
Stop starting with Windows.
.\connector.exe uninstall
What this PC is doing: paired or not, terminals, last read, service state.
.\connector.exe status
Punches the platform could not accept, kept on this PC. --retry sends them
once more.
.\connector.exe parked --retry
Look for terminals on the office network.
.\connector.exe search
Check this PC's network, with a fix for each problem found.
.\connector.exe doctor
Send traffic through the office proxy, or off to remove it.
.\connector.exe proxy http://proxy.example:8080
.\connector.exe proxy off
Also search these office networks (comma-separated; "" removes them).
.\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.
.\connector.exe link 10.20.30.0/28
.\connector.exe link auto
Which version this is.
.\connector.exe version
On a laptop on the same network
macOS, in Terminal.
My address on this network.
ipconfig getifaddr en0
Is the terminal there at all. Two pings, three seconds at most.
ping -c 2 -t 3 192.168.1.50
Does its port listen. Opens a TCP connection and closes it, sending nothing.
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.
go run ./cmd/probe 192.168.1.50
Serve a build to the PC on the office address only, for a few minutes.
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.
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.
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.
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.
curl -s https://<server>/downloads/<app>/SHA256SUMS
The hash of one file as served, to compare with the line above.
curl -s https://<server>/downloads/<app>/connector.exe | shasum -a 256
Is the server up. 200 means yes.
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.