All posts by Mark Williams

Send emails with attachements from the Linux command line.

If you are like me and you are running your Raspberry Pi headless, and don’t want to start up X windows to send a simple email. You are in luck, as this can easily be done from the command line. And it is very easy to setup.

Note; This is only to send email, and not receive.


– Install SSMTP

pi@raspberrypi ~ $sudo apt-get update
pi@raspberrypi ~ $sudo apt-get install ssmtp


-Configure SMTP

pi@raspberrypi ~ $ sudo nano /etc/ssmtp/ssmtp.conf

Add add these lines;

root=username@gmail.com
mailhub=smtp.gmail.com:465
rewriteDomain=gmail.com
AuthUser=username
AuthPass=password
FromLineOverride=YES
UseTLS=YES


Use your email address for root, and your gmail username and password for AuthUser and AuthPass.



To send an email
To send an email, run SSMTP with the recipients name.
SSMTP will then wait for you to type your email. It has to be formatted as shown below. And once done, press Ctrl-D to send.

pi@raspberrypi ~ $ ssmtp mail.address@example.com
subject: this is a test
hello world!
pi@raspberrypi ~ $


Continue reading Send emails with attachements from the Linux command line.

How to Cross Compile the Kernel for the Raspberry PI

August 2015 ## This guide has been updated to the latest version of Raspbian ##

Compiling the kernel on the Raspberry Pi can take some time, Im not sure how long it takes as I have never waited long enough, I gave up after 4 hours.
Below is a guide on how to compile the kernel on a faster PC and then transfer the new kernel and modules over to the Raspberry Pi.

Cross compiling is when you compile on a different platform then what the kernel will be used for. This is mostly done when the host receiving the kernel is on a slow or legacy device.

 

Continue reading How to Cross Compile the Kernel for the Raspberry PI

Raspberry Pi and TFT Display

The 1.8″ TFT from Adafruit is the perfect display to attached to a Raspberry Pi.

These instructions also help with the Sainsmart display and you can find more info for both here: http://www.whence.com/rpi/

 

 

The TFT isn’t ‘plug & play’ with the Raspberry, a patch has to be applied to the kernel to be able to interface via SPI with the ST7735R controller chip on the TFT. Once working, the display will act as a framebuffer device.

I spent two weeks trying to get it working, so I thought I would document it to help others.

PiScreen TFT Raspberry Pi


###UPDATE 14th Nov 2013###
After a large number of request, I have now posted the compiled version of the kernel that supports the 1.8” TFT. Based on 2013-09-25-wheezy-raspbian.img. There are two links below, one for the Kernel the other is the instructions.

http://ozzmaker.com/downloads/1.8TFT_Kernel_3.6.11.tar

 

http://ozzmaker.com/download/README1.8TFT_Kernel_3.6.11.tar.txt

 

Mirror

 

Thanks go to Kamal (http://www.whence.com/rpi/) and Neil for responding to my emails & forum post, and their work on the ST7735R driver.
Thanks also go to Adafruit for their cool products.

 

As it takes over three hours to compile the kernel on the PI, I will show how to cross compile from another Linux PC. In my case, it is Ubuntu 12.10 running within VMWare on a Windows 7 Quad core PC. Kernel compile time is 15 mins.

 

Wire it up




Sainsmart wiring details are here on Kamal’s page: http://www.whence.com/rpi/


You could also use a shield to make the wiring a lot easier, look here

Prepare the Raspberry Pi

-Download and install Raspbian “wheezy”.
This guide is based on 2013-02-09-wheezy-raspbian which is running 3.6.11 kernel

Continue reading Raspberry Pi and TFT Display