Hardware Reference
In-Depth Information
If you are working on a project that wants dedicated access to the UART serial device,
you will probably want to remove the console=ttyAMA0,115200 and kgdboc=ttyA
MA0,115200 entries from /boot/cmdline.txt and reboot your Raspberry Pi. If you do
not, you will get unexpected line noise across the serial line from the Linux kernel that
your program/project is probably not ready to deal with.
If you have enabled the serial devices as a login console, you will also want to disable
that. To disable it on Raspbian, comment out the following lines in /etc/inittab (by
changing the line to start with a # ):
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
On Pidora, you simply need to remove the systemd getty service symlink for the
ttyAMA0 device, by running:
$ su -c 'rm -f /etc/systemd/system/getty.target.wants/serial-
getty@ttyAMA0.service'
On either Linux distribution, after making these changes, reboot for them to take ef-
fect.
Weird Noise (or Missing Signal) on the Serial Connection?
Both Ubuntu and Fedora include a piece of software called ModemManager , which han-
dles setting up all sorts of modem devices, from old dial-up modems to more modern
3G/4G devices. Unfortunately, quite a few current modems just have the same generic
converter chip that our USB serial connector cable uses (the pl2303) stuck in front
of the modem.
As a result, ModemManager will try to access it (and keep trying, and keep trying …),
because it has no way of knowing that the device behind /dev/ttyUSB0 is a modem, or
a Braille terminal, or in our case, a Raspberry Pi. This might prevent you from being
able to open /dev/ttyUSB0 , or it might simply cause noise to appear across the console.
Since we know what that USB device is connecting to, we can tell ModemManager to leave
it alone and explicitly blacklist our connector device with udev rules.
Search WWH ::




Custom Search