Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Connect to AS/400 via Serial Port 97H7557 cable #65

Open
velteyn opened this issue Apr 1, 2020 · 6 comments
Open

Feature: Connect to AS/400 via Serial Port 97H7557 cable #65

velteyn opened this issue Apr 1, 2020 · 6 comments

Comments

@velteyn
Copy link

velteyn commented Apr 1, 2020

Hello , I have a vintage AS/400e 9401 150 without a twinax terminal.

I was wondering if I have the cable 97H7557, that is a special serial cable, if I can use TN5250j to connect to serial port and gain access to OPERATION CONSOLE using/modifying this program.
Thank you. (I'm a professional java developer I can do the modifications myself it is feasible)

@nitram509
Copy link
Member

Hi, that's an interesting question ... I guess that should be possible.
Assuming you're are able to connect to the serial cable via COM Port, by e.g. using jSerialComm,
then I estimate the effort is just a matter of hours.
Currently, tn5250j connects via TCP and uses InputStream and OutputStream objects
to read and write bytes.
Hence, just the connection creation code needs to be replaced.

Worth a try ;)

@friedkiwi
Copy link

This might be a rather late update, but I've looked into this before and I would have to create better protocol dumps to even consider starting such a thing. It's not as simple as just shoving the tn5250 stream over serial.

@velteyn
Copy link
Author

velteyn commented Jan 30, 2023

Via LAN the OPERATION CONSOLE is operated via BOOTP Protocol, https://www.ibm.com/docs/en/POWER5/iphbx_p5/iphbxbook.pdf
I absolutelly cannot find what protocol is used via SERIAL..

@friedkiwi
Copy link

friedkiwi commented Jan 30, 2023

Via LAN the OPERATION CONSOLE is operated via BOOTP Protocol, https://www.ibm.com/docs/en/POWER5/iphbx_p5/iphbxbook.pdf
I absolutelly cannot find what protocol is used via SERIAL..

This is not fully true - I've recently been doing some reverse engineering there, and there's two aspects:

LAN console configuration
If the LAN console is unconfigured (or you force it into that state using the magic button mashing combination, you give it an IP with BOOTP. They use non-standard BOOTP, or rather, non-standard in the sense that string values used are EBCDIC encoded and not ASCII, which breaks pretty much all available bootp servers. Using python/scapy it's trivial to solve this though.

LAN console protocol
This is a whole other can of worms, essentially it multiplexes the operator panel (and SRC display) together with a console session. Usually listens on tcp/2300, and it does not speak tn5250.

To find out which protocol is being used for Serial, we'll have to start sniffing the data.

@velteyn
Copy link
Author

velteyn commented Jan 30, 2023

Interesting, to sniff the serial protocol how can it be done ? A fake serial COM1 port used when you use the IBM software ? An hardware interface that echoes all data through it ? I was only able to find how the 97H7557 cable pinout is made. Nothing more.

@nitram509
Copy link
Member

If you have access to a real serial console, I would spend some money on these cheap "uart usb adapter" - they are starting from 3 EUR ... and there are multiple out there, e.g. RS232, RS485, and others.
The serial protocols differ in signal somewhat, hence I do recommend checking what's the signal and then find a matching USB converter.

As an alternative ... if you have access via TCP you might indeed just use non-ssl (plain text) communication and wireshark to capture the data send and received. We used this technique in some scenarios, to enable replay for development and testing. See https://github.com/tn5250j/gct-trace-file-replay-server
Unfortunately, I don't have the recorder part ... just the replay server part.

I hope that helps somewhat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants