XMEN BLOGGER: December 2016

Wednesday, December 28, 2016

Raspberry Pi - Install Node.js on Raspberry Pi 2 Model B



$ wget https://nodejs.org/dist/v7.3.0/node-v7.3.0-linux-armv7l.tar.gz
$ tar -xvf node-v4.0.0-linux-armv7l.tar.gz
$ cd node-v4.0.0-linux-armv7l

$ sudo cp -R * /usr/local/

$ node -v



FROM: http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/

$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

$ sudo apt install nodejs

$ node -v
v7.3.0
$ node
> 1 + 3
4
> # We can hit Ctrl-C twice to exit the REPL and get back to the bash (shell) prompt.

Tuesday, December 27, 2016

Raspberry Pi - Node Telescope Server for Stellarium/SkySafary 4


From:
 https://www.npmjs.com/package/node-telescope-server
 https://github.com/fcsonline/node-telescope-server

 http://blog.raceconditions.net/wifi-telescope-control-with-skysafari-4/
 https://www.npmjs.com/package/stellar-socks



Overview
This is a small tutorial to connect Stellarium with a Celestron telescope, and control it remotly. The next diagram describes all the required elements to build your own homemade planetarium.

Requirements
 - RaspberryPi with raspbian installed.
 - A Ethernet wire or a Wireless adapter for your Raspberry Pi (I prefer a Wireless LAN adapter).
 - Telescope Celestron (Nexstar Protocol) with GoTo feature (Celestron NexStar 127SLT, in my case).
 - USB to Serial port adaptor (recommended).
 - A computer with Stellarium installed.

Installation
The first step is to install the nodejs and npm packages:

pi@raspberry $ sudo apt-get install nodejs npm

Verify that the current nodejs and npm packages have compatible versions:

pi@raspberry $ node -v
0.8.9

pi@raspberry $ npm -v
1.1.4

If the previous commands have returned older versions you should install node and npm manualy:

pi@raspberry $ wget http://www.nodejs.org/...
pi@raspberry $ tar zxf node-0.8.9.tar.gz
pi@raspberry $ cd node-0.8.9
pi@raspberry $ ./configure && make
pi@raspberry $ sudo make install

pi@raspberry $ node -v
0.8.9
pi@raspberry $ npm -v
1.1.4

Then install the node-telescope-server module in your Raspberry running:

pi@raspberry $ sudo npm install node-telescope-server -g

Now, connect your USB to Serial port adaptor to one of your available ports in the Raspberry Pi and connect the other side to the telescope. Run the next lsusb command to identify the USB device to be initialized:

pi@raspberry $ lsusb
...
Bus 001 Device 002: ID 4358:2523
...
pi@raspberry $ sudo modprobe usbserial vendor=0x4358 product=0x2523

Run dmesg command and you shall see lines like these:

pi@raspberry $ dmesg
usbserial_generic 1-1:1.0: generic converter detected
usb 1-1: generic converter now attached to ttyUSB0
usbcore: registered new interface driver usbserial_generic

Identify the device uid assigned by the kernel to the serial port, aka ttyUSB0

Start a nts instance to control your telescope. You should specify -t and -i arguments with your telescope type and file to the device file descriptor:

pi@raspberry $ nts -s stellarium -p 5050 -t nexstar -i /dev/ttyS0
Remote stellarium control server running at port 5000 to a nextar telescope
This command starts a Stellarium control server listenning at port 5050 connected to a Nexstar (Celestron telescopes) sending commands to /dev/ttyS0 device.

Now the Node Telescope Server (nts) is ready to receive instructions to move your telescope to the desired target.

Next step is to connect this nts instance with the Stellarium software. Open Stellarium and press Ctrl+0 or go to the telescopes window. Add a new telescope and choose the External software or remote computer. Then choose a desired name for your telescope, for example "NodeJS-RaspberryPI". Then specify the ip assigned to the RaspberryPI and the port listening by nts instance, in my case 192.168.5.1 and 5050 (because my Raspberry is configured as a AP gateway). Save the telescope configuration.

Multiple servers

$ nts -c config.json
Telescope Dummy: Remote dummy control server running at port 4000 to a dummy telescope
Telescope Stellarium Dummy: Remote stellarium control server running at port 4001 to a dummy telescope
Telescope Nexstar: Remote stellarium control server running at port 5000 to a nexstar telescope
Disabled remote web control server running at port 5001 to a nextar telescope

This command starts several servers defined in the config.json file.

An example of config file:

[
{
"name": "Telescope Dummy"
, "server": "dummy"
, "port": 4000
, "telescope-device": "/dev/null"
, "telescope-type": "dummy"
},
{
"name": "Telescope Stellarium Dummy"
, "server": "stellarium"
, "port": 4001
, "telescope-device": "/dev/random"
, "telescope-type": "dummy"

, "enabled": true
},
{
"name": "Telescope Nexstar"
, "server": "stellarium"
, "port": 5000
, "telescope-device": "/dev/ttyS0"
, "telescope-type": "nextar"
, "camera-device": "/dev/null"
},
{
"name": "Telescope Lx2000"
, "server": "web"
, "port": 5001
, "telescope-device": "/dev/ttyS0"
, "telescope-type": "lx2000"
, "camera-device": "/dev/null"

, "enabled": false
}
]

Last step is to click on connect button and the status label should change to "Connected".

Finally you have the Stellarium connected to your telescope! Choose the desired object and pres the Ctrl+1 and realize that the telescope start pointing to the target. :-)

Enjoy it!



-Do the same but now with Stellar-Socks (a TCP server for interacting with a telescope via serial connection from planetarium software such as Stellarium and SkySafari).

$ npm install stellar-socks

Configuration
By default the server will open a TCP socket on port 5000, and connect to a telescope on /dev/ttyUSB0. To configure these values, change the configuration in config.json.

Starting the Server

Before you start the server, you'll want to make sure you have your telescope on and aligned, as well as the Raspberry Pi (or other device) connected to the serial port on the telescope. You'll also want to make sure you have the configuration file config.json set up properly for your environment.
To start the server, navigate to the installation directory from the installation step, and run the following command:

$ npm start

When you run the command, the service will start up and announce its status as shown in the image below.

Running StellarSocks

You are now ready to configure your remote planetarium software to connect to the server.

http://www.nexstarsite.com/PCControl/RS232Cable.htm

Raspberry Pi - Reset user "pi" passwd


To reset your 'pi' password:

Power down and pull the SD card out from your Pi and put it into your computer.

Open the file 'cmdline.txt' and add 'init=/bin/sh' to the end. This will cause the machine to boot to single user mode.

Put the SD card back in the Pi and boot.

When the prompt comes up, type 'su' to log in as root (no password needed).

su

Type "passwd pi" and then follow the prompts to enter a new password.

passwd pi

Shut the machine down, then pull the card again and put the cmdline.txt file back the way it was by removing the 'init=/bin/sh' bit.

init=/bin/sh

Friday, December 23, 2016

Raspberry Pi - Blind (sunshades) control


WiringPi

Software

There ar three pieces of software (wiringPi (from Gordon Henderson), shell script, RaZ-OR function) to be installed, from which the last is optional for use by people that do have the RaZberry plugged in.

WiringPi module

The GPIO pins can be controlled directly from the command prompt. For security reasons that function does require access as root. That is not always convenient. Therefore the WiringPi module should be installed(following Plan B) on the Raspberry. It not only deals with the "root" problem, but it also makes interfacing easier.

$ gpio readall



For this example we use "soft" pin numbers 12,13,14 in the first column named wPi. Those correspond to the physical pin numbers 19,21,23 as you can see in the above table, which was made using the gpio readall command. Check this for your Pi board.

Raspberry Pi pins:

PIN 01 - 3v3 battery (+)
PIN 19 (GPIO12) - down button (+)
PIN 21 (GPIO13) - stop button (+)
PIN 23 (GPIO14) - up button (+)
PIN 25 - ground (-)

Shell script

If you run OpenRemote on the Raspberry Pi, the sunshades can be controlled via the OpenRemote Shell execution protocol with the following script:

#!/bin/sh
PIN=$1
/usr/local/bin/gpio mode $PIN out
/usr/local/bin/gpio write $PIN 1
sleep 0.1
/usr/local/bin/gpio write $PIN 0

