/blog
CAN to 4G gateway with MQTT: the checks that decide the projectA gateway is bought for the years after installation, not for the day it arrives. These are the questions that decide whether it still fits in year three.
Q: CAN to 4G gateway with MQTT — what should it support?
A: MQTT over TLS with mutual authentication, a JSON payload agreed per project, 4G CAT.1 with 2G/3G fallback, and local buffering with a heartbeat so unchanged values are not billed. Field updates should be A/B FOTA with resume and automatic rollback.
A CAN to 4G gateway with MQTT is a small computer that sits between a machine bus and a broker. The machine bus is usually CAN 2.0B at 250 or 500 kbps, sometimes J1939-format message sets, sometimes RS232. The broker is yours. What matters is what the unit is allowed to change once it is in a machine in another country.
CAN to 4G gateway with MQTT for vehicle data
A CAN-to-4G gateway reads the bus and publishes over MQTT or HTTP; 4G CAT.1, GPS, change-triggered or periodic upload.
The gateway is the path for data that has to leave the machine: CAN or RS232 in, MQTT/HTTP out, 4G CAT.1 with GPS. Upload can be periodic or change-triggered, and the payload is documented so the platform team can decode it without a call. This is a data path, not a TPMS product - the TPMS side ends at the CAN frame.
What the uplink should look like
| Item | What to require |
|---|---|
| Transport | MQTT over TLS with mutual authentication — a client certificate, not just a password |
| Payload | A documented JSON object, agreed per project, so the platform maps its own field names |
| Upload trigger | Change-triggered with a heartbeat, so unchanged values are not billed |
| Offline behaviour | Local buffer while coverage drops; forward the history when the link returns |
| Cellular | 4G CAT.1, with fallback to 2G/3G where the network requires it |
| Positioning | GPS / BeiDou dual-mode, optional |
| Field update | A/B dual-partition FOTA with resume and automatic rollback |
What the JSON looks like
One record per upload, keyed by unit and timestamp. Values are plain numbers with units, not an opaque blob — that is what makes the platform side a configuration task instead of a development task.
{
"device": "GZ-<unit-id>",
"ts": 1762900000,
"gnss": {"lat": 22.51, "lon": 113.92},
"tyres": [
{"pos": 1, "kPa": 812, "degC": 41},
{"pos": 2, "kPa": 805, "degC": 40}
]
}
The exact names are agreed with you, because a platform that already renders a tyre widget wants its own keys, not ours.
Three checks before you buy
- What can be changed after shipping — interval, thresholds, payload, topic, firmware — and how. If the answer is "send it back", the unit is not ready for a machine in another country.
- What it does when it cannot reach the broker — how many records it holds, and what it reports about itself to make the gap visible.
- Who owns the payload definition — and whether changing it needs a new hardware order.
What this is not
It is not an OBD replacement and it does not need your CAN protocol document. We configure the unit against a list of values you want published; your definitions stay with you. Where a J1939 network is involved we have deployed J1939-format message sets in construction machinery integrations, and the layout is documented so it can be aligned to your DBC — but the alignment is a joint step, not a certification claim.
Certification status, stated plainly: CE in progress, not held. If a tender requires a certificate today, say so early.
Data sheet, interface list and a payload example on request — contact us (ralph@gz-can.com · +86 130 7692 2278).