Transforms data received via RS-232 (COM port) into keystrokes

Troubleshooting 232key and RS-232 connections

RS-232 connections can be difficult and frustrating to troubleshoot as there can be many sources of errors. Below you will find a list of the various components involved in a data transmission, as well as possible problems. Please check them systematically.

Elements involved in RS-232 data transfer

1. RS-232 device (e.g. scale, barcode reader, etc.)

Consult the manual that came with your device and check its actual settings to verify that:

  1. The interface parameters (bits/s aka. baud rate, data bits, stop bits, parity and flow control) set in the menu of your device match the settings in the Input tab in 232key. If the settings do not match, data transfer will not be successful.
  2. Data transmission is enabled. Some devices require you to explicitly enable data transfer (often by selecting a data transfer mode, see next point).
  3. Data transmission is set to the correct mode. You want data to be transferred upon pressing a button on the device (sometimes called "key mode") or automatically at the end of a measurement or reading. Modes which you do not want might be called "stream" or "continuous mode" where data is sent continuously several times per second, "interval mode" where data is sent automatically in certain intervals or "command mode" (bi-directional mode) where data has to be requested by the software (although command mode can be used with 232key Pro).
  4. There are no impediments for data to be sent. Some scales and balances will only send stable weight values. Legal for trade scales (verified scales) often don't send values below the minimum weight.
  5. Data content is set correctly. Generally, 232key automatically captures the first number it encounters in the data sent by the device, so you should make sure the value you want is sent as the first (or only) value. If this is not possible, you can use custom regular expressions in 232key Plus.

    Example:
    • Many Ohaus precision and analytical balances allow you to send the "numeric value only".

To confirm that your device is sending data, you could try observing the RS-232 output signals with a USB converter equipped with TD/RD LEDs such as the FTDI US232R, an RS-232 interface tester such this one (Amazon affiliate link), a suitable voltmeter or an oscilloscope.

2. RS-232 cable:

  1. Make sure the connectors are fully plugged in (sounds stupid, but this is a common mistake).
  2. Verify that you have the right kind of cable for your device. Unfortunately, even cables which look completely identical on the outside can be wired differently. If you're using a crossed ("null modem") cable where a straight 1:1 cable is required (or vice-versa), the connection won't work. Some balances (e.g. Sartorius) require very special cables as their pinout is not compatible with regular cables.

The fact that you can physically connect a cable between your PC and device means nothing in terms of internal wiring and does not guarantee that the correct pins are connected.

3. RS-232 to USB converter

  1. Make sure the driver is installed and up to date. Most drivers will be automatically found and installed through Windows Update but some have to be downloaded and installed manually.
  2. Most converters are not meant to be connected directly to your serial device as they were designed as a replacement for an RS-232 port on your PC. If you know the pinout of your scale, you may be able to find a converter suitable for a direct connection. Otherwise, you may need a serial cable (as shown in the photo above) or a null modem adapter (Amazon affiliate link) in addition to the converter. Please contact your device manufacturer or dealer for support if you cannot find the necessary information in your user manual.

4. 232key

If 232key does not work as expected, please press Stop in the Start/stop tab and then switch to the Event log. If it seems that 232key has already stopped itself, please see this issue.

The event log is a very useful troubleshooting tool. In the example below, you can see that 232key has received a total of 10 lines of data from the connected device. Two lines contained measuring values which were captured and typed by 232key: "70.8" and "102.1". These captured values are shown in blue. Non-printable ASCII control characters are shown in pointy brackets with their decimal codes ("<13><10>" = carriage return and line feed).
RS-232 software event log

Depending on what you see in your event log, please click on the description that best describes your problem:

  1. No data received from your device is shown in the event log
  2. "Error [WW]: java.lang.NumberFormatException"*
  3. "Cannot type: .." error*
  4. "Unsent data" message
  5. Framing or parity errors
  6. Data received, but 232key captures and types the wrong part
  7. Data received, but 232key captures and types too many parts
  8. Data received, but 232key captured nothing
  9. Data received and captured correctly, but 232key does not type anything
  10. Several lines of data per second
  11. Just one line of data and a "stopped" message

