Glenn's Junk Chest

An assortment of Glenn's writings, photography, gaming resources, flash movies, and other creative output.


Monday, July 09, 2007

iPhone Hack - The Lightest of Tethers

One of the limitations on the iPhone is that it doesn't support "tethered mode", which is where you hook it up to your laptop (either by bluetooth or cable) and use it as an external modem to get your laptop online.

The reason for this limitation is probably threefold. 1) AT&Ts EDGE Network is slow, and possibly overburdened for this purpose. They may have been reticent to have a bunch of bandwidth-hungry laptop users with shiny new iPhones flooding onto it. 2) AT&T charges extra for this service. 3) The phone plays big to people that are often in Wi-Fi enabled areas. Such people don't need a tether, and may chose another phone anyway, thus making heavy R&D investment in this space a dubious investment.

The most galling limitation of this, for me, proved to be in composing email. I'd want to send an email from a non-wifi area, and could either compose it on my laptop and wait to send it later, or compose it on my iPhone, which doesn't allow for easy composition of long email messages. (little keyboard, small view space, no cut and paste, etc.)

So, the question in my mind became, how do I write an email on my laptop, then sync it to the iPhone and send it? The mail sync on the phone syncs only account info, not content. The notes application doesn't sync. You could write the message into an address book entry (maybe) or a calendar entry (maybe), but without cut and paste, there's no way to get it into the mail program. In fact, the only content that syncs from your computer to the iPhone that you can send via email is photos. This does work, if you put your email body into a 320x480 image file, sync it to the iPhone as a photo and then email it, people can get your message as an image. It's a terrible kludge, but with photos being the only synced and mailable content, there was no other way.

Or was there?

