Connecting a Phone or Tablet to the Operator App
|
<< Click to Display Table of Contents >> Navigation: Reference Section > Installation and Deployment > Touchcut Integration (STP) > The PrimeCut Operator App > Setting up the Operator App > Connecting a Phone or Tablet to the Operator App |
What the device needs
The Operator App is a web page served by the STP service on the PrimeCut server. A phone or tablet reaches it the way it reaches any other server on the works network, so it needs three things:
·an address on the same network as the PrimeCut server, or a route to it
·a way to turn the server name into an address, if you reach the server by name rather than by its IP address
·trust in the server's certificate, which is covered in Setting up the Operator App
The first two normally happen by themselves the moment the device joins the right Wi-Fi network. This topic is for the times they do not, and for the questions that come up when someone suggests typing a static address into the tablets.
The default gateway is rarely the problem. The gateway is the router a device uses to reach other networks. Traffic between a tablet and a server on the same network never goes through it, so a wrong or missing gateway does not stop the Operator App on the same network. It stops internet access, and it stops reaching servers on other networks. Only when the tablets are on a different network from the server, a separate Wi-Fi network or VLAN for example, does the gateway carry the Operator App traffic, and then the router in between must also be allowed to pass it.
1. Join the works Wi-Fi and let the network do the rest
When a device joins a network it asks, by broadcast, for an address. The network's DHCP server answers with the address, the subnet mask, the default gateway and the DNS server in one reply. There is nothing to type on the device, and the gateway is part of what the device is given, not something it chooses or asks. A device cannot take its address automatically but pick its own gateway: on both iPhone and Android the IP settings are either entirely automatic or entirely manual.
To see what the device was given:
·iPhone or iPad: Settings, Wi-Fi, then the (i) beside the network. IP Address, Subnet Mask and Router are listed under IPV4 ADDRESS.
·Android: Settings, Network & internet, Internet, then the gear beside the network. The IP address and gateway are listed under the network details. Menu names vary between makers and versions.
Compare the device's address with the server's. On a typical works network with a subnet mask of 255.255.255.0 the first three numbers must match, for example a tablet on 192.168.1.57 and a server on 192.168.1.20. If they match, the two are on the same network and the gateway plays no part in reaching the server.
Guest and isolated Wi-Fi. Many shop and guest Wi-Fi networks let devices reach the internet but not each other, or sit on a separate network from the office servers. The symptom is a tablet with working internet that can never open the server page. Nothing on the tablet fixes this. Put the tablet on the same Wi-Fi network as the office computers, or have whoever runs the network allow the tablet's network to reach the PrimeCut server.
2. Try the server's IP address first
Before chasing names, prove the network path. On the server, run ipconfig in a command prompt and note the IPv4 address. On the device, open the browser and go to the address directly:
https://192.168.1.20:8443/primecut-gui/operator/
with your own server address and port. If the sign-in page appears, the network is fine and anything still wrong is the name or the certificate. If it does not, the problem is the network, and the sections above are where to look.
The certificate STP makes for itself names the server's network addresses as well as its name, so reaching it by IP address is trusted once the certificate is installed on the device. It names the addresses the server had when the certificate was made. If the server's address changes, the certificate is stale: delete it so STP makes a new one at its next start, as described in Setting up the Operator App.
Fix the server's address, not the tablets'. If operators reach the app by IP address, or bookmark it, the server must keep the same address. Give the server a DHCP reservation at the router or DHCP server, or a static address, and leave the tablets on automatic. A tablet does not need a fixed address to reach a server.
3. Reaching the server by name
A name only works if the DNS server the device was handed knows that name. Names that work on every PC in the building can still fail on a phone, for these reasons:
·No internal DNS. If the DHCP server hands out a consumer router or a public resolver such as 8.8.8.8 as the DNS server, it has never heard of your server and the name will never resolve. Use the IP address, or have a name for the server added to the DNS the network hands out.
·Short name versus full name. A Windows server registers its full name, for example SERVER.company.lan. Windows PCs add the domain suffix to a short name automatically; Android does not do this reliably. Use the full name on the device.
·Domains ending in .local. Phones and tablets treat any name ending in .local as a Bonjour or mDNS lookup, not a DNS lookup, so the full name of a server in a Windows domain called something.local may fail on the device precisely because it is fully qualified. This is not a fault on your side. Use the IP address, or a name under a different suffix.
·Android Private DNS. Settings, Network & internet, Private DNS. If it is set to a named provider rather than Automatic, every lookup bypasses the local DNS server and internal names silently never resolve.
Whatever name you settle on must be the one written into DomainNameForCertificate in STPService.ini, or the browser will warn about the certificate even though it is installed. See Setting up the Operator App.
4. Giving a device a fixed address by hand
This is the fallback, for a network with no DHCP server or when whoever runs the network asks for it. It is all or nothing: the device will not accept an address without the mask and gateway to go with it. Get all of these from whoever manages the network before you start:
·a free IP address on the server's network that no other device uses and that the DHCP server will not hand out
·the subnet mask, or on Android the prefix length (255.255.255.0 is a prefix length of 24)
·the default gateway
·a DNS server, if the server is to be reached by name
iPhone or iPad
14Settings, Wi-Fi, then the (i) beside the network.
15Under IPV4 ADDRESS tap Configure IP and choose Manual.
16Enter IP Address, Subnet Mask and Router, then tap Save.
17If a DNS server is needed, tap Configure DNS, choose Manual and add it. DNS is the one setting an iPhone lets you set by hand while keeping the address automatic.
Android
18Settings, Network & internet, Internet, then the gear beside the network and the pencil or Edit control.
19Open Advanced options and change IP settings from DHCP to Static.
20Enter IP address, Gateway, Network prefix length, DNS 1 and DNS 2, then tap Save. All of them are required.
Menu names differ between makers and versions of Android, but the setting is always on the saved network, never on the device as a whole.
A manual address is set per Wi-Fi network and is lost if the network is forgotten or the device is reset. Two devices given the same address knock each other off the network, so keep a list of the addresses you hand out. A DHCP reservation at the server end, keyed to the tablet's Wi-Fi hardware address, gives the same fixed address without any of this, but note that Private Wi-Fi Address on iPhone and Randomised MAC on Android are on by default and present a made-up hardware address per network. Turn that off for the works network, or reserve against the address the device actually shows.
Things that look like faults and are not
What you see |
What it means |
Internet works on the tablet, the server page never loads |
The tablet is on a guest or isolated Wi-Fi network, or a different network from the server. Compare the addresses; move the tablet to the works Wi-Fi. |
Works by IP address, not by name |
A DNS problem, not a server problem. Use the full server name, avoid a .local suffix, and check Android Private DNS is Automatic. |
Works on every PC, not on any phone |
The name is a short name or ends in .local. PCs fill in the suffix and use real DNS; phones do neither. |
Worked yesterday, not today |
The server was given a new address by DHCP. Reserve its address, and delete the old certificate so STP makes one that names the new address. |
The gateway on the tablet is blank or wrong |
Irrelevant if the tablet and server are on the same network. It only matters for reaching other networks and the internet. |