Difference between revisions of "Raspberry Pi"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
m
Line 89: Line 89:
 
==Related==
 
==Related==
 
*[[Android on Raspberry Pi]]
 
*[[Android on Raspberry Pi]]
 +
 +
[[Category:Computer Technology]]

Revision as of 16:13, 6 April 2020

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. The baseline cost of the Raspberry Pi is between $5 and $35. It is popular with hobbyists and engineers because the Raspberry Pi has so many uses. It can be expanded with modules, like adding a camera module or a touchscreen module, to increase the scope of the device.

The first commercially available Raspberry Pi unit was launched on February 19, 2012, and sales started ten days later. This version could run Linux-based desktop operating systems, and featured 256MB of RAM, one USB port, and no Ethernet port. This was named the Model A.

Pi Family Zero annotated 1500.jpg

Pi 1, Pi 2, and Pi 3 indicate the “generation” of the model, where roughly Pi 1 is 2012-14 models, Pi 2 is 2015 models, and Pi 3 is 2016.

For most users, it makes sense to buy the Raspberry Pi 3 Model B, which retails at $35 on Amazon. That’s the only model which comes with Wi-Fi and Bluetooth built-in, and includes a dedicated Ethernet port.

When you buy a Raspberry Pi starter kit you are getting the device itself and a number of useful accessories to fit the needs of most general purpose uses.

With a Raspberry Pi, you can do most things you do with a regular computer like web browsing, document editing, playing games, coding and much more.

There are MANY Raspberry Pi accessories out there, but you just need a few to quickly get started.

Diagnostics w/o BIOS

Raspberry Pi has no configurable BIOS: The way your Raspberry Pi provides diagnostic details is through the various LEDs it has on its board.

All models of Raspberry Pi

  • LED1: Green, labelled ACT: SD card access
  • LED2: Red, labelled PWR: 3.3V power is present
  • Only on the original Raspberry Pi Model B
  • LED3: Green, labelled FDX: Full duplex (LAN) connected
  • LED4: Green, labelled LNK: Link/activity (LAN)
  • LED5: Yellow, labelled 100: 100Mbit (LAN) connected

On the Model A/A+ with no wired networking, the last three LEDs aren't present on the PCB, and you'll find the labelling is slightly different on earlier revisions of the Model B, although their functions are identical.

When you first connect the Pi to a power source, the red LED2 should light. This indicates the device is getting the correct amount of power, and this LED should remain lit for the entire time your Raspberry Pi remains powered.

There is a pseudo BIOS on the board, which is actually a closed source firmware using proprietary code programmed into the SoC (System on a Chip) processor, which cannot be modified. This firmware concludes by directing to a bootloader on the SD card.

Lost Root/Admin Password

  1. Power down and pull the SD card out from your Pi and put it into your computer.
  2. Open the file 'cmdline.txt' and add 'init=/bin/sh' to the end. This will cause the machine to boot to single user mode.
  3. Put the SD card back in the Pi and boot.
  4. When the prompt comes up, type 'su' to log in as root (no password needed).
  5. Type "passwd pi" and then follow the prompts to enter a new password.
  6. Shut the machine down, then pull the card again and put the cmdline.txt file back the way it was by removing the 'init=/bin/sh' bit.

The cmdline.txt should look something like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait init=/bin/sh

This file should contain a line of text that resembles the line below.

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

additional comments:

You must modify this file so that the Raspberry Pi starts on the bin/sh script, which will allow you to change the password of your Raspberry Pi without knowing it. To do this, simply add the line below to the end of the file and save it.

init=/bin/sh

Shellinabox is handy for Raspberry Pi

Shellinabox has a built-in web server that runs as a web-based SSH client on a specified port and prompt you a web terminal emulator to access and control your Raspberry Pi SSH Shell remotely using any AJAX/JavaScript and CSS enabled browsers without the need of any additional browser plugins such as FireSSH.

On Debian, Ubuntu and Linux Mint

sudo apt-cache search shellinabox
sudo apt-get install openssl shellinabox

By default, shellinaboxd listens on TCP port 4200 on localhost.

Now you can use a WEB BROWSER to gain terminal access to your Raspberry Pi!

Raspbian PIXEL

Pixel DE Security makes it more of a pain in the rear to setup your new Raspberry Pi.

SSH will be disabled by default on their official release images. But they made it REALLY EASY to enable it without the need to connect a keyboard and monitor! It is annoying they decided to disable ssh server by default, at least they made it less of a hastle to enable it. In short,

sudo touch /boot/ssh

That's good for ONE BOOT ONLY, because the system will delete the empty file. Once in, you need to configure ssh to be enabled on subsequent boots.

In the past, SSH was enabled by default, so people using their Pi headless could easily update their SD card to a new image. Switching SSH on or off has always required the use of raspi-config or the Raspberry Pi Configuration application, but to access those, you need a screen and keyboard connected to the Pi itself.

If you want to enable SSH, all you need to do is to put a file called ssh in the /boot/ directory.

Put the SD card in your workstation PC, mount the filesystem rw, go into the /boot directory and create an empty file called ssh.

The contents of the file don’t matter: it can contain any text you like, or even nothing at all. When the Pi boots, it looks for this file. When found the system enabled SSH server and.... DELETES THE FILE!

Now go to the Raspberry Pi configuration application or raspi-config and change the setting to ensure ssh server remains active after you reboot.

In the terminal

sudo raspi-config

Select Interfacing Options. Navigate to and select SSH. Choose Yes.

Related