PDA

View Full Version : Creating ad hoc wifi hotspot on iPhone?




craig1410
Jul 21, 2010, 06:49 PM
Hi,

Many of us will have heard of the MyWi iPhone tethering app which is widely used on jailbroken phones. It seems to work well to allow sharing of the iPhone's 3G connection via WiFi with some limitations such as poor battery life etc.

As an iPad WiFi owner, I am keen to be able to occasionally use my iPhone to provide short term, ad hoc connectivity for my iPad but I don't want to jailbreak my phone to install MyWi. Partly this is because I am using my iPhone for development purposes and partly because I like it fine the way it is.

So, since I am a developer and have paid my $99 developer's licence, I am interested in creating my own (very basic) version of MyWi if possible. I have already come across iProxy source code which provides the proxy functionality but I can't find any guidance or sample source code about what is involved in creating a WiFi hotspot. I expect I will need to do stuff like initialise the chipset and then wait for an incoming connection and then do some authentication followed by issuing a DHCP address but I'm sure this is over simplified...

Does anyone know of any sample source code in this area or do you know of any documentation (eg. RFC docs) which describe the protocols surrounding creation of a hotspot/router?

Please note, I have no intention of trying to produce a commercial app but just want to use this for my own purposes and education. If my phone was jailbroken then I'd have no issue with spending $20 on MyWi but I don't want to jailbreak.

Thanks,
Craig.



ulbador
Jul 23, 2010, 02:04 PM
I'm sure it's possible, but unfortunately the available documentation for the MobileWifi.Framework (the private API that would make this possible) is a bit slim. About all you can do now is detect available networks (which is how many of the WiFi hotspot finders that were pulled worked).

I can't tell you exactly how MyWi works, but I have a feeling it uses something like iwconfig, which is a Linux program to handle the WiFi connection. Setting up a hotspot with iwconfig is pretty trivial. Unfortunately, without reinventing a ton of wheels, this would again require a jailbroken iPhone.

craig1410
Jul 23, 2010, 07:31 PM
I'm sure it's possible, but unfortunately the available documentation for the MobileWifi.Framework (the private API that would make this possible) is a bit slim. About all you can do now is detect available networks (which is how many of the WiFi hotspot finders that were pulled worked).

I can't tell you exactly how MyWi works, but I have a feeling it uses something like iwconfig, which is a Linux program to handle the WiFi connection. Setting up a hotspot with iwconfig is pretty trivial. Unfortunately, without reinventing a ton of wheels, this would again require a jailbroken iPhone.

Hi,
Thanks for taking time to reply, I was beginning to think I was going to draw a blank on this question... :)

Yeah, I was hoping that maybe there was an API which I could use but perhaps not. I have used iwconfig on Linux before so i know what you are talking about. I never considered the possibility that MyWi might use the likes of iwconfig so thanks for opening my mind to that possibility.

Maybe I will look at iwconfig source code to see what it is doing.

Thanks again,
Craig.

AndyCodez
Jul 26, 2010, 09:39 AM
Be nice if we could find an open source one so we could just install it with our dev accounts haha.

Stongfort
Nov 2, 2010, 09:08 AM
Does anyone know if there's more progress on something like this? I would love to be able to tether my iPad wifi to my iPhone.

Right now the only thing without jailbreaking is the iProxy software you can install on a dev account. It works, sort of, but requires a 3rd device to set up an ad-hoc network. That really kills the portability of the concept.

Mr. Zorg
Nov 8, 2010, 12:03 PM
I'm interested in this too. I'd even be willing to pay for it, I just don't want to jailbreak when I can already load my own apps. :)

PBG4 Dude
Nov 8, 2010, 08:02 PM
Hah, I'm in the same boat too. Managed to get iProxy up and running this afternoon but I think a WiFi hotspot would be much cleaner.

Anyone know if the hotspot functionality in Android would be easy to ferret out for porting purposes?

kev21986
Nov 18, 2010, 10:52 AM
anyone ever figure this one out?

cnstoll
Nov 18, 2010, 11:22 AM
For what it's worth, remember that without jailbreaking apps are all still subject to certain limitations and bounds, such as the sandbox. I'm not very familiar with the requirements of creating a wifi hotspot, but one thing I found while trying to compile and run the Terminal mobile app from a google code project using my developer account was that even though I can install it on my phone...it won't work because those restrictions are still in place since my phone isn't jailbroken.

Just some food for thought.

wheli
Dec 28, 2010, 01:53 PM
any progress on this? I contacted MyWi to see they would sell me a distribution that I can install it as a developer and am waiting to hear back....