Now it works only Half duplex depending on the settings of the “Flow Control” parameter in the YAT settings.
Hardware (RTS/CTS) works from Arduino to Terminal.
Software (XOn/XOff) works from Terminal to Arduino.
Combined (RTS/CTS + XOn/XOff) works from Arduino to Terminal.
What do I need to do to make it work Full duplex?
The software:
- void loop() {
- while(HWSerial.available()){
- size_t l = HWSerial.available();
- uint8_t b[l];
- l = HWSerial.read(b, l);
- USBSerial.write(b, l);
- HWSerial.println("loop: from monitor");
- }
- while(USBSerial.available()){
- size_t l = USBSerial.available();
- uint8_t b[l];
- l = HWSerial.read(b, l);
- HWSerial.write(b, l);
- HWSerial.println("loop: from terminal");
- }