Browse Category: Raspberry Pi

How to schedule Cron Jobs on the Raspberry Pi

About: I have recently been working on a MMORPG turn based text game and needed a way to run a php script every 2 hours to generate a turn. Since I use the Raspberry Pi as a LAMP server for testing out my game before releasing official updates I figured it would work well as a cron job to call a website page every 2 hours.

You can schedule many types of cron jobs using your Raspberry Pi. Cron is basically the Linux version of the Windows Task Scheduler. You can schedule commands to run at certain times of the day or only run once a month. The shortest time a cron job can run is 1 minute in between commands. If you need a command to repeat every 30 seconds then a cron job will not work.

Objective: To create and schedule a cron job using the terminal on the Raspberry Pi

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)

Instructions: Open up a terminal window and type the following command to create a cron job

Continue Reading

How to get the PSK or Password of a WiFi network if you have the WPS Pin

About: I have previously discussed how easily a router that has WPS enabled can be hacked. You can check out my post on how to perform a Pixie Dust Attack and attempt to grab a WPS pin from a unsecured router.  The attack takes a matter of seconds not days and will expose your WiFi password. It doesn’t matter if you are using WPA or WPA2 security since the WPS pin completely bypasses this security. Since you already have the WPS Pin you should be able to connect to the users SSID but you will not know their network password. The method I will show you today will expose their SSID password. If you have their SSID password, they may be using the same password for Facebook or Google or any other website.

A little knowledge about WPS. WPS stands for Wi-Fi Protected Setup and it is a wireless networking standard that tries to make connections between a router and your wireless devices faster and easier. It only works for wireless networks that have WPA/WPA2 security. It is suppose to make it easier to connect devices without a keyboard, like a TV, to your home network. Most routers come with WPS enabled and work by pushing the WPS button on your router and connecting your device. I personally have never heard or WPS before doing this research and have never used it in my personal life.

Objective: To demonstrate how to retrieve the PSK (password) of a WiFi network if you have the WPS Pin

Material: You will need the following:

  • Raspberry Pi (I have PwnPi 3.0 running on mine)
  • USB WiFi Adapter – I used the Panda USB WiFi adapter in this tutorial
  • PwnPi or Kali Linux distro on your Raspberry Pi or Linux machine
  • WPS Pin for the Network you are attempting to steal the PSK (Password)

Instructions: I am using PwnPi distro on my Raspberry Pi which has the tools I will need to get the PSK of the victims WiFi. You will pretty much need ‘WPA_Supplicant’ and ‘WPA Cli’ installed on your distro to expose the PSK so using PwnPi or Kali isn’t really necessary if you want to install those packages separately.
Continue Reading

How to connect your Raspberry Pi 3 to a WiFi network using the terminal

About: I recently purchased a Raspberry Pi 3 and was excited to learn that it comes with Bluetooth and WiFi built-in. Since I will be using this Raspberry Pi as a server I will be running it headless so it will not have a monitor. I will connect to the Raspberry Pi over SSH. The Raspberry Pi I will be using is running Raspbian Lite but will also work on the GUI version of Raspbian.

Objective: To connect your headless Raspberry Pi 3 to your WiFi network.

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $36 with free shipping)

Instructions: Go ahead and connect to the Raspberry Pi over SSH and login to the Raspberry Pi. The default username and password is ‘pi’ and ‘raspberry’.  Continue Reading

5 Best Raspberry Pi Camera Modules for 2016

There are many cameras available for the Raspberry Pi. You can use many older USB webcams on your Raspberry Pi if you have any laying around. There is an official list of what USB webcams are supported here, but your best bet is to simply hook up your USB webcam to your Raspberry Pi and see if it will work.

I will be listing my favorite cameras dedicated to the Raspberry Pi and I know they will work with no issues. I made the list depending on the popularity of the camera as well as the price. There are many dedicated cameras that have a lot of write ups about them and have a ton of documentation on how to set them up as well as code libraries to get them working fast.

5. Raspberry Pi Camera Module Board 5MP 160° Wide Angle Fish Eye Lenses

This is basically the original Raspberry Pi camera module with an attached wide angle lens. The lens will give you a 160° viewing angle. It uses a fixed focus Omnivision 5647 sensor for the camera. The camera is capable of 2592 x 1944 pixel static images, and also supports 1080 p @ 30 fps, 720 p @ 60 fps and 640 x480 p 60/90 video recording.

This camera is a little more expensive then the official 5 megapixel Raspberry Pi camera but this includes the wide angle lens which is great if it’s something you are looking for.

4. Official Raspberry Pi 5MP Night-Vision Camera

