Raspberry Pi and the USB to TTL Serial Cable on Mac (unfinished)
This document is unfinished and is not a complete tutorial
The primary way to interact with a Raspberry Pi is to use WiFi and SSH. The problem with this is that the WiFi on the Pi needs to be configured and in order to do that you'll need a monitor. I've tried to edit the
wpa_supplicant.conf by using the SD card's file system. I achieved this with minimal success the problem with this is that you still need to get the IP address of the Pi, even if it's connected.
Alas, there's another way! Using a wire referred to as the "USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi".
Note: The Raspberry Pi has a power cable, you know the one that plugs into the wall. It is important to note that the Raspberry Pi has another alternative way to be powered. It's the farthest most pin from the board on the corner is a 5 volt input not output, as I misread several tutorials. The cable we're using has a red wire that powers the Pi. This being said you should only use one methods of powering the Pi.
DO NOT USE THE RED WIRE AND POWER ADAPTOR AT THE SAME TIME!
Wiring it up!
red power, black ground, white RX into USB port, and green TX out of the USB port
Installing the PL2303 USB to Serial Driver
Below are links for the two options for getting the PL2303 driver to work on OSX Mavericks. I've tried NoZap in the past with no luck.
Note: It seams you can't have two of the same drivers installed. If you run the NoZap
.app file again it will uninstall it, then close terminal and unplug / plug in the Pi.
I'm going to use try using the
osx-pl2303.kext for the rest of this tutorial.
Making the SSH Connection
We're gonna use the
screen command, which is a terminal emulator. We have to point to the usb port and pass in
115200 (Speed | Baud rate).
screen/cu. then press tab it will show you a couple of options for drivers. When the usb wire is unplugged it shows only a couple of Bluetooth drivers, but when it's plugged in it shows the
PL2303 driver and the number
screen /dev/cu.PL2303-00001004 115200
this later changes for me to, (remember to tab through options!)
screen /dev/cu.PL2303-000013FA 115200
THIS IS WHERE I GET AN ERROR
Errors / Results
- It just hangs with a empty terminal screen.
- It errors / flashes
Cannot open line '/dev/cu.PL2303-000013FA' for R/W: Resource busyand then lands on
Sorry, could not find a PTY.then I get the command line back with a printed
[screen is terminating]statement.
- If I run it with
sudo screen /dev/cu.PL2303-000013FA 115200I get a completly different error
/dev/cu.PL2303-000013FA: ioctl TIOCEXCL failed: Resource busy, then the blank terminal screen.
- A connection has been made. It's just I'm not able to see the command line, or write commands. I believe this might be an issue with the setup on the Pi itself.
- I only get this error (so far) after I've ran the command and gotten a blank screen in one terminal session. I believe that it can't make the same connection twice, hence why it's busy.
- What's the difference between
screen /dev/tty.PL2303-000013FA 115200and
screen /dev/cu.PL2303-000013FA 115200?
- I'm running
sudo apt-get upgradeon the Pi now. (Taking forever)
- Reinstall raspbian
- Futz with the
/bin/inittabfile on the Pi
Inittab & cmdline.txt
sudo nano /etc/inittab
Using the tool I'm getting an error, follow that issue to see how I got the tool to work.
After all this, I run the
screen command again to continue to get a blank terminal window or resource busy.
Where I left off
- This tweet
- Send an email to lurch the creator of
- Stackexchange question Raspberry Pi and the USB to TTL Serial Cable on Mac
- Adafruit's Raspberry Pi Lesson 5. Using a Console Cable (black | white | green)
- RPi Serial Connection
- How to Run Raspberry Pi with No Monitor or Network
- Raspberry Pi Serial Console
- Linux / Unix Command: inittab
- etc/inittab auto login frustration~!
- Headless Setup (black | white | green)
- Adafruit USB Serial Cable (black | white | green)