Showing posts with label headless wifi setup. Show all posts
Showing posts with label headless wifi setup. Show all posts

Apr 12, 2018

Raspberry Pi: Headless Setup Notes - For beginner & pre-configuration

How to

2 solutions:

  1. Create an empty file "ssh" or "ssh.txt" (case sensitive, must lower case) in the root folder of SD card created for OS installation.
  2. Plug HDMI to your raspberry pi to a monitor and follow steps below

HDMI + Monitor solution

1. SSH is disabled by default (default setting of a rpi)
2. USB or through HDMI use your rpi
3. enable SSH in your raspi-config or through terminal
4. follow steps below to enable remote SSH in your rpi

Select 7 for advanced options


Select SSH
Select Yes to enable remote SSH for Headless environment

Mar 14, 2018

Raspberry Pi: Send Email as your personal Notifier!

Configurations

you need smtp installed, to get it, you need (smtp and mail):
  
    sudo apt-get install smtp mail
  

Setup email server configuration (edit smtp config):
  
    /etc/ssmtp/smtp.config
  

into format as below:
  
    root=your@email.com
    mailhub=mail_service_provider #for example "smtp.gmail.com:465"
    FromLineOverride=YES
    rewriteDomain=gmail.com
    AuthUser=your@email.com
    AuthPass=yourpassword
    #UseSTARTTLS=YES
    UseTLS=YES
  

Sending Email in Plaintext

  
    echo "the content of the email body" | mail -s "This is the subject" your@email.com
  

Troubleshooting

Just in case you run into Gmail authorization problems:
1. mail: cannot send message: Process exited with a non-zero status
Probably your smtp.config has it configured incorrectly

2. ssmtp: Cannot open smtp.gmail.com:465
Check if your port number is entered correctly

3. ssmtp: Authorization failed (for Gmail, if you have 2FA activated)
You might have to follow this 2FA Gmail Solution to add an app-specified password for that particular app.

Send Email with attachment (Coming soon...)

Content coming soon... (be patient)

Mar 23, 2014

raspberry pi for dummy: WPA_SUPPLICANT: /SBIN/WPA_SUPPLICANT DAEMON FAILED TO START

Monday, 27 March 2017 UPDATE:
- please refer to this official Raspberry Pi Wifi configuration documentation

After you have the USB Wifi dongle plugged into your RPI, you can scan wifi sign near you with
sudo iwlist wlan0 scan 
command (if this work, that mean you are close to setup wifi successfully)

Finally, if you haven't added any network config in your wpa_supplicant.conf (/etc/wpa_supplicant/wpa_supplicant.conf) insert wifi detail using:
wpa_passphrase "your wifi SSID" "your wifi password" >> /etc/wpa_supplicant/wpa_supplicant.conf

Note: please refer official link attached above for detailed explanation.


If you face problems stated below:
- WPA_SUPPLICANT: /SBIN/WPA_SUPPLICANT DAEMON FAILED TO START


You may first look at this Setting up Wifi (EDIMAX) on Raspberry Pi,
if you're still fail to configure a successful connection to your access point (AP or wifi router),
please remove the quote symbol to your psk value like this in your wpa_supplicant.conf:
network={
    ssid="Your SSID Here"
    key_mgmt=WPA-PSK
    psk=YourPresharedKeyHereWithoutQuote
}
get your PSK value from WireShark WPA-PSK Generator.

Once done:
apply commands and restart network or your RPI (sudo reboot):
sudo service networking restart
sudo ifup wlan0 (or sudo ifdown wlan0 then sudo ifup wlan0)

I wrote this because I saw too many tutorial out there didn't mention/emphasize about removing the quote symbol for psk value.
examples
Circled quotes symbols should not be around your psk value

wireless setup command reference: Useful Linux Wireless Commands