Converting a PC Keyboard to a Terminal Keyboard using Soarer?

User avatar
Pastenseolith

09 Feb 2020, 04:31

Ok, so I have a conundrum. I have a nice IBM Model M keyboard, early 1390120, I love this keyboard and I paid good money for it. I want to include an actual terminal to my build so I can achieve levels of hipster first thought impossible, but to do this, I need to connect the terminal to an actual keyboard. I picked up an IBM 3151 without a keyboard, and it has an RJ45 as the keyboard connector. It is designed for "Terminal Keyboards" which use, as you guessed it, Terminal Formatting. It is technically possible to utilize my present keyboard, but many functions and commands will be broken that would be useful for a vintage terminal. My idea is to take a USB Hub, connect my Model M to the USB Hub via a PS/2 to USB converter. From there, I will take the USB Hub and connect one to my Terminal, and the other to my PC. Then I can push a button and switch between the two devices, and keep the same keeb. This is a diagram I conjured up.

Would it be possible to configure the Soarer software to allow for a PC to Terminal connection? How would I go about doing this? If you have any ideas or have any prior experience on the topic let me know. I am currently looking at this cable, but contacted the seller to see if they could swap the gender. In the meantime, if anyone have any ideas please let me know as that would be quite helpful.

Edit:
spelling and formatting

User avatar
Darkshado

09 Feb 2020, 06:32

What you're referring to as a "hub" is an "A-B switch".

Unfortunately, Soarer's firmware is closed source and the author has effectively disappeared without a trace some years ago. It would be ok to convert from PS/2 (Set 2) to USB HID but won't cover USB HID to Set 3 (Terminal), I'm not sure such a converter exists.

orihalcon

09 Feb 2020, 07:14

You might first want to look into whether your terminal supports hot plugging of keyboards or not, guessing they do, but I (and probably most of us) have not used a terminal keyboard with its original hardware. If hot plugging isn't supported, you'd have to reboot the terminal each time you wanted to use the keyboard with it which would put a big damper on things.

What you need is a custom adapter that converts Code Set 2 (PS/2) to Code Set 3 (which is what terminals use). It's not unheard of to convert one protocol to something that's not USB, see here for converting AT to XT:

AT to XT: http://tech.mattmillman.com/building-an ... ype-board/

USB to XT: https://github.com/jedimatt42/teensyUSBtoXT

I believe there was another one posted for AT to XT a while back on DT or GH, but its name escapes me.

A standalone Soarer's converter won't help in this case because it can only convert things to USB.

