When I first used SerialCommands with the given example and putty I wondered why this didn't work.
The first problem was the line-ending, which I then matched on putty and SerialCommands.
The second thing was: there was no echo of the input on the client.
Okay, one could force putty to do an echo itself.
My way was to add an echo to SerialCommands.
Inside SerialCommands.cpp i've added a
Serial.write(ch); //ECHO
after the
int ch = serial_->read();
inside the ReadSerial() function.
In my case this is working, but I think this could be done better, at least concerning a multi-serial-support.
Maybe You'd like to add an echo-option to Your code and also make that an option to the initialisation (maybe a TRUE or FALSE behind the delimiter argument?).
When I first used SerialCommands with the given example and putty I wondered why this didn't work. The first problem was the line-ending, which I then matched on putty and SerialCommands. The second thing was: there was no echo of the input on the client. Okay, one could force putty to do an echo itself. My way was to add an echo to SerialCommands. Inside SerialCommands.cpp i've added a
Serial.write(ch); //ECHO
after theint ch = serial_->read();
inside the ReadSerial() function.In my case this is working, but I think this could be done better, at least concerning a multi-serial-support. Maybe You'd like to add an echo-option to Your code and also make that an option to the initialisation (maybe a TRUE or FALSE behind the delimiter argument?).
Thanks