What is the earliest mention of a data link protocol for electronic devices?

by Worse_Username

Everyone knows about TCP/IP stack and Ethernet, but I'm interested in what was before it, when did the idea of two electronic devices exchanging digital(not electronic data) originate.

Not necessarily separate, but I'm also interested in learning what is the earliest documented formal definition of such a protocol.

Reading up on history of ARPANET gave me mention of 1822, a protocol that apparently performed functions of both physical, data link and network layer, but I got no idea about where to look next.

spiderspit

The first peripheral device was the printer. So i would say the serial port and the machine code needed to make a computer and printer talk to each other was the first such protocol.

Old text document formats used code such as LF,CR to communicate commands (from typewriter terminology) that corresponded to Line Feed and Carriage Return. We saw them in electronic typewriters as well as languages like Pascal etc.