I took it to heart when @kassandra_perch said to document everything durring her talk at EmpireJS. So I documented my whole process, what went right and what went wrong.
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!
red power, black ground, white RX into USB port, and green TX out of the USB port
Note: I originally had the white and green wires reversed because of this rpi wiring image image from a adafruit tutorial, which is why I had the diagram. Special thanks to Francis Gulotta @reconbot.
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.
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).
Enter 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 00001004
.
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
- It just hangs with a empty terminal screen.
- It errors / flashes
Cannot open line '/dev/cu.PL2303-000013FA' for R/W: Resource busy
and then lands onSorry, 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
iesudo screen /dev/cu.PL2303-000013FA 115200
I 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 115200
andscreen /dev/cu.PL2303-000013FA 115200
?
- I'm running
sudo apt-get upgrade
on the Pi now. (Taking forever) - Reinstall raspbian
- Futz with the
/bin/inittab
file on the Pi
sudo nano /etc/inittab
Here's my inittab file and my cmdline.txt file.
Like a gift from the gods someone (lurch) made this, rpi-serial-console which checks both cmdline.txt
and 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.
- This tweet
- Send an email to lurch the creator of
rpi-serial-console
- Stackexchange question Raspberry Pi and the USB to TTL Serial Cable on Mac
- Fritzing
- 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)
You need to swap your green and white wires; you have TX ↔TX and RX ↔ RX, when you need TX ↔ RX and RX ↔ TX.
PL2303 drivers are horrible under OS X. Do you in fact have a /dev/cu.PL2303-000013FA device file? The difference between a TTY and a CU device is mostly historical. Just make sure you're a member of the
dialout
,tty
orcallout
(??) groups.I'd strongly recommend that you try different serial hardware, like a FTDI Basic Breakout - 3.3V. FTDI drivers just work.