Today is...
Monday, July 22, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
Wiring and programming your servos and I/O just got a lot easier...
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Changing Modbus MBAP Header
Is there a way to define the MBAP header (ADU) themselves? I want to send: 40 02 AA BB always as Header.

Hi Guys, I need your help.

Is there a way to define the MBAP headers themselves?
I want to send:

Request: 40 02 AA BB 00 06 FF 03 00 10 00 08

Can you tell me how to illustrate it over TCP protocol. A short
description or code example would be very helpful.

μC only responds to packet if this in the MBAP header (ADU) one
owns certain value / certificate.
Transaction ID (MBAP header) = 0x40 0x02
Protocol ID (MBAP header) = 0x20 0xAB

otherwise the package will be discarded.
How can I simulate such a package?

Best regards
Oemer Sonne