You could swap your 1390120's controller for Terminal version's controller so it outputs Code Set 3 instead of PS/2 (but then your lock lights won't work without additional effort). Note a regular terminal board of that size actually has one extra key in the numpad area (split plus key, so one of those keys won't be there on your keyboard). The extra effort of making the lock LEDs work would be wiring a Soarer's converter inside of your keyboard (or outside of the keyboard see next paragraph) with lock lights wired appropriately to the Soarer's converter itself rather than the controller (as the terminal controller won't have a spot for the LEDs to plug into. You'd have to use a regular arduino like a teensy and wire the LEDS to the circuit board, so this won't be a solderless conversion by any means. LEDs won't work while being used with the terminal just so you know.

You could also put the Soarer's converter and switch up in your "Y enclosure" and power your LEDs over the full length of the cable using 3 additional conductors. 3 conductors would go to the LEDS plus the terminal's +5V, Ground, Clock, and Data. This would actually all fit into a regular ethernet cable and you could keep the non-LED pinouts the same at the RJ45 end, so you could plug your keyboard directly into the terminal, or plug it into your special Soarer's converter that directly powers the LEDS through the full length of your cable. Doing the full cable powering of the LEDS might require some modifications of the resistors on the LED board as there will likely be some voltage drop over the long cable.

You'd further need a physical toggle switch on the outside of your keyboard or up in your "Y" enclosure so you can choose if the output of the controller gets directed through the Soarer's converter, or if it remains unconverted. A triple pole double throw (3PDT) switch would work for that (so you can effectively direct 3 of the 4 conductors to the Soarer's VS out unconverted). The 4th wire (ground) could always be connected to both the Soarer's converter and the unconverted output.

If you put the Soarer's converter inside of the keyboard, Your next issue then would be that you'd have to have both an RJ45 cable and a USB cable exiting your keyboard as well as needing that 3PDT switch on the keyboard itself which might look a little strange. If you got really fancy, you could carry all signals on something like an 8 conductor ethernet cable instead and then just make a small adapter at the end of that that splits it in a "Y" towards the end into USB and regular RJ45.

The above is more of a thought experiment and what I would do if I were in your shoes and had your same goal, mainly because I can't code. The ideal solution is a Code Set 2 to Code Set 3 converter which technically should be relatively easy to code in the scheme of things, but you'll need to find someone that can do it for you. You'd then just hook that up to a 3PDT switch that will direct the PS/2 data into either the Soarer's Converter or your "Code Set 2 to Code Set 3" converter. This requires no modification of the keyboard at all. All the converters can be put in a single enclosure. with a PS/2 female input jack and RJ45 and USB exiting with the 3PDT switch sticking out, and that's it!

Weezer

09 Feb 2020, 10:18

orihalcon wrote:
09 Feb 2020, 07:14
your lock lights won't work without additional effort
Actually the 1390120 doesn't have lock lights, it's the model IBM offered as an upgrade for XT PCs.

Weezer

09 Feb 2020, 10:51

What about a KVM? If you get the correct keyboard controller (or whole keyboard) for the 3151 but rewire the cable from a rj45 jack to a ps/2 plug, then take a kvm with a ps/2 IN and two ps/2 OUTs and reterminate one as an rj45, then hook the ps/2 to usb soarers converter up to the modern pc side, I could see that maybe working. Then again, I've never tried something like that before, but I know the KVM would solve the hot swap problem because its always powered. I have no idea whether it would respond to set 3, but my motherboard responds to set 3 natively with no soarers, and set 2 and 3 share a lot of the same scan codes.

I think the bottom line for OP is that it's going to require some coding skills (which I'm guessing they probably dont have since they're buying a soarers instead of flashing their own) or require buying a controller that speaks set 3, and some other stuff, and taking a lot of time to experiment.

User avatar
Pastenseolith

09 Feb 2020, 15:57

Darkshado wrote:
09 Feb 2020, 06:32
What you're referring to as a "hub" is an "A-B switch".

Unfortunately, Soarer's firmware is closed source and the author has effectively disappeared without a trace some years ago. It would be ok to convert from PS/2 (Set 2) to USB HID but won't cover USB HID to Set 3 (Terminal), I'm not sure such a converter exists.
When I refer to a Hub I refer to a KVM or something like this.

As I have seen thus far, it seems that this adventure will be converting a PS/2 (Set 2) over to Terminal (Set 3.) My setup now Converts PS/2 to USB, then that goes into my computer. If I was going to do a hypothetical setup like this, I'd get a PS/2 KVM, connect my keyboard to the KVM, then from there a PS/2 connection will go to my computer (I don't have a PS/2 slot on my current build, but my newer build I have planned will contain a PS/2,) then the other will go through a Set 2 to Set 3 converter of sorts.

orihalcon wrote:
09 Feb 2020, 07:14
You might first want to look into whether your terminal supports hot plugging of keyboards or not, guessing they do, but I (and probably most of us) have not used a terminal keyboard with its original hardware. If hot plugging isn't supported, you'd have to reboot the terminal each time you wanted to use the keyboard with it which would put a big damper on things.

What you need is a custom adapter that converts Code Set 2 (PS/2) to Code Set 3 (which is what terminals use). It's not unheard of to convert one protocol to something that's not USB, see here for converting AT to XT:

AT to XT: http://tech.mattmillman.com/building-an ... ype-board/

USB to XT: https://github.com/jedimatt42/teensyUSBtoXT

I believe there was another one posted for AT to XT a while back on DT or GH, but its name escapes me.

A standalone Soarer's converter won't help in this case because it can only convert things to USB.

You could swap your 1390120's controller for Terminal version's controller so it outputs Code Set 3 instead of PS/2 (but then your lock lights won't work without additional effort). Note a regular terminal board of that size actually has one extra key in the numpad area (split plus key, so one of those keys won't be there on your keyboard). The extra effort of making the lock LEDs work would be wiring a Soarer's converter inside of your keyboard (or outside of the keyboard see next paragraph) with lock lights wired appropriately to the Soarer's converter itself rather than the controller (as the terminal controller won't have a spot for the LEDs to plug into. You'd have to use a regular arduino like a teensy and wire the LEDS to the circuit board, so this won't be a solderless conversion by any means. LEDs won't work while being used with the terminal just so you know.

You could also put the Soarer's converter and switch up in your "Y enclosure" and power your LEDs over the full length of the cable using 3 additional conductors. 3 conductors would go to the LEDS plus the terminal's +5V, Ground, Clock, and Data. This would actually all fit into a regular ethernet cable and you could keep the non-LED pinouts the same at the RJ45 end, so you could plug your keyboard directly into the terminal, or plug it into your special Soarer's converter that directly powers the LEDS through the full length of your cable. Doing the full cable powering of the LEDS might require some modifications of the resistors on the LED board as there will likely be some voltage drop over the long cable.

You'd further need a physical toggle switch on the outside of your keyboard or up in your "Y" enclosure so you can choose if the output of the controller gets directed through the Soarer's converter, or if it remains unconverted. A triple pole double throw (3PDT) switch would work for that (so you can effectively direct 3 of the 4 conductors to the Soarer's VS out unconverted). The 4th wire (ground) could always be connected to both the Soarer's converter and the unconverted output.

If you put the Soarer's converter inside of the keyboard, Your next issue then would be that you'd have to have both an RJ45 cable and a USB cable exiting your keyboard as well as needing that 3PDT switch on the keyboard itself which might look a little strange. If you got really fancy, you could carry all signals on something like an 8 conductor ethernet cable instead and then just make a small adapter at the end of that that splits it in a "Y" towards the end into USB and regular RJ45.

The above is more of a thought experiment and what I would do if I were in your shoes and had your same goal, mainly because I can't code. The ideal solution is a Code Set 2 to Code Set 3 converter which technically should be relatively easy to code in the scheme of things, but you'll need to find someone that can do it for you. You'd then just hook that up to a 3PDT switch that will direct the PS/2 data into either the Soarer's Converter or your "Code Set 2 to Code Set 3" converter. This requires no modification of the keyboard at all. All the converters can be put in a single enclosure. with a PS/2 female input jack and RJ45 and USB exiting with the 3PDT switch sticking out, and that's it!
I have a relatively basic understanding of coding. I code a lot in bash and python, but it's rather rudimentary. I am rather young and still learning, so this might be a cool project to test myself with. The actual question would be what language to code this in, but asking someone else for help wouldn't hurt either. My older brother is fluent in many languages, so this might be a project worth looking into with him, and it'd be good learning experience for me.

As for your ideas, they're great and will most likely be the route I am going to look for. This is what I am confused about though, Soarer converts correct? It converts whatever to USB, would it be possible to convert say PS/2 to USB, then taking that USB and converting it directly to RJ45, maintaining the same config that I set for it. You see, I don't know much about this stuff other than surface-level understanding. From what I can gather, that may work, but if that is a stupid suggestion, tell me it's stupid hehe.
You could swap your 1390120's controller for Terminal version's controller so it outputs Code Set 3 instead of PS/2 (but then your lock lights won't work without additional effort).
This won't be an issue as what was previously said, the 1390120 lacked any Lock Lights at all. I personally don't find this an issue, as the Model M lock lights don't look very appealing in my opinion. This being said, I am going to skip over the suggestions about the lock lights and such, as that won't be needed.
You'd further need a physical toggle switch on the outside of your keyboard or up in your "Y" enclosure so you can choose if the output of the controller gets directed through the Soarer's converter, or if it remains unconverted. A triple pole double throw (3PDT) switch would work for that (so you can effectively direct 3 of the 4 conductors to the Soarer's VS out unconverted). The 4th wire (ground) could always be connected to both the Soarer's converter and the unconverted output.
I think for my needs a footswitch would be nice. So I could just smack the footswitch below with, you guessed it, my foot and it switches the connection. Something like this seems to be worth investing into, as I could solder directly to those PCBs, and not to the actual feet of the switch itself. I could then design and 3D print myself a nice enclosure and then we're off. I am a tad confused by what you mean by the conductors. I have a basic understanding of electric engineering so maybe I am just using that term wrong in this context. The ground wire would directly bypass the switch. An IBM Terminal Connector like RJ45 utilized 5 of the 8 connections, one being ground. This is the thing, my keyboard will be connecting first through IBM SDL, which only utilizes 4 of the 6 pins! Because of this, the PE connections can be totally knocked off the IBM Terminal Connector it seems, and we can utilize your 3PDT switch design, keeping the ground connected always, and then the three connections being switched around when we need.
If you put the Soarer's converter inside of the keyboard, Your next issue then would be that you'd have to have both an RJ45 cable and a USB cable exiting your keyboard as well as needing that 3PDT switch on the keyboard itself which might look a little strange. If you got really fancy, you could carry all signals on something like an 8 conductor ethernet cable instead and then just make a small adapter at the end of that that splits it in a "Y" towards the end into USB and regular RJ45.
I won't be utilizing the Soarer converter inside the keyboard itself it seems, but I like that ethernet design. The only issue I have right now is what you brought up in the beginning:
You might first want to look into whether your terminal supports hot plugging of keyboards or not, guessing they do, but I (and probably most of us) have not used a terminal keyboard with its original hardware.
A KVM would solve this issue, as the devices would always be powered like Weezer said. Something we could do though is making our own KVM, and just like ground, we could keep the Vcc +5V always powered between the Terminal and the PC. If we do this, the terminal will just treat the keyboard as having no output, not that it's disconnected. I will draw something up later today on how this should go about. I think your 3PDT is the way to go, but it seems if we want to do that, we'd need to find a way to keep the 5V power always going to the Terminal and the PC. This is only, of course, if the Terminal doesn't support hot swap. I can't find anything about the IBM 3151 and it's hot swap capabilities, so I will dig a little bit more, but a part of me feels like this will be a test.
The above is more of a thought experiment and what I would do if I were in your shoes and had your same goal, mainly because I can't code. The ideal solution is a Code Set 2 to Code Set 3 converter which technically should be relatively easy to code in the scheme of things, but you'll need to find someone that can do it for you. You'd then just hook that up to a 3PDT switch that will direct the PS/2 data into either the Soarer's Converter or your "Code Set 2 to Code Set 3" converter. This requires no modification of the keyboard at all. All the converters can be put in a single enclosure. with a PS/2 female input jack and RJ45 and USB exiting with the 3PDT switch sticking out, and that's it!
Well I have someone who could possibly code the Set 2 to Set 3, I will do some research in the meantime to see how we would begin to do that though. If anyone has any resources or suggestions that would be nice. Even a link to some documentation on the protocols would be great. Thank you for your response orihalcon it was quite helpful.

Weezer wrote:
09 Feb 2020, 10:51
What about a KVM? If you get the correct keyboard controller (or whole keyboard) for the 3151 but rewire the cable from a rj45 jack to a ps/2 plug, then take a kvm with a ps/2 IN and two ps/2 OUTs and reterminate one as an rj45, then hook the ps/2 to usb soarers converter up to the modern pc side, I could see that maybe working. Then again, I've never tried something like that before, but I know the KVM would solve the hot swap problem because its always powered. I have no idea whether it would respond to set 3, but my motherboard responds to set 3 natively with no soarers, and set 2 and 3 share a lot of the same scan codes.

I think the bottom line for OP is that it's going to require some coding skills (which I'm guessing they probably dont have since they're buying a soarers instead of flashing their own) or require buying a controller that speaks set 3, and some other stuff, and taking a lot of time to experiment.
Very interesting, and I could see that working. Basically converting my Model M over to Terminal, then using the Soarer for it's intended purpose. I will look into that as well.

Post Reply

Return to “Keyboards”