jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 8:56 am

I have a Raspberry Pi 3 Model B V1.2 2015.

I am trying to do a headless installation.

1. downloaded the lite version and deployed it on the sd-card.
Then I created ssh file on the /boot as well as the wpa_supplicant.conf (as per instructions)
but when i insert the sd-card and try to boot the raspberry pi, my router does not detect it. all config parameters in the wpa_supplicant are correct.

what is more interesting is that when i take sd-card out and plug it in my computer again (ssh and wpa_supplicant.conf) are no longer on the sd-card.

i am also confused because I have a 64 GB sd-card but when i get disk info, it shows: Capacity 44.5 MB , Available 24 MB. however, installation files are there.

is it even possible to do headless installation using ssh on the Pi 3 Model B V 1.2 ?
is my sd-card too big for it?

Please advise if you have any suggestion ...

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 10:02 am

Could you please post your wpa_supplicant.conf?
jawadkr wrote: i am also confused because I have a 64 GB sd-card but when i get disk info, it shows: Capacity 44.5 MB , Available 24 MB. however, installation files are there.
Because you're only looking at the first partition, which is used for the firmware and kernel. The image creates two partitions.

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 10:11 am

Welcome to the Raspberry Pi forums.
is it even possible to do headless installation using ssh on the Pi 3 Model B V 1.2 ?
Yes.
is my sd-card too big for it?
No.

what is more interesting is that when i take sd-card out and plug it in my computer again (ssh and wpa_supplicant.conf) are no longer on the sd-card.
That is 'interesting' in the sense that it proves your Operating System has booted up and detected and processed those files correctly.

From: https://www.raspberrypi.org/documentati ... /README.md
For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
The same mechanism applies to the WiFi configuration.

I suggest you post the actual content of your wpa_supplicant.conf file. Change the passphrase to "not my passphrase" if you are concerned about security.

Edit: unintended overlap with advice already provided. Left here because of the supporting links.

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 1:09 pm

here is the wpa_supplicant.conf
I even tried to change my router setting to open network without any security and password. (so i deleted the psk and key_magmet value-pairs)
still no result and i can not even see the raspberry pi in the router admin manager page under connected devices

Code: Select all

country=KR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="PTIA-710"
    scan_ssid=1
    psk="14720234"
    key_mgmt=WPA2PSK + AES
}

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 1:11 pm

Do you have another way to access the pi to diagnose the problem?

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 1:18 pm

unfortunately No,
I use a Macbook Air that does not even have an Ethernet port for wired connection to the Pi.
That means I have to purchase a monitor as well as a USB to Ethernet converter.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6086
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 1:22 pm

jawadkr wrote:
Fri Apr 27, 2018 1:18 pm
unfortunately No,
I use a Macbook Air that does not even have an Ethernet port for wired connection to the Pi.
That means I have to purchase a monitor as well as a USB to Ethernet converter.
A usb to 3.3v serial/uart adapter would be much cheaper.

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 1:36 pm

I am no expert regarding wpa_supplicant, but is this valid -

Code: Select all

key_mgmt=WPA2PSK + AES 

This prior discussion might help. Ignore the defunct advice about network/interfaces
viewtopic.php?f=28&t=50312

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 3:07 pm

to make sure, I changed by network to Open access that requires no password / key.

Accordingly, I just deleted the lines for psk and key_mgmt.

or should I leave the values for these two as blank and not delete them?

User avatar
HawaiianPi
Posts: 4880
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Fri Apr 27, 2018 5:42 pm

Which version of Raspbian are you using? If you have the March 2018 version, try the newer April 2018 version (there was a race condition between 2 scripts in the March version that caused wireless issues for some people).

jawadkr wrote:
Fri Apr 27, 2018 1:09 pm

Code: Select all

    scan_ssid=1
Is your router SSID hidden? If so, unhide it. Contrary to popular belief, hiding your SSID does not make your network more secure (it can actually make it less secure), and it creates connection problems. The SSID is not meant or designed to be hidden (that nonsense was something added by router manufacturers as a marketing gimmick).

The default wpa_supplicant.conf looks like this:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
	ssid="Your network SSID"
	psk="Your WPA/WPA2 security key"
	key_mgmt=WPA-PSK
}
So your last line looks suspect as well.

The fact that the files were no longer in the "boot" partition indicates your system correctly started and processed the files. However, since your wpa_supplicant.conf file is incorrect your WiFi never connected. You might be able to fix it by adding a valid wpa_supplicant.conf file to the "boot" partition again, but if you unplugged the power without a proper shutdown SSH key generation may have failed, so you may have to start over with a freshly imaged card.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Sat Apr 28, 2018 3:18 am

it is Raspberry Pi 3 Model B V1.2 2015

after using different versions and playings with the wpa_supplicant.conf

