Drainbamage.nl blog of Christiaan Ottow

25Mar/090

iPhone tethering in OS 3.0

Yesterday I decided I would try out the new OS 3.0 beta 1. I've been looking forward to having tethering in my iPhone very much, since I'm often traveling and working at the same time. Buying an extra device for laptop internet (like a UMTS USB dongle) doesn't seem right, since I'm already paying for unlimited data access with my iPhone subscription. After having heard some reports of people in NL who got tethering to work with T-Mobile, I decided it was time.

To get to the tethering, one must go through these steps:

  • Register your iPhone's UUID with apple
  • Get the OS 3.0 beta firmware image
  • Install the iPhone SDK or at least the USB System Components package that comes with it
  • Change the carrier information on you iPhone by uploading a modified IPCC file

I'm registered as an Apple developer since the company where I work is starting to build iPhone apps. So, getting the device registered and downloading the OS 3.0 beta image and SDK was easy.

Upgrading to the new image is done by clicking the "Check for Update" button in iTunes while the Option key is pressed. This allows you to select a firmware image to update to. By selecting the 3.0 image, the device is upgraded. Then the SDK story. I already have the iPhone 2.2 SDK, since I've started writing iPhone apps. For tethering to work however, you need the 3.0 SDK or a part of it. I first installed the pkg that only contains the necessary drivers for USB tethering (the whole SDK is a 2.15 GB download). This file can be found here. Later, when tethering didn't work, I installed the whole SDK, and when it still didn't work, I installed the small PKG again. It finally worked :-)

Then, you need an IPCC file. For T-Mobile NL, you can find such a file in this excellent post. It didn't work for me though, I downloaded this file (thanks to Wiebel).

At first, iTunes and my iPhone would crash when I plugged the iPhone in with tethering enabled. After re-installing the PKG with drivers again, this problem was fixed. Tethering via bluetooth worked after using Wiebel's IPCC file. So, now it works both via bluetooth and USB!

Post to Twitter Tweet This Post

Filed under: Life hacking No Comments
30Jan/081

Leopards extended file attributes (Time Machine and Quarantine)

Recently, I discovered something interesting about the HFS+ filesystem features in Mac OS X 10.5 Leopard. I don't know whether these features were present in earlier versions of OS X, they weren't used in the way they are now however.

I was wondering how Apple's new backup feature "Time Machine" works. When looking at a time machine partition with the terminal, all the files that haven't changed are simply hard links. However, when I listed them with 'ls -al', I saw a an attribute I haven't seen before:

-rw-r--r--@ 2 chris staff 14M Jan 27 13:58 stoel.mov
-rw-r--r--@ 2 chris staff 12M Aug 9 05:31 tony vs paul.flv
-rw-r--r--@ 1 chris staff 59M Jan 28 20:40 visiting shoes.mov

Also, this '@' sign is present on other files sometimes. The man page of ls says:

-@ Display extended attribute keys and sizes.

I also discovered this attribute on another bunch of files I recently downloaded. The strange thing about these files was that I couldn't modify or move them: the Finder (and 'mv') wouldn't allow me to. After some googling, I found this link that explained why.

The '@' sign indicates that there are extended attributes in place on the file. You can list them with ls -@, and you can get and set them with 'xattr'. On the files I couldn't modify, I saw there was a 'com.apple.quarantine' attribute in effect. After removign it with 'xattr' I could move them again.

Back to Time Machine. The files in Time Machine have many attributes, for example:


Appelflap:Stop Motion chris$ xattr -l stoel.mov
com.apple.FinderInfo:
0000 4D 6F 6F 56 69 53 74 6F 00 00 00 00 00 00 00 00 MooViSto........
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

com.apple.metadata:_kTimeMachineNewestSnapshot:
0000 62 70 6C 69 73 74 30 30 33 42 2D 63 C3 7F 00 00 bplist003B-c....
0010 00 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 ................
0020 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 11 ..

com.apple.metadata:_kTimeMachineOldestSnapshot:
0000 62 70 6C 69 73 74 30 30 33 41 AA 9B A8 BA 00 00 bplist003A......
0010 00 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 ................
0020 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 11 ..

Appelflap:Stop Motion chris$ xattr -l tony\ vs\ paul.flv
com.apple.metadata:_kTimeMachineNewestSnapshot:
0000 62 70 6C 69 73 74 30 30 33 42 2D 63 C3 7F 00 00 bplist003B-c....
0010 00 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 ................
0020 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 11 ..

com.apple.metadata:_kTimeMachineOldestSnapshot:
0000 62 70 6C 69 73 74 30 30 33 41 AA 9B A8 BA 00 00 bplist003A......
0010 00 08 00 00 00 00 00 00 01 01 00 00 00 00 00 00 ................
0020 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 11 ..

