Blog: November 2008 Archive

Briefcase v1.1 has hit the App Store. We've received a lot of great feedback in the three weeks since we launched Briefcase. The new versions of Briefcase and Briefcase Lite smooth out some of the rough edges and fine tune the workflow.

Note that for Briefcase Lite the new version is actually v1.1.1. My apologies to those affected by the document viewing bug in the first Briefcase Lite update. A change intended to extend document viewing capabilities in the full version of Briefcase had the side effect of restricting document viewing in Briefcase Lite. We pulled the update immediately and fixed the problem, but we know that some of you updated before we discovered the problem.

Along with the update to Briefcase, we would also like to announce our new demo video (we've been busy!). We weren't content to just drone on about Briefcase's features (although I do a bit of that). We decided to have a bit of fun and throw in some spies, cars, and top secret documents. You can watch just the spy short or you can watch the full length demo complete with lots of droning. We've also got a [YouTube version] of the spy movie for those who prefer it.

Back on the topic of the update, we have tried to respond to as many issues as possible while getting an update out in a timely fashion. We've upgraded the image viewer, cleaned up the connection UI and improved the workflow for those who don't store their passwords in Briefcase. Along with that, there have been numerous other fixes and tweaks. For a full list, see our change log.

For v1.0 of Briefcase, the image viewer was probably the weakest part of the software. For v1.1 we've done our best to turn it into one of Briefcase's strengths. The iPhone has a limit of one megapixel for image display. Briefcase did not obey that limit in v1.0, resulting in instability when viewing larger images. For v1.1 we've changed the full version of Briefcase to support the display of images of arbitrary size. Most iPhone apps handle this by scaling larger images down to one mega-pixel. In Briefcase we've pushed that up to two mega-pixels using image tiling. When you zoom in on large images in Briefcase, you'll see more detail. Images larger than two mega pixels are scaled down to 2 mega-pixels for display. I've tested with images up to 45 mega-pixels with no problems (you do have to be a bit patient, after all it's only an iPhone:-).

Please continue to send your feedback our way. In the mean time, we'll keep chugging away on the wish list we've already compiled.

Thanks for your support!

Last week was a little crazy. I learned a lot of new things about the App Store submission process. For example, I learned that if you submit an update to the App Store too quickly after the previous one, Apple will take it as a sign that you wish to roll back the previous submission. We tried to follow up v1.1 with another small patch release and ended up selling v1.0 in the App Store again. And, there was no mechanism for us to control it.

Having Briefcase rolled back to v1.0 wouldn't have been so bad if the App Store on the iPhone hadn't started offering an "upgrade" to v1.0 to all Briefcase users who had managed to grab v1.1.

My apologies for glitches in v1.1 that got us into this mess. I made a classic rookie mistake in the late stages of the development of v1.1. I made a change and didn't do a full test sweep before submitting. I missed finding a crash in iPhone-to-iPhone transfers that a seemingly unrelated change caused. I've been writing commercial software for 15 years and should know better.

The other lesson I learned was to test in at least a few languages other than English because I missed a second crash when adding remote bookmarks. I've started switching my iPhone into random languages during development so that I get better test coverage. I cannot do a full sweep in every language every time (with 10 languages, that would be prohibitive), but I can do better.

With those lessons learned and v1.1.2 solidly entrenched in the App Store, we are finally able to start sifting through the wish list for ways to improve Briefcase in the next version. Thanks to all that have provided feedback so far!

One of the more interesting things about developing Briefcase has been that the features most popular with users haven't always been the ones I necessarily expected. One that caught me by surprise was the popularity of using the remote bookmark features of Briefcase to connect to home computers while on the road.

The reason the popularity surprised me was that I know it can be tricky to set up remote login. But, it turns out that most people think it ought to be easy (and they are right, it ought to be!). Unfortunately, despite improvements in modern networking equipment, you've still got to know a little bit about networking if you are going to succeed. I've had a number of users launch in with little networking knowledge and pull it off. All they needed was a clear explanation of what was going on and a pointer in the right direction (and possibly a strong cup of coffee).

Here is my attempt to explain the process so that others may likewise succeed. Please leave me a note if you find any bits confusing.

What's the big picture?

You are on the road with your iPhone and you want to connect to your home computer. The picture looks something like the one below.

Most people who have devices like iPhones and Macs also have a wireless router plugged into their high speed modem. Some recent models of high speed modems even come with the routers built into them. Apple's AirPort Extreme is an example of a commonly used router. The router is the center of any home or small office network setup.

The Router

Most people are a little fuzzy on what exactly the router does. In general people know that they need one if they want to share their internet connection between multiple computers and devices. Few know how the router achieves it (or that the home router is actually responsible for saving the Internet as we know it...more on that later).

The router performs the following important tasks:

  1. Internet (IP) address sharing
  2. firewall protection of your computers from the Internet
  3. wireless/local networking in your home/office

Address Sharing

Address sharing is the feature of routers that most affects your remote use of Briefcase, and it's also how the router managed to save the modern Internet.

The basic problem is that there aren't enough addresses on the Internet for each device or computer to have its own. There's been general concern about the Internet running out of addresses for decades. There are large scale solutions in the works which will eventually allow your toaster to have it's own Internet address, but in the mean time we've used address sharing to stretch out the existing pool of addresses.

So, this means that your ISP gives you just one internet address and that address is taken by your router. That means that your router has an address that is unique on the Internet.

Now, in order to be on your home network, your computers and other devices still need to have an address. Your router takes care of that by handing out addresses from a special pool that are reserved for use in local networks (LANs). Those addresses are not unique on the Internet. In fact, there may be a hundred thousand computers with the same same address as yours. Your router uses a technique called Network Address Translation to allow your computers to talk to the Internet using the router's address.

That means that there is no unique address you can enter into Briefcase that will point to your computer at home. But, you can get to your router.

Firewall

The other problem that the router presents is that it is designed to stop computers on the Internet from connecting to your computer. All connections between your computer and the Internet must be initiated by your computer.

That means that if you try to use Briefcase to connect to your computer from outside your local network, your router is designed to stop it from doing so.

The Solution

If you haven't guessed yet, the router is where the solution lies. Your router has a unique address on the Internet, and it controls the firewall. The idea is to make your router forward all requests of a certain kind to your Mac. In this case, we need to forward all Secure Shell (SSH) connection requests (what Briefcase uses) from your router to your Mac. Routers can tell networking requests apart by which port number they come in on. Each networking request has a port number associated with it. For SSH, the port number is usually port 22.

So, the solution is to make the router forward requests on port 22 to your Mac. Then, you put the address of your router into Briefcase and use that to connect.

Static Address

Before we start forwarding requests to your computer, we need to know what local address your computer is at. There is an additional complication in that your computer may not always be at the same address. Your router hands out addresses and may not always hand out the same one to the same computer.

So, the first thing to do is to make sure that your computer is assigned a constant or static address. On a Mac this is fairly easy.

First you should know that an IP address consists of four numbers, each in the range from 0 to 255, separated by '.'s. For example, 192.168.1.100. When you are making new static addresses, you only want to change the last number.

NOTE: You may want to make a new "Network Location," before you start changing network settings, especially if you are configuring a laptop. You can do that by selecting "Edit Locations" from the "Locations:" drop-down menu (Under System Preferences > Network). Then hit the "+" button to create a new "Location." This will make it easy for you to switch back to the default networking settings later if you want to.

Proceed by opening up System Preferences, then Network and selecting the network adapter you are using (left hand side bar). It will likely be the only one lit up green and marked as "Connected." Look for the drop-down menu that says "Using DHCP" and change it to "Using DHCP with manual address". Then, you choose a new address for your computer by changing the last number. Do not choose 0, 1, or 255 as the last number because they are special.

Port Forwarding

Now, we move onto forwarding traffic. The tricky part about explaining port forwarding is that there are hundreds of kinds of routers and high speed modems and they all do port forwarding differently. Fortunately, there is a resource on the web to help you out.

The first step is to go to http://portforward.com/routers.htm and find your router type (brand and model number) in the master list (If you don't know what kind of router you have, there should be a label on it somewhere - frequently it's on the bottom). On this webpage (at the top of the router list, in the centre) you'll notice your external IP address displayed. Take note of this, you'll need it later.

Click on your router type. You will be taken to a new page that will display a new set of "protocol" options. Find SSH and click on it:

Follow the instruction on the next page that come up. This will walk you through all the steps needed to get your router to forward SSH requests from Briefcase to your computer.

Sleeping

Another thing to mention is that Briefcase cannot connect to a sleeping computer. You need to adjust your power settings (System Preferences > Energy Saver) so that your computer does not sleep (Put The Computer to Sleep... select "Never"). There is a way to wake up a sleeping computer remotely, but I have not implemented it yet. There are some other iPhone apps waking up computers, but they do not work with WiFi and I'm not sure how they would work through a router. I will be looking into that.

Connecting

By now you should have done the following:

  • set up a static address for your computer
  • recorded your external address
  • forwarded SSH traffic from your router to your computer
  • made sure that your computer will not sleep

The next step is to try it out on your iPhone with Briefcase. Hit the "+" on the Briefcase "Connect" screen to add a new remote bookmark. Enter a nickname, your external IP address, and the username for your account (on your computer) and save the bookmark.

Next, if you are still at home, you may want to turn off WiFi on your iPhone so that you can test your connection over 3G (iPod Touch users of course, can't use 3G and will only have remote login available to them when they are in a WiFi hotspot). To turn off WiFi on an iPhone, just go to the home screen and tap on "Settings" then "WiFi" and slide the WiFi switch to Off.

Cross your fingers and try out the bookmark. If you are stuck, you can email me at support@heymacsoftware.com and I'll try and help.

Final Notes

Now that you are hopefully connected, there is one other thing to worry about. Your ISP likely changes your router's address regularly (that's where your router gets its IP address from); unless you are paying extra for a static IP address (and you're probably not). Your options are to ask your ISP for a static address (expensive) or set up a static domain name on the internet (free) to keep track of your router's address. You get a static domain name through a DDNS service provider. I recommend dyndns.com.

IMPORTANT It can sometimes happen that your domain name is pointing to the wrong IP address (it's rare, but has happened to one customer). If this happens, Briefcase will bring up a warning which says "Host's Hash Value has Changed." If you see this warning, DO NOT LOG IN! If you do, you'll be sending your password to the wrong computer (possibly the computer of a hacker). Instead, hit cancel and at your earliest opportunity update your address with your DDNS provider.

That's All

I have tried to explain just enough of the networking lingo so that you'll understand what is going on. I hope I didn't get carried away. If you've got feedback or questions, please leave a comment below and I'll try to clarify where I can.

Good luck!

Copyright © 2008 Hey Mac Software. All rights reserved.