Skip to content

Add Read Device Identification support (function code 0x2B)#214

Merged
rquackenbush merged 1 commit into
NModbus:masterfrom
Fananos:feature/read-device-identification
Apr 16, 2026
Merged

Add Read Device Identification support (function code 0x2B)#214
rquackenbush merged 1 commit into
NModbus:masterfrom
Fananos:feature/read-device-identification

Conversation

@Fananos

@Fananos Fananos commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Implement Modbus Read Device Identification (MEI type 0x0E) per Modbus Application Protocol V1.1b3, section 6.21.

New API:

  • IModbusMaster.ReadDeviceIdentification(slaveAddress, category, objectId)
  • IModbusMaster.ReadBasicDeviceIdentification(slaveAddress)
  • Async variants of both methods

Supports all four device ID categories (Basic, Regular, Extended, Individual) and parses variable-length object responses including vendor name, product code, and revision information.

Includes EnhancedModbusRtuTransport for handling variable-length Device ID responses that cannot be determined from the response header. Use ModbusFactoryExtensions.CreateRtuMasterWithDeviceId() to create a master with Device ID support.

New files:

  • Message/ReadDeviceIdRequest.cs
  • Message/ReadDeviceIdResponse.cs
  • Data/DeviceIdCategory.cs
  • Data/DeviceIdentificationHelper.cs
  • Device/MessageHandlers/ReadDeviceIdentificationService.cs
  • IO/EnhancedModbusRtuTransport.cs
  • ModbusFactoryExtensions.cs

Implement Modbus Read Device Identification (MEI type 0x0E) per
Modbus Application Protocol V1.1b3, section 6.21.

New API:
- IModbusMaster.ReadDeviceIdentification(slaveAddress, category, objectId)
- IModbusMaster.ReadBasicDeviceIdentification(slaveAddress)
- Async variants of both methods

Supports all four device ID categories (Basic, Regular, Extended,
Individual) and parses variable-length object responses including
vendor name, product code, and revision information.

Includes EnhancedModbusRtuTransport for handling variable-length
Device ID responses that cannot be determined from the response
header. Use ModbusFactoryExtensions.CreateRtuMasterWithDeviceId()
to create a master with Device ID support.

New files:
- Message/ReadDeviceIdRequest.cs
- Message/ReadDeviceIdResponse.cs
- Data/DeviceIdCategory.cs
- Data/DeviceIdentificationHelper.cs
- Device/MessageHandlers/ReadDeviceIdentificationService.cs
- IO/EnhancedModbusRtuTransport.cs
- ModbusFactoryExtensions.cs
@rquackenbush rquackenbush merged commit 82b6163 into NModbus:master Apr 16, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants