Monday, May 30, 2011

Ubuntu Dynamips and Dynagen

Here's how to install Dynamips and Dynagen Cisco Router emulator on Ubuntu:

1. Installation
# sudo apt-get install dynamips dynagen

2. IOS image
Get yourself a Cisco IOS image to use with the emulator. It is a good idea to uncompress the image for better loading
# unzip -p>

3. Configure telnet client
You can configure your telnet client in /etc/dynagen.ini file, just uncomment this line:
telnet = xterm -T %d -e telnet %h %p > /dev/null 2>&1 &

4. Configuration file
You will need a configuration file for your router(s), you can see the example here: /usr/share/doc/dynagen/examples/sample_labs/simple1/

The configuration will look like this:
     image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
     npe = npe-400
     ram = 160
     [[ROUTER R1]]
     s1/0 = R2 s1/0
     # No need to specify an adapter here, it is taken care of
     # by the interface specification under Router R1

5. Starting Server and Management Console
To start the server
# dynamips -H 7200 &

And you can start to console using command:
# dynagen /usr/share/doc/dynagen/examples/sample_labs/simple1/

After that you can refer to this link for further reference.

Friday, May 27, 2011

Accesing #webOS Device via WiFi using SFTP Client

I'm using this because I'm tired of connecting USB cable everytime I want to copy files between my Palm Pre and my MacBookPro. Actually there's only 5 simple steps to follow:

  1. Install Preware
  2. Use Preware to install SFTP and terminal application
  3. Use terminal application to generate keys for OpenSSH
  4. Transfer SSH keys to desktop via USB
  5. Configure SFTP client (I'm using Cyberduck on Mac OS X) on desktop and connect
1. Install Preware
You can see here for complete reference

2. Using Preware to install SFTP and Terminal application
Still, you can refer to previous link for usage guide. FYI, I'm using SDL Terminal, other options is Terminal and Terminus

3. Use terminal application to generate keys for openSSH
I just did these steps:
# cd /
# /opt/bin/ssh-keygen (press Enter key once to accept default filename, then Enter key twice for blank password)
# mv /home/root/.ssh/ /home/root/.ssh/authorized_keys

Or you can read from wiki here

4. Transfer SSH keys to desktop via USB
First, run this command:
# mv /home/root/.ssh/id_rsa /media/internal/

Then connect your Pre to your desktop station via USB cable, and put it in Drive mode. Copy and save id_rsa file you've just copied to any safe place in your desktop station

5. Configure SFTP client on desktop and connect
First,you need to know your IP address on your Pre. Open Wifi and tap on current Wifi connection (SSID) to view the IP address.
Then, open your SFTP client. Since I'm using Cyberduck, for now I'm just explaining about how to use it on Cyberduck only. But, actually the steps are very similar on any SFTP client. 
1. Click on Open Connection
2. Choose SFTP (SSH File Transfer Protocol).
3. Fill in username: root
4. Leave the password blank
5. More options -> check "Use Public Key Autentication"
6. Click Connect

Just wait and see :D

Monday, May 23, 2011

Workaround to Run SPSS 17 on Snow Leopard

You have to installed Leopard version of  JRE 1.5, like I post in previous blog post before doing these steps. After installing SPSS 17 and JRE 1.5 on Snow Leopard, open edit 2 files system:

1.  /Applications/SPSSInc/Statistics17/
# vim /Applications/SPSSInc/Statistics17/
Comment this line (put semicolon in front of this line):
and add this line (to change the previous commented line):
2. /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist

# sudo vim  /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist
Find this line:
and change 17.1 to 17.0
That's all you need to do.  This workaround makes me run SPSS 17 smoothly on my MacBook Pro :)

Sunday, May 22, 2011

Installing JRE1.5 on Snow Leopard

This JRE workaround was I did to make SPSS 17 runs well on Snow Leopard, in order to make things clearer, I divide those 2 things and put each of them on separate blog post. So let's get started! :)

Just follow this simple steps, and in the end you'll get JRE1.5 installed. Please keep in mind that this steps will not remove JRE1.6, but add the option to choose with JRE you'd like to use. First you can go to Finder -> Utilities -> Java Preferences, and check to make sure you only have Java SE 6 there (32-bit and 64-bit version). If you already have J2SE 5.0 (32-bit and 64-bit), just move 32-bit version to top of the list and you're done. No need to follow these steps below :D

1. Check your current version of JRE installed:
# java -version
2. change directory to home directory
# cd ~/
3. retrieve JRE version for Leopard (OS X 10.5.x)
# curl -o java.1.5.0-leopard.tar.gz
4. extract the file you just downloaded

# tar -xvzf java.1.5.0-leopard.tar.gz
5. remove existing 1.5 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5
6. remove existing 1.5.0 version file on Snow Leopard

# sudo rm /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
7. move current extracted JRE1.5 for Leopard to existing System directory

# sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
8. make link from currently moved folder to previously removed file

# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5
9. same usage as no. 8
# sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
And after you done with all 9 steps above, just go to Finder -> Utilities -> Java Preferences.

There you'll see additional J2SE 5.0 (32-bit and 64-bit), move J2SE 5.0 32-bit version to top of the list, close the preferences, then go back to Terminal apps to execute this command:
# java -version
Notice the differences? You'll now get the "java version 1.5.0_19" (in my MacBook Pro). And you're done :)

Saturday, May 21, 2011

Huawei Aviator Hands-On

A few photograph taken when I had a chance to glance at Huawei Aviator :)

Friday, May 20, 2011

Jailbreaking FU iOS Device

I put the title, so I am aware that what I'm about to write here works on almost any iOS device (which I already tried the same way for iPhone 3G/s and 1st generation of iPad). After reading on several blogs, and tried it on my iOS device myself, I choose the method using redsn0w. All you need to do first is make sure that newest update iOS version already been able to jailbreak, and all requirement files are downloaded and ready to use.

Actually you only need 2 files, redsn0w (mac and/or windows) and .ipsw files according to which version of iOS device you want to jailbreak. After you get those two files, execute redsn0w, choose the .ipsw files, check only at "Install Cydia", then just follow onscreen instruction at redsn0w window. That's it! :) And after rebooted, you'll find Cydia icon in your launcher.

Here are some of the snapshot I took, when jailbreak iPhone 3G: