Monitor one Serial1 not reading needed data

I am using a Monitor 1 to communicate with a RS232 to TTL adapter. Tx is tied to Tx and Rx to Rx. I connected to a CP2102n at the same baud rate, and same UART configuration with no software or hardware flow control. The CP2102 was able to read the data from the RS232 device with no issues, and the Monitor 1 was able to read data from the CP2102 with no issues, but the Monitor 1 will not read from the RS232 device. Here is a snippet of code:

SerialBuffer<32768> serBuf(Serial1);

void setup() {
  Serial1.begin(115200, SERIAL_8N1);
  serBuf.setup();

  TrackerConfiguration config;
    config.enableIoCanPower(true);
    config.enableIoCanPowerSleep(true);
  Log.info("Serial1 and CAN_PWR enabled.");

  Edge::instance().init(config);
}

void loop() {
  char c = serBuf.read();
  char nodata = -1;
  if (c != nodata) {
    std::string msg = std::string("Serial Data: ") + std::string(c);
    Log.info(&msg[0]);
  }
}

I'm confused about how you connected that, could you post a diagram?

What did you use for the RS232 to TTL adapter when you removed the CP2012 and how did you power it?

This is the RS232 Adapter I am using:

I have the Tx of the M1 to Tx of adapter, Rx to Rx, Gnd to Gnd, and Vcc of adapter to 3.3V (I don't have a diagram at the moment)

The CP2102 USB to UART adapter was just used to confirm the 232 device and adapter were communicating over UART as expected. and then to ensure that Serial1 was working on M1.

If I'm understanding this correctly, it works when you use the CP2012 to communicate with the target device. And also when you use the CP2012 to communicate with the Particle device.

The Particle device is the DTE, and CP2012 is usually the DCE, so they can communicate. But since both the Particle device and your target device are DTE, you need a RS232 null modem adapter between them for those two to communicate because neither device is a DCE. Basically the DB9 null modem just crosses pins 2 and 3 if you are not using flow control.

Thank you for your help! I was able to get it figured out. I had a null modem cable but the issue was with the RS232 device not initializing communication so it had to be one on the M1 side.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.