serialTerminal.com
serialTerminal.com copied to clipboard
Unable to send control characters?
It'd be very helpful to be able to send control characters (CTRL+C, BACKSPACE, etc...).
I couldn't readily find a way to send raw bytes via the input box.
EDIT: (for those also wondering) Undoubtedly my naiveness, but since I couldn't escape bytes within the input box, I just added a couple buttons for control characters I commonly use with CircuitPython boards.
add buttons:
<button onclick="sendCtrlChar(3)" style="width:45px">Halt</button>
<button onclick="sendCtrlChar(4)" style="width:65px">Restart</button>
add function
async function sendCtrlChar(ctrlChar) {
if (ctrlChar == 3) dataToSend = "\x03"; //ctrl+C
if (ctrlChar == 4) dataToSend = "\x04"; //ctrl+D
await writer.write(dataToSend);
}
I added a new button so you can enter a number and send character. Let me know if that works. I am planning on adding some thing so you can create buttons with specific strings to send. Should be good for shortcuts to send frequently used things.
Actually I am looking in to how to make a more advanced version of the terminal with full compatibility. I found this https://xtermjs.org/ and it seem like it might be a prime candidate for the more sophisticated version. Just need to figure out how to link it all up. Any help would be appreciated.
@mmiscool interesting... have you played with https://googlechromelabs.github.io/serial-terminal/?
I did play with that chrome labs demo but it never worked as I expected it to work. @maholli
My I suggest accepting those numbers in Hex? Hexadecimal. perhaps by preceding them with '\x' e.g. \xaa would be the same as 170 (because 170 in decimal is AA in hex). Also, \t or \r might be nice to support as tab and return. So then you need \ as . But that would make the tool so very very valuable for debugging binary serial communications.
Oh... you would also need an option to display the return values which are binary the same way.