Thursday 13 September 2012

Following the excellent instructions at D. Bodnar's pi page: http://www.trainelectronics.com/RaspberryPi/ I successfully made a serial cable for the pi.

I bought an rs232 to ttl chip from http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=221068548032 very cheap, and it even arrived next day!

Initially, I soldered the chip right-to-left, which didn't work. It was only by noticing the layout of the resistors in D. Bodnar's page above that I realised the chip was inverted. Note that this chip has 6 resistors, unlike the above page. Click the image to enlarge it. I guess I'm lucky I didn't fry it, or the pi. The chip did get very hot. Ahem.



Once the cable was complete, I needed to test it via a terminal. I don't have a windows machine with a COM port, so I used a linux laptop and ran

screen /dev/ttyS0 115200

On my crunchbang 11 linux setup, this initially just returned '[screen is terminating]'. Suspecting permissions on /dev/ttyS0 I ran the command again as root, pressed Return a few times, and it worked! I'll work out what the permissions issue on /dev/ttyS0 is later.


Note the ttyAMA0 presented by the pi compared to the normal tty1 you see over e.g. HDMI console. Interestingly, the terminal stays connected after a reboot and you can see the pi's output as it is restarting.
 


No comments:

Post a Comment