If you run on RaspCLI:

/usr/local/bin/gpio mode 19 out
/usr/local/bin/gpio write 19 1

Result is:


If you do not run OpenRemote on the Raspberry, you can control the shades using this script via the RaZ-OR module (see below)

For the further description it is assumed the file is called GPIO.sh. It is called with a single numerical parameter that is interpreted as follows if you use the above wiring diagram and the wiringPi module:

down  : 12
stop  : 13
up    : 14

Then:
/usr/local/bin/gpio mode 14 out
/usr/local/bin/gpio write 14 1
-> Goes up

And:
/usr/local/bin/gpio mode 13 out
/usr/local/bin/gpio write 13 1
-> Goes stop

The script makes the GPIO temporarily go high, which makes the Somfy remote button close for a short while.
In this script the wiringPi PIN numbers are used. See more detail on those pin assignments here.



REFERENCE

Somfy control
http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Control+Sunshades+-+Somfy+with+Raspberry+Pi

blind-control
http://romor.github.io/blind-control/

Raspberry Pi - WiringPi with RF 433mHz transmitter


WiringPi GPIO pins



Pin 2 - Vcc (5V)
Pin 6 - GND
Pin 11 - GPIO 17 - (WiringPi Pin 0): Linked to Emitter
Pin 13 - GPIO 27 - (WiringPi Pin 2): Linked to Receiver (RF433MHz – XY-MK-5V)





FROM: http://i-build-stuff.blogspot.com.es/2015/01/wireless-room-temperature-monitoring_27.html

With that simple setup on i can go ahead i can try and send data and see if it is being received.

Now on my computer i connect to my Raspberry Pi using ssh

Code 1 : ssh pi@yourlocalIPaddress
(once prompted, enter your password. Default is "raspberry")

Then I have to go to the specific folder where the 433Utils programs are stored in order to start them.

Code 2 : cd 433Utils/RPi_utils

This bring you to the correct folder where the sending program and the sniffing program are stored.
Now i open another Terminal window and login via ssh (code 1) and i go to the 433Utils folder (code 2)

In the first terminal window start the Sniffer program.

Code 3 : sudo ./RFSniffer

Now in the second terminal window send a code

Code 4 : sudo ./codesend 121234 (any random integer)

If everything works fine, you should see your integer going through the Sniffer result window just like in the below screenshot :

pi@raspberrypi ~/wiringPi $ gpio readall



(*) Raspberry Pi RF remote (433MHz)

FROM: http://npham.dk/?p=34

Creating RF transmitter / receiver

Source: http://shop.ninjablocks.com/blogs/how-to/7506204-adding-433-to-your-raspberry-pi

I bought my RF transmitter and receiver from eBay a about 1$.
Connecting RF transmitter and receiver to the Raspberry Pi is pretty simple.
Both the reciver and transmitter has a VCC, GND and DATA pins.
And all you do is connect it to the Raspberry Pi GPIO pins.



Install RPi_utils

Source:
https://github.com/ninjablocks/433Utils/tree/master/RPi_utils

Start by installing RPI_utils

sudo apt-get update

#Installs GIT
sudo apt-get install git
sudo apt-get install git-core

#Installs 433utils
git clone git://github.com/ninjablocks/433Utils.git
cd 433Utils/RPi_utils/

#Installs wiringPI
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build

#Builds RPI_util
cd ..
make all

Testing and decoding RF signal

To capture and decode the RF signal from the remote, I ran the program RFSniffer.

sudo ./RFSniffer

When I push the A (on) button on the remote, I get the following code on the screen.

Received 5260625
Received 5260625
Received 5260625
Received 5260625
Received 5260625

To test if the transmitter works you can send the received value with this command.

sudo ./codesend 5260625

If you convert 5260625 to binary, you get 10100000100010101010001.
And looking at the binary value of all the buttons, you start to see a pattern.

Button Decimal value Binary value
A (On) 5260625 10100000100010101010001
A (Off) 5260628 10100000100010101010100
B (On) 5263697 10100000101000101010001
B (Off) 5263700 10100000101000101010100
C (On) 5264465 10100000101010001010001
C (Off) 5264468 10100000101010001010100
D (On) 5264657 10100000101010100010001
D (Off) 5264660 10100000101010100010100