This is the official 5 megapixel Raspberry Pi night vision camera. The Raspberry Pi NoIR (No IR filter) Camera Module is a custom designed add-on for Raspberry Pi that does not have an ‘IR cut filter’ installed. It attaches to Raspberry Pi by way of one of the two small sockets on the board upper surface. It features a 5 megapixel camera sensor, and has a fixed focus lens on board. The camera is capable of 2592 x 1944 pixel static images, and also supports 1080p30, 720p60 and 640x480p60/90 video.

This is basically like the cheaper original 5 megapixel camera made for the Raspberry Pi except it can work in a low light environment a lot easier without the infrared filter. You’ll have to flood the area you’re shooting with infrared light from a seperate module or led’s. A small piece of blue filter plastic is included in case you want to re-add the cut filter.

3. 5MP Waveshare Night-vision Raspberry Pi Camera

The Waveshare Raspberry Pi camera is a 5 megapixel night-vision camera. It features a 5MP OV5647 sensor for the camera and supports 2 infrared LED’s used for the night-vision. Make sure to run raspi-config and enable your camera if you are having issues installing this camera. It should be easy to setup and the image quality is decent.

When running the camera and the infrared led’s it can get a little power hungry. It is suggested to run your Raspberry Pi with 5 volts and at least 2.5 amps or more for your power supply. This should help with any issues of the raspberry pi shutting down. The infrared led’s also get warm to the touch after running the camera. If you require a camera that has night vision this is the camera to pick. The price is not too bad and the image quality is very good for a 5 megapixel camera. Definitely don’t over look this camera.

2. Official Raspberry PI 5MP Camera Board Module

This is the official Raspberry Pi camera module. It is supported in the latest Raspbian OS and is very easy to install and setup. It features a 5 megapixel sensor-capable of 2592 x 1944 pixel static images. It can support 1080p30, 720p60 and 640x480p60/90 video. It uses very low power which is great if your project is running off a battery. It is also small and very easy to hide or mount in your projects.

The 5MP camera is not the best quality in low light situations but it works great for the price. There are also many cases that support this camera module so mounting it on your project should be easy. If you are looking for a cheap option in adding a camera to your project look no further as you will not find a cheaper option that works painlessly.

1. Pixy Smart Vision Camera Sensor

This camera module has been getting very popular lately and there has been many write-ups about it. It has a button you can push to “teach” it objects which you can program your projects to either follow the object or identify it. It includes libraries for the Arduino and Raspberry Pi. The Pixy camera includes mounting hardware to attach Pixy to your robot creation. The firmware, software and hardware are open source and constantly updated.

There are many mounting options. One of them is this which has a servo for pan/tilt. I think this camera is very neat and the resolution is okay for a basic robot. I would use this camera module for more advanced projects which include project tracking or avoidance especially since it includes libraries for the Arduino and Raspberry Pi. Definitely check this camera out if you are making any type of robot project.

How to set a Static IP Address on the Raspberry Pi running Raspbian Jessie+

About: With the release of Raspbian Jessie made all older methods of setting a static IP Address on the Raspberry Pi obsolete. You no longer need to edit /etc/network/interfaces . You will now need to edit /etc/dhcpcd.conf to set your static IP address on the Raspberry Pi. Setting a static IP address is easy and useful if you are running something that requires the IP address to remain the same after a reboot. This is useful is you are using your Raspberry Pi as a web server or a DNS server.

Objective: To set a Static IP Address on our Raspberry Pi running Raspbian Jessie or newer

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $37 with free shipping)

Instructions: Let’s start off by going into your terminal on your Pi. Continue Reading

How to Whitelist Xbox Live on Pi-Hole

About: I have been using Pi-Hole on my home network for the past 3 months and it has been working great. It blocks ad’s network wide at home. For example, I can play games on my Ipad and won’t see any ads on the bottom of the screen. If I am watching YouTube, I see no ads before a video plays. It’s great and I don’t think I can ever go back. Check out my tutorial on How to Install Pi-Hole here.

Recently, Pi-Hole has been working great on my Xbox One, until one day it started to take forever to log into Xbox Live and sometimes it never did. Eventually, my Xbox One was unable to connect to Xbox Live at all. The only app that worked was Netflix, not even YouTube would start. I did some trouble shooting and found Pi-Hole has updated one of it’s ad lists which includes Xbox Live services. I did some research and got some help from Reddit user /u/Palmer11 who compiled a whitelist of addresses to add to Pi-Hole. If you are having trouble connecting to Xbox Live while running Pi-Hole this should hopefully work for you, and clear this issue up.

Objective: To whitelist blocked Xbox Live service domains on Pi-Hole

Material: You will need the following:

  • Raspberry Pi (Click the link to check out the price on Amazon. Usually around $37 with free shipping)
  • Pi-Hole

Instructions: You will only need one command to do this. Simply SSH into your Pi-Hole server and type the following command

Continue Reading