jahboater
Posts: 4761
Joined: Wed Feb 04, 2015 6:38 pm

Re: Loosing my head over headless...

Tue Oct 24, 2017 1:28 pm

SurferTim wrote:
Tue Oct 24, 2017 12:46 am
Edit: The only thing that would stop Stretch connecting is if you are using WEP encryption on your wireless network.
No, that works fine too (128 bit WEP).
(Yes I know its insecure, I am getting a new router in a couple of weeks).

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Loosing my head over headless...

Tue Oct 24, 2017 1:31 pm

It isn't a fight. I am troubleshooting the new versions of Stretch 2017-09-07, both full and lite. If you want to revert to Jessie, please feel free to do so.

You may assume human error, but I try to eliminate that by repeating the tests more than once. I was also a network IT for years.

With Stretch 2017-09-07, mine works and yours doesn't. It isn't my bad.

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

Re: Loosing my head over headless...

Tue Oct 24, 2017 1:44 pm

If anybody else is running into this issue and can connect a monitor and keyboard or use serial, please post the output of 'sudo journalctl'

Mike_in_clw
Posts: 8
Joined: Mon Oct 23, 2017 5:45 pm

Re: Loosing my head over headless...

Tue Oct 24, 2017 5:15 pm

Here is the debug output from the Cisco AP, the boot up with stretch is never attempting to communicate with the AP, so I think the radio is not coming on.



