Those are some good notes. I'll address them:
13 hours ago, kostrse said:
I would make the transport layer between x16 and the external card as abstract and general purpose as possible
The connection is currently broken down into an Address and a Data channel. The Address channel is used to select the active port and to control serial parameters. The Data channel is completely transparent, so you can shove through whatever data you want - text, binary data, or even data meant to be UDP or TCP payloads.
13 hours ago, kostrse said:
* I would make port numbers purely logical (e.g. 0-255), not bound to any particular physical ports on the external card (e.g. Arduino).
Port numbers are entirely at the discretion of the external hardware (ie Arduino). There's nothing in the design or specification that requires port 1 to be the USB port or port 2 to be a serial port or anything like that. If you use an Arduino Mega, there is plenty of room to have several ports of different types, including USB, RS-232, SPI, and TTL serial to a network interface.
i do NOT plan to directly support a network transceiver, so this should not be used for TCP/UDP data. Instead, you would need to build a smart device externally to handle that. The preferred method at this point would be an ESP32 or ESP8266 running an AT firmware (aka a modem emulator.)
13 hours ago, kostrse said:
* I would not require to provide parameters like transfer rate from X16, if it's not strictly required for establishing connection between the X16 and the card
The purpose of this interface is to connect to RS-232 devices. Other layer 1 protocols, such as I2C or SPI are compatible enough at the data layer, but you should still send the RS-232 initialization sequence, to ensure that if the connection is to an RS-232 device, the UART is configured correctly. Having said that, I expect there to be a default connection speed, which will be 9600,n,8,1 in my reference driver.
Having said that - SPI connections will simply ignore the parameters that don't make sense for it. SPI does not have a "baud rate", but it does have a maximum speed cap, so I plan to add some basic SPI parameters into the protocol later. I'll probably also work in some way to set the I2C address to allow sub-addressing on an I2C connection.
13 hours ago, kostrse said:
To have an external card (Arduino or Raspberry) with modern Linux and modern networking stack (Wi-Fi, Ethernet, HTTPS, OpenSSL etc.), and ability to write a server app using any modern programming language (C++, Go, Python etc.) which would listen for incoming connections from the X16, and make requests to outside services using modern protocols (HTTP, SSH, FTP, SMB etc.) with all encryption, authentication, compression etc.
The choice of logical ports between X16 and the server implementation on external card would not be predefined and up to the server implementation, application level protocol also could depend on particular server implementation.
That's a perfectly reasonable use case. In fact, it's one of my expected use cases - using a Pi as an external UART is exactly the kind of this this standard is designed to for.
However, the reference firmware will run on an Arduino Mega, which has 4 serial ports. What you do with it is up to you, but 0-3 should generally be used for RS-232. Use other port numbers as you wish. The important thing is that your software should allow the user to set any port number, and the software should always have the ability to set all of the standard parameters, to allow for any Layer 1 transport to the communication device. (ie: a terminal program needs to set not only baud rate, but should also be able to set SPI speed and I2C channel, in the event someone makes a network modem that runs over SPI.) Never expect that a communication device will run on just the Layer 1 you expect.
If you want to support additional standard protocols and port numbers, it's reasonable to create a list of suggested port numbers for specific purposes. For now, I want to keep that loose, and if you always allow the user to pick a port number and communication parameters, there should be no conflicts with this use case.