They all starts with 1010000010, and all the ON buttons ends with 0001 and all the OFF buttons ends with 0100.
The 1010000010 matches with the dip-switches; 10 = down and 01 = up.
The middle part, is a value that identifies A,B,C and D.
You can see the pattern here:

Dip switch Button Id On / Off
A = 10 10 00 00 10 + 00 10 10 10 1 + 0001 / 0100
B = 10 10 00 00 10 + 10 00 10 10 1 + 0001 / 0100
C = 10 10 00 00 10 + 10 10 00 10 1 + 0001 / 0100
D = 10 10 00 00 10 + 10 10 10 00 1 + 0001 / 0100

Script

I then created the following bash script.

#!/bin/bash
BTN=$1
STATUS=$2

BTN=$(echo $BTN | tr '[:lower:]' '[:upper:]')
STATUS=$(echo $STATUS | tr '[:lower:]' '[:upper:]')

DIP_SWITCH="DDUUD" #Change dip switches to match the remote

#hardcoded values
BTN_A="001010101"
BTN_B="100010101"
BTN_C="101000101"
BTN_D="101010001"

DIP_SWITCH=$(echo $DIP_SWITCH | sed 's/D/10/g' | sed 's/U/00/g')

case $BTN in
A )
BTN=$BTN_A ;;
B )
BTN=$BTN_B ;;
C )
BTN=$BTN_C ;;
D )
BTN=$BTN_D ;;
* )
echo "Please define the button [A-D]";exit;
esac
case $STATUS in
ON )
STATUS="0001" ;;
OFF )
STATUS="0100" ;;
* )
echo "Please define the button state [ON/OFF]";exit;
esac