ap#debug dot11 aaa manager keys
dot11 AAA mgr key processing debugging is on
ap#
ap#!plugged in PiZeroW with stretch microSD
ap#
ap#
ap#
ap#
ap#
ap#!waited 5 minutes
ap#
ap#
ap#!unplugged power to PiZeroW
ap#!swapped in Jessi microSD
ap#
ap#
*Jan 30 07:53:43.648: dot11_dot1x_send_ssn_eapol_key: eapol->length 95
*Jan 30 07:53:43.648: dot11_dot1x_build_ptk_handshake: building PTK msg 1 for b827.eb45.----
*Jan 30 07:53:43.648: dot11_dot1x_build_ptk_handshake: ptk key len 32
*Jan 30 07:53:43.648: dot11_dot1x_build_ptk_handshake: ptk key data len 0
*Jan 30 07:53:54.404: dot11_dot1x_send_ssn_eapol_key: eapol->length 95
*Jan 30 07:53:54.404: dot11_dot1x_build_ptk_handshake: building PTK msg 1 for b827.eb45.----
*Jan 30 07:53:54.404: dot11_dot1x_build_ptk_handshake: ptk key len 32
*Jan 30 07:53:54.404: dot11_dot1x_build_ptk_handshake: ptk key data len 0
*Jan 30 07:53:54.504: dot11_dot1x_send_ssn_eapol_key: eapol->length 95
*Jan 30 07:53:54.504: dot11_dot1x_build_ptk_handshake: building PTK msg 1 for b827.eb45.----
*Jan 30 07:53:54.504: dot11_dot1x_build_ptk_handshake: ptk key len 32
*Jan 30 07:53:54.504: dot11_dot1x_build_ptk_handshake: ptk key data len 0
*Jan 30 07:53:54.524: dot11_dot1x_verify_ptk_handshake: verifying PTK msg 2 from b827.eb45.----
*Jan 30 07:53:54.524: dot11_dot1x_ssn_generate_ptk: wpa-v2 PSK: use ssid psk as pmk
*Jan 30 07:53:54.524: Calculating MIC across (123 bytes):
01 03 00 77 FE 01 09 00 20 00 00 00 00 00 00 00 02 88 6D 6F 98 01 16 F2 5B 40 75 47 5D A9 67 D1
D6 10 E4 C6 F7 3D 0E 76 41 27 0E E0 FB E7 7F 12 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 18 DD 16 00 50 F2 01 01 00 00 50 F2 02 01 00 00 50 F2 02 01 00 00 50 F2 02
*Jan 30 07:53:54.524: MIC key used (whole ptk):
C8 D5 31 16 CC 87 FA FA 14 37 A6 AF 47 BE ED A4 FA 63 F4 74 B4 F8 9F A6 B0 26 FE 47 F8 F0 9E 07
E6 59 51 3E EC D2 81 EA B6 27 A0 8D A0 4E C8 BC F1 5B 37 B2 CE E6 C1 96 45 E2 DC 03 2F 6B BB 1F
*Jan 30 07:53:54.528: dot11_dot1x_verify_ptk_handshake: Handshake passed
*Jan 30 07:53:54.528: dot11_dot1x_send_ssn_eapol_key: eapol->length 121
*Jan 30 07:53:54.528: dot11_dot1x_build_ptk_handshake: building PTK msg 3 for b827.eb45.----
*Jan 30 07:53:54.528: dot11_dot1x_build_ptk_handshake: ptk key len 32
*Jan 30 07:53:54.532: dot11_dot1x_verify_ptk_handshake: verifying PTK msg 4 from b827.eb45.----
*Jan 30 07:53:54.532: Calculating MIC across (99 bytes):
01 03 00 5F FE 01 09 00 20 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
*Jan 30 07:53:54.532: MIC key used (whole ptk):
C8 D5 31 16 CC 87 FA FA 14 37 A6 AF 47 BE ED A4 FA 63 F4 74 B4 F8 9F A6 B0 26 FE 47 F8 F0 9E 07
E6 59 51 3E EC D2 81 EA B6 27 A0 8D A0 4E C8 BC F1 5B 37 B2 CE E6 C1 96 45 E2 DC 03 2F 6B BB 1F
*Jan 30 07:53:54.532: dot11_dot1x_verify_ptk_handshake: Handshake passed
*Jan 30 07:53:54.532: dot11_dot1x_send_ssn_eapol_key: eapol->length 127
*Jan 30 07:53:54.532: dot11_dot1x_build_gtk_handshake: building GTK msg 1 for b827.eb45.----
*Jan 30 07:53:54.532: dot11_dot1x_build_gtk_handshake: dot11_dot1x_get_multicast_key len 32 inde
x 1
*Jan 30 07:53:54.532: dot11_dot1x_hex_dump: GTK: 55 84 2E 5C 85 18 A6 C7 62 81 DF 10 CA C7 41 95
E6 A1 BB 93 4A 1B 8F 51 94 26 89 23 17 23 0A C2
*Jan 30 07:53:54.540: dot11_dot1x_verify_gtk_handshake: verifying GTK msg 2 from b827.eb45.----
*Jan 30 07:53:54.540: Calculating MIC across (99 bytes):
01 03 00 5F FE 03 11 00 20 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
*Jan 30 07:53:54.544: MIC key used (whole ptk):
C8 D5 31 16 CC 87 FA FA 14 37 A6 AF 47 BE ED A4 FA 63 F4 74 B4 F8 9F A6 B0 26 FE 47 F8 F0 9E 07
E6 59 51 3E EC D2 81 EA B6 27 A0 8D A0 4E C8 BC F1 5B 37 B2 CE E6 C1 96 45 E2 DC 03 2F 6B BB 1F
*Jan 30 07:53:54.544: %DOT11-6-ASSOC: Interface Dot11Radio0, Station b827.eb45.---- Associated
KEY_MGMT[WPA PSK]
ap#
ap#

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Loosing my head over headless...

Tue Oct 24, 2017 8:27 pm

Mike_in_clw wrote:
Tue Oct 24, 2017 5:15 pm
Here is the debug output from the Cisco AP, the boot up with stretch is never attempting to communicate with the AP, so I think the radio is not coming on.
If the radio is associating with Jessie on your RPi, then it is not your hardware. If the radio is associating with Stretch on my RPi, then it is not the OS.

The only difference is the setup. If your radio is not activating, I would suspect your wpa_supplicant.conf file has a problem. Just saying...

The best way to tell is with a keyboard and a monitor on your RPi during the boot.

Mike_in_clw
Posts: 8
Joined: Mon Oct 23, 2017 5:45 pm

Re: Loosing my head over headless...

Tue Oct 24, 2017 10:44 pm