com.apple.metadata:kMDItemWhereFroms:
0000 62 70 6C 69 73 74 30 30 A2 01 02 5F 10 42 68 74 bplist00..._.Bht
0010 74 70 3A 2F 2F 61 73 68 2D 76 31 30 30 2E 61 73 tp://ash-v100.as
0020 68 2E 79 6F 75 74 75 62 65 2E 63 6F 6D 2F 67 65 h.youtube.com/ge
0030 74 5F 76 69 64 65 6F 2E 66 6C 76 3F 76 69 64 65 t_video.flv?vide
0040 6F 5F 69 64 3D 41 4A 7A 55 33 4E 6A 44 69 6B 59 o_id=AJzU3NjDikY
0050 5F 10 21 68 74 74 70 3A 2F 2F 6D 65 67 61 75 70 _.!http://megaup
0060 6C 6F 61 64 2E 6E 65 74 2F 6B 65 65 70 76 69 64 load.net/keepvid
0070 2E 70 68 70 08 0B 50 00 00 00 00 00 00 01 01 00 .php..P.........
0080 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 ................
0090 00 00 00 00 00 00 74 ......t

com.apple.quarantine: 0000;479afced;Safari;51D09ED4-1818-4136-A801-52237BD2E12E|com.apple.Safari
Appelflap:Stop Motion chris$

While these attributes are binary, they reveal some information. The "com.apple.metadata:kMDItemWhereFroms" attribute shows the URL I downloaded the movie from, which is keepvid.com. The other properties have to do with version control in time machine.

Interesting stuff. I haven't found the time yet to dig deeper into time machine and see what it does with diffs and all, for now it seems like it just hardlinks unchanged files and uses these 'extended properties' for version management. Which explains why it only works on HFS+ :-)

Post to Twitter Tweet This Post

Filed under: Life hacking 1 Comment
29Jan/080

My first youtube post

Recently I figured that I cannot be a true student of Telematics, semi-geek or internet professional without actively participating in the Web 2.0 thing. I'm already on last.fm, linkedin, 43things and plaxo, but I have never posted a film to youtube!
Combined with this great new app I bought, iStopMotion, and an evening with a good friend, it resulted in a short stop-motion film. You can watch it at youtube or embedded here. It is about a pair of shoes visiting a friend and having a beer together :-)

Have fun!

Post to Twitter Tweet This Post

Filed under: Life hacking No Comments
22May/070

Samsung D500 synchronization using iSync

Yes, it's possible! Recently (as in 'yesterday'), I obtained a Samsung SGH-D500 cellphone. A very nice phone, 1.3 megapixel camera and 96MB of memory. I was fairly happy with my Sony Ericsson Z520i, but after it suddenly died I had to find a replacement. Getting it to synchronize my contacts and agenda using iSync was a hassle, so here's the solution.

The Saumsung D500 officially doesn't have iSync support. Or the other way around, Apple iSync officially doesn't support the D500. However, after googling for a while, I found out that Nova Media has a set of iSync plugins that adds additional phone support, including for the D500. I purchased the software (€10,-, not too bad) and gave it a try.

Post to Twitter Tweet This Post

14May/072

Organizing your Photos

As a true student of Telematics, I not only try to keep my digital life organized, but am also constantly looking for better ways to organize my life using digital tools. In the past few years, I have become pretty dependent on my Mac for the regulation of day-to-day things.

The areas in which the digital assets of people like myself fall, are:

- E-mail
- Agenda
- Contacts
- Documents
- Photos
- Audio
- Video
- Finances

And then of course the big issue: Backups.
Most people will recognize these categories, and also recognize the solution they found for organizing each category in the way they like. Except for backups, usually :-)

The key is finding a way to organize your data that is flexible so you can change it, without having to do too much work. Sometimes however you will still make a big change and have to re-organize your data manually. That's where scripting skills come in handy :-)

Post to Twitter Tweet This Post

14May/070

The wonderful world of Windows Activation

The last few months I've been running into a small complication when installing Windows XP: activation. I got my windows license from the university, through the MSDN Academic Alliance program. This gives me a license to all microsoft software execpt Office (Why? Don't students need Office?), including driver development kits, business software and all kinds of frameworks. But since I'm a Mac user, I only use Windows XP, and I only use that for the few games I play and testing websites I create in Internet Explorer.

However, the small problem. After installation I need to activate windows, just like a normal windows (in fact, the software is the same, but the license isn't). This used to work using internet activation, but now I get the message that I've activated windows too many times. Luckily, I've found a way to break through the telephone activation procedure (which isn't aware of MSDN AA) and get it activated anyway.

The problem probably has to do with activating it on many different hardware platforms, most of them virtual. I use windows on my PC, and in a number of virtual machines on my mac. Since different versions of the emulation software emulated different hardware, windows 'thinks' I've installed it on many PCs. Which, according to the normal license, isn't allowed.

Post to Twitter Tweet This Post

   

Twitter links powered by Tweet This v1.7, a WordPress plugin for Twitter.