Difference between revisions of "Bering-uClibc 7.x - User Guide - Advanced Topics - Raspberry PI Zero W direct WIFI logon"

From bering-uClibc
Jump to: navigation, search
(Raspberry PI Zero W direct WIFI logon)
(Raspberry PI Zero W direct WIFI logon)
 
(17 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
  
If you own a '''Raspberry PI Zero W''' you can connect to it using the WIFI interface only, no need for the console access using GPIOs serial pins 14 and 15 with a TTL-serial-USB adapter. This is an interesting feature if you want to use the lowest priced Zero which does not have a soldered GPIO pins header and want to keep it that way.  
+
If you own a '''Raspberry PI Zero W''' you can connect to it using the WIFI interface only, no need for the console access using GPIOs serial pins 14 and 15 with a TTL-serial-USB adapter. [[Image:20210413_165052.png|middle|frame|alt=no need for that|no need for that... ''even though it is mighty useful :-)'']]
 +
This is an interesting feature if you want to use the lowest priced Zero W which does not have a soldered GPIO pins header and want to keep it that way.  
  
'''SORRY this image is not the right one yet, but if you have a serial console you can still play with it ... as only~ the wpa_supplicant thingy is not working yet.'''  
+
'''SORRY the final PiZ.img file is not available yet ... '''  
  
You can obtain a bootable image file https://sourceforge.net/projects/leaf/files/Bering-uClibc/7.0.1/Bering-uClibc_PiZ.img/download from the LEAF distribution and transfer it to an SD card using '''dd''' or the Raspberry PI Imager program on Windows or Mac.  
+
but you can obtain a working one, to play with, from https://sourceforge.net/p/leaf/packages/ci/7.0.0-images/tree/ by clicking the '''Download Snapshot''' button at the top of the web page. Unzip the '''leaf-packages-9b99....zip''' file you just downloaded and pick PiZ.img to <s> You can obtain a bootable image file https://sourceforge.net/projects/leaf/files/Bering-uClibc/7.0.1/Bering-uClibc_PiZ.img/download from the LEAF distribution and</s> transfer it to an SD card using '''dd''' or the '''Raspberry PI Imager''' program on Windows or Mac.  
  
Once the SD card is generated and is still inserted in your PC, open it up and edit the file '''wpa_supplicant.conf''' by adding your own ssid and psk.
+
'''WARNINGs this image should not be use in production, it is intended for testing purposes... well, I should say intended mostly for the impatients, it will allow you to play with your PI Zero until a proper image is available. It is ok to be used behind your home firewall. Upgrade and fetchpackages are not working.'''
 +
 
 +
Once the SD card is generated and is still inserted in your PC, open it up and locate and edit the file '''wpa_supplicant.conf''' by adding your own ssid and psk.
  
 
In case you loose the file here is what it should look like:
 
In case you loose the file here is what it should look like:
Line 38: Line 41:
 
On bootup the /init.d/wpasupplicant startup script will look for this file presence on the boot media, and will copy it's content to /etc/wpasupplicant.conf . The script will then delete the file on the boot media.  
 
On bootup the /init.d/wpasupplicant startup script will look for this file presence on the boot media, and will copy it's content to /etc/wpasupplicant.conf . The script will then delete the file on the boot media.  
  
Wait a few minutes for the PI to load and run, find the PI Zero IP address ( using '''fing''' on your phone...) and from a browser type in the URL http://pi.zero.ip.addr . If faced with a password login request, admin:admin should get you there.
+
Wait a few minutes for the PI to load and run, find the PI Zero IP address ( using '''fing''' on your phone...) and from a browser type in the URL http://pi_zero.ip.addr . If faced with a password login request, admin:admin should get you there.
 +
 
 +
'''This temporary PiZ.img will also allow a password-less connection, like: ssh root@pi_zero.ip.addr'''
  
 
You should make these changes permanent by running '''lrcfg''' with the '''s)''' option... remember the file on the media will be erased after the first boot. Before doing that though, if you don't want to leave "yourpassword" in plain sight you could use the result of the command "'''wpa_passphrase yournet yourpassword'''" which will give you a hash of "yourpassword" that you can copy to '''/etc/wpa_supplicant.conf''' .
 
You should make these changes permanent by running '''lrcfg''' with the '''s)''' option... remember the file on the media will be erased after the first boot. Before doing that though, if you don't want to leave "yourpassword" in plain sight you could use the result of the command "'''wpa_passphrase yournet yourpassword'''" which will give you a hash of "yourpassword" that you can copy to '''/etc/wpa_supplicant.conf''' .

Latest revision as of 03:03, 15 April 2021

Raspberry PI Zero W direct WIFI logon

If you own a Raspberry PI Zero W you can connect to it using the WIFI interface only, no need for the console access using GPIOs serial pins 14 and 15 with a TTL-serial-USB adapter.
no need for that
no need for that... even though it is mighty useful :-)

This is an interesting feature if you want to use the lowest priced Zero W which does not have a soldered GPIO pins header and want to keep it that way.

SORRY the final PiZ.img file is not available yet ...

but you can obtain a working one, to play with, from https://sourceforge.net/p/leaf/packages/ci/7.0.0-images/tree/ by clicking the Download Snapshot button at the top of the web page. Unzip the leaf-packages-9b99....zip file you just downloaded and pick PiZ.img to You can obtain a bootable image file https://sourceforge.net/projects/leaf/files/Bering-uClibc/7.0.1/Bering-uClibc_PiZ.img/download from the LEAF distribution and transfer it to an SD card using dd or the Raspberry PI Imager program on Windows or Mac.

WARNINGs this image should not be use in production, it is intended for testing purposes... well, I should say intended mostly for the impatients, it will allow you to play with your PI Zero until a proper image is available. It is ok to be used behind your home firewall. Upgrade and fetchpackages are not working.

Once the SD card is generated and is still inserted in your PC, open it up and locate and edit the file wpa_supplicant.conf by adding your own ssid and psk.

In case you loose the file here is what it should look like:

# Minimal /etc/wpa_supplicant.conf to associate with open
#  access points. 

# path to UNIX socket control interface
ctrl_interface=/var/run/wpa_supplicant

eapol_version=1
ap_scan=1
fast_reauth=1

### Example of basic WPA-PSK secured AP, uncomment the next 4 lines, add in your own ssid and psk...
#network={
#    ssid="yournet"
#    psk="yourpassword"
#}

### Associate with any open access point
###  Scans/ESSID changes can be done with wpa_cli
network={
        key_mgmt=NONE
}


On bootup the /init.d/wpasupplicant startup script will look for this file presence on the boot media, and will copy it's content to /etc/wpasupplicant.conf . The script will then delete the file on the boot media.

Wait a few minutes for the PI to load and run, find the PI Zero IP address ( using fing on your phone...) and from a browser type in the URL http://pi_zero.ip.addr . If faced with a password login request, admin:admin should get you there.

This temporary PiZ.img will also allow a password-less connection, like: ssh root@pi_zero.ip.addr

You should make these changes permanent by running lrcfg with the s) option... remember the file on the media will be erased after the first boot. Before doing that though, if you don't want to leave "yourpassword" in plain sight you could use the result of the command "wpa_passphrase yournet yourpassword" which will give you a hash of "yourpassword" that you can copy to /etc/wpa_supplicant.conf .