Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • While using ReadSerialTest inside the package com.serotonin.modbus4j.test, I am getting the error mentioned below for Modbus RTU over RS232.

    Actually the software doesn't transmit any data over RS232. Hence its receiving a null pointer exception on the receive side.
    Output stream this.out is null, not assigned.
    public StreamTransport(InputStream in, OutputStream out) {
    this.out = out; = in;

    What could be the reason. Please help me to resolve the problem.

  • Hi libu7alex,

    1. ReadSerialTest throws a null pointer because TestSerialPortWrapper returns nulls for its input and output streams. That looks like a bug in the test, and shouldn't affect the larger issue you seem to be asking about, so,

    2. I believe you're writing code to use Modbus4J? We offer limited free support for this.

    3. You are providing the SerialPortWrapper to the Modbus master you're creating an instance of, correct? If so you should set a breakpoint in your serial port wrapper and see what happens in the serial library you're wrapping for the 232 setup you're testing when it tries to get the input or output stream from your wrapper.