Raspberry Pi DIY hardware DIY

Raspberry Pi (or Pi 2), a powerful platform to play with various hardware.  Raspbian as a Linux based OS, various Linux resources can be easily reused.  People use it as an educational tool.  Or you may make some custom hardware to work with your imagination!

The hardware I bought was Raspberry Pi 2 Model B version 1.1.  Or RPI2, which I mentioned below.  For those GPIOs and pin connections, I am referring to this:
https://github.com/efarres/Go-Raspberries-Go/blob/master/image/pi_modelb%2B_pinouts.jpg
I capture the latest .jpg file here, in case the link has been modified or removed.


==================================

Task #1:

Test drive with UART-to-serial cable login

To connect a USB to Serial FTDI hardware from PC(running Windows 10) to RPI2.    I am using the latest Raspbian release (2015-11-21-raspbian-jessie.zip) and I updated to latest version using commands:

sudo apt-get update
sudo apt-get upgrade

and then rebooted.  Only a single line of "decompressing kernel" type of message is shown, and nothing else.  No login prompt at all.  I am using "teraterm" with 115200 N81 setting as terminal config.  Since the message seems from RPI2, I believe the UART connection is working, at least the TX pin of RPI2 is OK.

The hardware connection includes only 3 wires from the FTDI USB-to-UART cable:
1. GND  ----> Ground of RPI2, one of the 40 pin header.  I used pin #6.
2. RXD (on FTDI board) ----> GPIO14(TXD) pin #8.
3. TXD (on FTDI board) ----> GPIO15(RXD) pin #10.

So, I guess, in the default setting, UART login seems disabled.  I need to check using LAN cable and my WIFI AP to connect with my Win10 PC.  By using PUTTY, I logged on RPI2.  And then checking:

$ uname -a
Linux rpi2_Fel 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux

$ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

It seems that the console is using tty1, not ttyAMA0 which I expected.  I used nano editor to change tty1 to ttyAMA0:

$ sudo nano /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

And reboot.  Nothing shown on the teraterm screen.  I tried power down by unplug the micro-USB power to RPI2 and reconnect.  The UART boot worked!

Next time when I am out with my laptop PC with FTDI UART to serial canle only, I can still using RPI2 where ever I go.

I believe if your UART to serial cable can be configured to 3.3V, whichever brand don't care.

==================================

(I am still working on the blog for other tasks, come back latter for more tasks done :) ) Have fun Raspberry Pi-ing!!

沒有留言:

張貼留言