Project

General

Profile

Actions

Feature #5463

open

X.21 hardware interface

Added by laforge about 2 years ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Low
Assignee:
Target version:
-
Start date:
02/20/2022
Due date:
% Done:

10%


Description

It's surprising how "dead" the X.21 interface seems to be. Apart from some super expensive RS232 to X.21 converters, and the odd FarSync card on ebay, it seems it's very hard to get anything that attaches to a modern computer and implements that interface.

After a bit of research, it seems electrically it's not really more than 6 differential RS-422 style signals. 4 in DCE->DTE direction, and 2 in the other. I'm tempted to do a simple board with a 15pin SUB-D connector and 6 half-duplex RS-422 drivers (so the direction can be switched).

The transceivers of course would be 3.3V supply + logic level, so they can be used with any modern uC/FPGA/...

The board should be configurable for both DTE and DCE role, as well as a passive sniffer, switching all channels to receive-only.

Would anyone be interested in that?

The idea is that such an interface could then be attached to a microcontroller (or fpga) implementing the actual protocol related bits.
Given that I'm more of a hardware + software and not a FPGA person, I'd probably try to hook it up to an ARM based uC.


Files

Actions #1

Updated by laforge about 1 year ago

  • Status changed from New to In Progress
  • Assignee set to laforge
  • % Done changed from 0 to 10

I've been working a bit towards a design for an X.21 adapter. Basis is the icE1usb-RS422 add-on board by tnt, as it solves a similar problem - albeit only for 3 signals, we need t (R, T, I, S, B).

I'll keep the same approach of being able to use either signal in either direction, so that we can use the same device/frontend for
  • DCE
  • DTE
  • sniffer
