ForcedBonjour

Contents

Background

If your network doesn't support Bonjour or your computer and phone are on different subnets (all this described here) then syncing will not work. Here's a kludge to get you going. Improvements would be very welcome, but it does work.

The Fix

You'll need Bonjour Browser (discussed elsewhere) and either Network Beacon or the mDNSResponder source code from Apple. You also need nmap from fink or macports.

  1. Get onto a working network (a computer-computer or one where you can sync OK), open Things on your iPhone, and run Bonjour Browser. You'll see a huge long id string like this: Image:faq-bonjourbrowser.jpg
    Copy this string down, it's the unique id of your iPhone Things install. (Note: Maybe there's a way to get this from the desktop app?)
  2. Fire up Network Beacon. Make a new service of type "_cciphonethings._tcp." with the unique id as the name. Then check "Enable Host Proxy" and put in the IP address your phone gets on the network where you want to sync. The port is the tricky part: it changes each time you run Things.
  3. Find the port: this is the kludge part. You need to check all the possible ports on your iPhone. I think these range from 55000 to 60000 (clarification would be great). A command line like "nmap -p 55000-60000 <iphone ip address>" will take about 45 seconds to run and give you one open port.
  4. Take the port from the previous step and enter it into Network Beacon. Hit OK, and enable the beacon. Now open up Things on your mac and it should initiate a sync. Note that each time you quit and restart things on the phone, the port number will change (usually it increments by 1).

Automating this Hack

If you grab the mDNSResponder source and compile it (go into the mDNSPosix directory and do a "make os=panther") you'll get a utility called mDNSResponderProxy which works similarly to Network Beacon (all compiled tools are in build/prods). Put this tool somewhere in your path (I used /usr/local/bin) and then you can use this script:

#!/bin/sh

IP=<iphone ip address>
THINGSID=<your things id string>
PORT=`nmap -PN -p 55000-60000 $IP | grep "open" | awk -F/ '{print $1}'`
mDNSProxyResponderPosix $IP "" $THINGSID _cciphonethings._tcp $PORT

Save it as something like sync.sh, open Things on your desktop, open Things on your phone, run ./sync.sh, and wait a little while. It takes right around 45 seconds for me.

Improvements

I think there's a way to query mDNS with a unicast address, which would let you determine the port without the nmap battering. Anyone who knows how to do this, please update this.