Your ISP might kill an idle SSH session (why?). So, if you're using Putty, here's what you can do :
(yes, it's that simple)
Just set this number to 10 - every 10 seconds, it'll send a keep-alive packet..
Handy for Raspberry Pi hacking - so says the Right Honourable Harry Perkins, steelworker from Sheffield.
Wednesday, September 24, 2014
Sunday, September 21, 2014
Cheezy Surveillance System with Better UI
Would you like to set up a $5 (Fry's) webcam in your home and be able to look at it from anywhere on your phone?
If yes, then...
(assumes fswebcam is installed on your Raspberry Pi and you have a cron job (see older post:) to take a photo ever so often and that pic is being saved at ~/Desktop/snapshot.jpg)
Last year, I had an Airbnb guest stay at my place when I left town. I only cared about the garage being secure. So, I set up a pi-connected-webcam there. I had to use an SFTP client on my phone to pull the pic each time. We (my smarter buddy who helped me with the setup) couldn't get HTTP to do it..
Today, we figure out that it's just that Cox is blocking port 80 (HTTP). (My buddy ran nmap to reach the conclusion)
So, pick another port - maybe 1025 and, in your (assuming you've installed lighttpd as your webserver :) ) /etc/lighttpd/lighttpd.conf, change to see :
server.port = 1025
Now, in your /var/www, you need a link to the snapshot.jpg, so do :
(after you cd to /var/www)
(might have to do sudo)
ln -s ~pi/Desktop/snapshot.jpg
Then, you can, in a browser, even on your phone,
whatever.wherever.org:1025/snapshot.jpg
See older post on how you can get the whatever.wherever stuff done right - using freedns.afraid.org.
I recently installed inadyn to update my IP address on that host automatically...
Happy securing :)
Here's an alternative to freedns.afraid.org :
http://www.instructables.com/id/Host-your-website-on-Raspberry-pi/step5/have-your-domain-name/
If yes, then...
(assumes fswebcam is installed on your Raspberry Pi and you have a cron job (see older post:) to take a photo ever so often and that pic is being saved at ~/Desktop/snapshot.jpg)
Last year, I had an Airbnb guest stay at my place when I left town. I only cared about the garage being secure. So, I set up a pi-connected-webcam there. I had to use an SFTP client on my phone to pull the pic each time. We (my smarter buddy who helped me with the setup) couldn't get HTTP to do it..
Today, we figure out that it's just that Cox is blocking port 80 (HTTP). (My buddy ran nmap to reach the conclusion)
So, pick another port - maybe 1025 and, in your (assuming you've installed lighttpd as your webserver :) ) /etc/lighttpd/lighttpd.conf, change to see :
server.port = 1025
Now, in your /var/www, you need a link to the snapshot.jpg, so do :
(after you cd to /var/www)
(might have to do sudo)
ln -s ~pi/Desktop/snapshot.jpg
Then, you can, in a browser, even on your phone,
whatever.wherever.org:1025/snapshot.jpg
See older post on how you can get the whatever.wherever stuff done right - using freedns.afraid.org.
I recently installed inadyn to update my IP address on that host automatically...
Happy securing :)
Here's an alternative to freedns.afraid.org :
http://www.instructables.com/id/Host-your-website-on-Raspberry-pi/step5/have-your-domain-name/
Wednesday, September 17, 2014
WPA Mode Not Immune Either
With WEP, I was losing my WLAN link every few hours. WPA is only an upgrade to a "few days". I had to reboot my Pi today just to be able to get back in from my PC through Putty..
Tuesday, September 2, 2014
The Trouble with Mr. Motion
I thought this one was a dream come true..
http://www.projects.privateeyepi.com/home/webcam-surveillance-project/webcam-surveillance-monitor
I guess not, unless one's a PhD in computer science. How the hell is one supposed to fix stuff when it doesn't behave as expected? Yuck!
...
A thousand apologies! It works!! And the picture quality in the movie isn't bad!! I could recognize myself on this crappy camera! Just use winSCP to port the swf file over to windows and look at it with Chrome!! Phew! Now, where can we go with this?
I did update the _port to 8081 (original) instead of 8085, but that shouldn't be necessary..
I thought I should give it some credit and half-heartedly went in the living room and turned on the light and thought that should qualify as motion - since the successive frames differ considerably and - yes! There's a tiny .swf file there and that's exactly what it shows! Looks like christmas light lighting up the room - a 0.5 second movie - on/off/on/off..
Excellent work by Kenneth Lavrsen.
http://www.projects.privateeyepi.com/home/webcam-surveillance-project/webcam-surveillance-monitor
I guess not, unless one's a PhD in computer science. How the hell is one supposed to fix stuff when it doesn't behave as expected? Yuck!
...
A thousand apologies! It works!! And the picture quality in the movie isn't bad!! I could recognize myself on this crappy camera! Just use winSCP to port the swf file over to windows and look at it with Chrome!! Phew! Now, where can we go with this?
I did update the _port to 8081 (original) instead of 8085, but that shouldn't be necessary..
I thought I should give it some credit and half-heartedly went in the living room and turned on the light and thought that should qualify as motion - since the successive frames differ considerably and - yes! There's a tiny .swf file there and that's exactly what it shows! Looks like christmas light lighting up the room - a 0.5 second movie - on/off/on/off..
Excellent work by Kenneth Lavrsen.
Sunday, August 31, 2014
Sir Eben Upton
Please help out Jake Beningo :
Here's some stuff from his latest course :
Script Automation
•Login Automatically
–sudo nano /etc/initab
– comment out
•1:2345:respawn:/sbin/getty 115200 tty1
–Add
•1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1
•Script start on login
–nano ~/.bashrc
–At the bottom add “sudo python /path/pws.py”
Here's some stuff from his latest course :
Script Automation
•Login Automatically
–sudo nano /etc/initab
– comment out
•1:2345:respawn:/sbin/getty 115200 tty1
–Add
•1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1
•Script start on login
–nano ~/.bashrc
–At the bottom add “sudo python /path/pws.py”
So, what's my problem? How the hell are you supposed to find out such stuff on your own? Is this teaching or spoonfeeding? Do you want to give a man a fish or teach him how to fish? A good teacher makes himself unnecessary. You need to motivate finding out such information and teach how to go find it!!
Oh Jake
Get your act together man :)
rpi-serial-console status
cool. That works.
rpi-serial-console disable
Serial console can only be disabled by root user
rpi-serial-console status
cool. That works.
rpi-serial-console disable
Serial console can only be disabled by root user
Okay, no big deal, you run again as sudo. But, when you're broadcasting to so many folks through a reputed host, isn't it a good idea to double check everything? How hard is it to hire a college freshman for minimum wage to do this - couple hours at most. For all you know, a python script could easily check out all your code snippets..
Then, few slides down, more frustration.. "Setting up the UART". How the f are you supposed to get the 2nd window that shows the serial-port interaction? On the PC it would be realterm.. What are you supposed to do on the Pi?
Here's a potentially useful resource : https://www.youtube.com/watch?v=da5Q7xL_OTo
www.beningo.com raspberry pi
Then, few slides down, more frustration.. "Setting up the UART". How the f are you supposed to get the 2nd window that shows the serial-port interaction? On the PC it would be realterm.. What are you supposed to do on the Pi?
Here's a potentially useful resource : https://www.youtube.com/watch?v=da5Q7xL_OTo
www.beningo.com raspberry pi
Saturday, August 30, 2014
The Genius of Jake Beningo
Phew, the guy gets paid to teach this stuff :
if State == 0:
GPIO.output( GREEN_LED, False)
State = 1
else :
GPIO.output( GREEN_LED, True)
State = 0
within a while loop. Yuck.
He made State an integer. Dude, why?
Here's the right way :
GPIO.output( GREEN_LED, State )
State = not State
if State == 0:
GPIO.output( GREEN_LED, False)
State = 1
else :
GPIO.output( GREEN_LED, True)
State = 0
within a while loop. Yuck.
He made State an integer. Dude, why?
Here's the right way :
GPIO.output( GREEN_LED, State )
State = not State
Subscribe to:
Posts (Atom)