Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FC17 Read Server ID (0x11) #11

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Add FC17 Read Server ID (0x11) #11

merged 1 commit into from
Jan 7, 2024

Conversation

aldas
Copy link
Owner

@aldas aldas commented Jan 7, 2024

This PR adds FC17 (0x11) Read Server ID, Requested by aldas/modbus-tcp-client#55 (comment)

// ReadServerIDRequestRTU is RTU Request for Read Server ID function (FC=17, 0x11)
//
// Example packet:  0x10 0x11 0xcc 0x7c
// 0x10 - unit id (0)
// 0x11 - function code (1)
// 0xcc 0x7c - CRC16 (6,7)
// ReadServerIDResponseRTU is RTU Response for Read Server ID (FC=17) 0x11
//
// Example packet: 0x10 0x11 0x02 0x01 0x02 0x00 0x01 0x02 0xd5 0x43
// 0x10 - unit id (0)
// 0x11 - function code (1)
// 0x02 - byte count for server id (2)
// 0x01 0x02 - N bytes for server id (device specific, variable length) (3,4)
// 0x00 - run status (5)
// 0x01 0x02 - optional N bytes for additional data (device specific, variable length) (6,7)
// 0xd5 0x43 - CRC16 (n-2,n-1)

@aldas aldas merged commit 12b8e62 into main Jan 7, 2024
3 checks passed
@aldas aldas deleted the add_fc17 branch January 7, 2024 19:14
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.

None yet

1 participant