Echo Server

An echo server, is probably the simplest server we could make. It should receive a message, and echo it back to the sender.

We earlier said that minicom/PuTTY would transmit any keystrokes we send, and display and data received, so the end result should be the familiar experience of typing and seeing the letters typed appear as expected.

Flow

  1. The character a is typed
  2. minicom/PuTTY encodes the a character's unicode code point (097 in decimal) as a word in a serial frame
  3. The frame is transmitted to the micro:bit over USB
  4. The micro:bit software decodes the frame to get the word
  5. The microbit software re-encodes the word to get a (new but identical) frame
  6. The frame is transmitted to the computer over USB
  7. minicom/PuTTY decodes the frame's word as a unicode code point
  8. The letter a is displayed