Archive for the ‘Apple’ Category

iPhone Power Drain Glitch

I ran into a very annoying software glitch today with my 3G iPhone. I charge my phone every night so when I started out at 06:00 it was fully charged. I got to my first client of the day at around 9:00 and noticed that my phone was already at half power. The best part was I actually hadn’t even used it yet. After another 2 hours my phone was completed dead and powered off. I popped up my laptop and started re-charging it and it turned back on. My laptop ended up going to sleep and when I turned around it was dead again. I repeated the process this time when it powered on I properly powered off the phone and then powered it back on. Same thing it drained in a matter of minutes. I finally made it back to my wall charger and was shocked to find that after I plugged it in the thing still managed to drain itself and power off. Yes, it powered itself off while still plugged in. I had to unplug and plug it back in to get it to start charging again.

Another engineer at my company had a similar problem a few weeks back and I talked to him about it and he set to reset the iPhone and delete all settings and content. I did this, which took about an hour, and when it came back up it wanted to be synced with iTunes, after all that it seems to have charged and is ok now.

Long story short is there definitely seems to be a software glitch since erasing my iPhone seems to have fixed the issue. One item of note is that when I first plugged it in my iTunes prompted me to restore from backup but I chose to just start over.


GNS3 (Dynamips) on Mac OSX

I have been playing around with GNS3 (Dynamips) on my Windows VMWare image and I decided to get it working natively on my Mac OSX.  Unfortunately unlike the Windows installer the Mac OSX distribution does’nt include the necessary applications.  After poking around I figured out a way to get all the parts installed and working.  This post is an step by step of what I did to make it all work.

Step 1 – Apple Xcode Tools

The first thing you need to do is download and install the Apple Xcode Tools which are freely available from Apple at the following URL.

http://developer.apple.com/technology/xcode.html

Step 2 – Macports

Macports is a port application for Mac OSX. This is needed to install libpcap which is needed. The installation is pretty straight forward. Download the binary package from the following URL and install it.

http://www.macports.org/install.php

Once installed make sure you are updated by running the following command:

/opt/local/bin/port -d selfupdate

Step 3 – libpcap/dynamips

This is pretty straight forward and easy to do. Run the following:

/opt/local/bin/port install libpcap
sudo ln -s /opt/usr/local/libpcap.a /usr/local/lib/libpcap.a
/opt/local/bin/port install dynamips
NOTE: There is a good chance that the dynamips will fail. On top of that it will most likely install a version that is too old for the GNS3 Dynagen version to run. This is ok but we still want to run this step because it will download and install all the other requirements.

Step 4 – libelf

Most likely the port install dynamips failed with a rom2c error. This package will correct that issue. Go to a temporary directory such as your Downloads and do the following:

curl ‘http://www.mr511.de/software/libelf-0.8.9.tar.gz’ -o libelf-0.8.9.tar.gz
tar -zxvf libelf-0.8.9.tar.gz
cd libelf-0.8.9
./configure –prefix=/usr/local
make
sudo make install

Step 5 – dynamips

We are now ready to download a current version of Dynamips. You might want to check to see if a newer version is available. This is an example of the process:

curl ‘http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2.tar.gz’ -o dynamips-0.2.8-RC2.tar.gz
tar -zxvf dynamips-0.2.8-RC2.tar.gz
cd dynamips-0.2.8-RC2
make
mv dynamips /opt/local/bin

Step 6 – Download & Install GNS3

Last but not least GNS3 itself. Simply go to the following URL, download the DMG and copy the application to your Applications folder. Once you are done point it to “/opt/local/bin/dynamips” and click Test. You should be ready to go now.

http://www.gns3.net/download

Optimizations

One of the easy things you can do to speed up booting of the IOS images is unzipping the images. To do this do the following, simply replace the filename with your filename.

unzip -p c1700-adventerprisek9-mz.124-15.T7.bin > c1700-adventerprisek9-mz.124-15.T7.image

Now point GNS3 to that new image and your router will boot significantly faster.

Summary

At this point everything should be working for you. If you run into problems let me know.


iPhone Web Tools

After my recent purchase of an iPhone 3G I became interested in making some small applications to do some common conversions and such that I run into while doing my Networking thing. While there is a subnet calculator I wasn’t able to find a BaseConverter or an IPv4 to Hex converter. I downloaded the iPhone SDK and started poking around. I quickly realized that I don’t have time to figure all of this out right now with all my certification tests. So I decided to make some iPhone friendly web tools. So far I have a BaseConverter and IPv4 Converter.

The BaseConverter does exactly that. It converts from one base to another. It supports Decimal, Binary and Hex. The primary reason I wanted this tool is to convert those pesky Hex ports found on the NetFlow outputs on the routers.

The IPv4 Converter converts an IPv4 address to Hex format and back. I wrote this small tool because manually doing it is a pain in the butt and for some reason Cisco loves to store IPv4 addresses as Hex in traces.

I am always up for suggestions on other tools. Make sure to drop me a comment if there is something you would like to see or if you run into any bugs.

http://www.crimsonsilo.com/iphone/tools/

NOTE: Yes, these tools work fine from a normal web browser as well they are just optimized for an iPhone display.


The Switch

One of the perks of my new job is the fact we are allowed to supply our own laptop/phones. My current personal laptop is over 6 years old now and hasn’t even been turned on in at least 4 years now. It was time for a new laptop and I decided it was time to take the plunge. I ordered myself a MacBook Pro 15” from Apple. I have been wanting to give Mac a whirl for a few years now and it was the perfect time. I have three weeks of unused vacation right now so the cost wasn’t an issue so I couldn’t find a reason not too. So far I am completely happy, there have been a few things that I have had to relearn but I am making progress. Apple really knows how to make something slick.

The second switch was in the cellular department. I have been using a BlackBerry for the last 4 years now I knew it would be a touch role to fill so I was kind of reluctant to move to a different platform. My biggest gripe about the AT&T BlackBerry was the EDGE network. The timing worked out that the iPhone 3G was coming out 4 days after I took a new job and had to get a personal laptop. After thinking about it for awhile and being happy with my Mac I figured what the heck. The BlackBerry was 199.99 and so was the iPhone 8gb. The monthly plan for BlackBerry is 44.99 and the iPhone is 30.00 all in all the iPhone was cheaper and faster. I planned on getting to the store around 5AM this morning but I woke up at 2:30AM and couldn’t get back to bed so I figured what the heck and headed down to the store. I was shocked to find myself the 25th person in line. Apparently people started lining up at 10PM the previous night. After a slow start I finally made it in the store around 8:50AM and I was done and on my way to work by 9:15AM. Unfortunately I wasn’t able to actually do any syncing with iTunes until around noon when their servers came back online.

I also decided to give the 60-day free trial of Mobile-Me a go. This was a test of patience today. The MobileMe website was down pretty much all day and my iPhone wasn’t getting any contacts, calendar events or mail. Around 9PM tonight I created a contact on my iPhone to see if the phone could send a contact up to the web and bam as soon as I saved the contact my iPhone downloaded all my contacts and the contacts/calendar portions seemed to work. I still however had no luck with mail. I finally broke down found an article on apple and it didn’t help so I sent an e-mail to support and to my shock about 10 minutes later I got my first me.com e-mail on my iPhone. It seems to also be fixed now.

All in all I am very pleased with my purchases and the way Apple handled the launch. Yes it was bumpy but seriously people what launch of any size goes off without a hitch. Guitar Hero 3? GTA IV? None of these had their website working and in fact it was days before it was fixed. Yes iPhone is a lot more dependent but a global launch and they were for the most part squared away within 24 hours is impressive. At least in my book.