SurferTim wrote:
Tue Oct 24, 2017 8:27 pm
Mike_in_clw wrote:
Tue Oct 24, 2017 5:15 pm
Here is the debug output from the Cisco AP, the boot up with stretch is never attempting to communicate with the AP, so I think the radio is not coming on.
If the radio is associating with Jessie on your RPi, then it is not your hardware. If the radio is associating with Stretch on my RPi, then it is not the OS.

The only difference is the setup. If your radio is not activating, I would suspect your wpa_supplicant.conf file has a problem. Just saying...

The best way to tell is with a keyboard and a monitor on your RPi during the boot.

Could it be that Stretch has a different requirements for wpa_supplicant.conf than jessie does, specifically that it requires the interface name?

I have the same conf file, I am positive, as several times I booted both using a 'drag and drop' into /boot after using etcher to burn the image


you want the hassle of getting a syslog off of somethign without a network connection, here you go:

Here is a grep of dhcp on the syslog ( via sudo cp -f /var/log/syslog /boot/syslog) and then moved the sd back to my pc to read it) :

Sep 7 15:54:47 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Sep 7 15:54:48 raspberrypi dhcpcd[317]: wlan0: ctrl_interface not defined in /etc/wpa_supplicant/wpa_supplicant.conf
Sep 7 15:54:48 raspberrypi dhcpcd-run-hooks[340]: wlan0: ctrl_interface not defined in /etc/wpa_supplicant/wpa_supplicant.conf
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: not interacting with wpa_supplicant(8)
Sep 7 15:54:49 raspberrypi dhcpcd-run-hooks[341]: wlan0: not interacting with wpa_supplicant(8)
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: waiting for carrier
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: carrier acquired
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: adding address fe80::1115:f9e5:8550:3f91
Sep 7 15:54:49 raspberrypi dhcpcd[317]: DUID 00:01:00:01:21:44:28:49:b8:27:eb:45:10:2b
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: IAID eb:45:10:2b
Sep 7 15:54:49 raspberrypi dhcpcd[317]: wlan0: carrier lost
Sep 7 15:54:50 raspberrypi dhcpcd[317]: wlan0: deleting address fe80::1115:f9e5:8550:3f91
Sep 7 15:55:19 raspberrypi dhcpcd[317]: timed out
Sep 7 15:55:19 raspberrypi dhcpcd[317]: forked to background, child pid 445
Sep 7 15:55:19 raspberrypi systemd[1]: Started dhcpcd on all interfaces.



And Jessie via putty, because the interface came up:

[email protected]:~ $ sudo more /var/log/syslog | grep "dhcpcd"
Oct 24 22:08:39 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Oct 24 22:08:39 raspberrypi dhcpcd[374]: version 6.7.1 starting
Oct 24 22:08:39 raspberrypi dhcpcd[374]: dev: loaded udev
Oct 24 22:08:39 raspberrypi dhcpcd[374]: wlan0: adding address fe80::1115:f9e5:8550:3f91
Oct 24 22:08:39 raspberrypi dhcpcd[374]: forked to background, child pid 385
Oct 24 22:08:39 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Oct 24 22:08:42 raspberrypi dhcpcd[385]: wlan0: waiting for carrier
Oct 24 22:08:42 raspberrypi dhcpcd[385]: wlan0: carrier acquired
Oct 24 22:08:42 raspberrypi dhcpcd[385]: DUID 00:01:00:01:20:ef:91:a5:b8:27:eb:45:10:2b
Oct 24 22:08:42 raspberrypi dhcpcd[385]: wlan0: IAID eb:45:10:2b
Oct 24 22:08:42 raspberrypi dhcpcd[385]: wlan0: rebinding lease of 192.168.2.118

Mike_in_clw
Posts: 8
Joined: Mon Oct 23, 2017 5:45 pm

Re: Loosing my head over headless...

Tue Oct 24, 2017 10:58 pm

Per viewtopic.php?f=28&t=159942

So when you named your static, you also added the ctrl_interface declaration...

Jessie obviously does not need it to bring wlan0 up, , and maybe a pi3 is able to default to something that works, then writes something somewhere that remembers it... and when the microSD is inserted back int he PiZeroW, it works..

