Sunday 10 April 2011

Sending And Receiving

For this post, we're going to send some characters out the serial port, which is then looped back, so we can read what we sent, and we're going to do it just using command line tools.

To do this, we're going to have to do a little hardware. It's very minor, though. What you'll need is a connector that plugs into your serial port. On that connector, join pins 2 & 3 together, which are the send and receive pins. This is the case for both D9 and D25 connectors. Most connectors have each pin numbered.

If you're handy with a soldering iron, a connector with solder buckets can be used. These are easily linked with a blob of solder, or a short piece of wire. Make sure that no solder spikes touch any other pins, though.

If soldering seems a bit daunting, then connectors that accept crimp connectors can be used.

With the hardware sorted out, let's look at the software.

If you need to set the permissions to use your serial port, then this was covered in a previous post, here.

____________________