Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad
This is the forum to discuss the Wrox book Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad by Jack Cox, Nathan Jones, John Szumski; ISBN: 978-1-118-36240-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 28th, 2013, 03:12 PM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13 - Bonjour without Wifi network

Hello,

Thank you for the great book. I am undertaking an iOS app that connects to a Wifi (zeroconf) enabled sensor. I expect this connection to take place outside in the wilderness without a Wifi router nearby. My understanding is that this is possible with zeroconf.

I am curious to see that from Chapter 13, the Consumer Help app does not find Associate Help when they are outside of a good Wifi network. Consumer Help is running on my iPhone and Associate Help is running on my iPad. Discovery occurs fine when both devices are setup to communicate with my home's Wifi network. However, if I disconnect either from the home network, the Bonjour discovery does not occur. Discovery also fails when they leave the range of my network as I had traveled to my partners to do a demo. Is this to be expected from this example?

What would I need to configure or code differently to allow them to communicate outside my home's Wifi network?
Reply With Quote
  #2 (permalink)  
Old July 30th, 2013, 10:54 AM
Wrox Author
Points: 61, Level: 1
Points: 61, Level: 1 Points: 61, Level: 1 Points: 61, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Bonjour requires a local network

Hey acsteester - I'm glad you're finding the book helpful, hopefully this post does the same.

Bonjour is a great networking technology, unfortunately it requires a local network to function. That network can be your typical wifi network or a Bluetooth personal area network (support added in iOS 3). It sounds like the latter may fit your particular use case.

Unfortunately, as of iOS 5, the policy changed such that apps must explicitly opt in to Bluetooth support. Bluetooth can still be used but Bluetooth control is not supported by the higher-level API (NSNetService and CFNetService) requiring you to drop down to the DNS-SD API to configure it. Tech Note 1753 contains more detail and links to sample code for the DNS-SD API.

If you are only targeting the iOS platform GameKit may be worth exploring. Chapter 12 covers GameKit and discusses it's suitability for use in situations other than just gaming.
Reply With Quote
  #3 (permalink)  
Old July 30th, 2013, 04:25 PM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for that information nathanjones. I will look further into that.

Since we are building our own wifi sensor. Do you suppose it is possible to build in the ability for the sensor to create a wifi network for the specific purpose of sharing data with the app? Then the iOS user can select the network from their Wifi settings and then run our app. Presumably the iOS device would later pick up this sensors network automatically, anytime it came in proximity.

We are looking at using PcDuino and a WiShield to quick prototype this.


Thank you
Reply With Quote
  #4 (permalink)  
Old July 30th, 2013, 11:30 PM
Wrox Author
Points: 61, Level: 1
Points: 61, Level: 1 Points: 61, Level: 1 Points: 61, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey acsteester -

Not being a hardware person I'm really not qualified to answer that question. I guess it could work in theory but the user experience of having to join a random network before interacting with a device may be perceived as a negative barrier.

Based on what it sounds like you need I would recommend exploring Bluetooth LE. It is secure, I believe it includes proximity support, and iOS provides an API.

Good luck!
Reply With Quote
  #5 (permalink)  
Old July 31st, 2013, 12:04 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I feel our use case would be within the range allowable by bluetooth, so I will dig into that.

Thanks so much!
Reply With Quote
  #6 (permalink)  
Old July 31st, 2013, 09:55 AM
Wrox Author
Points: 61, Level: 1
Points: 61, Level: 1 Points: 61, Level: 1 Points: 61, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Glad to help and happy to hear Bluetooth may be an option. Good luck!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 - Last Try it Out jdlferreira BOOK: Beginning ASP.NET 4 : in C# and VB 2 July 16th, 2012 05:45 AM
Windows Mobile 6 to use WiFi yukijocelyn C# 2005 2 May 29th, 2008 12:48 AM
Linux driver needed-WUSB54G wifi adapter?? HypnoFox22890 Linux 0 October 22nd, 2007 09:16 PM
setting up WiFi Access on Fedora Core 5 crmpicco Linux 0 August 24th, 2007 06:58 PM
Timeout when connection to SQL Server in WiFi LAN smp4774 SQL Server 2000 1 June 29th, 2007 08:15 AM



All times are GMT -4. The time now is 07:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.