FAQ W tej małej sekcji FAQ pozwolę sobie z góry odpowiedź na pytania, które mogą się pojawić w związku z przedstawioną tu konstrukcją. Ma to na celu uniknięcia zbędnego nabijania postów w temacie. Oczywiście, nie przewidzę wszystkich pytań, więc jak są jakieś wątpliwości spoza listy to proszę pytać śmiało. Pytanie: Ten projekt jest niepraktyczny. Czy dyski rzędu 80GB to nie za mało jak na serwer w 2019 roku? Odpowiedź: Jak na moje potrzeby to jest dużo. Przypominam, że Dysk Google za darmo oferuje tylko do 15GB przestrzeni, a DropBox tylko do 2GB, a i tak wielu ludziom to starcza. Mogę również dodać, że cała rodzinna kolekcja zdjęć ma teraz tylko jakieś 40GB, a to raptem połowa z tego. Dodatkowo nic nie stoi na przeszkodzie, by użyć większych dysków. Ponadto sama instalacja i konfigurowanie OpenMediaVault na nowszym sprzęcie wyglądałoby bardzo podobnie jak to co tu opisałem. Pytanie: Użyty do projektu sprzęt jest stary, czy lada chwila nie nastąpi awaria? Odpowiedź: Wg. założeń projektu ten serwer ma być włączany raz co jakiś czas, tylko by zrobić kopię zapasową plików na wypadek gdyby coś złego stało się z głównym PC. Pytanie: Czy pobór prądu takiego serwera nie jest znacząco większy względem dostępnych teraz do zakupu serwerów NAS? Odpowiedź: Jak wyżej; wedle założeń projektu ten serwer nie będzie chodzić cały czas, więc to nie jest problem. Pytanie: Czy użyty zasilacz nie jest z czarnej listy? Odpowiedź: Jest czy nie jest, jak znajdę jakiś lepszy, to go tam wsadzę. Pytanie: Ile te dyski wytrzymają jeszcze? Ile posłużą? Odpowiedź: Tego to ja nie wiem sam, ale z chęcią się przekonam. Postaram się za rok czy za dwa napisać w tym temacie jak tam serwer się trzyma, jeśli zapomnę to proszę mi przypomnieć. Pytanie: Czy gra jest warta świeczki? Czy taki serwer nie daje dużego ryzyka, że się posypie i utracą się dane? Odpowiedź: Wedle założeń to jest serwer do backupów, czyli do kopii zapasowej. To nie jest jedyne miejsce gdzie przechowuję dane. Dodatkowo do większości danych stosuję co najmniej zasadę 3-2-1, czyli w skrócie posiadania trzech kopii ważnych danych. Nie będzie katastrofy, jak ten serwer padnie. Do tego ten serwer jest w zupełnie innej części budynku niż główny komputer. Pytanie: Czy taki serwer jest dostępny z całego świata z całej sieci Internet? Odpowiedź: Jak najbardziej może być dostępny. Dostępność tego serwera to nie jest kwestia tego serwera samego w sobie, tylko posiadania publicznego adresu IP/przekierowania portów. To się ustawia w routerze i/lub u dostawcy internetu. Pytanie: Wszystko ok, ale po co, jak można kupić gotowca? Odpowiedź: Projekt powstał w celach edukacyjnych, w celu nadania nowego życia posiadanemu już sprzętowi, oraz też aby po prostu pokazać, że da się to zrobić... Napotkane problemy Troszkę problemów technicznych w trakcie robienia tego projektu się skumulowało. Większość z nich rozwiązałem od razu, chociaż podłączenie WiFi trochę zajęło, tak samo jak skonfigurowanie statycznego adresu IP. W trakcie projektu w zasadzie to OpenMediaVault instalowałem dwukrotnie (i testowałem go na różnych dyskach), ale w powyższym temacie już tego nie uwzględniłem by nie komplikować i tak długiego już opisu całego projektu. Pierwsza instalacja OpenMediaVault w zasadzie miała służyć sprawdzeniu czy jest sens i czy ten sprzęt to uciągnie, bo szkoda byłoby inwestować czas w ogarnianie jego jeśli by miał polec, ale okazało się, że tak, taki stary sprzęt mimo kłopotów w instalacji systemu i konfiguracji można jak najbardziej dobrze jeszcze wykorzystać. Dalszy rozwój projektu W zasadzie można by zrobić jeszcze kilka rzeczy: - można dodać na PCI kartę rozszerzeń ze slotami SATA i podłączyć w ten sposób dodatkowe dyski (jest jeszcze miejsce w obudowie) - można by wywalić tego TL WiFi USB i dać normalną kartę sieciową, ale takiej na razie nie mam - można by sprawdzić, jak wygląda stawianie własnej witryny WWW ze skryptami PHP (bądź nawet innymi) na tym serwerze i jak wygląda kwestia wydajności - można by postawić na tym systemie soft rclone, ale na razie nie miałem takiej potrzeby - można by spróbować jakoś wykorzystać porty RS232 oraz LPT tego komputera, posterować nimi np. z poziomu PHP, lecz na ten moment nie widzę dla tego żadnego zastosowania - można dodać tzw. WAOL, czyli Wake Up On LAN, czyli możliwość zdalnego włączenia serwera przez sieć. Ale ja tego nie potrzebuję w tym przypadku, poza tym większość czasu ten serwer jest odłączony od sieci dla bezpieczeństwa (nigdy nie wiadomo, kiedy będzie jakaś burza czy coś) - można dodatkowo skonfigurować DNS serwera (na LANie a może nawet i w sieci Internet) i mieć do niego dostęp nie tylko poprzez IP, lecz poprzez nazwę domenową Materiały dla zainteresowanych Umieszczam tutaj zgromadzone i zebrane przeze mnie materiały których użyłem przy składaniu serwera z tego tematu. Stanowią one uzupełnienie całego artykułu, tłumaczą dokładniej koncepty które tu przedstawiłem, więc zapraszam do zapoznania się z nimi. Dokumentacja OpenMediaVault (niestety nieco nowszej wersji): 990624 PDFy z sieci na temat wpa_supplicant i WiFi (jeden dotyczy raspberry ale samo łączenie z WiFi jest takie jak na zwykłym systemie Linux): 990622 990623 Mój skrypt łączenia się z WiFi (ten startowany z Cron na starcie systemu): 990621 WLAN setup guide z sieci (o wpa_supplicant): 990626 Podsumowanie Z projektu jestem bardzo zadowolony. Myślę, że udało mi się wykazać, że w roli takiego serwera plików nawet dość stary sprzęt sprawdza się bardzo dobrze. Nie ma zbędnych opóźnień lub "zamulania", a jeśli już jakieś jest, to nie jest przeze mnie odczuwalne. Z całości korzysta się sprawnie i wygodnie. Pobór energii może i jest większy od dostępnych teraz rozwiązań typu NAS, ale założeniem projektu było używanie tego serwera sporadycznie, więc nie jest to problem. Mam nadzieję, że ten serwer długo mi posłuży.
TRENDING
Welcome
NAVIGATE
Home
»
Tutorials & Help
»
Setup WiFi on a Pi Manually using wpa_supplicant.conf
Setup WiFi on a Pi Manually using wpa_supplicant.conf
BY MATT ON APRIL 8, 2017
15
TUTORIALS & HELP
This article explains how to setup WiFi on a Raspberry Pi without needing to connect a monitor or
keyboard to the Pi. Although you can con gure WiFi using the graphical utility within the Raspbian
Desktop this requires that you connect a keyboard, mouse and monitor to your Pi. It is sometimes useful
to be able to do it before you’ve booted the Pi. This is especially useful when using the Pi Zero W or A+
models where attaching a keyboard and mouse requires a USB hub.
The following technique will allow you to take a fresh SD card, setup WiFi and boot a Pi without any other wires than a
power cable. It should work for all Pi models but it’s easier on the devices with on-board Wi-Fi as you don’t need to
worry about a WiFi dongle.
Step 1 – Create a fresh SD card using Raspbian image
Create fresh SD card using the latest available Raspbian image from the O cial Download page.
NOTE: This method to setup WiFi must be completed before you boot this card for the rst time. This is the point at
which the system checks for the wpa_supplicant.conf le. If you have already booted the card you will need to re-write
with a fresh image and continue.
Step 2 – Create a blank text le
Create a blank text le named “wpa_supplicant.conf”. Use a plain text editor rather than a Word Processor.
If using Windows you need to make sure the text le uses Linux/Unix style line breaks. I use Notepad++ (it’s free!) and
this is easy to do using “Edit” & gt; “EOL Conversion” & gt; “UNIX/OSX Format”. “UNIX” is then shown in the status bar.
Insert the following content into the text le :
country=us
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid= " MyNetworkSSID "
psk= " Pa55w0rd1234 "
}
Double check the SSID and password. Both the SSID and password should be surrounded by quotes.
The Country Code should be set the ISO/IEC alpha2 code for the country in which you are using your Pi. Common
codes include :
GB (United Kingdom)
FR (France)
DE (Germany)
US (United States)
SE (Sweden)
Step 3 – Copy to SD Card
Copy the le to the boot partition on your SD card. In Windows this is the only partition you will be able to see. It will
already contain some of the following les :
bootcode.bin
loader.bin
start.elf
kernel.img
cmdline.txt
Step 4 – Eject, Insert and Boot
Safely remove the SD card from your PC and insert into the Pi. Power up the Pi and once it has booted you should be
connected to your WiFi network.
You may be able to use your Router admin interface to list connected devices. Your Pi should appear in the list with an
assigned IP address.
Additional Thoughts
As Sebastian Bjurbom points out in the comments below you might want to take this opportunity to enable SSH as
well. It is disabled by default but it is easy to enable by copying a blank text le named “ssh” to the boot partition. This
can be done at the same time “wpa_supplicant.conf” is copied across.
If you save a copy of the wpa_supplicant.conf le (in a secure location) you can quickly copy it to all your SD cards
when they have a fresh image written to them.
Troubleshooting
If after waiting a few minutes your Pi is not connected to your WiFi consider the following points :
Did you complete this method before booting this SD card for the very rst time? If not start again from Step 1
Check wpa_supplicant.conf exists in the boot partition and the lename is correctly spelt
Check the le contains the text listed above
Double check every character in the SSID
Double check every character the password
Check the SSID and password are correctly surrounded with double quotes “….”
Ensure your text editor is using Linux style line breaks
SHARE.
PREVIOUS ARTICLE
Ampli ed Voice Changer using a Raspberry
Pi Zero
RELATED POSTS
OCTOBER 21, 2019
0
Pi-Hole OLED Status Screen
JUNE 4, 2019
Using a USB Audio Device with the Raspberry Pi
0
NEXT ARTICLE
Raspberry Pi Zero W CCTV Camera with
motionEyeOS
FEBRUARY 5, 2019
1
Setting up SSH Keys on the Raspberry Pi
DECEMBER 15, 2018
2
Running Flask under NGINX on the Raspberry Pi
DECEMBER 8, 2018
3
Remote Access to a Raspberry Pi using MobaXterm
NOVEMBER 5, 2018
0
Raspberry Pi 7-Segment LED Display Module using
Python
SEPTEMBER 4, 2018
0
Using a Level Shifter With the Raspberry Pi GPIO
JUNE 16, 2018
0
Create an I2C OLED Display Slideshow with Python
MAY 13, 2018
1
Creating a Simple FTP Server with a Raspberry Pi
15 COMMENTS
SEBASTIAN BJURBOM on APRIL 9, 2017 8:29 AM
Worth mentioning is that you usually would need a blank le named “ssh” in root in order to be able to
connect remotely on a “headless” installation.
REPLY
KRATZ on JULY 2, 2017 2:27 PM
Hey dude!
Thanks a bunch for your concise guide!
REPLY
P. on JULY 16, 2017 5:58 AM
great guide, thanks. took me a while to get it to work, until i realized the le had to be copied over before
rst boot, if anyone else is having trouble make sure you’re copying into a fresh image.
REPLY
JOWEE on NOVEMBER 21, 2017 11:48 AM
omg thank you!!!
REPLY
BILL MILLER on AUGUST 15, 2017 2:54 PM
I got it to boot, but it brings me to a login prompt for motioneye. I dont know username or password nor
can I determine the IP address.
REPLY
MATT on AUGUST 28, 2017 11:00 PM
The default user name is “admin” with a blank password. You should set a password as soon as
possible!
REPLY
KEVIN on AUGUST 19, 2017 9:24 PM
my rst time doing wpa_supplicant was not easy
rst noob step was naming text le wpa_supplicant.conf.txt
took me half a day to gure out what was wrong
REPLY
JOWEE on NOVEMBER 21, 2017 11:37 AM
hey guys i’ve got the ip address, everything should be working but it won’t connect to it. any ideas are
welcome. thank you
REPLY
MATT on NOVEMBER 21, 2017 11:52 AM
Check in your router settings to see if the Pi can connected and been allocated an IP address. If not
double check the le is named correctly and the SSID and PSK values are 100% correct.
REPLY
LARS on DECEMBER 12, 2017 10:24 AM
I have trouble with connecting to two di erent networks.
Can you con rm my code works?
country=nl
update_con g=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid=”NETWORK1″
psk=”password111″
}
network={
scan_ssid=1
ssid=”NETWORK2″
psk=”password222″
}
REPLY
FILIP on JANUARY 28, 2018 2:35 PM
This worked for me, thanks.
REPLY
GARETH on FEBRUARY 12, 2018 4:32 PM
Worked rst time on my Zero-W. Still trying to get it to talk to my gmail, but an excellent guide
Thanks
for sharing.
REPLY
PETER LOTH on MAY 24, 2019 10:30 PM
Hi,
I performed carefully your guide.
My monitor shows:
Interface wlan0 has IP address 192.168.1.77/24
Default gateway is 192.168.1.1
DNS server address is 192.168.1.1
In Windows 10 from MS Edge I enter URL 192.168.1.77/24
Get error message page not found.
In Windows 10 from MS Edge I enter URL 192.168.1.77
Get error message page not found.
On my WiFi router the Raspberry Pi Zero have IP address 192.168.1.77
What went wrong?
Peter Loth
Netherlands
REPLY
MATT on JUNE 26, 2019 6:21 PM
Nothing has gone wrong. Your Pi has IP adddress 192.168.1.77 on your network. You won’t see
anything in a browser unless the Pi is running a web server capable of delivering webpages. Try
installing a basic web server using this guide : How To Setup A Web Server On Your Raspberry Pi
REPLY
JUHO on JULY 29, 2019 7:36 PM
My problem was that Windows made the wep_supplicant.conf le into .txt le, got rid of the problem
after i made the le with notepad++.
Now it works just ne, thanks for the guide!
REPLY
LEAVE A REPLY
Your Comment
Your Name
Your Email
Your Website
Save my name, email, and website in this browser for the next time I comment.
POST COMMENT
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Search …
Search
RECENT POSTS
OCTOBER 21, 2019
0
Pi-Hole OLED Status Screen
SEPTEMBER 22, 2019
0
KKSB Raspberry Pi 4 Steel Case
JUNE 24, 2019
0
Introducing the Raspberry Pi 4
JUNE 19, 2019
2
Gameboy Zero 6 Button Board from Aliexpress
JUNE 4, 2019
Using a USB Audio Device with the Raspberry Pi
CATEGORIES
0
1-wire
3D Printing
Add-ons
BBC Micro:bit
BerryClip
Books
Camera Module
Cases
Events
General
Hardware
I2C
Infographics
Interfaces
Minecraft
Model A+
Model B+
News
Pi Models
Pi Zero
Power
Programming
Python
Raspbian
RetroGaming
Robotics
Sensors
Software
SPI
Tutorials & Help
Follow on Twitter
17.6K
Subscribe on YouTube
Like on Facebook
Follow on Instagram
1.3K
TAGS
battery
3D Printing
audio
CamJam
DigiMakers
LED
Pi-Lite
Linux
media
Retrogaming
ultrasonic
retroPie
video
WiFi
RASPBERRY PI RELATED
Adafruit Blog
Average Maker
O cial RaspBerry Pi Site
Raspberry Pi Pod
RasPi.tv
RaspTut
Stu About Code
TECH RESOURCES
MattsBits – Pi Resources
Microbit Spy
display
Minecraft
power
portable
berryclip
games
Model A
python
screen
SD card
Birthday
bluetooth
GPIO I2C
Model B
interface
motionEyeOS
Raspberry Jam
security
camera
cambridge
PCB
Kickstarter
LCD
photography
photos
Raspberry Pi Bootcamp
sensor
SPI
raspbian
temperature
Technology Spy
ARCHIVES
Select Month
ABOUT
Uno cial site devoted to the Raspberry Pi credit card sized computer o ering tutorials, guides, resources,scripts and
downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on con guring,
programming and operating it.
POPULAR POSTS
JULY 27, 2012
100
16×2 LCD Module Control Using Python
OCTOBER 20, 2013
99
Analogue Sensors On The Raspberry Pi Using An MCP3008
SEPTEMBER 19, 2014
96
Top 5 Reasons The Raspberry Pi Sucks
RECENT POSTS
OCTOBER 21, 2019
0
Pi-Hole OLED Status Screen
SEPTEMBER 22, 2019
KKSB Raspberry Pi 4 Steel Case
0
JUNE 24, 2019
0
Introducing the Raspberry Pi 4
Entries RSS | Comments RSS
This site is not associated with the o cial Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a
trademark of the Raspberry Pi Foundation.
Copyright © 2019 - All Rights Reserved - Matt Hawkins