How-to
Connecting an HMI to the Internet With a Cellular Router
Short answer
Give the cellular router an unused static address in the machine's existing subnet, disable its DHCP server, and point the HMI's default gateway at it so one Ethernet port carries both PLC traffic and remote access. The deciding check is whether the router address, after the subnet mask, lands in the machine's network.
On this page
- Why do USB cellular dongles fail on a panel that worked with a hotspot?
- Do I have to change every device address to match the router?
- Can one Ethernet port carry PLC traffic and Internet traffic?
- What address and settings does the router's LAN side need?
- How do I configure the router and the panel step by step?
- How do I test the three paths separately?
- Is it safe to give the machine an Internet route?
- Questions asked
Set the router's LAN interface to an unused static address in the machine's existing subnet — 192.168.1.200 with mask 255.255.255.0 in the worked example below — disable its DHCP server, and enter that same address as the HMI's default gateway in the panel's network settings. That is the whole change: the HMI and PLC keep their addresses, one Ethernet port carries both PLC traffic and the remote-access connection, and no USB dongle is involved. This article covers why unlisted dongles fail, the subnet arithmetic that decides which router address works, the configuration steps in order, and the tests that isolate each path when something does not connect.
Why do USB cellular dongles fail on a panel that worked with a hotspot? #
The dongles failed because USB attaches the device while the panel firmware still has to recognize its network interface, and only dongles on the vendor's supported list are documented to provide that interface. The working installation used a battery hotspot with a SIM on the panel's USB port; the failing one tried three different 3G dongles. Those are not equivalent tests. The hotspot exposed a network interface the panel accepted; each dongle either exposed none or one the firmware did not recognize. Signal bars on the dongle prove only the modem side, never the panel side.
Weintek documents a supported list of 3G/4G dongles for its remote-access service. Dongles outside the list sometimes work, but that result belongs to that exact dongle on that exact panel — it does not transfer to the next one you buy, so every unlisted substitution repeats the same gamble.
The decision: if a dongle you already own appears on the supported list, use it and set the connection options that entry documents. Otherwise stop substituting dongles and put a cellular router on the machine LAN. The router does the modem work in equipment built for it and hands the panel an ordinary Ethernet gateway, which is what the rest of this article configures.
Do I have to change every device address to match the router? #
No: the machine keeps its addresses and the router moves instead — set its LAN interface to an unused static address inside the existing subnet so the change touches one device rather than every device on the switch. A router arrives with a factory LAN address and DHCP enabled on some other network; fitting the router to the machine is a one-device change, while renumbering the machine touches the panel, the PLC, and the PLC address stored in the HMI project. The cellular side of the router — SIM, operator settings, the mobile network's own addressing — is a separate network that the machine never sees and never adopts.
Can one Ethernet port carry PLC traffic and Internet traffic? #
Yes: the panel compares every destination address against its own address and subnet mask, sends matches out the local switch and everything else to its default gateway, so one port does both jobs. Until now the panel had no gateway because its only peer, the PLC, sat on the same network; adding a gateway changes nothing about local delivery. The same rule seen from a computer's side is routing browser access to a fixed-IP HMI over two subnets.
Worked example, illustrative addresses — HMI 192.168.1.10, PLC 192.168.1.20, mask 255.255.255.0 on both:
- 192.168.1.10 AND 255.255.255.0 = 192.168.1.0
- 192.168.1.20 AND 255.255.255.0 = 192.168.1.0
- Candidate router LAN address 192.168.1.200 AND 255.255.255.0 = 192.168.1.0
All three masked results equal 192.168.1.0, so a router at 192.168.1.200 is local to both the panel and the PLC. The mask 255.255.255.0 passes the first three octets unchanged and zeroes the fourth; that fourth octet offers 256 addresses, minus the network address and the broadcast address leaves 254 usable, 192.168.1.1 through 192.168.1.254, and .200 sits unused inside that range.
Now the same router as shipped, at 192.168.0.1 with the same mask: 192.168.0.1 AND 255.255.255.0 = 192.168.0.0, and 192.168.0.0 is not 192.168.1.0. The digits look nearly identical, but under the mask they are different networks, so the panel would hand traffic for the router's own address to a gateway it does not have, and the address is unreachable. The masked comparison — never the count of matching leading digits — is the check that decides whether a router address works.
What address and settings does the router's LAN side need? #
Give the LAN interface an unused static address with the machine's own subnet mask, turn DHCP off, and leave the cellular side on the operator's settings: those four settings are everything the router's LAN side needs. Confirm the chosen address is truly free before configuring it — a duplicate shows up later as intermittent connectivity that began the moment the router was connected. Disable the DHCP server, because with static addresses everywhere the only thing it could hand out is wrong settings to a device that asks.
Connect a router LAN port to the existing switch and leave the HMI and PLC on their current ports. A router with two Ethernet sockets can carry the panel on one and the PLC on the other only when both sockets are documented as bridged LAN ports; a socket designated for the WAN or cellular uplink is not part of the machine LAN, so read the port assignment in the router documentation before moving anything off the switch.
How do I configure the router and the panel step by step? #
Record everything first, then change the router, then the panel, then test: those steps in that order keep local production traffic alive the whole time, because the only setting that touches the HMI is the default gateway entered near the end.
- Record the HMI and PLC addresses, subnet masks, and current gateway settings, and save the HMI project and the PLC configuration.
- Compare the router's factory LAN network against the machine subnet with the masked check above; if it would collide, plan the new LAN address before the router ever reaches the switch.
- Open the router's local management page through its documented default connection and set the LAN interface to the unused static address in the machine subnet, with the same mask the HMI uses.
- Disable the DHCP server on the LAN side.
- Configure the SIM and the cellular session: PIN removed, APN and credentials as the operator requires. Confirm network registration and an active data session on the router's status page.
- Connect a router LAN port to the machine switch.
- In the panel's network settings, set the default gateway to the router's LAN address and enter a reachable DNS resolver — the router's own, if it provides one, or a public resolver.
- Leave the PLC address in the HMI project and the PLC's own address unchanged.
- Confirm local operation before testing remote access.
How do I test the three paths separately? #
Test HMI-to-PLC first, HMI-to-router second, router-to-Internet third, because a failure in one path says nothing about the others and a panel can run its screens normally while having no usable Internet route.
| Path | Confirmed by | Most likely failure |
|---|---|---|
| HMI to PLC | Live values update with no communication alarm | Duplicate address introduced with the router |
| HMI to router | A laptop with a static machine address opens the router's management page | LAN address or mask outside the machine subnet |
| Router to Internet | Router status shows registration and a data session; the laptop pings a public address | SIM service, operator settings, or signal |
| Name resolution | The laptop pings a name after the numeric address worked | DNS resolver unreachable from the panel |
A laptop with one static address inside the machine subnet is the test instrument for the middle two rows. Ping a numeric public address first and a name second: if the number answers and the name does not, routing works and DNS does not. A remotely served HMI showing the same local-versus-remote split is HMI Modbus TCP working locally but not over cellular. A service that cycles between connecting and disconnected is the classic wrong-subnet symptom, and a SCADA gateway cycling between connecting and disconnected over a subnet mismatch shows the same masked check applied there.
Is it safe to give the machine an Internet route? #
Treat the router as the security boundary: keep the vendor's remote service as the access path instead of open inbound port forwarding, because every port forwarded to the panel is reachable from the whole Internet. With EasyAccess, the panel holds its own outbound connection to the vendor's service, so the router forwards nothing inbound. If a service needs direct reach — VNC or the panel's web server — which TCP ports to forward for remote Weintek HMI access names the ports involved; forward only those, restrict the sources allowed to use them, and change the router's default management password. Give the PLC a gateway only when the PLC itself must answer from beyond the subnet, and then it is the same router LAN address.
Questions asked
Does the PLC need a default gateway after this change?
Only if something must reach the PLC from outside the machine subnet. While the HMI carries all the remote-access traffic, the PLC keeps an empty gateway. If you later want remote programming or SCADA polling through the cellular router, set the PLC gateway to the router's LAN address as well; local HMI-to-PLC traffic never uses a gateway either way.
Could I leave DHCP on and renumber everything onto the router's network instead?
You could, but you would renumber the panel and the PLC and then edit the PLC address inside the HMI project before downloading it again, all to avoid setting one static address on the router. The static method touches one device; the DHCP method touches every device plus the project file, so use it only when the machine subnet genuinely has to change.
How do I check a dongle against the supported list before buying another one?
Write down the dongle's exact model and the panel's installed firmware, then compare both against the vendor's supported 3G/4G dongle documentation. A dongle that registers on the cellular network has proven only its modem side; the panel still has to recognize the dongle's network interface, which is what the list certifies. Off-list dongles sometimes work, but that result does not transfer between models.
Do I need to forward ports on the cellular router for remote access?
No inbound forwarding is needed when the panel makes its own outbound connection to the vendor's remote service, which is how EasyAccess works. Port forwarding is the alternative that exposes the panel directly; if you use it for VNC or a web service, forward only the documented TCP ports and restrict the source addresses allowed to connect.