Modbus Function Code 43 (0x2B): Read Device Identification Specification & Hex Guide
Automated asset discovery, firmware tracking, and controller verification are essential in modern industrial automation and SCADA systems. While legacy installations often rely on vendor-proprietary registers or unstandardized FC 17 queries, the official Modbus Application Protocol Specification V1.1b3 defines a standardized mechanism: Function Code 43 (0x2B in hex) — Encapsulated Interface Transport (MEI), specifically MEI Type 14 (0x0E) — Read Device Identification.
Unlike legacy queries, Function Code 43 provides structured, object-oriented device metadata—including Vendor Name, Product Code, Major/Minor Firmware Revision, and Model Name—complete with standardized pagination, conformity levels, and support for both streaming and individual object retrieval. This comprehensive technical guide details the protocol frame structure, object ID hierarchy, Python implementation, and simulation workflows using ModbusSimulator.
1. Protocol Architecture & MEI Encapsulation
Modbus Function Code 43 is designed as a tunneling mechanism called Modbus Encapsulated Interface (MEI). Rather than creating separate function codes for every diagnostic protocol extension, Modbus encapsulates sub-protocols under function 0x2B using a 1-byte MEI Type field:
- MEI Type
0x0D(13 Dec): CANopen general reference communication. - MEI Type
0x0E(14 Dec): Read Device Identification (the subject of this guide).
| Field | Byte Length | Hex Value | Engineering Description |
|---|---|---|---|
| Function Code | 1 Byte | 0x2B (43 Dec) |
Encapsulated Interface Transport (Public Function Code) |
| MEI Type | 1 Byte | 0x0E (14 Dec) |
Read Device Identification sub-protocol identifier |
| Read Device ID Code | 1 Byte | 0x01 to 0x04 |
Access category (Basic, Regular, Extended, or Individual) |
| Object ID | 1 Byte | 0x00 to 0xFF |
Starting object ID for stream access, or specific object ID for individual access |
2. Standardized Device Identification Objects Hierarchy
The specification partitions device parameters into three sequential categories, each containing standardized ASCII string objects:
| Object ID | Object Name | Category | Mandatory / Optional | Example Value |
|---|---|---|---|---|
0x00 |
VendorName | Basic (0x01) | Mandatory | "Schneider Electric" / "ModbusSimulator" |
0x01 |
ProductCode | Basic (0x01) | Mandatory | "M340-BMX-P342020" |
0x02 |
MajorMinorRevision | Basic (0x01) | Mandatory | "V3.40.1" |
0x03 |
VendorUrl | Regular (0x02) | Optional | "https://modbussimulator.com" |
0x04 |
ProductName | Regular (0x02) | Optional | "Modbus Server Engine" |
0x05 |
ModelName | Regular (0x02) | Optional | "MB-SIM-PRO-2026" |
0x06 |
UserApplicationName | Regular (0x02) | Optional | "Turbine_Telemetry_Node_04" |
0x80..0xFF |
Vendor-Specific | Extended (0x03) | Optional | Calibration date, MAC address, serial strings |
3. Request and Response Hex Frame Analysis
Understanding raw hexadecimal byte frames is vital when inspecting Wireshark captures, serial analyzer logs, or troubleshooting client driver rejections.
Request Hex Frame (Basic Stream Access)
In Modbus RTU, querying a slave at address 0x01 for Basic Device Identification starting at Object 0x00:
[Slave ID] [FC] [MEI] [Read ID] [Object ID] [CRC-16]
01 2B 0E 01 00 70 77
Response Hex Frame Breakdown
When the target server responds, it returns the conformity level, pagination flag, object count, and length-prefixed ASCII objects:
01 2B 0E 01 01 00 00 03 00 0F 4D 6F 64 62 75 73 53 69 6D 75 6C 61 74 6F 72 01 08 4D 42 53 2D 32 30 32 36 02 06 76 32 2E 34 2E 30 [CRC16]
01: Slave Address (1)2B: Function Code 430E: MEI Type 14 (Read Device Identification)01: Read Device ID Code (Basic Stream)01: Conformity Level (0x01 = Basic stream access supported)00: More Follows (0x00 = No more fragments follow; all objects returned)00: Next Object ID (0x00 because no more objects follow)03: Number of Objects returned (3)00 0F 4D 6F...: Object ID 0x00 (VendorName), Length 15 (0x0F), ASCII "ModbusSimulator"01 08 4D 42...: Object ID 0x01 (ProductCode), Length 8 (0x08), ASCII "MBS-2026"02 06 76 32...: Object ID 0x02 (MajorMinorRevision), Length 6 (0x06), ASCII "v2.4.0"
4. Python Implementation: Querying FC 43 with Pymodbus
The following industrial Python script demonstrates how to query and decode Modbus Function Code 43 using pymodbus over Modbus TCP:
from pymodbus.client import ModbusTcpClient
def query_device_identification(host='127.0.0.1', port=502, unit_id=1):
client = ModbusTcpClient(host, port=port)
client.connect()
# Read Device Information: read_code=1 (Basic), object_id=0
response = client.read_device_information(read_code=1, object_id=0, unit=unit_id)
if not response.isError():
print("=== Modbus Device Identification ===")
vendor = response.information.get(0, b'').decode('utf-8', errors='ignore')
product_code = response.information.get(1, b'').decode('utf-8', errors='ignore')
revision = response.information.get(2, b'').decode('utf-8', errors='ignore')
print(f"Vendor Name: {vendor}")
print(f"Product Code: {product_code}")
print(f"Firmware Revision: {revision}")
else:
print(f"Query Failed: {response}")
client.close()
if __name__ == '__main__':
query_device_identification()
5. Testing Function Code 43 with ModbusSimulator
When developing SCADA drivers, DCS systems, or IoT edge gateways, verifying device identification responses without physical hardware prevents costly plant commissioning delays. With ModbusSimulator, automation engineers can:
- Configure virtual Modbus TCP servers on any network port (default 502) or RTU serial COM port.
- Define custom ASCII strings for VendorName (0x00), ProductCode (0x01), and MajorMinorRevision (0x02).
- Simulate pagination scenarios by toggling the "More Follows" flag across multiple frames.
- Inject exception responses (e.g., 0x01 Illegal Function or 0x02 Illegal Data Address) to test supervisory failover logic.
Test Modbus RTU & TCP Protocols with Precision
Download ModbusSimulator for Windows. Features dual Master and Slave simulators, visual register monitors, and protocol compliance analyzers.
Download Free 30-Day TrialFrequently Asked Questions
What is Modbus Function Code 43 (0x2B)?
It is the Encapsulated Interface Transport (MEI) function in the official Modbus standard, used with MEI Type 14 to read device identification strings like Vendor Name, Product Code, and Revision.
Why use Function Code 43 over Function Code 17?
FC 17 is a legacy serial command with unstandardized vendor data formatting. FC 43 / MEI Type 14 is fully standardized across both RTU and TCP with structured Object IDs, lengths, and conformity levels.
What happens if a device does not support FC 43?
If a slave or server controller does not support FC 43, it returns Modbus Exception Code 0x01 (Illegal Function). If it supports MEI but not Type 14, it returns Exception 0x03 (Illegal Data Value).
Does ModbusSimulator support Function Code 43 simulation?
Yes. ModbusSimulator enables full simulation of Function Code 43 / MEI 14 with custom ASCII strings, conformity levels, and raw packet frame logging.