News

Using Briefcase lite for the iPhone with Windows


« Back to news

Transfer files using the iPhone from a Windows PC without resorting to jail breaking and best of all its free! If you don’t care about the technical details just download the following and install and configure openSSH for Windows (information on doing that can be found here).

Download OpenSSH
Download Bonjour for Windows
Download Bonjour advertiser (binary)
Download Bonjour advertiser (source)

For those interested, read on for all the gory details…

Before you start, you'll want to make sure you have the following:

This article is divided into the following sections:

  1. Problem Description
  2. Solution (Common)
  3. Doing it the C/C++ way
  4. Doing it the Python way
  5. Getting Openssh up and running
  6. Comments
  7. Troubleshooting

1. Problem Description

Briefcase lite does not allow you to manually connect to a machine by entering an ip address. The only way to access another machine (and a list of the services available on it) is to discovery it using the MDNS protocol (multicast DNS which is a Zeroconf solution). This protocol can be supported on the Mac and Windows using Apples Bonjour.

Once briefcase has discovered a machine, it needs to ensure that an SSH server is running to allow it to perform the actual file transfer. This is where you run into problem on Windows. On a Mac the SSH server is automagically advertised via Bonjour but on Windows it isn’t even included and if you download one such as Openssh, it won’t be advertised and thus briefcase will presume there is no transfer service available and won’t display the machine in its list.

In order to get things working properly, the SSH service must be registered with Bonjour. This can be done by writing a small application in either Python or C/C++.

2. Solution (Common)

3. Doing it the C/C++ way

Download Bonjour advertiser for Windows(source)

4. Doing it the Python way

5. Getting Openssh up and running

6. Comments

You may be wondering why I went to all that effort using python when it’s so much easier to use C/C++. The answer is quite simple, I wanted to have a dabble in python (its been on my TODO list for quite some time) and it was the first way I discovered of doing it. Hopefully if you’re purely a python developer and couldn’t have done it using C/C++ you found this information useful.

7. Troubleshooting

Q: I get an error message compiling about a missing python26_d.lib
A: You need to change the build configuration to release

Q: I get the error "ImportError: No module named _bonjour"
A: You need to build the dll as explained above

Q: I get the error "ImportError: No module named bonjour"
A: You need to copy the appropriate files to the python26 lib directory as explained above

8. Contact

If you have any questions, comments etc please feel free to email me. All my details can be found here.

Hosted by www.Geocities.ws

1