The iPhone allows for one more data type to be synced. The Safari bookmark. (It allows IE bookmark syncing on Windows, but I haven't tried that.) For sending email, this offers two possibilities.

The first is that you could create or use a web service somewhere that allowed messages to be encoded in the URL used to access the service. Such as:

http://www.fakeemailservice.com/email.php?body=This+is+my+message!

Make this into a bookmark, sync it to your iPhone, and then use the service to send the email. This solution has a lot going for it, but wasn't quite what I was looking for. I wanted to use the mail program (already configured on my iPhone) with the accounts found there.


The second (drumroll please) is that you could encode the message as a "mailto" link, like so:

mailto:glenn@theMediaNinja.com?subject=Test&body=This+is+my+message!

When you make such a link into a bookmark in Safari, sync it to your iPhone, and then select it from the iPhone's bookmark menu, it pops up the mail interface, with addressee, subject, and body intact. You can then send it right from the iPhone. I don't know how long such a bookmark can be, but it's at least several thousand characters.

In order to take advantage of this capability, you'll need to URL-encode the body of your message. (this is because characters like & and % are reserved, and because you want to replace spaces and carriage returns). The iPhone also has a slightly non-standard way of converting mailto links, in that it doesn't use %0D or %0A for carriage returns, but instead likes "<br>". (This suggests that you might be able to use this technique to build more complete HTML to send from the mail program, but I haven't tried that yet.)

In order to make this more palatable, I have created a quick-n-dirty flash movie that does the proper URL encoding, you can try it or download it from:

http://www.themedianinja.com/linked/textprocess_iphone.swf
(option-click or right-click the link to download it.)

Remember to download it if you actually want to use it at some point. Hope this helps someone out!

Suggested improvements welcome.

Labels: , , , ,


Tuesday, January 09, 2007

Apple: 10 Burning Questions about the iPhone

Update: I've updated some of the answers as of 3/14/08

The just-announced iPhone looks very very cool. So cool, in fact, that if you'd told me all the features before the announcement, I would have called you a damn liar. This post may not make sense if you aren't already familiar with the baseline, so you might want to check out the link to see Apple's multimedia presentation on what the phone will do.

The Apple iPhone
That said, the announcement (and my subsequent reading) has left me with some questions. None of these are necessarily make-or-break deals, but I'd dearly love to know the answers.

1. Is the storage space expandable?

It comes with either 4 or 8GB, but that's not much when you're talking about full length movies and tv shows. There's a slot on the side, can you put some sort of memory card in there to expand its storage?

Answer: The iPhone does not have memory expansion, which means the video-playing capabilities are a little dubious, especially if you have a lot of music you want to keep on the device as well. I'd say to figure the 8GB model as a must if video storage is in the plans. That will let you get 2 or 3 full length movies on there at any one time. More if you skimp on either quality or other data.

Update: However, if you have wifi, and the wherewithal, you can compress a movie in MP4 so that you can play it in the web browser. I've compressed a good chunk of my library in this way, so I can watch movies on the road from my home server.


2. Can you access the unix command line?

One of the very cool things about OS X is that when you need to, you can fire up the terminal and access the basic unix command line. The new phone "runs OS X" but that's only an advantage if it offers the same sort of accessibility that makes OS X what it is.

Answer: Not yet. Someone has hacked shell access using the port on the bottom, but that's a far cry from command line access on the device itself.

Update: Yes, if you hack it. The hack, called "jailbreaking" has improved to the point where you can get true shell access. However, it does involve either a fair amount of work to keep up to date, or a commitment to not updating to the latest firmware at every chance. Apple's upcoming official solution for third party apps will doubtlessly not include shell access.



3. Does it support ssh?

A device that allows me to make a ssh (secure shell) connection to a server at my office is easily worth half again as much as one that doesn't.

Answer: Kind of. There's no way to do it on the device itself, but, since it supports a pretty powerful web-broswer with SSL, you could connect to a secure web service that provided a terminal window. It's clunky, but doable. I still hope for a real ssh client to be added at some point.

Update: Yes, if you hack it you can install a true ssh client, and it works quite well. I imagine that there will be an decent ssh client that runs in the 2.0 firmware as well.


4. Does it support video to an external TV?

One of the super cool things about the current video iPod is that with an inexpensive cable, you can hook it up to a TV and use it as the source for watching a movie or show. I'd hate to lose that capability.

Answer: This is not possible with any existing iPod peripherals or cables. I'm still not sure whether this means that the capability is truly gone, or if it just requires a new peripheral of some sort.

Update: Yep, it just required new cabling, which is now available. However, you do have to watch out for GSM interference on the audio from the cell phone. Putting it in airplane mode will solve this if you're doing a presentation or the like.


5. Does it support the iTunes music store?

If you can use the device itself to buy music from the store, and then transfer that music later to your other devices, that would be pretty nifty. If you could use the store to buy games, movies, and tv shows as well, even better. (but see question 9.)

Answer: No. However, this capability could easily come as a software update. The presumed problem here is AT&T's desire not to have their limited EDGE network bandwidth taken up by this kind of traffic. This might be a feature that waits until a G3 version of the iPhone hits the shelves.

Update: They added this capability in a firmware update (1.1.1), and the addressed the bandwidth concern by making it something that only works over wifi, not over the cell network.


6. Is it compatible with the games already released for the G5 iPod?

I own three of these. Admittedly, they're not expensive, but I like them, and it would be really nice if I could bring them along, and one more reason to make this my portable device of choice.

Answer: No. Doubtlessly there will be games for it eventually, but there were none at launch. There are now some games that can be played in the Safari web browser, but none of them are especially grand.

7. Does it support Adobe Flash in the browser?

Sure, it's Safari in name, and looks like a pretty good browser, but a browser that doesn't support Adobe Flash is essentially crippled on today's web. Lots of video sites rely on it, many web games rely on it, heck, even some web comics now depend on it. What degree of Flash is supported? (For that matter, how well will it work with web 2.0 apps?)

Answer: Actually, this isn't turning out too badly. The answer is still no, but A) web 2.0 support is decent. and B) Flash is rumored to be coming as a future update. Wait and see, I guess.

Update: Still not too bad, but it doesn't look like flash is coming.


8. How open will it be to third party developers?

This is a biggie. One of the nice things about many of the palm and windows-based smartphones is the ability to install applications written by independent developers. From useful utilities to entertaining games, this ability is nearly crucial, but Apple won't even talk about what kind of processor the device has yet, so it seems like it's not exactly approaching the development community with the most open of arms.

Answer: No. Apple is calling it a "Closed Platform". Steve Jobs told the New York Times: "These are devices that need to work, and you can't do that if you load any software on them." Which is obviously bullshit, since I put stuff on my PDA, my computer, and my PSP, and all of them continued working just fine. Jobs told MSNBC: "Cingular doesn't want to see their West Coast network go down because some application messed up.", which is, I suspect, closer to the truth. The deal-with-the-devil AT&T exclusive probably required some compromising, and crippling the device so that user apps couldn't be installed was probably one of those compromises. This may be simply to proctect AT&T's various fee-based markets. I wouldn't use SMS messaging at all if I could install an AIM chat client, for instance. I hope this position changes, or that (at least) it allows for widgets and/or Adobe flash programs. Even decent support for HTML or Web 2.0 apps running from local memory would be better than nothing, here. (Web apps so far only run from the web, not from local storage.)

Update: Well, Jobs relented, and the SDK for writing applications is now available. Full application support is coming in June with the 2.0 firmware. While there are some caveats, I think it will address this point quite nicely.


9. What will the monthly service cost?

This is a pretty big deal. With the capabilities of the device, you're going to want unlimited (or nigh unlimited) data transfer. What kind of a monthly pricetag is that going to amount to? Especially important because of the two year contract.


Answer: $60 for 450 minutes with unlimited data. Not too bad, actually.

10. Does it support easy net access for my MacBook via Bluetooth?

One of the grails of cell phones for me has been the transparent ability to set it up next to my laptop and get my laptop online through the phone's access to the net. This has, historically, been way more difficult that it should be. This phone seems to have all the pieces, but I've seen that before.

Answer: Nope. I'm guessing that AT&T didn't want this because they charge a lot more for data plans that allow "tethered" access of this sort. I've crafted a way to write an email on my laptop and send it using the iPhone, which takes part of the burden of this restriction away. Would be nice to see this capability added.

Update: It is possible to do this with a hacked iphone now, but it's against AT&Ts terms of service, so is probably not a good idea if you want to keep your cell phone plan.


Bonus Q: Will I be able/want to get one?

Despite my initial skepticism about some of the devices limitations, the fact turned out to be that I needed a phone. With that as a baseline need, and the surprisingly reasonable monthly rate, I decided to spring for it. Its email capabilities are really what I needed in way of data, and it's phone features are just what the doctor ordered. The rest of the built in capabilities vary from cool to great, and that makes it a pretty good phone for me. I'm still hoping to see some of the shortcomings fixed, either by new versions of the device or by software improvements. Time will tell.

Labels: , ,