Posts Tagged ‘ sd card ’



Low Powered FTP Server with Raspberry Pi Goodness.

Written By:
Friday, May 29th, 2015

SCK RASPPI

There comes a time where you need to have an FTP server and do not want to spend money on a machine that will be there 24/7. Here is the solution. All you will need are the following items and some optional ones to make it awesome ;).

(1) Raspberry Pi B /B+ or 2.

(1) 2amp 12VDC Adapter [USB] for power.

(1) USB to Sata Drive, for storage

Installing the OS Image onto the SD Card
logo_raspbian-france_250px

Lets start by installing the image of Raspbian onto an SD card, I will be using a 32GB Class 10 SD card. These are great as they are fast and reliable.

Lets find the letter that the computer assigned the SD card and lets open the SD formatter tool, format the correct drive and move onto opening up the Win32 Imager tool.

select the correct Image and hit “Write” this will take some time so go make a cup of coffee…..

cup-of-joe-funny-memes

Once we have done this we will install the SD Card onto the raspberry pi ensuring that it is well seated. Lets turn it on by connecting the USB Connection.

Go ahead and expand the system files, select the “PI” Password and your local time. I also changed my local host name as I will be using this raspberry pi for other purposes and I already have another in my home network. After this is done the raspberry pi will boot up asking for a username and password. I elected to leave it in “command line mode” I do not need it to be running a desktop style background for this and it helps with performance. If you are skilled, you can also overclock this baby and just add heat sinks and fans to cool down the raspberry pi.

Installing updates

Lets go ahead and download any updates and install them, we will do this by imputing the following code onto the terminal

#sudo apt-get update

#sudo apt-get upgrade -y

This will take some time, after this is done we will install “VSFTPD

#sudo apt-get install vsftpd -y

After this is done we need to use nano to edit a configuration file we do this by imputing the following command.

#sudo nano /etc/vsftpd.conf

We will need to edit some lines and writout the file and exit.

Here are the lines that need to be changed.

anonymous_enable=YES  
to 
anonymous_enable=NO

