Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 21, 2010, 07:49 PM   #1
craig1410
macrumors 6502a
 
Join Date: Mar 2007
Location: Scotland
Creating ad hoc wifi hotspot on iPhone?

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.
__________________
MacBook Pro Retina 15.4", 2.3GHz, 16GB RAM, 500GB SSD; iMac 27" Retina 5K, 4GHz, 24GB RAM, 1TB SSD, iPhone 6 364GB Space Gray; iPad Air 64GB WiFi
craig1410 is offline   0 Reply With Quote
Old Jul 23, 2010, 03:04 PM   #2
ulbador
macrumors 68000
 
ulbador's Avatar
 
Join Date: Feb 2010
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.
ulbador is offline   0 Reply With Quote
Old Jul 23, 2010, 08:31 PM   #3
craig1410
Thread Starter
macrumors 6502a
 
Join Date: Mar 2007
Location: Scotland
Quote:
Originally Posted by ulbador View Post
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.
__________________
MacBook Pro Retina 15.4", 2.3GHz, 16GB RAM, 500GB SSD; iMac 27" Retina 5K, 4GHz, 24GB RAM, 1TB SSD, iPhone 6 364GB Space Gray; iPad Air 64GB WiFi
craig1410 is offline   0 Reply With Quote
Old Jul 26, 2010, 10:39 AM   #4
AndyCodez
macrumors regular
 
Join Date: Aug 2009
Be nice if we could find an open source one so we could just install it with our dev accounts haha.
__________________
13" Macbook White, 2.00 ghz, 4 gig mem, 120g hd.
iphone 3g - 8gig.
Time Capsule 500g.
iFlashCardPro - Flash Cards
AndyCodez is offline   0 Reply With Quote
Old Nov 2, 2010, 10:08 AM   #5
Stongfort
macrumors newbie
 
Join Date: Nov 2010
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.
Stongfort is offline   0 Reply With Quote
Old Nov 8, 2010, 01:03 PM   #6
Mr. Zorg
macrumors regular
 
Join Date: Sep 2007
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.
Mr. Zorg is offline   0 Reply With Quote
Old Nov 8, 2010, 09:02 PM   #7
PBG4 Dude
macrumors 65816
 
Join Date: Jul 2007
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?
PBG4 Dude is offline   0 Reply With Quote
Old Nov 18, 2010, 11:52 AM   #8
kev21986
macrumors newbie
 
Join Date: Apr 2008
anyone ever figure this one out?
kev21986 is offline   0 Reply With Quote
Old Nov 18, 2010, 12:22 PM   #9
cnstoll
macrumors 6502
 
Join Date: Aug 2010
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.
cnstoll is offline   0 Reply With Quote
Old Dec 28, 2010, 02:53 PM   #10
wheli
macrumors newbie
 
Join Date: Jun 2008
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....
wheli is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: If you jailbreak iPhone wifi hotspot Christian 5G Jailbreaks and iOS Hacks 1 Feb 6, 2013 12:52 AM
wifi or LTE if using iphone's hotspot? Drecca iPad 0 Oct 23, 2012 02:54 PM
iPhone: can i use Sprint iphone as wifi Hotspot ? jigsb007 Jailbreaks and iOS Hacks 14 Oct 11, 2012 10:27 PM
iPhone 5 can't connect to Xfinity Wifi Hotspot zzoomp09 iOS 6 11 Oct 7, 2012 11:07 AM
Creating hidden Ad-Hoc network Inspiratron OS X 10.8 Mountain Lion 3 Sep 1, 2012 06:29 AM

Forum Jump

All times are GMT -5. The time now is 03:00 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC