KMI HRM · PROBLEM SOLVED · NOVEMBER 2026
Our attendance agent needs a Windows PC on the same network as the fingerprint machine. Some sites do not have one running, or it is switched off when it matters. But HR staff at those sites do carry a phone. In November 2026, I made the KMI Connect app able to do the agent’s job.
How attendance, HR and payroll for a Pakistani company of several sites and plants came together, from fingerprint machines to the phone in an HR manager’s hand.
Fingerprint machines normally need a PC on site running our agent. We taught the KMI Connect Android app to do the same job over Wi-Fi, so a site with no PC can still sync its machines, without two agents ever fighting over one machine.
These machines speak their own protocol over a raw network connection, which ordinary JavaScript in a mobile app cannot open. So I wrote a small Android module for raw TCP, then ported the protocol logic from the Python library the PC agent already used. Because of that native module, this feature needs a proper app build and cannot run in a simple preview app.
Asking HR staff for an IP address is a poor start. The Machines screen has “Find machines on this Wi-Fi”. It lists each machine it finds, matches it by serial number against what the HR system knows, and saves it with one tap.
The risky part is not talking to the machine. It is the phone and a PC both trying to run it, processing commands twice. So the server decides whose turn it is, and the rule is short: one agent at a time, and a PC always wins. A phone identifies itself as a phone, and if a PC is active, it waits on standby and receives no commands. If the PC stops, the phone can take over.
Keeping this decision on the server means neither device has to guess what the other is doing. This behaviour is covered by its own automated test.
This came straight after HR Admin arrived in the app, a single sign-in with role-based native screens for approvals, people, punches and reports, opened behind fingerprint or face. KMI Connect itself covers much more than HR, and its HRM module is the part I built.
When two devices can do the same job, do not let them negotiate. Give one authority the decision and a simple rule for who wins.