The internal bus of the Smart Lamp Locator, joining the RTLS module to the cap lamp controller — and through it to the gas sensors, buttons and display.
Modbus RTU is the main interface between the Smart Lamp Locator and a cap lamp controller — either the native Smart Lamp controller or a third-party cap lamp controller the module is embedded into. It is the integration contract for both cases: a controller that speaks the register map below works with the module without firmware changes on either side.
The cap lamp controller is the master; the RTLS module is a slave. This is the reverse of what the naming might suggest — the module does not poll the lamp, the lamp polls the module.
| Protocol | Modbus RTU, CRC-16 |
| Bit rate | 1200 baud |
| Module address | 0x11 |
| Controller address | 0x34 |
| Register file | 48 registers, 16-bit |
| Maximum frame | 128 bytes |
1200 baud is deliberate. The payload is a handful of registers a second, the cable run is centimetres, and the environment is a mining cap lamp — a slow bit rate buys noise immunity and low emissions where nothing needs speed.
| Code | Function | Direction | Carries |
|---|---|---|---|
0x03 | Read Holding Registers | lamp reads the module | commands for the lamp, display text |
0x10 | Force Multiple Registers | lamp writes to the module | gas readings, button and alarm events |
0x08 | Test | — | loopback |
0x11 | Report Slave ID | — | identification |
Errors use the standard exception mechanism: illegal function, illegal data address, illegal data value, and a CRC failure code.
| Register | Content |
|---|---|
0 | Alarm acknowledgement state |
1 | Methane concentration |
2 | Methane sensor status word |
3 | CO concentration or temperature — see below |
4 | CO sensor status word |
5 | Methane alarm threshold |
6 | CO alarm threshold |
7 | Battery estimate — methane / CO builds |
9, 10 | Pressure, high and low words |
11 | Battery estimate — methane / pressure / temperature builds |
12 | Command to the controller |
13… | Message text, two characters per register |
Two registers move depending on the fitted sensor option. Register3carries CO concentration on a CO build and temperature on a methane-pressure-temperature build. The battery estimate is at register7on most builds and register11on a methane-pressure-temperature build. A decoder must know theSL_CONFIGoption before it can read either — see Gas Sensors.
Wire register numbers are offset from these positions — the master's numbering and the module's internal array do not share an origin, and the shift differs between the read and write paths. Work from the function code, not from an assumed one-to-one mapping.
Registers 2 and 4 are split by byte: the high byte reports sensor health and the low byte reports the threshold state.
| High byte | Sensor health |
|---|---|
0 | OK |
1 | Zero point not set |
2 | Not calibrated |
3 | Low sensitivity |
4 | Malfunction |
16 | Warming up |
| Low byte | Threshold |
|---|---|
0 | Concentration normal |
1 | Concentration exceeded |
This is the same word that surfaces as MethaneALM and COALM in MQTT, which is why testing bit 0 works for the alarm and comparing the whole word to 1 does not — a sensor that is warming up or uncalibrated carries a non-zero high byte while its threshold state is perfectly normal.
Register 12 is split the same way. The high byte is a command for the lamp:
| Value | Command |
|---|---|
0x01 | No command |
0x02 | Turn the tag off |
0x03 | Turn the gas sensors off |
0x04 | Turn the tag on |
0x05 | Sensor status request |
0x06 | Free the bus |
0x07 | Clear the network icon |
0x08 | Show the network icon |
The low byte says what kind of message follows in the text registers:
| Value | Message type |
|---|---|
0x00 | None |
0x01 | Alarm — shown as a banner |
0x05 | Proximity notification |
0x80 | Text message |
The network icon commands are how the wearer knows the lamp still has a link: the module owns the WiFi connection, so only it can tell the lamp whether to show the icon.
Written by the lamp with function 0x10:
| Code | Event |
|---|---|
0x0001 | Text message acknowledged by the wearer |
0x0002 | Alarm acknowledged by the wearer |
0x0003 | Alarm raised |
0x0004 | Alarm cancelled |
0x0005 | RTLS confirmed |
0x0006 | Proximity notification acknowledged |
0x0007 | Switch WiFi to ECO mode |
0x0008 | Turn WiFi off |
The acknowledgement codes are what become AckSMS, AckReadSMS, AckALM and AckReadALM on MQTT. A wearer pressing a button on the lamp raises a Modbus write, which the module turns into a receipt on the uplink — the two protocols are ends of one path.
The power-management codes travel the same way. The lamp, not the module, decides when to move WiFi into ECO mode or shut it down, because the lamp is the part that knows about the battery and the shift.
Message text occupies the registers from 13 upward, two characters per 16-bit register — first character in the high byte, second in the low. The text budget is 70 bytes.
A message arriving from the server on /InSms is decoded by the module, written into these registers with the appropriate type in the low byte of register 12, and read out by the lamp on its next poll. Proximity warnings are generated on the module itself and travel the same path.