I added the three lines to the top of the .conf, overwrote what was in the Stretch /boot on the Stretch(lite) microSD, and voila... it has network...

Code: Select all

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
[email protected]:~ $ sudo more /var/log/syslog | grep "dhcpcd"
... cut uninteresting old lines
Sep 7 16:03:19 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Sep 7 16:03:20 raspberrypi dhcpcd[300]: wlan0: starting wpa_supplicant
Sep 7 16:03:20 raspberrypi dhcpcd-run-hooks[322]: wlan0: starting wpa_supplicant
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: waiting for carrier
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: carrier acquired
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: adding address fe80::1115:f9e5:8550:3f91
Sep 7 16:03:21 raspberrypi dhcpcd[300]: DUID 00:01:00:01:21:44:28:49:b8:27:eb:45:10:2b
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: IAID eb:45:10:2b
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: carrier lost
Sep 7 16:03:21 raspberrypi dhcpcd[300]: wlan0: deleting address fe80::1115:f9e5:8550:3f91
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: carrier acquired
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: adding address fe80::b383:9af1:d1cb:a204
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: IAID eb:45:10:2b
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: soliciting a DHCP lease
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: offered 192.168.2.118 from 192.168.2.1
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: probing address 192.168.2.118/24
Sep 7 16:03:22 raspberrypi dhcpcd[300]: wlan0: soliciting an IPv6 router
Sep 7 16:03:26 raspberrypi dhcpcd[300]: wlan0: leased 192.168.2.118 for 86400 seconds
Sep 7 16:03:26 raspberrypi dhcpcd[300]: wlan0: adding route to 192.168.2.0/24
Sep 7 16:03:26 raspberrypi dhcpcd[300]: wlan0: adding default route via 192.168.2.1
Sep 7 16:03:27 raspberrypi dhcpcd[300]: Too few arguments.
Sep 7 16:03:27 raspberrypi dhcpcd[300]: Too few arguments.
Sep 7 16:03:27 raspberrypi dhcpcd[300]: forked to background, child pid 443
Sep 7 16:03:27 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Sep 7 16:03:35 raspberrypi dhcpcd[443]: wlan0: no IPv6 Routers available

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Loosing my head over headless...

Tue Oct 24, 2017 11:01 pm

This appears to have been your problem:

Code: Select all

Sep 7 15:54:48 raspberrypi dhcpcd[317]: wlan0: ctrl_interface not defined in /etc/wpa_supplicant/wpa_supplicant.conf
You had a small error in wpa_supplicant.conf.

Edit: The reason I know wlan0 won't come up because of an error in wpa_supplicant.conf is I've done the same thing myself.

Mike_in_clw
Posts: 8
Joined: Mon Oct 23, 2017 5:45 pm

Re: Loosing my head over headless...

Wed Oct 25, 2017 1:42 am

SurferTim wrote:
Tue Oct 24, 2017 11:01 pm
This appears to have been your problem:

Code: Select all

Sep 7 15:54:48 raspberrypi dhcpcd[317]: wlan0: ctrl_interface not defined in /etc/wpa_supplicant/wpa_supplicant.conf
You had a small error in wpa_supplicant.conf.

Edit: The reason I know wlan0 won't come up because of an error in wpa_supplicant.conf is I've done the same thing myself.
ERROR? come on.... it works fine in Jessie... please explain how it is an error?

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

Re: Loosing my head over headless...

Wed Oct 25, 2017 6:12 am

The dhcpcd hook for wpa_supplicant uses wpa_cli to reconfigure wpa_supplicant when appropriate. That line is required for wpa_cli and other tools to talk to wpa_supplicant. In Jessie, wpa_supplicant was started by ifupdown, which didn't have that same check.

That's why this is the first question asked:
SurferTim wrote:
Mon Oct 23, 2017 11:57 am
What did you put in wpa_supplicant.conf?

MacAasbakk
Posts: 11
Joined: Sun Oct 22, 2017 5:38 pm

Re: Loosing my head over headless...

Mon Oct 30, 2017 4:27 am

