How to get a serial terminal emulator in linux to ignore RTS & DTR?
1
vote
1
answer
2446
views
I purchased a generic 8-pin ESP8266 off Amazon. It came loaded with some "AT" command firmware that acted like a modem. I connected the module to an FTDI1232 which is a USB connected UART that acts like a serial port.
Here is the USB ID:
Bus 002 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
It appears as
This is basically the circuit I already had, but I **had to add the RTS & DTR lines** to complete this.
I created a very simple sketch like this
void setup(){
Serial.begin(115200); // 8 bit char, no parity, 1 stop bit
while(!Serial){};
}
void loop(){
int v = Serial.read();
if(-1 != v){
Serial.write((uint8_t)v);
}else{
delay(10)
}
}
This is a basic "echo" type sketch that should write back whatever is written to the device.
After uploading the sketch I can use the Tools -> Serial Monitor to interact with the sketch. I created a couple more, including one that transformed the data sent and then echo'd it back. They all work.
At this point CuteCom, didn't work at all. After much searching for the reason, I eventually looked at the implementation of the Serial Monitor in the java code. What I found is this line
!BaseNoGui.getBoardPreferences().getBoolean("serial.disableRTS"),
!BaseNoGui.getBoardPreferences().getBoolean("serial.disableDTR"));
From: https://github.com/arduino/Arduino/blob/ee1967cd530ceb9a1d638875e385157e90d532e8/arduino-core/src/processing/app/Serial.java#L68
It appears that basically each "board" (the nomenclature for the code that lets the SDK talk to the ESP8266 here) defines whether or not RTS & DTR should be enabled. The code then calls the jccs library to enable or disable RTS & CTS.
At this point I disconnected the lines from my ESP8266 that were connected to RTS & CTS. I was able to use CuteCom again to talk to my new sketch I had uploaded. However, I don't want to have to disconnect & reconnect my lines each time I program from the Arduino IDE.
Obviously it's possible to talk to the device without disconnecting them as the "Serial Monitor" in the Arduino IDE works just fine.
How can I get a serial terminal emulator in Ubuntu 14.04 that will let me ignore RTS & DTR? I'd also accept commands to put the port in this mode so it can be used with
/dev/ttyUSB0
in my system. I installed CuteCom on my Ubuntu 14.04 machine, selected a speed of 115200, no parity, 8 bit characters and 1 stop bit. I was able to communicate normally to send and receive data using CuteCom.
However, I don't really have much usage for this default firmware. I downloaded the latest version of Arduino IDE and then added in ESP8266 support via an additional core package.
To program this device, I connected the ESP8266 based off this diagram.

socat
or similar.
It's probably irrelevant, but here is a photo of the actual devices

Asked by Eric Urban
(163 rep)
Aug 27, 2018, 01:54 AM
Last activity: Jul 2, 2025, 05:05 AM
Last activity: Jul 2, 2025, 05:05 AM