*Applies only to the Plus and MU version.

Other 232key issues

232key shows an error message in a dialog

a. No data received from your device is shown in the event log

If the event log only contains 232key's status messages as shown below, this means that no data has been received from your device:
Event log: no data received

1. Did you choose the correct COM port?

If there are multiple COM ports available on your system, please ensure that you've selected the correct one. On some systems, if you plug a device into a different USB port, the COM port may also change. If 232key is listening on the wrong COM port, it cannot possibly receive any data. The names that 232key shows in the Input tab are the same as in the Windows Device Manager under Ports (COM&LPT). Example:

Windows Device Manager COM ports

In the screenshot above, you can see two built-in COM ports (COM1 and COM2) and one (virtual) COM port which was created when an Ohaus scale with a USB interface was connected to the PC. Note that it shows up as "USB Serial Port" and not "Ohaus". The correct port to set in 232key in order to use the Ohaus scale would therefore be COM3. The numbers of the COM ports on your PC will be different.

2. Can you receive data using a different program?

Please try using a free terminal program like hTerm or Termite to receive data from your device (instead of using 232key). If the terminal program doesn't receive any data either, then there is something wrong with the settings of your device or with the connection between your device and your PC. Please read the common causes at the very top of this page or contact your device manufacturer or dealer for help.

If you do receive data with a terminal program but not with 232key, please contact us and send us screenshots of the received data in the terminal software and of 232key's event log (you can also use our support forum).

Due to the overwhelming amount of support requests we're receiving, we may not be able to respond to you if you ignore the above instructions and expect us to fix a problem for free that is not caused by our software. 232key is not magical. If it does not receive data from your device, it cannot work.

3. Does your device only support request-reply protocols?

Some devices cannot transfer data when a button is pressed. Instead, the software running on the computer has to request the data by sending a command. The following illustration shows the NCI protocol used by some scales (mainly price computing scales, but also a few parcel scales):

Request-reply example: NCI POS protocol

These kind of devices cannot currently be used with 232key. You could try using 232key Pro instead, but please note that some protocols are even more complicated and require multiple requests and replies.

b. "Unsent data" message

If you find an "unsent data" message in the event log (after having pressed Stop in the Start/stop tab), this means that 232key has received data from your device, but has not found the terminator you specified in the Input tab. This can have two possible causes:

1. Wrong terminator

