Siements IoT2000/2040 COM Port Configuration

Hi all,

I’ve successfully set up Node-RED running on a Siemens IoT2040, including the node-red-contrib-modbus@2.5.0 node (the latest version gives errors) and am at the point where I’d like to test the Modbus comms using my usual Modbus device for testing.

I’ve wired the X30 COM port as per page 53 of the manual, where pin 1 is D-/B, pin 2 is D+/A and pin 5 is ground, using termination resistors on both ends (can confirm I’m happy with this as the same setup I use on all other RS485/modbus setups).

However, triggering a modbus read gives me a timeout. Page 46 of the same manual suggests that the COM port needs to be configured, to act as either RS232 or RS485, which I haven’t done:

You can use any COM port as an RS 232, RS422 or RS 485 interface through the software controlled interface parameter assignment. Possible parameters: "Auto-flow-control", "Onboard
termination", "Half-duplex" or "Full-duplex"

Termination can be set with the software.

This guide mentions the setup, using the iot2000setup tool, which I’m assuming isn’t provided in the default packages for the IoT20xx?

Has anyone experienced a similar issue and would therefore be able to offer some guidance? Thanks.


We never used iot2000setup tool but if you know where to find it, you could probably add it to your container and use it from there.

Thanks for the comment. Would you know how to configure the COM ports via the standard balena os? I wouldn’t know where to start, on the iot2000setup. Thanks.

This seems to be the basis of the iot2000setup tool:

I checked the script a little and based on your description you would need to run The problem is that it assumes some other tools in the container. For example switchserialmode. You will need to go through all that and figure it out exactly what you need in the container. Also the container will need access to the serial devices.

BTW. The tool I’m mentioning above comes from: