How to connect the Raspberry Pi Zero W's Serial Port to an Apple 30 pin Dock

The UART that is routed to the Raspberry Pi GPIO connector header pin 8 (GPIO 14 - UART TX) and pin 10 (GPIO 15 - UART RX) is by default used for the Pi's console output.  If we want to use these pins to connect with an external serial device, such as the serial port that is part of Apple's 30 pin dock connector, we need to re-configure the Pi to disable the console output over that UART / Serial Port. 

A Raspberry Pi Zero W or Zero 2 W with a freshly imaged Raspbian SD card shows one serial port in the /dev/ directory.  

ls /dev

This is /dev/serial1 which points to /dev/ttyAMA0.  This is the Pi's secondary serial port, and is used for the Pi's communication with Bluetooth and is not the UART that is routed to the Pi's big connector header, so let's configure the pi to show the UART we want, which is /dev/serial0.  

sudo raspi-config

After rebooting and repeating the command

ls /dev/

we see that the /dev/serial0 is newly available.  19200 is the iPod protocol's baud rate. 

You can open the serial port with 

sudo screen /dev/serial0 19200

and communicate with the serial port pins on the Raspberry Pi Zero's connector.

If you want these pins to connect to an Apple 30pin dock connector, you can use the Poolside Factory 'Raspberry Pi to iPod HiFi 30-pin-dock Adapter', which not just connects the Raspberry Pi's audio signals to the 30 pin dock connector, but also the UART serial port. 

Leave a comment

Please note, comments must be approved before they are published