The terminator is the very last character in each line of data sent from the device. In the example below, the terminator should be "<10> LF", but was specified as "<13> CR" (in this example, this didn't prevent 232key from extracting the measuring value):

Unsent data - incorrect terminator

Please specify the correct terminator in the Input tab. You can enter any decimal ASCII code. See our documentation for further information.

2. Wrong interface parameters (port settings)

If the "unsent data" message is followed by unexpected characters and numbers in <angle brackets>, your interface parameters are wrong. All of the following settings in the Input tab in 232key have to match the settings of your device: bits/s, data bits, stop bits and parity. Please refer to the manual that came with your device to find the correct settings.

Wrong connection parameters

The numbers in angle brackets are unprintable characters shown as their decimal codes.

c. "Error [WW]: java.lang.NumberFormatException"

Error: NumberFormatException

This error appears in the Plus version if:

  1. The Device you've selected in the Input tab expects numeric values only (this is the case for all devices except for "Barcode alphanumeric" and "Barcode alphanumeric extended").
  2. You've modified the regular expression used by 232key to match non-numeric characters.
  3. You did not remove these characters by entering them in the Remove field in the Process tab.
What happened then is that 232key tried to convert the captured non-numeric data into a number, which produced the error.

Solutions:

  • If you want 232key to type a number, you have to remove the matched non-numeric characters in the Process tab (in the pictured example, you'd enter "/" in the Remove field).
  • If you want 232key to type all characters as captured, change the Device in the Input tab to "Barcode alphanumeric" or "Barcode alphanumeric extended".

d. "Cannot type: .." error

Cannot type error

This message means that 232key has captured a character which it cannot (currently) type. The "Barcode alphanumeric" device can type characters A-Z (case sensitive) and 0-9, while the "Barcode alphanumeric extended" device can also type a-z and several other characters (see entry under "additional devices" here for a complete list). If a character outside this range has been captured, this error message is logged and the character is ignored.

We're constantly working on adding further characters to the "Barcode alphanumeric extended" device. Due to the low-level nature of our keyboard simulation and the many keyboard layouts in use around the world, this can be surprisingly complicated.

e. Framing or parity errors

Parity errors in event log

These errors appear if the data received by 232key does not match the expected format at byte level. If you see a long list of these errors, the interface parameters configured in the Input tab are most likely wrong. Please refer to the manual that came with your device to find the correct settings.

If these errors only appear sporadically, this could mean that your data has been corrupted.

f. Data received, but 232key captures and types the wrong part

1. Wrong numeric value typed

If your device transmits multiple values in one line (e.g. time/date and a measuring value), only the first one will be captured and typed by 232key. This value might not be the one you're interested in. Here's an example of a complicated data sequence where 232key types the first number ("0,16") instead of the desired measuring value ("105"):
Event log: Wrong value extracted

Solutions:
  1. Try configuring your device to send only the value you need.
  2. Create a custom regular expression to capture only the data you want (requires a Plus license).
  3. Contact us so that we can analyze the data and build a special device profile. Please send us the content of the event log tab and the name of your device and manufacturer. Here's the event log for the example above after we included a "Tanita TL-280/TL-290" profile for our user, showing that the desired value (" 105") is now being captured:
    Event log: Correct value extracted with new profile

2. Letters not captured

Currently, only the "barcode alphanumeric" and "barcode alphanumeric extended" profiles supports letters. Please make sure one of these devices is selected in the Input tab.

g. Data received, but 232key captures and types too many parts

If your device transmits several lines of data at once, 232key will process all of them and possibly capture some values you're not interested in. The following example shows the output of an Ohaus STX scale in its default configuration:
Event log: too many values extracted

As you can see, 232key captures and types part of the date, the balance ID, part of the model no. and finally the weight.

Solutions:
  1. Configure your device to send only one value. The scale used in our example can be set to transmit the "numeric value only" (and then sends only the weight, a setting which works fine with the default "Ohaus" profile in 232key).
  2. Create a custom regular expression to capture only the data you want (requires a Plus license).
  3. Contact us so that we can analyze the data and build a special device profile. Please send us the content of the event log tab and the name of your device and manufacturer.

h. Data received, but 232key captures nothing

Data has been received from your device and is shown in the Event log, but nothing is shown in blue (i.e. no data has been captured and typed by 232key).

  • Please make sure that you've selected the right Device profile in the Input tab: The "general" device profile is meant to be used with measuring instruments and only supports numeric values. The "barcode alphanumeric (A-Z and 0-9)" device profile supports characters A-Z (case sensitive) and digits 0-9 while the "barcode alphanumeric extended*" profile supports all printable ASCII characters.
  • If you only see a lot of values in pointy brackets, please ensure that your interface parameters are correct and that your device is sending data in ASCII format (currently, 232key does not support binary formats like Modbus RTU).

i. Data received and captured, but 232key does not type anything

The event log looks fine, i.e. you can see that data was received from the connected device and that 232key captured the desired value (shown in blue), but nothing is typed into your application.

  • Make sure that your target application has focus and is ready to receive keyboard inputs while 232key is running in the background. If you start typing on your keyboard, the characters should appear in your target application.
  • Please try using another target application (like notepad) to see if the problem persists. Some applications may capture keyboard input and prevent 232key from working correctly.
  • Make sure that no error messages appear in the event log (e.g. " cannot type" errors).
  • Try changing the Keyboard setting in the Output tab to match your keyboard layout or try selecting "All (compatibility mode)".

If you're using 232key Plus or 232key MU, please also check the following:

  • Verify that the Start with key defined in the Input tab is not moving focus away from where you want the data to be typed.
  • Ensure that no setting in Process tab is preventing 232key from typing the received data. With all settings are disabled, the tab should look like this:
    Processing tab: everythinig disabled (no processing)

j. Several lines of data per second

If you see several lines per second in the event log, your device is set to send data continuously:
Event log: continuous data

Consult its manual to switch to a mode where data is only sent when a key on the device is pressed (or data is sent automatically, but only once).

Note: Some devices may only have a "continuous" mode and unfortunately can't be used with 232key at this time.

k. Just one line of data and a "stopped" message

Event log: 232key stopped itself

If the Event Log only shows one line of data received from the connected device, followed by a "stopped" message (even though you did not press the Stop button), then 232key is configured to send "enter" and was still in focus when the data was received:
Output: End with Enter

This caused the software to immediately "press" the Stop button. Please switch to the target application before sending data from the connected device. If you have not triggered the data transmission manually, your device may be set to send data automatically or continuously.

Note: Some devices can send data so fast that you'll see several lines ahead of the "stopped" message.

232key does not start

Please make sure you're using an operating system supported by 232key. If that's the case, try disabling your virus scanner (should this solve the problem, please let us know which virus scanner you're using).

232key starts, but then disappears

You have probably configured it to minimize to the notification area.

No port found

No RS-232 port found

232key needs a (virtual) serial port to communicate with your device. Make sure the port shows up in the device manager on your system. If you're using a RS-232/USB converter, check that it is plugged in correctly.

Port is in use

Error: Port in use

Your port is being used by another application. Check that you've selected the right port in the Input tab and that no other programs are using this port.

Port not valid

Error: Port not valid

The port you selected in the Input tab is not valid. This could happen if you disconnect a RS-232/USB converter while 232key is running.

Scale not connected to this port (A&D devices only)

A&D scale not connected error

232key shows this message if it can't detect an A&D device at the specified port. Please make sure that you've chosen the right port in the Input tab and that the cable is connected to your device and computer.

If you receive this error message, but your A&D device is working properly as the program continues, please tell us which A&D scale or balance you're using. If you're using a cable or converter which does not support the RTS/CTS and DTR/DSC signal lines, select "A&D (no handshaking)" instead.

Scale connected, but switched off (A&D devices only)

Error: A&D scale switched off

232key has detected an A&D device at the specified port, but this device does not respond as expected. It could be switched off or you might be using the wrong type of cable. A&D scales and balances usually require a straight cable and will not work with a crossed (null modem) cable.

Note concerning A&D balances with power safe mode: Power safe mode is currently not detected by 232key, this message will only appear if your balance is unplugged.

If you receive this error message, but your A&D device is working properly as the program continues, please tell us which A&D scale or balance you're using. If you're using a cable or converter which does not support the RTS/CTS and DTR/DSC signal lines, select "A&D (no handshaking)" instead.

Error while loading settings

Invalid setting or expired license

All settings you make in 232key are saved and loaded automatically. If one or more of these saved settings are not valid, the error message above is displayed and the program uses the default setting. This can also mean that a trial license you used has expired.

Access error while loading settings

Access to the registry was denied. The program cannot load the settings your settings.

Please ensure that access to the registry (232key) or ProgramData folder (232key MU) is not blocked by a virus scanner or similar application.

Access error while saving settings

Your settings are automatically saved when 232key is closed. If access to the registry (232key) or ProgramData folder (232key MU) is denied, you'll see this error message.

Please ensure that access to the registry is not blocked by a virus scanner or similar application.

Invalid license key

Invalid setting or expired license

All license keys purchased from our partner FastSpring are generated automatically and are guaranteed to be valid. There are three reasons why you might see this message:

  1. You're using an outdated version of 232key (this is the most likely reason and applies to more than 95% of all support requests concerning this error). Please switch to the About tab and confirm that your version number starts with 2017 or later (e.g. 2022):
    232key version
    Older versions don't accept newer license keys. Please update your software by downloading and running the installer for 232key Plus or 232key MU (depending on which license you've purchased).
  2. You've not copied and pasted the complete license key or your email client has problems displaying it correctly (this can happen in rare cases when FastSpring's original email with the license key has been forwarded to you in HTML format). Please copy the entire key from the email you've received from FastSpring. If the error persist, please contact us and we'll resend you your license key as a text file. However, first make sure you're not using an outdated version of 232key as mentioned above!
  3. You've purchased multiple licenses and copied more than one license key at one. Please copy only one line (one license key).