BIN=$(echo $DIP_SWITCH$BTN$STATUS)
DEC=$((2#$BIN))

#echo $DEC
sudo /home/pi/codesend $DEC

And to emulate a click, I just call

./RFISend.sh A ON

Control via web

Because the codesend uses wiringpi, it is required to call with sudo.
But if you need to call it from a webserver, it creates some problem, because sudo requires a password.

So we need to edit visudo, so it doesn’t require a password.
(it may not be a secure thing to do, but in my case the webserver is not exposed to the internet, and is only for “at home” use)

sudo visudo

Add the following line to the file.
#NOTE: use TAB and not space, except for the last one – after NOPASSWD:

www-data ALL=(root) NOPASSWD: /home/pi/433Utils/RPi_utils/codesend

Save the file and reboot the Raspberry Pi, and you’re good to go.

Now the local PHP webserver can call the script with:

< ? php
shell_exec("/home/pi/433Utils/RPi_utils/RFISend.sh A ON");
? >



http://rsppi.blogspot.com.es/2013/08/comunicacion-por-rf-433mhz-desde.html



Home Control Dashboard
https://dendriticspine.github.io/projects/2014/10/10/homedashboard



REFERENCE:

http://www.touteladomotique.com/forum/viewtopic.php?f=118&t=15760

http://wiringpi.com/wp-content/uploads/2013/03/pins.pdf

WiringPi GPIO pins
http://www.14core.com/configure-clibrary-wiringpi/



http://blogwifi.fr/raspberry-pi-b-telecommande-433-mhz-universelle/

http://domotique-home.fr/domotique-diy-partie-2-protocole-433-mhz/

http://npham.dk/?p=34
http://www.princetronics.com/how-to-read-433-mhz-codes-w-raspberry-pi-433-mhz-receiver/

Thursday, December 22, 2016

English



Is it English your mother tongue?
Yes, It's my mother tongue

ad (advertisement)
glass
creepy (terrorifico)
scary (to scare)
Prank (joke) - clown prank

from out of nowhere

Do you want to go with us?
Yes i'd love too

What shall we do?

Thinks get better

I wasn't the only one

let me help you

I'm glad you won
I'm sorry you lost

Ask to wolk more slowly
I'm affread it's going to rain

take a deep breath
to breathe - respirar
breath - respiracion

littering (litter) - grosery
Ped Xing (x-ing)

cobbler (zapatero)
stein (tanque de cerveza)

I wish you well

With a better level of English... you be able to...

rail way - rail road

I'm thrilled to be back from holidays
I'm happy to be back
I'm recommend you...

Wednesday, December 21, 2016

Raspberry Pi - IP fija









Tuesday, December 20, 2016

Raspberry - Adding 433 to your Raspberry Pi


From: https://web.archive.org/web/20150415084145/http://shop.ninjablocks.com/blogs/how-to/7506204-adding-433-to-your-raspberry-pi
Thanks to: Justin Clayden



In this blog post I'll show you how to add RF 433MHz to your Raspberry Pi.

Requirements

- A Raspberry Pi (ORLY?) I'm using the revision 2 Pi, but if you have the revision 1 board, you'll just need to be mindful of the different pin numbers. As you'll see, the code uses *wiringPi* numbers and these haven't changed between revisions (thankfully!) but be aware that the RF receive pin we use will be BCM GPIO pin 27 in revision 2, and 21 in revision 1. That little tidbit is just for the curious; as I say the wiringPi pin numbering system abstracts this for us nicely.

- A 433MHz Transmitter module

- A 433MHz Receiver module

- The code! https://github.com/ninjablocks/433Utils

Phase One - Install the Hardware



Step One - Install the Transmitter module

The requirements for this module are easily satisfied. Provide it with power and a data signal, and optionally an aerial, and it's well happy. We'll connect the DATA pin of this module to wiringPi pin 0. (This is GPIO pin 0 and BCM GPIO pin 17).

That's the 6th pin from the left on the lower row:



I used wire-wrapping techniques to connect mine:



Step Two - Install the Receiver Module

The requirements for this module are the same as for the transmitter, however there are some pin differences, so don't be caught out by this. The two middlemost pins are both data pins, and there is an entirely different area on the board to which to attach an aerial. Your receiver board may look different to mine. In fact my receiver has 8 pins.

The main message is to check your pin out documentation for your devices!

Attach the DATA pin of your receiver to wiringPi pin 2 - that's GPIO2; the 7th pin from the left on the lower row:



Phase Two - Run the Software

Step One - Clone/Download the '433Utils' github repo if you haven't already.

You'll find a 'RPi_utils' directory; that's where the code for this How-To resides.

Step Two - Build the Software

cd into the 433Utils/RPi_utils directory and do a:

make all

Run the codesend Sketch

On your Ninja Dashboard, choose the 'Listen' function. Then do a:

sudo ./codesend 12345

Almost any number will do here. You should see its hexidecimal equivalent appear in the Listen window. Change the number and verify that a different number appears in the Listen window.

Step Three - Run the RFSniffer Sketch

Within the 433Utils/RPi_utils directory, do a:

sudo ./RFSniffer

Grab your wireless button (or any 433MHz generating device.) and get pressing!

You should see its code appear in your terminal:

Starting Up..

Received 89745

Received 89745

Received 89745

Received 89745

Received 89745

NOTE: Your code may differ, of course.

Improvements

One limitation of this code is that it requires sudo to work, due to its calling of certain wiringPi functions.

Raspberry Pi - Remote Shade Control


Somfy Telis Interface



green - GND
GPIO19,21,23 - +Vcc
GPIO25 - GND

Opto coupler CNY74-4H used in the add-on electronics to connect push buttons (remote control).

http://www.vishay.com/docs/83526/83526.pdf



Shades Automation
http://www.seebq.com/2013/11/29/shades-automation.html

http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Control+Somfy+Sunshades+with+Raspberry+Pi
http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Control+Sunshades+-+Somfy+with+Raspberry+Pi

http://www.smbaker.com/automated-cellular-shades-with-somfy

GitHub
https://github.com/seebq/remote_shade_control_app

http://romor.github.io/blind-control/



Domoticz
http://www.domoticz.com/forum/index.php
http://www.nemcon.nl/blog2/wiring



Lamp Remote Control (with Python) - 2N222A Transistor
http://jack.minardi.org/raspberry_pi/make-an-internet-controlled-lamp-with-a-raspberry-pi-and-flask/



Example with 2N25 transistor (optocoupler):
http://electronics.stackexchange.com/questions/76682/shorting-a-remote-control-pushbutton-with-gpio-and-a-transistor


R=100 Ohms






[solved] How to start Check Point High Availability (CPHA) Module?


From: https://firewallengineer.wordpress.com/2012/05/02/solved-how-to-start-check-point-high-availability-cpha-module/

cphaprob stat
will display the status of the cluster

[Expert@R65-FW-254]# cphaprob state
HA module not started.
[Expert@R65-FW-254]#

cphaprob -a if
Will display the monitoring interfaces, the fwd, cphd dameon states, look for any interface down alerts if the cluster is down.

[R65-FW-254]# cphaprob -a if
HA module not started.

cphaprob list
Will display the overall health status of the cluster / Shows a status in list form

[R65-FW-254]# cphaprob list

Built-in Devices:

Device Name: Interface Active Check

Registered Devices:

Device Name: Synchronization
Registration number: 0
Timeout: none

Device Name: Filter
Registration number: 1
Timeout: none

Device Name: fwd
Registration number: 2
Timeout: 2 sec

[R65-FW-254]#

cpstat ha
high availability state

[Expert@R65-FW-254]# cpstat ha
Product name: High Availability
Version: N/A
Status: problem
HA installed: 1
Working mode:
HA started: no
[Expert@R65-FW-254]#

[Expert@R65-FW-254]# cpstat -f all ha
Product name: High Availability
Major version: 6
Minor version: 0
Service pack: 1
Version string: N/A
Status code: 2
Status short: problem
Status long:
HA installed: 1
Working mode:
HA protocol version: 2
HA started: no
HA state: ClusterXL inactive or machine is down
HA identifier: 0

Interface table
————————————————
|Name|IP|Status|Verified|Trusted|Shared|Netmask|
————————————————

Problem Notification table
————————————————-
|Name |Status |Priority|Verified|Descr|
————————————————-
|Synchronization|problem| 0| 730| |
|Filter |OK | 0| 730| |
|fwd |OK | 0| 731| |
————————————————-

Cluster IPs table
———————————————–
|Name|IP|Netmask|Member Network|Member Netmask|
———————————————–

Sync table
—————–
|Name|IP|Netmask|
—————–
[Expert@R65-FW-254]#

[Expert@R65-FW-254]# fw hastat
HOST NUMBER HIGH AVAILABILITY STATE MACHINE STATUS
localhost ?? module disabled
[Expert@R65-FW-254]#

[R65-FW-254]# cpstart
SVN Foundation: cpWatchDog already running
SVN Foundation: cpd already running
SVN Foundation started
FireWall-1: starting external VPN module — OK
Note: This machine is not defined as a part of any Cluster.
It is possible that the IP of this machine as it appears in your hosts
file differs from the general IP of this machine in the Management server.
Alternatively, Check your Cluster configuration in the Management server.
If this machine is no longer part of a Cluster, please disable Check Point ClusterXL
or State Synchronization on it.
FireWall-1: Starting fwd

Installing Security Policy InitialPolicy on all.all@R65-FW-254
Fetching Security Policy from localhost succeeded
Failed to read database.
Probably module was never installed
Failed to fetch policy from masters in masters file
FireWall-1: enabling bridge forwarding
FireWall-1 started
FloodGate-1 is disabled. If you wish to start the service, please run ‘etmstart enable’.
SmartView Monitor: Not active
cpstart: Power-Up self tests passed successfully
cpstart: Starting product – SVN Foundation
cpstart: Starting product – VPN-1
cpstart: Starting product – FloodGate-1
cpstart: Starting product – SmartView Monitor
cpstart: Starting product – Advanced Routing
[R65-FW-254]#

[Expert@R65-FW-254]# cpconfig
This program will let you re-configure
your Check Point products configuration.

Configuration Options:
———————-
(1) Licenses
(2) SNMP Extension
(3) PKCS#11 Token
(4) Random Pool
(5) Secure Internal Communication
(6) Disable Advanced Routing
(7) Disable cluster membership for this gateway
(8) Automatic start of Check Point Products

(9) Exit
Enter your choice (1-9) 7

REFERENCE
https://www.cpug.org/forums/installing-upgrading/9786-how-do-i-start-my-ha-module.html

https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk36247

SOLUTION [May 20, 2012]
You can read the solution here🙂
https://firewallengineer.wordpress.com/2012/05/20/solved-finally-cpha-configuration-resolved/

Checkpoint R65 - Add routes


# route add -host x.x.x.x gw x.x.x.x
# route add -net x.x.x.x/24 gw x.x.x.x

# route add -host x.x.x.x gw x.x.x.x
# route add -net x.x.x.x/24 gw x.x.x.x

# route --save
# route -n

# netstat -nvr
# clish
> set static-route x.x.x.x/24 next hop gateway address x.x.x.x on

Cisco - Mirror


# sh monitor
# conf term
# monitor session 1 source int fast 1/0/2
# monitor session 1 destination int fast 1/0/5

# no monitor session 1

Monday, December 19, 2016

Cisco - How to Erase configuration



For safety, lets start by wiping the routers current config. Enter these commands:

enable
erase nvram:
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]

Press "y" to erase the routers config. Then enter the below commands. Note that the router may not ask you to save the current config. If it does, make sure you say no - we are trying to wipe the config.

reload
System configuration has been modified. Save? [yes/no]: no
Proceed with reload? [confirm]

Press "y" to let the router reboot. For those people who have some familiarity with Cisco routers the "erase nvram:" command has supersede the "write erase" and "erase startup-config" commands (these commands all do the same thing).

When the router has completed booting this time it will ask if you want to run the setup wizard, say "no". It should eventually tell you to press "return to get started". Tap return a few times. Now we need to go into config mode:

enable
config terminal

Now copy the config you want to load onto the router into the clipboard (hint: CTRL-A then CTRL-C), and paste into HyperTerminal (Edit/Paste To Host). Once it has pasted in, you need to save the config.

CTRL-Z
copy running-config startup-config

With any luck, your now done!



config t
int fa0/1
ip address 192.168.1.1 255.255.255.0
description *** Assigning an ip address to a physical fast ethernet port on the switch***

int vlan 1
ip address 192.168.2.1 255.255.255.0
description *** Assigning an ip address to the virtual (vlan) interface on the switch ***

How to install a config text file into a Cisco router


From: https://supportforums.cisco.com/document/13116/how-install-text-file-configuration-router

If the configuration is already uploaded, go directly to step 8.

1. If the configuration needs to be copied from another router, connect to that router through the console or Telnet. At the Router > prompt, issue the enable command and provide the required password. The prompt changes to Router#, indicating that the router is now in privileged mode.
2. To force the router to return the entire response at once, rather than a screen at a time, issue the terminal length 0 command. This allows you to capture the configuration without extraneous --more-- prompts generated when the router responds a screen at a time.
3. On the HyperTerminal menu, select Transfer > Capture Text. The Capture Text window appears.
4. Name this file config.txt.
5. To dismiss the Capture Text window and begin the capture, click Start.
6. Issue the show running-config command and allow time for the router to complete its response.
7. To end the screen capture, select Transfer > Capture Text > Stop on the HyperTerminal menu.
8. Open the config.txt file you created in any text editor, such as Notepad or Wordpad.
9. Search for and remove any line that starts with AAA.
Note: This step removes any security commands that could lock you out of the router.
10.For each interface that is followed by shutdown, leave it as it is.
11. For all other interfaces, issue the no shutdown command, as shown in this example:

interface Serial0/0
no ip address
no ip directed-broadcast
no shutdown

12. Save the file.
13. Connect to the router that needs the configuration.
14. Open the config.txt file.
15. Highlight the entire contents of the config.txt file.
To accomplish this, drag the cursor from before the first character to after the last character in the file while holding down the left mouse button. If you are using Notepad, select Edit > Select All from the menu.
16. Copy the selected text to the Windows clipboard.
To copy, you can either select Edit > Copy from the text editor's menu, or hold down the CTRL key and simultaneously press the C key.
17. Switch to the HyperTerminal window and issue the configure terminal command at the Router# prompt and select Enter.
18. Paste the configuration file into the router by selecting Edit > Paste to Host on the HyperTerminal menu.
19. After the configuration has finished pasting, and the router brings you back to the configuration prompt, issue the copy running-config startup-config command. This writes the configuration into memory.
20. To return to the Router# prompt, issue the exit command.

Sunday, December 11, 2016

London Visit Guide


From: https://travellingtheworld2016.wordpress.com/2016/02/16/london/
Thanks to: Travelling the World


Essential visits

Wesminster Palace: It is a Victorian Gothic building, that houses the chambers of the British Parliament.

Tower of London: it houses the Crown Jewels.

Westminster Abbey: is the oldest and most famous London temple. Built over several centuries it has hosted famous events.

Buckingham Palace: It is the official residence of the British Royal family.

Big Ben: Has become a symbol of London, it’s very beautiful.

Tower Bridge: is the most famous bridge in London because of its history.

London Eye: Built in 2000, to celebrate the new millennium. It is an observation wheel situated 135 metres above the western end of the Jubilee Gardens.

The Shard: is the tallest skyscraper in the European Union with a height of 310 meters.

Chinatown: is London’s chinatown, the first businesses emerged in the middle of the last century.

Covent Garden: is one of the most charming districts in London.

Trafalgar Square: is one of the largest squares in the world. It is in central London, built to commemorate the Battle of Trafalgar.

Madame Tussauds: It is the most famous wax museum in the world. It has the largest collection of celebrity figures. Madame Tussauds has many locations, the biggest is in London.


Samsung AQV12FAN reset codes


Q:
I have a samsung aqv12fan unit not working just the 3 lights 2x green 1x red constantly flashing.

A:
Try a reset of the unit.

Remove one battery, hold down the temp setting up AND down buttons while refitting the battery.
You should get a screen which says:

10
00
00

Enter the six digits:

09 48 77

You enter the codes by pressing certain buttons for each digit/line.
Then press 'mode' button.
It's not that hard to work out which button effects what digit.
Try it, and work it out, you can't go wrong if you just make sure the right digit sequence shows up when you press the mode button.
You will be greeted with another screen saying:

10
00
00

Enter the next six digits:

17 52 45

Press 'mode' and the 'on/off' buttons.

This should fix your issue.

if no response you have a dead unit/receiver PCB/remote transmitter.

Monday, December 05, 2016

Crema de Calabaza con Calabacines y Puerros - Monsieur Cuisine Plus


Ingredientes (para 4 personas):

350gr de calabaza
200gr de calabacines (aprox. 2 puerros)
150gr de puerros (aprox. 3 puerros)
1 dientes de ajo
1 cebolla
3 quesitos light
45ml de aceite
450ml de agua
sal (al gusto)
pimienta (al gusto)

Preparación:

1. Limpiamos/lavamos el puerro, lo cortamos en trozos y lo introducimos en el vaso.
2. Pelamos y limpiamos/lavamos la cebolla y la introducimos en el vaso.
3. Programamos 8 segundos a velocidad 5 (con la tapa y el cubilete puestos).
4. Bajamos los ingredientes al fondo del vaso con ayuda de la espátula.
5. Vertimos el aceite en el vaso.
6. Y sin el cubilete puesto, programamos 8 minutos a velocidad 2 y temperatura 100ºC.
6. Pelamos y lavamos la calabaza y los calabacines y lo introducimos todo en el vaso.
7. Ahora con el cubilete puesto, trituramos durante 10 segundos a velocidad 5.
8. Vertimos el agua hasta cubrir los alimentos y echamos la sal.
9. Bajamos los ingredientes al fondo del vaso y lo cerramos con la tapa y el cubilete.
10. Programamos 30 minutos a velocidad 1 y temperatura 100ºC.
11. Echamos los 3 quesitos.
12. Trituramos durante 1 minuto a velocidad 7 (con la tapa y el cubilete puestos).

Y ya esta lista para servir.

La receta la he puesto sin patata, si queréis, podéis echarle una patata troceada a dados justo cuando se introduce en el vaso de la Monsieur Cuisine la calabaza y el calabacín cortados a trozos. Se pueden sustituir los quesitos por queso de cabra (100gr) e incluso si se quiere que sea más cremosa, echarle nata liquida para cocinar (light o normal).