Good evening, I'm new to the forum, and I'm also an arduino beginner. I have a problem, with Serial software I have to connect via serial rs 232 to a control unit, via max3232. The ports I use for serial software are (rx 6 / tx 7). I think the connection is correct, if I check with (serial port Monitor) connected with (USB -> RS232) to arduino, everything works perfectly. If I make the connection (USB -> RS232) to the control unit, and I query the control unit with command lines via Serial Port Monitor everything works, but when I send the string via software with arduino and max3232 the control unit does not respond, but I can receive only. Thanks in advance who can give me an answer.
Welcome to the forum
Do you think it might help diagnose the problem if you posted your sketch ?
Thanks for the answer to the question this is the sketch of the code, all very simple, but I can't get the ECU to start.
#include <SoftwareSerial.h>
SoftwareSerial serial_1(6, 7);
void setup() {
Serial.begin(38400);
delay(1000);
serial_1.begin(38400);
delay(1000);
Serial.print("connected serial");
serial_1.write (":?y"); //listening unit string
delay(500);
serial_1.write (":T0000000008v"); //string request data to the control unit
}
void loop() {
if (serial_1.available()) {
Serial.write (serial_1.read());
}
if (Serial.available()) {
serial_1.write (Serial.read());
}
}
1 Like
Which Arduino do you have, as software serial at 38400 baud may be a bit too fast?
I am using Arduino Uno, but in reception, I can see the data of the control unit. But first I make the request to the control unit with Serial Port Monitor.
I also tried with esp8266 node mcu, but the same thing happens.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.