How to get 32u4 arduino to ignore DTR for USB Serial

arduinoatmegaftdiserial

32u4 based "USB Serial Ports" refuse to send data to the PC unless DTR on the PC software side is set to high. If the PC software does not set DTR to true (high?), then Serial.print() on Arduino goes into a black hole, and the software never gets the responses from the Arduino.

I need to get a third party software package to work with my Arduino Pro Micro based device. This software sets DTR to false, which works fine with many other devices. Aruino receives data from the PC just fine, it's only the arduino responses that are lost.

End result…the software can send commands to my device, but because the PC software does not set DTR to true (high?), my Serial.print() responses are not received…the 32u4 essentially blocks the responses because DTR is low…even though serial data is going TO the arduino.

PIC microcontrollers, and Arduino UNO's etc., don't require DTR to be set high on the PC side for USB serial to work, FTDI chips seem to ignore DTR, so this third party software works fine with most other devices.

Modifying my hardware is not an option. How can I, in software/firmware, hack this device to ignore DTR so this third party PC software can see serial data from the device?

Best Answer

Hmm, upon further review, digging through the Arduino source for the USB serial code, it looks to me like the DTR check is at line 224 (first line of size_t Serial_::write(const uint8_t *buffer, size_t size)). I’m not terribly optimistic about disabling it (you’ll probably flood some buffer), but it might be worth a try.