Topic: iPhone Bluetooth Tether + WL-500gP v1 = Success!
After some time tinkering, I got iPhone 3G bluetooth tethering working with a WL-500gP v1 running kamikaze 8.09.1 (brcm-2.4) and this USB dongle (BCM2046). I wish I had a good reason for doing this other than curiosity. I suppose I could travel with the phone and router and share its connection over wifi, but I'm unlikely to do that.
I'll outline it in rough detail in case anyone's interested. I'm ignoring network configuration and start-up scripts which are likely needed. You could try to start by disabling the wan network, firewall, and other services and running everything like the dhcp client by hand, get it all working, and then try more fancy configuration. Be forewarned, your mileage may vary.
Note this does NOT require jailbreaking and all commands are for your router.
Now let's assume your iPhone's bdaddr is AA:AA:AA:AA:AA:AA and your dongle/router's bdaddr is 11:11:11:11:11:11.
Start by installing and enabling the prerequisites
$ opkg update $ opkg install kmod-usb-uhci-iv kmod-usb2 kmod-bluetooth bluez-utils $ /etc/init.d/dbus enable $ /etc/init.d/bluez-utils enable $ reboot
If all goes well, you should see,
$ hciconfig hci0: Type: USB BD Address: 11:11:11:11:11:11 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING PSCAN ISCAN RX bytes:10615 acl:1 sco:0 events:112 errors:0 TX bytes:1546 acl:0 sco:0 commands:65 errors:0 $ hcitool scan Scanning ... AA:AA:AA:AA:AA:AA My iPhone
If you don't see something like this, see Problem 1 below. Note, I don't always see my phone when running the scan, but it will usually work anyway.
You'll need to create a pin for your router. This file will get deleted on reboot so recreate it if necessary. Here's how to set it to 1234
$ cd /var/lib/bluetooth/11:11:11:11:11:11 $ echo "AA:AA:AA:AA:AA:AA 1234" > pincodes
Now, make sure you've enabled tethering on your phone, go to the Bluetooth screen and have it turned on (see Problems 2 and 3 below). To connect to the phone,
$ pand -n --connect AA:AA:AA:AA:AA:AA --role PANU pand: Bluetooth PAN daemon version 3.36 pand: Connecting to AA:AA:AA:AA:AA:AA pand: bnep0 connected
Enter the pin and that's it! You now should have an interface called bnep0, run dhcp on it et viola! You'll need to configure your firewall, etc in order to actually share wifi.
Problems I've run in to and some ugly quick fixes:
1. My bt dongle initialises in a bad state and won't work at all, this fixes that,
$ hciconfig hci0 reset $ hciconfig hci0 up $ /etc/init.d/bluez-utils restart
2. After starting a new session, it doesn't always work again unless you select "Forget this Device" for the OpenWrt entry on your iPhone's Bluetooth menu
3. I frequently need to reboot the phone due to buggy Bluetooth states
4. My providers DNS servers don't seem to work, so set dnsmasq and/or resolv.conf to use alternate DNS servers (try OpenDNS at 220.127.116.11 and 18.104.22.168)
I hope someone finds this useful.