Friday, February 13, 2015

How to Install COPS for E-Catalog on OpenWRT

What is COPS?
Please visit this website http://blog.slucas.fr/en/oss/calibre-opds-php-server
Briefly COPS much like a library or book catalog application
Just go ahead into the method installations:


Step 1:
opkg update
opkg install php5-mod-mod-dom php5-gd php5-json-mod-mod-php5 php5-pdo-sqlite mod-php5-pdo-sqlite mod-mod-php5 php5-sqlite3-xml mod-mod-php5 php5 XmlReader -mod-XmlWriter-mod-php5 zip

Step 2:
edit or uncomment php.ini in this part
; Dynamic Extensions
extension = dom.so
extension = pdo.so
extension = pdo_sqlite.so
extension = sqlite.so
extension = sqlite3.so
extension = xml.so
extension = xmlreader.so
extension = xmlwriter.so

Step 3:
create a web folder for storing data
mkdir /www/cops

Step 4:
create folders for storing books
mkdir /mnt/sdb6/books/

Step 5:
Download files
https://docs.google.com/file/d/0B8uKhOOykTAteWNKYTF6SFd4emc/edit?pli=1
Extract the contents to a folder /www/cops

Step 6:
Edit /www/cops/configlocal.php in the directory:
$ config ['calibre_directory'] = '/mnt/sdb6/books/';

Step 7:
Fix symlink from /www/cops/books
by using a putty application and point the link to /mnt/sdb6/books/
Step 8:
Copy - the contents of Calibre Library folder from the computer to the folder / mnt / usb / books
Make sure metadata.db also copied everything

Step 9:
uci set uhttpd.main.index_page = index.php
uci commit
/etc/init.d/uhttpd restart

Step 10:
Open a browser and navigate to http://192.168.1.1/cops

Step 11:
In order to be integrated with Aldiko and such, just edit the catalog and point it to the URL
http://192.168.1.1/cops/feed.php
As a result of your books neatly arranged and can search by Aldiko.


Source : https://www.facebook.com/notes/openwrt-indonesia/tutorial-install-cops/840685975972428
Read More..

Thursday, February 12, 2015

How To make Simple CCTV Server using Webcam And Motion on OpenWRT

1. Plug your webcam to router openwrt
2. run this command :
opkg update
opkg install kmod-usb-core kmod-usb2 kmod-video-core
opkg install kmod-video-gspca-core kmod-video-gspca-ov519

opkg install kmod-video-uvc

3. reboot your router
4. type this command :
ls /dev => and press enter

do you see video0..??

5. install motion on openwrt
opkg install motion

6. edit file motion.conf on /etc/motion.conf using this script :
#######################
daemon on
process_id_file /var/run/motion/motion.pid
setup_mode off
log_level 6
log_type all
videodevice /dev/video0
v4l2_palette 8
input -1
norm 0
frequency 0
rotate 0
width 352
height 288
framerate 5
minimum_frame_time 0
netcam_keepalive off
netcam_tolerant_check off
auto_brightness on
brightness 0
contrast 0
saturation 0
hue 0
roundrobin_frames 1
roundrobin_skip 1
switchfilter off
threshold 1000
threshold_tune off
noise_level 32
noise_tune on
despeckle_filter EedDl
smart_mask_speed 0
lightswitch 0
minimum_motion_frames 2
pre_capture 0
post_capture 0
event_gap 60
max_movie_time 0
emulate_motion off
output_pictures off
output_debug_pictures off
quality 75
picture_type jpeg
ffmpeg_output_movies off
ffmpeg_output_debug_movies off
ffmpeg_timelapse 0
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec mpeg4
ffmpeg_deinterlace off
sdl_threadnr 0
use_extpipe off
snapshot_interval 0
locate_motion_mode on
locate_motion_style redbox
text_right %Y-%m-%d\n%T-%q
text_left SR-C39-PWT
text_changes off
text_event %Y%m%d%H%M%S
text_double off
target_dir /mnt/usb/cctv
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
picture_filename %v-%Y%m%d%H%M%S-%q
movie_filename %v-%Y%m%d%H%M%S
timelapse_filename %Y%m%d-timelapse
ipv6_enabled off
stream_port 8080
stream_quality 80
stream_motion off
stream_maxrate 5
stream_localhost off
stream_limit 0
stream_auth_method 0
webcontrol_port 8081
webcontrol_localhost on
webcontrol_html_output on
track_type 0
track_auto off
track_iomojo_id 0
track_step_angle_x 10
track_step_angle_y 10
track_move_wait 10
track_speed 255
track_stepsize 40
quiet on
#######################

7. run motion using command
motion -c /etc/motion.conf

8. open firefox and type this address http://192.168.100.254:8080/?action=stream


Read More..

How to install samba (File Sharing) on Openwrt

1. run the command:
opkg update
opkg install luci-app-samba

2. Enable samba service
/etc/init.d/samba enable
/etc/init.d/samba start

3. For easier, open the browser http://192.168.100.254/cgi-bin/luci
Service tab -> Network Shares
Click the + Add below
Then fill in the name of the directory that will be shared contents directory path that has been created (eg: / mnt / usb)
Check the Allow Guest
Give permissions 0700 on the Create Mask and Mask Directory
Save & Apply

that samba street auto start
system - startup - enable samba


Read More..