How many iphone devices we an connect via bluetooth or wifi? - iphone

maximum How many iphone devices we an connect via bluetooth or wifi at a time ?........i need to connect 10...is that possible.......??

The Bluetooth standard (802.15.1) only allows 7 devices to be connected to a master at once. If too many are actively communicating, however, the bus can be exceedingly slow.
I'm not sure of the WiFi (802.11b/g) standard, some WAPs say "up to 255" which may be possible, but hilarious to try. Regardless, 10 is well within WiFi's capabilities.

Related

Establish communication link between a device and iOS

I'm developing an iPhone/iPad app that requires it communicate with another device. I'm actually more interested in receiving input from another device that the iPhone is connected to through USB. The solution needs to work with any iOS device and cannot require it to be jailbroken.
I've heard of apps that communicate with a piece of hardware that can be plugged to the iOS' serial connection, which is similar to what I'm going to develop except that the other device I'll be connecting to is a standalone music keyboard.
best regards,
fbr
If you are developing accessories that need to connect to iOS devices and want to use your own communication mechanism then you need to join the Apple MFi program.
Several options:
Forget MFi unless you have 1000s of $ backing up your product development. Apple won't even talk to you. I've tried.
Take a look at the Serial Cable from Redpark (http://redpark.com/c2db9.html)
I've got one of those and it's ideal for apps that you can deliver on your own, but you might also be able to get them into the App Store.
Another option is to use Wifi with a Wifi-to-Serial adapter on the other end. I've used the RN-174 and RN-134 from Roving Networks successfully.
However, these solutions only get you Serial connections, but can be quite fast, especially with the RN modules. There are also Serial-to-USB converters you can use on the device's end, but that would require the device to work as a USB host, usually. If you have a USB device that wants to act as a client, these common adapters won't do the trick.
So, unless you can actually afford the MFi program, and if you really need USB connectivity, you'll have to let someone create a small box containing a USB host adapter with a Wifi chip. I don't know of a ready-made solution for this yet, although I've seen quite a few area where people would like to have such a unit.

any examples of a server/client iphone app where both the server and clients are iOS devices?

I would like to create a server/client application where one iphone is running a server, and all other devices on the same wifi network can connect to the server device and send and receive information. Are there any examples of running a server on a device and letting other devices on the network search for it?
I looked into using GameKit, but the 16 person max limit is unfortunate. cocoaasyncsocket seems like a good option, but how do I set up one device as the server, and search for it on other devices?
The WiTap sample code may be what you're looking for (or at least a good place to start):
http://developer.apple.com/library/ios/#samplecode/WiTap/Introduction/Intro.html

How does Bonjour Over Bluetooth Work

Can anyone explain how bonjour works over bluetooth from iphone OS 3.0 onwards?
The documentation says the Bonjour API's used in the application just works even if Wi-fi is off and Bluetooth is on. It also says , a Bluetooth PAN is established and hence IP address comes into picture.
But Bonjour (based on mdns) requires multicast to work. But , Bluetooth PAN (piconet) works on a master-Slave concept. Any data to be exchanged between peers has to go to the master first and then the master forwards to the all clients. Moreover there is a restriction on the number of slaves in piconet i.e., 8. that means bonjour over bluetooth has a limitation that it would work for a max of 8 devices?
Apparently, it's PANU to PANU communication. So the limitation is actually - one-on-one communication. If you use Bluetooth Explorer, included with Xcode, you'll see the iOS device presents a service with ID 0x1115. Since there is no GN nor NAP nodes in the connection, only two devices can participate in the connection.
Bluetooth Explorer also shows various custom fields that serve to exchange metadata about the connection. See my somewhat related question for an example of the service announcement.
I have only been able to get this service to appear when using GameKit, on both iPhone 3G with 4.2.1 and iPad with 5.0.1.
I know nothing about Boujour and iPhone... Perhaps Bonjour just sees the TCP/IP network and multicasts on to it -- regardless of whether the IP network is over bluetooth or WiFi or FooBar...
IIRC PAN just forms a point-to-point link to the PAN peer and, thus if the peer is an access-point (rather than just another end-node) it it it that will handle multicasting the packets.

How can an iPhone access another non-iPhone device over wireless or Bluetooth?

I'm trying to figure out if an iPhone can connect to another non-iPhone device over wireless or Bluetooth and have seen conflicting information. Much of what I've found was before version 3.0 of the SDK came out, when it certainly wasn't possible. Looking at Stack Overflow questions, like Can the iPhone 3.0 SDK provide full access to Bluetooth devices (headsets)? mention you can't connect to an arbitrary device unless if it's part of the "Works for iPhone" device. Do I need hardware that is part of this program?
Looking through the Apple documentation, Peer-to-Peer Connectivity, it mentions connecting two iPhones, not an iPhone to another Bluetooth device. Then there are articles like iPhone SDK focus: Bluetooth enhancements that includes this quote
...and with the newly-announced "standard support" should allow file transfer between the iPhone and a computer, as well as between nearby iPhones
Another Stack Overflow question, GameKit in iPhone SDK 3.0, mentions Bonjour, and the Apple documentation for Bonjour talks about connecting to Bonjour devices, but can an iPhone connect to any Bonjour device? Does it have to have a Wi-Fi connection, or can it use Bluetooth?
Even if I could use Bluetooth to connect to another device, it won't be available on first generation iPhones and iTouches, I believe. Is that correct? I'm thinking of an iPhone application that would need to communicate with other non-iPhone devices in the area, probably using Bluetooth, but possibly a direct wireless connection. What are the possibilities and limitations of this approach? Is it not possible to have an iPhone connect to an arbitrary Bluetooth device? Does the other device have to be on a wireless Bonjour network that? I'm trying to figure out if it's even possible for this to work or if it's not worth the effort.
The only way to communicate with other Bluetooth devices via the External Accessory framework in iPhone OS 3.0 is if they are in the Made for iPod accessory program. Even though they communicate through standard Bluetooth connections, accessories need special hardware in order to process the data stream coming from the iPhone / iPod touch. Unfortunately, this means that your idea of communicating with generic Bluetooth devices won't work on iPhone OS 3.0.
If the devices you want to talk to are Bonjour-discoverable via Wi-Fi, they don't need to be part of the Made for iPod program. However, that doesn't sound like your case.
Third-party developers in the near future may produce dongles that connect through the 30-pin dock port and give access to existing Bluetooth devices. If these developers opened up their communication protocol, that might enable your goal of communicating with these devices.
You can use NSStream for opening IPv4/IPv6 sockets on the iPhone. The devices to which you're connecting do not have to be iPhones or use Wi-Fi necessarily. Because of how network communication protocols are laid out, you simply don't have to care what kind of device your iPhone is communicating with.
Bonjour, on the other hand, uses NSStream internally. It's basically a nifty little wrapper which allows for auto-discovery. You need the Bonjour protocol installed on all devices which you want to participate in the auto-discovery process. There is even an implementation for Windows.
As part of the iPhone OS 3.0 SDK, Apple announced the ability to control hardware accessories through either Bluetooth or the dock connector. The dock connector supports standard protocols (that is, play, pause, etc.) as well as any custom protocols the developer wants to implement.
As far as connecting via Bluetooth, you can talk to other iPhones or other devices. For example, you can use stereo Bluetooth to connect compatible Bluetooth stereo headphones, car kits, or other accessories.
As far as what devices support Bluetooth communication, everything except the first generation iPod Touch should be okay.
See also Apple's page on iPhone OS accessories.

How to list all devices in my wifi range in iphone

I am using the reachability code from apple to find if my iphone is connected to the wifi. Next i would like to list all the devices that are in my wifi range. How should i do this. The other devices do not publish any service. I want to detect all devices in my wifi range and send that device a request for tcp connection.
If a device does not advertise its presence and is not otherwise active, TCP/IP does not give you a way to "detect" it. If you can identify your subnet (which has nothing to do with a "wifi range", whatever that may be), you can try connecting to each possible host in it on all possible ports -- this is generally considered an attack (what legitimate reason could you have for such a port scan?), so, if you're detected trying this attack, be prepared for the consequences.
As #Alex says, even if you could find devices that weren't advertising, what's the point? You can't most likely do any adhoc communications with them. Instead you'd need to find copies of your application running on connected devices, and your app needs to advertise.
Take a look at Gamekit sample projects which will give you bluetooth connectivity, and you could dig into something like Jens Alfke's MyNetwork and Blip libraries for tcp/wifi. http://jens.mooseyard.com/2008/05/blip-come-n-get-it/