Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts

Friday, 10 July 2009

iPhone Tethering Notes for Ubuntu Vancouver LoCo

I gave a lightning talk at the Ubuntu Vancouver Local Committee July 9, 2009 on accessing the Internet from an Ubuntu computer through the iPhone.
  • Use the instructions from the Ubuntu forums here. This other page gives the underlying commands used by the script from the Ubuntu forum. You may find it helpful if the script doesn't work for you.
  • During installation, when you're asked to make the iPhone discoverable, go to Settings-> General-> Bluetooth and turn on Bluetooth.
  • Part way through the instructions in the Ubuntu forum you're asked to "pair" your iPhone with the computer. To "pair" your iPhone with your computer:
  1. Click on the blue icon with white triangles that you'll find amount the other notification icons, typically in the upper-right corner of your screen.
  2. Select "Set up new device..."
  3. Click "Forward".
  4. Wait for your iPhone to appear in the list. If it doesn't, go back to Settings-> General-> Bluetooth on the iPhone and make sure Bluetooth is on. Also, make sure your iPhone is less than a 1/2 metre from your computer.
  5. Select your iPhone in the list and click "Forward".
  6. Ubuntu will show you a four-digit code and ask you to enter it on the device. The iPhone will have a keypad showing. Enter the code.
  7. Ubuntu will ask if you want to allow the connection. Select "Always allow" and click "OK".
  8. You're now paired.
  • Before trying to tether your computer to the iPhone, go back to Settings-> General-> Bluetooth. Your computer's name with "-0" appended should appear below the on/off button. If it says "Not connected" beside your computer's name, click on the computer name and wait for it to change to "Connected".
  • Using Network Manager, turn off other network connections you may have running before tethering.
  • Finally, before running the script, don't forget to turn on Internet Tethering on the iPhone. Go to Settings-> General-> Network-> Internet Tethering and turn Internet Tethering on.
  • Keep the iPhone with 1/2 metre of your computer. (You can try more, but I suspect that the flaky connection I sometimes experience may be associated with the distance between the phone and the computer.)
  • After running the script, you still won't be able to browse the Internet. (You don't have any usable DNS servers defined on your computer.) Do the following in a terminal:
sudo cat >>/etc/resolv.conf <<-END nameserver 208.67.220.220 nameserver 208.67.222.222 END
  • I put the above in my uit.sh script at the appropriate place.
  • Remember to turn off Internet Tethering and Bluetooth on the iPhone when you're done.
  • Disconnect tethering on your computer by running: sudo ./uit.sh -d
  • Don't forget to reconnect your computer to your usual networks after you turn off tethering.
Troubleshooting
  • My experience is that you have to do everything in exactly the right order. If something goes wrong, do the following and then start over:
  1. On the iPhone, go to Settings-> General-> Network-> Internet Tethering and turn Internet Tethering off.
  2. On the iPhone, go to Settings-> General-> Network-> Bluetooth and turn Bluetooth off
  3. On your computer, run the disconnect script: sudo ./uit.sh -d
  4. On your computer, restart Bluetooth: sudo /etc/init.d/bluetooth restart
  • The Bluetooth connection seems to be unreliable. Sometimes I can browse a page or two and then it stops working. Sometimes it just doesn't connect at all. After two or three tries I usually get a reliable connection. Every time it fails, be sure to do all the steps in the above list.

Friday, 26 June 2009

Tethered iPhone

I'm posting this from my laptop sitting outside Marc's Karate dojo with my iPhone in my pocket providing my Internet connection over Bluetooth. I can't help but be geekily happy about this. I never bothered to set up the tethering before OS 3.0, so it's new to me. This is old news to the hardcore users.

I guess a new thing is that Fido is cool with the fact that I've tethered. Not that I care what they think, but phone companies are vindictive enough to actually cut you off if they detected you were tethering, so I feel a little better that it's legit. (Make sure you read the details to be sure you're legit.)

The best instructions I found are here. The instructions here show the actual commands, which is useful to know when you're debugging. It wasn't smooth for me because I didn't do the sequence in perfect order, and it looks like once I messed it up I just couldn't get it to connect. By going System-> Preferences-> Bluetooth and undoing the Bluetooth pairing, I was able to go through the steps from the start and get it working.

The part I had out of order is that I didn't check to see that the iPhone was actually connected to my laptop before attempting to tether from the laptop. The Bluetooth screen on the iPhone has to say "Connected", not just show the name of your laptop.

While writing this I lost my connection and couldn't get it back until I restarted Bluetooth on my laptop (sudo /etc/init.d/bluetooth restart). I have no idea what that's about, but I've seen others on the Internet complain that the connection isn't always reliable.

Monday, 15 June 2009

Open Web Vancouver 2009

I went to Open Web Vancouver 2009 last week. It's a two day, low-key conference about open technologies for developers, testers and others at that level of the business. It's a very well-run, well-attended and interesting conference, and very inexpensive.

The most interesting thing I heard about was PhoneGap. It's JavaScript that runs on all the major smart phones, so you have fewer cross-platform issues. And it gives web applications access to some of the functionality in the phone not normally accessible to a web application. On the iPhone, this means the current location and vibration.

There was a good workshop with City of Vancouver staff about their recent direction to open up the city's data, as well as moving to open standards and open source software. The first priority is the data. They're hoping that people will take the City's data and mash it up in useful ways. There's a Google Group about this at http://groups.google.com/group/vancouver-data.

18 months ago there was a lot of stuff about Ruby on Rails at this conference. This time the Drupal community was big. There was a presentation from Momentum magazine about how a volunteer built their website in Drupal. I thought they'd found money to have a professional develop the site, it's so good.

And Mozilla Messenging (i.e. Mozilla Thunderbird) is based in Vancouver. Who knew?

Friday, 20 March 2009

Rsync iPhone

If you're using the Cydia installer on your iPhone, there's a package for rsync. Just open Cydia and search for "rsync". You won't find a "BSD subsystem" package, because they say Cydia comes with BSD. It might, but it doesn't come with rsync hence the extra installation.

Sunday, 18 January 2009

iPhone UI Habits

I find myself trying to zoom documents on my laptop by pinching and spreading two fingers on the trackpad, like I would on my iPhone. The people at Apple sure have a knack for coming up with powerful user interface techniques.