RS232 to USB?

jacksonh22

26 May 2020, 02:41

Does anyone know how to convert a standard RS232 output to USB? I have a few RS232 keyboards, but I have no clue as to how to convert them. Any help would be awesome.

MMcM

26 May 2020, 04:13

Real RS-232, with voltages up to like ±15 V? Or TTL level serial with the RS232 bit encoding? Most keyboards would have the latter. Full-blown terminals would have the former.

For TTL serial to USB, there are standard chips like FTDI https://www.adafruit.com/product/70 or https://www.sparkfun.com/products/12731 or cheaper ones like CP2102 https://www.aliexpress.com/item/1859102520.html.

Note that all of these will appear to USB as a serial port, not as a keyboard. Is that what you want? Or did you want it to act like a keyboard?

What is the data sent over serial? If it's just ASCII, you won't be able to get a full-featured keyboard. If it's some kind of encoding of key presses and releases, you will need a program to interpret that and present a keyboard to USB, so there isn't a one size fits all solution.

Could you give an example of a keyboard that you have? Perhaps someone will recognize it and know the details to help you along.

jacksonh22

26 May 2020, 04:18

MMcM wrote:
26 May 2020, 04:13
Real RS-232, with voltages up to like ±15 V? Or TTL level serial with the RS232 bit encoding? Most keyboards would have the latter. Full-blown terminals would have the former.

For TTL serial to USB, there are standard chips like FTDI https://www.adafruit.com/product/70 or https://www.sparkfun.com/products/12731 or cheaper ones like CP2102 https://www.aliexpress.com/item/1859102520.html.

Note that all of these will appear to USB as a serial port, not as a keyboard. Is that what you want? Or did you want it to act like a keyboard?

What is the data sent over serial? If it's just ASCII, you won't be able to get a full-featured keyboard. If it's some kind of encoding of key presses and releases, you will need a program to interpret that and present a keyboard to USB, so there isn't a one size fits all solution.

Could you give an example of a keyboard that you have? Perhaps someone will recognize it and know the details to help you along.

It's a Honeywell Hall Effect board. Seen in my post here: viewtopic.php?f=2&t=23787

MMcM

26 May 2020, 06:27

Very nice. I see that there is another BCRU211G-001 for sale on eBay right now.

You should be able to connect the terminal's RS232 port to USB on a Linux machine and do shell stuff. Just search eBay / Amazon for USB to DB25 Serial. Most of these will sell you an FTDI (or clone) to DB9 and then a DB9 to DB25 converter, which is clunky but works. There are also a few USB straight to DB25; for instance, Cables to Go C2G has one. That will be more compact, though maybe a bit more expensive.

That is the standard part. The keyboard plugs into the back of the terminal with a DB25, which increases the chances that this is also talking RS232, but it isn't 100% guaranteed. Did you find documentation or otherwise confirm this or were you just going to give it a try?

Keep in mind once again that connecting that cable isn't going to make the keyboard work as a keyboard with a modern operating system. It is just going to show up as a serial port. So, you could use your computer's regular keyboard (and mouse) to open up a terminal emulator, connect it to that port and see the characters you type on the other keyboard printed back.

If is indeed serial, what it sends from the keyboard might be ASCII with extra codes for the function keys or it might be some encoding of key presses.

Alternatively, a DB25 is plenty wide for some kind of parallel interface, which would need a special purpose adapter. And even here, if the shift codes and so on are pre-computed, it's harder for the adapter to faithfully represent what you actually typed.

So some experimentation is needed, unless somebody else has already done this terminal or one very like it.

User avatar
hellothere

24 Jun 2020, 00:34


Findecanor

24 Jun 2020, 00:51

Sun's keyboard protocol was TTL-level RS232, and there are a few converters for that including TMK for the ATmega32u4.

Of course the actual protocol is going to be different, so you'd have to reverse-engineer that and rewrite the code.

MMcM

24 Jun 2020, 02:42

Suns have the polarity backwards -- idle low -- from modern MCUs, which adds an extra complication that may not be there with this board.

jacksonh22

24 Jun 2020, 05:30

Hi everybody, thanks for the responses. Unfortunately, I've never worked on converting a board before so most of what you all are saving is just sounding like gibberish... lol.

There's no documentation about this terminal online, but I assume it's running standard RS232.

User avatar
kps

24 Jun 2020, 17:36

On the PCB photo at https://terminals-wiki.org/wiki/index.p ... l_BCRU211G there are many traces running to the connector, so it's more likely parallel.

gipetto

25 Jun 2020, 00:11

i was looking at a honeywell brochure on google the other night and it mentioned rs485 along with rs232, so don't assume its the latter.

Post Reply

Return to “Keyboards”