RASPI3 – priprava vyuky B101PAP – rozchodenie prepojenia netbooku s RASPi3 po LAN POZN

december 2nd, 2016 | Posted by doc. Pančík in Hlavná stránka

/* Utorok 8.11. 9,00-10,30 (1,5h) RASPI3 – priprava vyuky B101PAP – rozchodenie prepojenia netbooku s RASPi3 po LAN POZN
CIEL :
– Pouzitie netbooku Acer
– Cielom je take nakonfigurovanie sietoveho interfejsu RASPI3 pre kity v BIVS tak aby studenti mohli pracovat so svojimi notebookmi a po
LAN kabli pristupovat z dialky na RASPI3. Student by sa tak oboznamil s Linuxom i embedded zariadeniami.

POSTUP:
****************************************
Postup konfiguracie RASPI3 :
****************************************
/*
/*
****************************************
1.LITERATURA – KNIHA
****************************************
Pracujem s poslednou verziou RASPI3 JESSIE [1] – tu je rozdiel medzi nastavenim statickej IP adresy pre LAN oproti kniham napr. [2] a [6]
(kapitola :Assign a static IP to your Raspberry Pi 2 str.17).Kniha [3] v kapitole “Three Terminals” podrobne pise o terminaloch. Obdobne je to popisane v [4], kde sa popisuje aj VNC server .
Referencna kniha vyku Linuxu je v [5] vratane popisu SSH konfiguracie a praci so subormi. Obdobne je to kniha O’Reilly [7], kde sa nastavenim sttaickej
adresy venuje “2.3 Setting a Static IP Address”.
****************************************
/*
/*
****************************************
2. NASTAVENIE STATICKEJ LAN IP ADRESY PRE RASPi3
****************************************
Vychodiskovuy clanok je [11] :
“This tutorial will show you how to set a static IP address on your Pi with the release of Raspbian Jessie. At the time of writing, the latest release date of Raspbian Jessie is 18-03-2016 with Kernal version 4.1.I recommend doing this on a fresh install, however if you have attempted to set a static IP address already, you may have found yourself editing the interfaces file (/etc/network/interfaces). I hope you made a backup, because you’ll need to remove any edits you have made, and revert it back to its original state!The following is done over SSH, but you could just as well plug your Pi into a monitor, hook up a keyboard and mouse, and use the Terminal instead.
Start by editing the dhcpcd.conf file: sudo nano /etc/dhcpcd.conf ”
Subor je po uprave nasledovny (vid. dole A_SUBOR):
Podla [11] tam pribudol tento kod:
interface eth0
static ip_address=192.168.10.99/24
# static routers=192.168.10.1
# static domain_name_servers=192.168.10.1

Now all you need to do is reboot, and everything should be set! : reboot
You can double check by typing :ifconfig
And checking the interfaces IP address

KOMENTAR:
– static ip_address=192.168.10.99/24 ‘ podsiet 10, umoznuje aby RASPi3 malo pistup na Internet
– # static routers=192.168.10.1 ‘ muselo byt vykomentovane aby RASPi3 malo pistup na Internet
– # static domain_name_servers=192.168.10.1 ‘ muselo byt vykomentovane aby RASPi3 malo pistup na Internet
****************************************
/*
/*
****************************************
3. PRIPOJENIE NA RASPi3 CEZ WLAN0 A PuTTy
****************************************
– RASPi3 : treba povolit WiFi na hornej liste
– RASPi3 : prikaz reboot – restart network interface
– RASPi3 : zistenie IP adresy WLAN0 RASpi3 prikazom ifconfig (napr.: 192.168.1.16)
– PC s WLAN: spustenie PuTTy programu so zistenou IP
– PC s WLAN (napr.):
login as: pi
pi@192.168.1.16′s password: raspberry
– PC s WLAN: mali by sme mat dialkove (remote) pripojenie s RASPi3
– POZNAMKA : WLAN pripojenie je nespolahlive
****************************************
/*
/*
****************************************
4. PRIPOJENIE NA RASPi3 CEZ vyukovy NOTEBOOK LAN0 a PuTTy
****************************************
– vyukovy notebook s LAN0: prikaz v cmd ipconfig : IP adresa LAN0 by mala byt 192.168.10.50
t.j. desiatkova podsiet musi byt nastavena rucne
POZNAMKA: WLAN tohot notebooku je napr. 192.168.1.16 a je pridelovana cez DHCP –> notebook ma pripojnie na Internet
– vyukovy notebook s LAN0 musi byt NEuspaty lebo etehrnet interface musi byt aktivovane
– RASPi3 : prikaz reboot – restart network interface
– RASPi3 : zistenie IP adresy LAN0 RASpi3 prikazom ifconfig (192.168.10.99)
– vyukovy notebook s LAN0 : spustenie PuTTy
– vyukovy notebook s LAN0 ::
login as: pi
pi@192.168.1.20′s password: raspberry
– vyukovy notebook s LAN0 :: mali by sme mat dialkove (remote) pripojenie s RASPi3
****************************************
/*
/*
****************************************
5. PRIPOJENIE NA RASPi3 cez server XMING X a PuTTy –> spustenie PHYTON 3.0
****************************************
– vyukovy notebook s LAN0 : instalacia serveru XMING [1], po instalcii serveru sa objavi ikona vpravo dole a napis Xming Server:0.0
– vyukovy notebook s LAN0 : nastavenie Connection –> SSH –> X11:
–> Enable X11 forwarding – zaskrtnut
–> X display location : localhost:0.0 – vyplnit
– RASPi3 : nesmie spat –> stav LED-iek:
– vyukovy notebook s LAN0 : spustenie PuTTy
– vyukovy notebook s LAN0 ::
login as: pi
pi@192.168.1.20′s password: raspberry
– vyukovy notebook s LAN0 : mali by sme mat dialkove (remote) pripojenie s RASPi3
– vyukovy notebook s LAN0 : spustit PYTHON3 /usr/bin/idle3
– malo by sa objavit remote okno Python IDE,
– vyukovy notebook s LAN0 : ukoncit PYTHON3 CTRL+D a Putty taktiez CTRL+D
– POZNAMKA: prikaz si over v “Desktop Entry” –> tam Command a je tam uvedene napriklad /usr/bin/idle3 pre Python3

[1] c:\Users\Juraj Pancik\Downloads\161105 RASPI3 INSTALL Sever XMING\Xming-6-9-0-31-setup.exe
****************************************
/*
/*
****************************************
X. POZNAMKY :
****************************************
– LAN interface musi byt aktivny – inak prikaz ifconfig ukazuje ze LAN adresa je nefunkcna
– prihlasenie cez putty (WiFi) na zaklade zistenir IP adresy pre WAN adapter na RASP3 – prikaz ifconfig
– prihlasenie cez putty (LAN) na zaklade IP adresy uveenej v subore
/*
/*
****************************************

Poznamky k vyuke :
1. Uvod do LINUX-u [5] v kap.6 a okolo, dalsie kbihy o LINUX-u [10] [3] ci priamo web stranka RASpi [12]
2. Kniha o architekture pocitacov [8] pre predmet B101PAP a knihao cisle PI ako takom [9] :-)

 

[1] c:\Users\Juraj Pancik\Downloads\161103 RASPI3 INSTALL Raspian Jessie 2016-09-23\2016-09-23-raspbian-jessie.zip
[2] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Raspberry_Pi_User_Guide-_4th_Edition.pdf
[3] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Learn Raspberry Pi with Linux.pdf
[4] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Raspberry_Pi_The_Complete_Manual_7th_Edition.pdf
[5] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Raspberry Pi System Software Reference.pdf
[6] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Raspberry_Pi_Computer_Architecture_Essentials.pdf
[7] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP OREILLY Raspberry Pi Cookbook, 2nd Edition.pdf
[8] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Learning_Computer_Architecture_with_Raspberry_Pi.pdf
[9] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\Pi_The_Next_Generation.pdf
[10] d:\Work\Oco\__WORK_RASPBERI_PI\KNIHY\161104 RASPI3 TOP KNIHY komentovane\TOP Exploring_Raspberry_Pi_Interfacing_to_the_Real_World_with_Embedded_Linux.pdf
[11] How to give your Raspberry Pi a Static IP Address – UPDATE, April 20, 2016 https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update
[12] https://www.raspberrypi.org/documentation/linux/

 

A_SUBOR :
/etc/dhcpcd.conf

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname

interface eth0
static ip_address=192.168.10.99/24
# static routers=192.168.10.1
# static domain_name_servers=192.168.10.1

You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.