iPhone 4 as a Webcam

Don’t have a webcam but have a Wireless Network and a iPhone? Found an awesome app that will allow you to install drivers to talk to your iPhone using Bonjour and share the camera with appications like Skype.

There are drivers for Windows + Mac OS X

iPhone Webcamera

Get the Drivers here – App on the iTunes App Store

Monitoring Opensolaris from iPhone / iPad using iStat

How to get istatd running on Opensolaris …

Well after I tried myself months ago to get istatd to compile on my Opensolaris box (token) someone smarter and who is not as lazy has worked it all out and got it to compile. One thing he did not do tho was write an init script so that it would start @ boot time. Here you can find it.

Please follow the install instructions on the following blog – I have written scripts, included a sample configuration and written a init script.

Karim Berrah’s Weblog

Compile Script (Place in parent dir to source code):

[bash]
#!/bin/bash

DIR=istatd-
VER=0.5.7

ACLOCAL110=aclocal-1.10
export ACLOCAL110
AUTOMAKE110=automake-1.10
export AUTOMAKE110
AUTOCONF26=autoconf
export AUTOCONF26
AUTOHEADER26=autoheader
export AUTOHEADER26
LIBTOOLIZE15=libtoolize
export LIBTOOLIZE15

cd ${DIR}${VER}
pwd
./configure
if [ $? -ne 0 ]; then
echo "ERROR with configure"
fi

make

echo "–> Finished compiling …"

pfexec useradd istat
pfexec groupadd istat

if [ ! -d /var/cache/istat ]; then
mkdir /var/cache/istat
fi
pfexec chown istat:istat /var/cache/istat

echo "–> Finished …"
[/bash]

Sample Config:

[plain]
#
# /etc/istat.conf: Configuration for iStat server
#

# network_addr 127.0.0.1
network_port 5901
server_code 55551
server_user istat
server_group istat
# server_socket /tmp/istatd.sock
server_pid /var/run/istat/istatd.pid
cache_dir /var/cache/istat

# Note: Only support for one network interface, limited by client.
monitor_net ( bge0 )

# Array of disks to monitor. Specify mount path or device name.
monitor_disk ( / /home )

# Set to 1 if you want to use mount path as label instead of the device name.
disk_mount_path_label 0

# Try to probe the filesystem for disk label, will override the mount path label.
disk_filesystem_label 1

# Set custom disk label. Will override all other labels.
# disk_rename_label /dev/sda1 "root"
# disk_rename_label /home "home"

# End of file
[/plain]

Init Script:
[bash]
#!/bin/bash

# Basic support for chkconfig
###
# chkconfig: 35 99 55
# description: start and stop istatd – iphone monitoring tool daemon
###

DIR=/usr/local/bin/
BINARY=istatd
OPTS="-d"

PIDFILE=/var/run/istat/istatd.pid

case "$1" in
start)
echo -n "Starting $BINARY … "
$DIR/$BINARY $OPTS
if [ $? -ne 0 ]; then
echo "! Failed !"
else
echo "done"
fi
;;
stop)
echo -n "Stopping $BINARY … "
kill $(cat $PIDFILE)
echo "done"
;;
status)
ps -ef | grep "$BINARY $OPTS"
;;
*)
echo "Usage: $0 {start|status|stop}"
exit 1
esac

exit 0
[/bash]

ln -s /etc/init.d/istatd /etc/rc3.d/S99istatd
ln -s /etc/init.d/istatd /etc/rc3.d/K10istatd

If someone has written a SMF service I would love to take it from you 🙂

If you have any questions – feel free to ask …

iPhone Speed Tips

Have you noticed a lag in the speed at which your iPhone 3G or 3Gs loads SMS text messages or web browser pages?

Remember that your iPhone is basically a small computer, it runs an operating system just like Windows XP or Mac OS X. And just like those systems, there are background tasks running that may slow down the performance of your iPhone. So in order to speed up your iPhone, you should properly quit the applications that you are not using.

Important note (common misconception):

When you press the ‘Home’ button on the front of the iPod Touch, you are not quitting the application. You are simply closing it, but the application is still open and running in the background.

Suppose you open a game that you downloaded or an application on your iPhone that constantly updates via the internet. But you don’t use that application often. Then it is smart to quit those applications so it is not hogging the bandwidth (speed) of your iPhone in the background.

So, in order to properly quit these applications on iPhone 3G or 3Gs, perform the following steps:

1. Open the application that you wish to quit by pressing its button on the home screen.
2. Once the app opens, hold the power button (on the top of the iPhone) until the ‘Slide to Power Off’ with a red button shows up.
3. Then let go of the power button and press and hold the ‘Home’ button on the front-bottom of the iPhone.
4. When the interface returns to the home screen, you have successfully quit the application.

Perform steps 1-4 on any applications that you don’t use often. This will speed up the performance of your iPhone.

Bonus: Clear the cache of your Safari browser regularly by doing the following:

Home Screen > Settings > Safari > Clear Cache

This will help speed up the performance of Safari when surfing the web.

Source: http://geekwhat.com/2009/09/14/how-to-speed-up-iphone-3g-or-3gs/

Slashdot for iPhone hosted @ cooperlees.com …

Just thought I would let people know that I have borrowed the source from http://pixelcity.com/s/ (as it was broke 20090818) so that I can continue to look at a fast loading Slashdot for my iPhone. For more information visit http://www.pixelcity.com/slashdot/ – Thanks for the sweet (but very hacky) code :).

The URL:

https://cooperlees.com/s/

I made a couple of very small changes:

  1. Put cooperlees.com in the title.
  2. Changed the useragent sent via curl to be the Safari useragent string (so it gets the Slashdot returned that a normal Safari browser would get).
  3. Also wgetting all the images – They are copyright to their original creator.

Get source here.

uit.sh Hits over 1000 Downloads !

Just thought I would pass on that my Ubuntu Iphone teathersing Shell Script has passed 1000 downloads.
Feels good to have people all over the world use your script 🙂

Hope everyone that has downloaded it has enjoyed it as much as I have in the car on the way to work.

The iPhone in Tethering Mode
The iPhone in 'Tethering Mode'

To see my super high tech counter visit:
http://us.cooperlees.com/ to see the current count 🙂

Ubuntu iPhone 3.0 Bluetooth Tethering with uit.sh

If you would like to use your iPhone 3.0 with your bluetooth capable Ubuntu 9.04 PC then uit.sh (Ubuntu Iphone Thethering) is for you. This script installs all required conf, allows you to enable and disable your iphone tethering and even uninstall the conf if you no longer need it. I do expect NetworkManager to eventually support this out of the box.

Thanks to http://xn--9bi.net/2009/06/17/tether…o-ubuntu-9-04/ blog post which assisted me in knowning what configuration was needed.

Usage:
— Ubuntu iPhone Tethering (uit) Version 0.1 – Cooper Lees <me@cooperlees.com> —
Usage: ./uit.sh options
– This script will install, uninstall, enable and disable iPhone tethering with iPhone 3.0 Software.
– It has been tested on a upto date (patched) box as of 20090623.
– !! Be careful, this script will ask for your password to get root privledges to your system!

OPTIONS:
-h Show this message
-i Install required configuration
-u Uninstall required configuration
-c Connect Tethering
-d Disconnect Tethering
-m [] Set iPhone’s MAC Address (to /home/USERNAME/.uitrc)
-v Verbose

Install Guide:
Avaliable from: http://us.cooperlees.com/download.php?F=uit.sh.gz

– Inital installation requires an active Internet Connection to get required dependancies through apt-get. Current dependancies = ‘bluez-compat’
– Only the install requires you to sudo the script, other areas apropriately sudo where required.

Install Process:

  1. Open terminal
  2. wget http://us.cooperlees.com/download.php?F=uit.sh.gz
  3. gunzip uit.sh.gz
  4. chmod 755 uit.sh
  5. [OPTIONAL] Move the script into your sbin – ‘sudo mv uit.sh /usr/sbin’ (This will allow it to be in your PATH)
  6. Run ‘sudo uit.sh -i’ (You will need to have your iphone in discoverable mode with Bluetooth on)
  7. You will be notified if it all sucessfully installs.

Connect Process:
– Ensure Bluetooth is on and paired with your system (use the GNOME Bluetooth tool to pair). Also make sure Internet Tethering is on.

  1. uit.sh -c

– Once connected you will see the iPhone come up with a blue bar stating ‘Internet Tethering’ is activated.

Disconnect Process:
One command will disconnect from the iphone tethering – You should see the blue notification text dissapear.

  1. uit.sh -d

Uninstall Process:

  1. uit.sh -u

– This will remove conf from files and also make backup of files modified.

Hope you enjoy it as much as I am. Finding the bluetooth a little slow. But still very handy and good. Thanks Apple.