So we have
  • 5x SP485 as differential transceivers
  • 2x Si8663 as isolator for the 5 signals (each 3 channels; 1 channel unused
  • Si8400 I2C isolator
  • 1x 16bit GPIO expander (PI4IOE5V9535ZDEX or EOL SX1503) on secondary (line) side to drive the DE/RE pins
  • 1x 16bit GPIO expander (PI4IOE5V9535ZDEX or EOL SX1503) on primary (uC) side to drive a set of 74xx125 to enable/disable the rx or tx path between uC and Si8663
  • isolated 5V/5V DC/DC converter to generate the 5V for the secondary side.

The plan is to make just a "frontend" board with all of the above, and then connect that frontend to any uC or FPGA via some wires.

Actions #2

Updated by tnt about 1 year ago

First, do you need that much isolation ?
Most RS422 transceiver can tolerate a few tens of Volts of potential difference by themselves. For the datacenter, out of an abundance of caution, I went with several kV isolation ..

Second, might be worth considering just using isolated RS422 transceivers. Back when I made the board, there were all out of stock, so I didn't have much choice, but situation has improved a bit since then.

Actions #3

Updated by laforge about 1 year ago

Thanks for your quick feedback!

On Fri, Feb 03, 2023 at 06:19:42PM +0000, tnt wrote:

First, do you need that much isolation ?

good question. Given that I expect anyone using such a device (myself
included) will interface some arcane retrocomputing hardware which is
impossible to replace, I would rather prefer to be on the safe side.
Yes, he isolation adds something like maybe 15 EUR of BOM cost, but then
I doubt there will ever be more than a few hand-assembled boards. And
most retrocomputing folks would probably rather invest in a few more EUR
for proper galvanic isolation to be on the safe side.

I could check if ITU says anything about the isolation requirements of
X.21. But even then, you don't know if some random equipment has a

Second, might be worth considering just using isolated RS422 transceivers. Back when I made the board, there were all out of stock, so I didn't have much choice, but situation has improved a bit since then.

My past experience with such transceivers (about a decade ago) indicated
that those were extremely expensive - and given that we'd need 5
bi-directional transceivers on a single board, it might actually be more
expensive even if available. But I'll have a look.

Actions #4

Updated by laforge about 1 year ago

Another situation comes to mind: You might operate your Teletex or whatever retro equipment using an isolation transformer on the AC line input (for safety purpose, or during repairs) and in that case you cannot afford to leak a GND (with potential PE reference) back into the device via the X.21 adapter.

So the more I think about it, the more it makes sense to have isolation for at least 230V AC / 400V DC plus some margin.

Actions #5

Updated by vogelchr about 1 year ago

Just thinking...

What would be more useful:

  • PCB with one X.21-D-SUB that is switchable between DTE/DCE role as described above
  • PCB with 2 D-SUB, one fixed to DTE role, one fixed to DCE, then with jumpers one could just pass through DTE->DCE and sniff, or have the separate interfaces

Component count would be almost the same, as one gets a switchable "rs485" receiver in the same 8-SO package a a fixed-direction RS422 Tx/Rx.

Actions #6

Updated by laforge about 1 year ago

Thanks for your feedback.

I've now pushed my draft schematics to https://gitea.osmocom.org/electronics/osmo-small-hardware/src/branch/laforge/x21

The idea of that design (extended from Sylvain's rs422 daughterboard for icE1usb) is to
  • have DTE/DCE/sniffer mode completely configurable by software (via the GPIO expanders)
  • have proper isolation

Regarding your idea with two connectors and jumpers: also interesting. I don't have the time right
now to think of all related consequences.

Actions #7

Updated by tnt about 1 year ago

laforge Make sure to check the ecn.md from the e1 hw repo, that contains some erratas that were manually reworked on the boards.

Actions #8

Updated by laforge about 1 year ago

On 8 February 2023 10:22:34 CET, tnt <> wrote:

Issue #5463 has been updated by tnt.
laforge Make sure to check the ecn.md from the e1 hw repo, that contains some erratas that were manually reworked on the boards.

Yes, I'm aware, thanks.

Actions #9

Updated by laforge about 1 year ago

vogelchr so who and how do we proceed here? should we have a call/chat at some point?

Actions #10

Updated by laforge about 1 year ago

  • Assignee changed from laforge to vogelchr
for the record, we had a call today, and decided to proceed as follows:
  • vogelchr will - as time permits - work on a hardware design
  • design is likely going to be "his" idea described above
  • once exact transceiver part is confirmed, sysmocom will stock sufficient quantity for first batch of prototypes
  • board should be 100mm wide with all connectors on one edge (for "BGT" component carrier mounting, or for enclosures intended for [partial] euro-cards
  • isolated DC/DC converter should be used onboard so the X.21 transceivers are supplied from "uC" side
    • I thought I had found one that doesn't require external EMI filtering, but it seems that was wishful thinking and I gave up searching. I'm sure I once saw some. According to my notes, I settled on the B0505LS-1WR3 - but for sure it could be any other part. If you do find one without extenal filter parts for EN 55022 Class B, it would be preferred
  • no uC or FPGA included so far, just a pure isolated X.21 transceiver for DTE, DCE or sniffing application
Actions #11

Updated by laforge about 1 year ago

There was the question whether male/female are used to indicate DTE/DEC on X.21 for the 15pin connector.

The Wandel+Goltermann DTX-1 has
  • male connector towards the DCE
  • female connector towards the DTE
  • Oddly enough, my Olympia Disque (DTE) has a female connector towards the DCE.
  • An Alfatron A600 is a device that can switch X.21 between DTE and DCE and it uses female
  • Both of my ISDN X.21 TA (DCE) have female connectors
  • My Siemens DAG (DCE) has female connectors

So the majority is clear: a DCE has female, and a DTE has male.

Actions #12

Updated by laforge about 1 year ago

I just confirmed the A/B polarity vs. X.21 logical levels using the Wandel_Goltermann_DTX-1:

Data lines (R/T)

B > A 1
B < A 0

Control lines (I/C)

B > A OFF
B < A ON
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)