Difference between revisions of "Explorer/RaspberryPi/Setup"

From PaparazziUAV
Jump to navigation Jump to search
(Created page with "Hello")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
Hello
[[Explorer]]
 
 
[[Explorer/RaspberryPi/Softwares]]
 
* Installation
Download and install raspbian (debian for raspberry) lite package (same for PI3 and PIzero)<br />
Raspberry Pi OS (32-bit) Lite (buster : 433M)
 
  wget https://downloads.raspberrypi.org/raspbian_lite_latest
 
  Flash the RaspberryPi OS on a 16Gb minimum size SD
  mv raspbian_lite_latest raspbian_lite_latest.zip
  ./balenaEtcher-1.5.79-x64.AppImage
 
* Initial configuration:
PI3 and PIZero can be configured headless, without a keyboard and a display.<br />
You just need to configure the board to connect to a wifi hotspot when power on.<br />
 
* Plug the memory SD card with the fresh raspbian installed.
 
Create file (sudo touch)
  boot/ssh
 
Create the file with following content (sudo vi)
  boot/wpa_supplicant.conf
  "
  ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
  update_config=1
  country=FR
  network={
    ssid="Androidxp"
    psk="pprzpprz"
  }
  network={
    ssid="pprz_router"
    key_mgmt=NONE
  }
  "
* Plug the SD memory card in the raspberry Pi and power on.
* Connect your computer to the same wifi hotspot
* Look for the Raspberry IP on the network
nmap -sn 192.168.1.0/24
 
* Connect to the identified IP
  ssh pi@...
  password: raspberry
 
* Set the configuration
  sudo raspi-config
  1) change user password
  5) P1) enable camera
    P6) login shell:disable
        serial interface:enable
  7) advanced options
    A1) expand filesystem
 
  /etc/hosts
  127.0.1.1      raspberrypi
  to 127.0.1.1      airpi or groundpi
 
  /etc/hostname
  raspberrypi to airpi or groundpi
 
/etc/dhcpcd.conf
"
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
profile static_eth0
static ip_address=192.168.3.2/24
static routers=192.168.3.1
static domain_name_servers=192.168.3.1
# fallback to static profile on eth0
interface eth0
fallback static_eth0
"
 
/boot/config.txt
"
dtoverlay=pi3-disable-bt
"
 
sudo reboot
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
 
sudo systemctl stop hciuart
sudo systemctl disable hciuart

Latest revision as of 01:49, 12 February 2021

Explorer


Explorer/RaspberryPi/Softwares

  • Installation

Download and install raspbian (debian for raspberry) lite package (same for PI3 and PIzero)
Raspberry Pi OS (32-bit) Lite (buster : 433M)

 wget https://downloads.raspberrypi.org/raspbian_lite_latest
 Flash the RaspberryPi OS on a 16Gb minimum size SD

 mv raspbian_lite_latest raspbian_lite_latest.zip
 ./balenaEtcher-1.5.79-x64.AppImage
  • Initial configuration:

PI3 and PIZero can be configured headless, without a keyboard and a display.
You just need to configure the board to connect to a wifi hotspot when power on.

  • Plug the memory SD card with the fresh raspbian installed.

Create file (sudo touch)

 boot/ssh

Create the file with following content (sudo vi)

 boot/wpa_supplicant.conf
 "
 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 update_config=1
 country=FR
 network={
   ssid="Androidxp"
   psk="pprzpprz"
 }
 network={
   ssid="pprz_router"
   key_mgmt=NONE
 }
 "
  • Plug the SD memory card in the raspberry Pi and power on.
  • Connect your computer to the same wifi hotspot
  • Look for the Raspberry IP on the network
nmap -sn 192.168.1.0/24
  • Connect to the identified IP
 ssh pi@...
 password: raspberry
  • Set the configuration
 sudo raspi-config
 1) change user password
 5) P1) enable camera
    P6) login shell:disable
        serial interface:enable
 7) advanced options
   A1) expand filesystem
 /etc/hosts
 127.0.1.1       raspberrypi
 to 127.0.1.1       airpi or groundpi
 /etc/hostname
 raspberrypi to airpi or groundpi
/etc/dhcpcd.conf
"
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
profile static_eth0
static ip_address=192.168.3.2/24
static routers=192.168.3.1
static domain_name_servers=192.168.3.1
# fallback to static profile on eth0
interface eth0
fallback static_eth0
"
/boot/config.txt
"
dtoverlay=pi3-disable-bt
"
sudo reboot

sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service
sudo systemctl stop hciuart
sudo systemctl disable hciuart