I removed my network security and made it open network (key_mgtm=NONE) and used an older version of Jessie Lite (2017-07).

it showed the MAC address (starting with B8-27-xx-xx) in the router admin page for 2 minutes and then disappeared. And it never assigned a DHCP ip-address to it.

i donno what could be wrong. it works in mysterious ways. lol

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Sat Apr 28, 2018 4:37 am

psk="14720234"
that must be the password and not the by
Separate tool, wpa_passphrase, can be used to generate 256-bit keys from ASCII passphrase
generated passcode,
that would be
psk=14720234 no ""
___________________________________________________
key_mgmt=WPA2PSK + AES
key_mgtm=NONE
from here
# key_mgmt: list of accepted authenticated key management protocols
# WPA-PSK = WPA pre-shared key (this requires 'psk' field)
# WPA-EAP = WPA using EAP authentication
# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically
# generated WEP keys
# NONE = WPA is not used; plaintext or static WEP could be used
# WPA-NONE = WPA-None for IBSS (deprecated; use proto=RSN key_mgmt=WPA-PSK
# instead)
# FT-PSK = Fast BSS Transition (IEEE 802.11r) with pre-shared key
# FT-EAP = Fast BSS Transition (IEEE 802.11r) with EAP authentication
# WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms
# WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms
# SAE = Simultaneous authentication of equals; pre-shared key/password -based
# authentication with stronger security than WPA-PSK especially when using
# not that strong password
# FT-SAE = SAE with FT
# WPA-EAP-SUITE-B = Suite B 128-bit level
# WPA-EAP-SUITE-B-192 = Suite B 192-bit level
# OSEN = Hotspot 2.0 Rel 2 online signup connection
# FILS-SHA256 = Fast Initial Link Setup with SHA256
# FILS-SHA384 = Fast Initial Link Setup with SHA384
# FT-FILS-SHA256 = FT and Fast Initial Link Setup with SHA256
# FT-FILS-SHA384 = FT and Fast Initial Link Setup with SHA384
# If not set, this defaults to: WPA-PSK WPA-EAP
#

User avatar
HawaiianPi
Posts: 4880
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Sat Apr 28, 2018 7:10 am

My local network uses WPA2-PSK (AES), and this is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3B(+) & Pi Zero W, or a Raspbian compatible USB WiFi dongle on other models. Everything is done before you boot, and can be done on a Windows or Mac computer which only has access to the small FAT32 "boot" partition of a Raspbian imaged SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card.
    • You don't need to extract the image or format the card prior to writing.
    • Just run Etcher, choose the Raspbian .zip you downloaded, pick your SD card and write.
    • If you have trouble, verify the SHA256 checksum of the download.
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the card (labelled "boot").
    • If you get a message telling you the card must be formatted, cancel it.
  5. On that small FAT32 partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
  6. To connect to a wireless network, create another file on the card called wpa_supplicant.conf, which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
         ssid="Your network name/SSID"
         psk="Your WPA/WPA2 security key"
         key_mgmt=WPA-PSK
    }
    • Edit country=, ssid= and psk= with your information and save the file.
    • Use the 2 letter country abbreviation in CAPS.
    • Use a pure text editor, not a word processor, to edit the wpa_supplicant.conf file.
  7. Make sure that both files are in the main directory of the small FAT32 partition, not in any folder.
  8. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file. If it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network. Give your Pi some time to boot and connect to your network (the first boot always takes longer), then you should be able to SSH into the Pi and configure it how you like.

If you have a Zeroconf network service installed (Apple's iTunes, Bonjour or Quicktime install Zeroconf), you can SSH into [email protected] (provided you don't have any other Pi computers on your network with the same default hostname). Otherwise you must SSH into your Pi's IP address, which you can find by logging into your router and checking the list of connected clients, or using a network scanner app (like Fing for smartphones) to find your Pi on your network.

To login using SSH from Windows, you can use an app called PuTTY, which looks like this.
Image

In the Host Name (or IP address) field, enter either, make sure SSH is selected (it should be by default) and click on Open.

If you have done everything correctly, a terminal window will open and you should see a password request. Although, if it's the first time you've connected to your Pi, you may have to answer "yes" to a security question, and then you'll get the password prompt. After login you'll get a warning about having SSH enabled with the default password, so type passwd[Enter] and enter a new password (twice). And now you can do whatever you need to configure your little Raspberry Pi computer.

Code: Select all

sudo raspi-config
Will bring up the Raspbian configuration utility. If you have more than one Raspberry Pi computer on your network it's a good idea to change the hostnames to something unique so that they can easily be identified.

Note:
If you have attempted this and failed, then unplugged power to turn off your Pi, you should start over with a freshly imaged card. Improperly powering down the Pi can cause SSH key generation to fail, which will prevent SSH logins (even if everything else is correct).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 4:50 am

