A lesson in Ad-Hoc networking
This is a more important post than it may seem. It’s proof that I can connect to the internet and post to this blog on my eeePC from my iPhone.
For the geeks out there, this was actually a bit tricky, as the eee is running eeeXubuntu, rather than the formally supported (by PdaNet) Windows XP or Mac OS. Specific instructions for getting PdaNet to work on Linux are non-existent, or at least burried deep in Google.
So, for my future reference, and for the reference of anyone who is interested in both setting up and connecting to an ad-hoc network on Linux, here’s the step-by-step conglomerated from tutorials here and here:
- Open Terminal
- % sudo -i
- % /etc/dbus-1/event.d/25NetworkManager stop
- % wlanconfig ath0 destroy
- % wlanconfig ath1 create nounit wlandev wifi0 wlanmode adhoc
- % iwconfig ath1 mode Ad-Hoc essid “networknamehere”
- % iwconfig ath1 enc open “passwordhere” //this line is optional, only required if you want a secure network (advised)
- % ifconfig ath1 -promisc 192.168.1.1 netmask 255.255.255.0
This is pretty much where the first tutorial takes us, though I’ve left out the line to stop the NetworkManagerDispatcher, as it doesn’t seem to be necessary. This alone won’t work. It establishes the ad-hoc network, but leaves your eeePC unconnected. For tethering to work, both the iPhone and the eee need to be connected to the adhoc network, and the connection step requires a bit of fudge.
There’s only one more command left, but timing makes a difference. The command:
- % dhclient ath1
This attempts to connect to the DHCP server, which is not on the eee, so before you execute this command, you need to have your iPhone connected to the network you created in the lines above, and have PdaNet open and ready to go. It took me a couple of rounds of trying dhclient before PdaNet saw the computer, and I decided to renew the lease in the middle of this post for good measure (that only took one try), but it will work eventually.
So, now we know we can blog from the road, as long as iPhone gets service. I haven’t tried uploading any photos from the tether yet, but we’ll see how it works soon enough.
Tomorrow I’ll be test riding up Topanga with my trailer full of stuff to see how the load feels on hills.
0 comments
Kick things off by filling out the form below.
Leave a Comment