I think maybe there is a bug within Stretch.
Everything is fine when I set up wifi in GUI on my Rpi3B.
Today I installed Stretch Lite on my Zero. First thing I did was to create the wpa_supplicant.conf file, and fill in my credentials for my wifi. And.... Nothing....

I can't get the Zero online with a fresh install of Stretch
Also tried this suggested solution with no luck: https://raspberrypi.stackexchange.com/q ... ng-stretch

I will try with Jessie Lite now and see how it goes

User avatar
RaTTuS
Posts: 10484
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Loosing my head over headless...

Mon Oct 30, 2017 9:27 am

what do you have in the wpa_supplicant.conf file
post it here
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Loosing my head over headless...

Mon Oct 30, 2017 10:48 am

For Stretch, you shouldn't add anything to /etc/network/interfaces for this wireless setup.

If you are following the first example, change the uppercase 'N' in "Network" to lowercase. You should also add a country code.

Code: Select all

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

network={
ssid="nowan"
psk="12qwaszx"
key_mgmt=WPA-PSK
}

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

Re: Loosing my head over headless...

Mon Oct 30, 2017 10:53 am

MacAasbakk wrote: I think maybe there is a bug within Stretch.
Everything is fine when I set up wifi in GUI on my Rpi3B.
Today I installed Stretch Lite on my Zero. First thing I did was to create the wpa_supplicant.conf file, and fill in my credentials for my wifi. And.... Nothing....
Is it a Zero or a Zero W? Are you using an external wifi dongle? Have you ever had wifi working on that particular pi at all.

Sorry if you have already answered these in previous posts.

amcdonley
Posts: 182
Joined: Mon Jan 26, 2015 5:56 pm
Location: Florida, USA

Re: Loosing my head over headless...

Tue Oct 31, 2017 1:32 pm

SurferTim wrote:
Tue Oct 24, 2017 2:37 am
Did you not read my posts? I just did two headless installs that went fine.

"Works for me" really doesn't feel good to those of us that are seeing this issue.

You may be onto something about what editor is used to create the wpa_supplicant.conf file. My recent headless stretch flogging seems to share a common theme with the OP - I used Etcher on a Mac, and perhaps we both used textapp to edit the wpa_supplicant.conf file.

I ended up connecting a monitor, mouse and kbd to get beyond this issue.

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

Re: Loosing my head over headless...

Tue Oct 31, 2017 1:34 pm

I've seen people Mac users have problems because their editor converted their " characters into something else that looks very similar.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Loosing my head over headless...

Tue Oct 31, 2017 1:49 pm

FYI: I used nano editor on a Ubuntu box. Works for me.

Edit: A quick Google search shows maybe you should use an app named TextEdit instead of textapp.

@amcdonley: You quoted part of my post, but left out the important part:
The thing I cannot stress enough is insure the text editor you use is a true text editor, and not a word processor. I use Ubuntu 16.04 LTS with nano as the editor.

amcdonley
Posts: 182
Joined: Mon Jan 26, 2015 5:56 pm
Location: Florida, USA

Re: Loosing my head over headless...

Wed Nov 01, 2017 2:03 am

SurferTim wrote:
Tue Oct 31, 2017 1:49 pm

Edit: A quick Google search shows maybe you should use an app named TextEdit instead of textapp.
TextEdit is the editor I used.

I discovered my problem: I had copied the text from a web page and pasted it into TextEdit. The quote chars from the web were the Unicode left/right double quote!! My old, spectacled eyes did not catch the slight slant and even smaller up/down difference.

Code: Select all

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

network={
    ssid=“MYWIFISSID”         
    psk=“MY11CHARWIFIPASSKEY”
    key_mgmt=WPA-PSK
}
After changing to the traditional double quote char, it configured WIFI/SSH "headless":

Code: Select all

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

network={
    ssid="MYWIFISSID"         
    psk="MY11CHARWIFIPASSKEY"
    key_mgmt=WPA-PSK
}
(I used vi, but changing to the correct "-char in TextEdit also works)
I have no idea what the cause for the OP was, but this solved my headless horseplay.

Return to “Troubleshooting”