I gave up on headless and found a monitor

Wireless says: no APs found
although near me there are around 30 APs

I searched for similar problems and solutions.
nothing works.

I even tried different images.

i think it is hardware problem.

This is my first purchase from Raspberry Pi.

very disappointed so far.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 5:02 am

-a- so how about a ethernet cable to router and check the
ifconfig
if ok can do a update upgrade first
does the ifconfig command show a wlan0 device at all?


-b- i remember that there was a situation where a BAD wpa_supplicant.conf file
conflicted with try to use the desktop wifi setup?
so i needed to delete my wrong manual settings there and then was able to do the config from network preferences / interface / wlan0 /...

?but as you use RASPBIAN LITE
what exact info about APs you get by what command?

ejolson
Posts: 3831
Joined: Tue Mar 18, 2014 11:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 6:03 am

jawadkr wrote:
Fri Apr 27, 2018 8:56 am
I have a Raspberry Pi 3 Model B V1.2 2015.
The Raspberry Pi 3 Model B released in February 2016 was the first model with built-in WiFi. Since your device was built in 2015 it does not have built-in WiFi and you need to attach a USB WiFi dongle for WiFi to work.

User avatar
hansotten
Posts: 324
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 6:15 am

Funniest thread in a long time!

When there is no wifi interface, headless wifi will not work. After all those replies ejolson was the first to notice that ;)
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

User avatar
rpdom
Posts: 15605
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 6:19 am

ejolson wrote:
Tue May 01, 2018 6:03 am
jawadkr wrote:
Fri Apr 27, 2018 8:56 am
I have a Raspberry Pi 3 Model B V1.2 2015.
The Raspberry Pi 3 Model B released in February 2016 was the first model with built-in WiFi. Since your device was built in 2015 it does not have built-in WiFi and you need to attach a USB WiFi dongle for WiFi to work.
Release date and build date are two different things. All Pi 3Bs have WiFi. I've just checked one of mine and the date on the board is 2015. It definitely has WiFi.

ejolson
Posts: 3831
Joined: Tue Mar 18, 2014 11:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 6:25 am

rpdom wrote:
Tue May 01, 2018 6:19 am
Release date and build date are two different things. All Pi 3Bs have WiFi. I've just checked one of mine and the date on the board is 2015. It definitely has WiFi.
Thanks for the correction. Never mind my disruption.

User avatar
HawaiianPi
Posts: 4880
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 7:34 am

rpdom wrote:
Tue May 01, 2018 6:19 am
Release date and build date are two different things. All Pi 3Bs have WiFi. I've just checked one of mine and the date on the board is 2015. It definitely has WiFi.
Isn't that actually a copyright date, and not a manufacturing date?
RPi3B-2015.jpg
RPi3B-2015.jpg (54.95 KiB) Viewed 4115 times

As I recall, the manufacturing date is on the bottom sticker.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

jawadkr
Posts: 7
Joined: Fri Apr 27, 2018 8:47 am

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 7:57 am

i have tools shortages around me.

So today i found an Ethernet cable and connected my Pi to router directly. but i prefer a wireless connection and remove this monitor and use my laptop instead.


here is i get doing - ifconfig

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.78  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::xxx:xxxx:xxxx:xxx prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 9754  bytes 11079023 (10.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7783  bytes 898560 (877.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 9  bytes 524 (524.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 524 (524.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0 (wired) has been assigned DHCP address. but the wlan0 seems like it is up but not Running.

on the GUI - No APs found - scanning...

i update the firm-ware too.

sudo rpi-update

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 8:06 am

sorry, do you want to know all about your board and config? try this
Last edited by KLL on Tue May 01, 2018 8:29 am, edited 1 time in total.

fruitoftheloom
Posts: 21088
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Headless, Raspberry Pi 3 Model B V1.2 2015

Tue May 01, 2018 8:10 am

jawadkr wrote:
Tue May 01, 2018 7:57 am
i have tools shortages around me.

So today i found an Ethernet cable and connected my Pi to router directly. but i prefer a wireless connection and remove this monitor and use my laptop instead.


here is i get doing - ifconfig

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.78  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::xxx:xxxx:xxxx:xxx prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 9754  bytes 11079023 (10.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7783  bytes 898560 (877.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 9  bytes 524 (524.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 524 (524.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0 (wired) has been assigned DHCP address. but the wlan0 seems like it is up but not Running.

on the GUI - No APs found - scanning...

i update the firm-ware too.

sudo rpi-update

rpi-update installs a testing firmware / kernel and should only be used under advisement, as it can break your Operating System.


The correct way to fully update Stretch is:

Code: Select all

sudo apt update
sudo apt full-upgrade
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

Return to “Beginners”