7

I'm on Windows 8.1 and I need a program that allows me to send a hex encoded byte array to a COM port on my computer and then receive an ascii string over that same COM port.

I tried the serial monitor that comes with the Arduino software, but it can only send text.
I tried Putty, but once I was connected I couldn't type anything in the console window.
I tried Termite, but it had the same problem as the Arduino serial monitor.
I tried the following batch script, but it could only send data and I can't receive anything:

@echo off
echo 04185A5A5A5A55AA19A7FFFF00000001FFE0F8BD0001FFF800185A5A5A5A55AA00091A9D000000000000000000000000>example_dump_1.txt
certutil -decodehex example_dump_1.txt example_dump_1.bin

MODE COM8:115200,n,8,1
copy example_dump_1.bin \\.\com8 /b

5 Answers 5

3

Sparkfun recommends RealTerm for something like that. I came across RealTerm and this question looking for a similar software. I'm about to fire it up for the first time. I think this software is Windows only.

Sparkfun says:

TeraTerm is awesome for simple ASCII-only serial terminal stuff, but what if you need to send a string of binary values ranging from 0-255? For that, we like to use RealTerm. RealTerm is designed specifically for sending binary and other difficult-to-type streams of data.

On RealTerm's website:

Realterm is an engineers terminal program specially designed for capturing, controlling and debugging binary and other difficult data streams. It is the best tool for debugging comms.

enter image description here

3
  • I tried RealTerm. It was terrible. I mean look at that GUI. Completely unusable.
    – Timmmm
    Jul 11, 2020 at 15:46
  • I like classic UIs like that. I hate the condescending nature of the iPhone UI that half of modern techies love. Nov 28, 2020 at 14:14
  • 1
    I was not talking about the number of options available or the fact that it uses standard Windows controls. There are plenty of good GUIs with this style and lots of options. This is not one of them! To pick an obvious example: "Display As" has a checkbox randomly chucked in there that doesn't even have a label!
    – Timmmm
    Nov 28, 2020 at 20:41
3

Termite does support sending and receiving binary data. Go to Settings->Hex View.

termite binary data

Then type 0xDEADBEEF or whatever in the input window.

2

I think that the things are very easy with Python as detailed in ReferenceDesigner. It will allow you to have greater control on what you want to send and you can create and change the script.

import serial
ser = serial.Serial("COM5", 9600) command = b'\x41\x42\x43\x44\x48\x65\x6c\x6c\x6f'
ser.write(command)
s = ser.read(9)
print(s)
1

You can do this in ZOC Terminal in various ways:

Make a serial connection: E.g. in Quick-Connect choose "localhost" as your destination and choose "Serial/Direct" as the connection method and click 'Configure' to select the COM port etc (see here for details).

Then, for short hex sequences, you can enter the bytes in the form ^(xx) (e.g. ^(01) for the SOH character) in the Local Typing window: Choose View menu > Local Typing, enter your sequence, press Alt+Enter

Hex data from Local Typing

If you need to send the same sequence repeatedly (on different occasions), you can also map them to a key or user button to access/send them quickly (either Options-menu > Keyboard Profiles or Options menu > Edit Session Profile):

ZOC User Button with Hex Data

For longer sequences like yours, you can use a simple REXX script and then start that or map it to a button or key.

A REXX Script that sends Hex Data

Finally, to monitor the data communication in hex, there is a variety of options in Session Profile > Debug/Trace

ZOC Terminal Debug/Trace Options

0

This is an old post. But my reply might be useful for someone else. There is one more tool not mentioned in this thread for sending hex values, and that is comDebug. You can try this. It's free.

2
  • Please declare if you are affiliated with it or not. Oct 20, 2022 at 7:41
  • Can you add any details about it and how does it compies with the question?
    – Alejandro
    Oct 20, 2022 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.