We need to uncomment a few things to enable them. Uncomment by removing [#] 

#local_enable=YES 
to 
local_enable=YES

If you want to enable FTP uploading for the user in their home directory, uncomment the write_enable line by changing

#write_enable=YES

to

write_enable=YES

You have the ability to have users locked onto their home directory

chroot_local_user=YES

After this click on CRTL + O to write out the file and exit by clicking on CTRL X
We next need to enable FTP Root user this may be already set but its good to check you can also add pi to the list or any other users.

We will use again the awesome command nano.
#sudo nano /etc/ftpusers

Uncomment the
#root

After this click on CRTL + O to write out the file and exit by clicking on CTRL X
You also want to change the Root Password to set the root password use the following command where root can be any other user.

#sudo passwd root

This will ask you for a new password and confirm it by imputing once again.

We will then restart the service by entering the following command.

#sudo service vsftpd restart

This will allow you to log into your system via FTP but there is more you will need to add a USB External Drive so as to not use the internal storage on your SD card.

We will do this by shutting down your raspberry pi and plugin your USB External drive onto the raspberry pi USB ports.

We will use the following command as we do not want to just unplug the raspberry pi as a method to shutting it down.

#sudo shutdown -h now

Setting up an External Drive to handle the files

We will need to ssh into the raspberry pi once more and input the following command to create some directories.

#sudo mkdir /media/shares

#sudo mkdir /media/shares/data

Then we input:

#sudo blkid

This will give you the following output, in mine it is

Capture

our drive is /dev/sda1 with a UUID=”3CD8-1613″

Once you know this information you will need to input this command

#sudo nano /etc/fstab

Add this line

#UUID="3CD8-1613/media/shares/data auto uid=pi,gid=pi,noatime 0 0

hit CTRL + O to write out the file and exit by CTRL + X

Then we mount the drive by using this command:

#sudo mount -a

after this you should be able to access the folder/files

#cd /media/shares/data

and display the file contents using

#ls -lah

If you external Drive has a format of NTFS we will need to install ntfs-3g

#sudo apt-get install ntfs-3g

then mount your drives

#sudo mount -a

Once you have done this we will move to our Recorder.

Setting up our NVR/DVR to send information to our Low Powered FTP Server

We will need to access the recorder’s IP address – in my case it is 192.168.1.130

I have the default passwords set for this demonstration.

I navigate to the “Setup” tab then select the “Network” tab and finally click on “FTP”

A new window will appear and we will be imputing the Raspberry Pi FTP servers IP address.

Host IP = 192.168.1.134

Port = 21 (default) can be changed in the raspberry pi.

User Name = root (lower case)

Password = your password

remote directory is = /media/shares/data

File Length = I set this to 20 Minutes

Image Upload Interval = 2 (Default)

Channel = All ( Or any of your choosing)

and select the periods and recording based on motion, alarms or Regular. Click on Save and you are done.

Once last thing is to set the Raspberry pi to that specific IP address, meaning Static IP Address.

Setting the Raspberry Pi Static IP Address

Setting up the RPI to Static IP is simple.

Log in as usual with SSH using Putty

We will back up some files just in case.

#sudo cp /etc/network/interfaces /etc/network/interfaces.sav

Then we will open the configuration file

#sudo nano /etc/network/interfaces

uncomment the line “iface eth0 inet dhcp”

It should be

#iface eth0 inet dhcp

then we will add
 # The loopback interface
 auto lo
 iface lo inet loopback
 auto eth0
 iface eth0 inet static
 #your static IP
 address 192.168.1.118  
 #your gateway IP
 gateway 192.168.1.1
 netmask 255.255.255.0
 #your network address "family"
 network 192.168.1.0
 broadcast 192.168.1.255

The comments will let you know what items to change in my case I only had to change the IP address to 192.168.1.134.

Voila!
You are done. Reboot the RPI and you should be set.

facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Hidden Camera With SD Card

Wednesday, February 9th, 2011

There are times when covert camera monitoring and recording are necessary and one of the best devices for this purpose is a hidden camera with SD card. Thanks to recent technological advances in the computer world as well as in general electronics, a camera can be made as small as to fit in the shell of an average writing pen.

When it comes to the appearance of a hidden camera with SD card, there are many types from which to choose. These cameras come in “bare-bones” mini versions, where the camera is basically undisguised but is small enough to be hidden, to disguised versions that look (and often times function) as clocks, mirrors, safes, stuffed animals, and many more.

But what exactly is a hidden camera with SD card and how is it able to work? We’ll answer those questions and more in the following article.

The secret behind the success of the hidden camera with SD card is its incredibly small size. Another technological feature is its relatively low demand for power consumption. Yet another is the ability to save digital video images to an SD card, a relatively small device that can pack a big punch in memory capacity these days. Let’s start from the beginning.

A digital video security camera system works by capturing color digital video images with the camera, transmitting those images to the Digital Video Recorder or DVR unit, and saving them on the DVR’s hard disk drive and or displaying them on a monitor. Technically, a monitor is only needed for the system to set it up; that is, fine tune and adjust initial settings. However, if the user wants to monitor the digital video live (or later) the monitor will be needed. The important point here is that a digital video system can consist of just a digital video camera and DVR.

Basically that’s exactly what a hidden camera with SD card is; a digital video camera with a DVR. The key component of the digital video camera is the sensor that is used to create the digital video image. One of two different types of sensors, a Charged Coupled Device or CCD or a Complementary Metal Oxide Semiconductor is used. Generally speaking, a CCD provides the highest quality image at the price of power consumption while a CMOS provided a good quality image at a much lower demand for electrical power.

As technology continues to increase, the power demands for the CCD become much less and the quality for the CMOS becomes even better. Since many hidden cameras with SD card are standalone units placed inside other objects to disguise their appearance, power consumption may be an issue. For that reason many hidden camera with SD cards use CMOS sensor chips.

Although the CCD and the CMOS work a little differently, they both produce the same outcome, a relatively high-quality digital video image. They do this by transferring light images into electrical impulses. These impulses can be measured and compiled into data that creates a digital video image.

One of the most impressive features of digital video cameras is that they can produce these high quality digital video images with a CCD or CMOS the size of a square that is only 1/4 inch! In addition, a wide angle lens is usually used to focus the image on the sensor and these lenses are often as small as 3.7 mm in diameter. Obviously, the small sensor chip and lens combination “paves the way” for camera to be used in other devices as a hidden or disguised camera.

After the camera has created the data for a digital video image micro-circuit technology take over from there. First, an on-board analog-to-digital converter chip transfers the analog data into digital data. Then another circuit compiles and condenses the data to create a digital video file. The digital video file is saved by the DVR, however this cameras DVR records to an SD (Secure Digital) card instead of a hard disk drive.

SD cards are non-volatile memory containers that are used in many electronic devices such as cameras, cell phones and MP3 players. All the user has to do is remove the SD card, plug it into their computer, and download the digital video file created by the hidden camera with SD card.

On-board power for hidden cameras with SD cards may be supplied by a battery, or the camera may actually tap into the power of the device in which they are hidden.

facebooktwittergoogle_plusredditpinterestlinkedintumblrmail