iOS Bonjour Device Connection Limit? - iphone

If I am writing my own networking services via Bonjour (instead of GameKit's implementation), is there any limit to the amount of devices that can connect to a single socket? Meaning, I have one device that is the "host", is there a limit to how many other devices can connect to the host via Bluetooth/Wi-fi?

The maximum number of remote users able to connect to the given host is dictated by the max number of file descriptors iOS allows you to open on a socket. It's not strictly a Bonjour issue. I'm unable to find any documentation for iOS but the default value for OS X is presently around 256 open descriptors per socket (low compared to other UNIXes, although it can easily be bumped).
Given the hardware constraints of an iOS device I would assume this max value is lower, but should still be in the hundreds, comfortably enough for gameplay between users on the same link-local network.
Get above that number of concurrent players and the likelihood is that CPU and network conditions would be the limiting factor anyway.

Related

Can devices with different port settings work normally in modbus network?

We have several devices connected to Modbus network. We bought a new device that can't be tuned and has fixed settings: baudrate=19200, parity=odd, while others have baudrate=38400, parity=none. Is it possible to use them in one network, i.e. first read from old devices, and then reset serial port to read from the new device?
Yes, as long as the devices ignore data encoded with the wrong baud rate.

Restrict bandwidth in specific devices [wifi]

I wanted to restrict my wifi's bandwidth in some particular devices (specifically android). I searched up, and found QoS as a solution. But, as far as I have seen, QoS divides bandwidth on basis of priority. Means, if a laptop (with medium priority) and an android (with low priority) are connected to wlan, the android device gets low bandwidth.
But as soon as laptop is disconnected, android again consumes the maximum available bandwidth.
I wish to restrict bandwidth in terms of figures (Eg: 1Mbps for Wlan devices). Is there any way out to achieve this?
I'm using TP-LINK W8961ND modem.
There's no standards-based mechanism to do this. You need your wifi modem/router to provide this function in software. Many do in the enterprise market but not in the residential/SOHO market.
If your "modem" is not your router, you could also do it on your gateway device and only shape traffic going over the internet. For example pfsense is perfect for this.

PRI Trunks on IAD

Please clarify a few questions regarding the below scenario -
A service provider is providing a business "ABC Limited" two PRI trunks on a single IAD.
Should the IAD be always a 48-port IAD or could it be a 24-port IAD?
Assuming it's a 24-port IAD, what I'm unable to understand here is that if the device has only 24 ports then how will it allow 46 simultaneous call?
Is there any limitation placed on the number of analog telephone devices that could use a single IAD assuming a PBX is used between IAD and telephone devices?
Can the IAD be used without a PBX? If yes, then what should be the total number of analog telephone devices that could be attached to the IAD?
I provide a brief overview of an IAD below that will help clarify the answers to the questions posted.
Should the IAD be always a 48-port IAD or could it be a 24-port IAD?
Hardware-wise, the provider will provide a Voice handoff(Analog or Digital, PBX or Analog phone) and this will depend on the Data Pipe being installed. As an example, utilizing Telco Data, a 1.5 Meg T1 with 24 ports allowed for Voice channelization, if ALL ports are in use, this will utilized ALL the Bandwidth and not allow for any data to be used. So, 48-port IAD can be configured, only if the Data Pipe being installed is (2) bonded 1.5 Meg T1's.
Assuming it's a 24-port IAD, what I'm unable to understand here is that if the device has only 24 ports then how will it allow 46 simultaneous call?
You are correct. You will only have 24 voice channels available in a 24 port configuration. The handoff can be to a PBX can be Analog Trunks(can have analog telephone devices connected to these) or a PRI protocol.
Is there any limitation placed on the number of analog telephone devices that could use a single IAD assuming a PBX is used between IAD and telephone devices?
When talking analog telephone devices only, then, a 1 to 1 ratio has to be considered in the case of an Analog Trunk handoff.
Can the IAD be used without a PBX? If yes, then what should be the total number of analog telephone devices that could be attached to the IAD?
Again, in an Analog Handoff, a 1 to 1 ration is what you will need to consider.
NOTE: Integrated Access Device (or IAD) provided by the Local Telecom Provider can be deployed with multiple configurations. Its primary purpose is to aggregate multiples channels of data to support Voice and Data services to a carrier or service provider using one Data pipe onsite. When no Voice Channels are in use, the total capacity of the pipe can be utilized for Data.
Dynamically, the pipe will allow Voice channels(or ports) to be available when requested by the PBX onsite/analog device attached to the IAD or when an PSTN caller dials into the PBX/analog device. The Data Pipe will dynamically adjust to allow less Data to be used on the shared pipe to allow the Voice Channel connect. This is approximately 64k of bandwidth PER Voice Channel.

How do I detect iPhone on network?

I am trying to detect if my iPhone is in the same network as my Raspberry Pi. I would like to execute a script when I am at home and my iPhone's presence is registered in my LAN.
It seems that when the phone is in standby not even the iphone-sync port (6207/tcp) is found. "/usr/bin/nmap -n -sT -p62078 [my phone's local IP]" shows no host. I wonder what else I could scan for. Obviously the phone is online and ready to accept facetime calls (data via 3G is deactivated). Could I accomplish something with avahi which I am using on my Raspberry Pi, or are there other ways.
I've just spent a week beating on this problem so I can refrain from sending SMS home alarms to my wife when she's at work.
Pinging won't work because the iPhone won't respond to ICMP when asleep. Reading the ARP cache won't work because a sleeping iPhone will come and go (check it every 30 seconds for a few minutes).
The only way I have found to 'reliably' determine when my two iPhones are on my local (home) network is to use the PCAP dotnet library to look for any packets originating from either of the phones' MAC addresses. For example, if you run Wireshark with the capture filter
ether src <iphone-mac-address>
you will see a surprising amount of network discovery/announcement traffic from the phone. It still has quiescent states, but so far the longest interval I have seen between captured packets is around 10 minutes. You would have to wait until you have not heard from the phone for some interval (I use 15 minutes) before declaring it not-home.
With this technique you will find a phone quickly when it rejoins the home network, assuming your phone is configured for DHCP. I also use port mirroring on my main Ethernet switch to include traffic from my wireless access points.
I don't have a Raspberry Pi solution for this, because my linux expertise is very limited, but someone else may be able to help you along those lines. I have a Windows Service using the PCAP library and so far it works reliably, with the limitation of waiting 15 minutes before deciding an iPhone has left the network.
* update 2-3-2018 *
I have this detection algorithm down to about 5 minutes, using a combination of ping/arp messages directed to each phone, about once per minute. Seems to work great.
You can find a list of devices on your network by investigating your arp cache.
arp -a
Simply write a bash script to run arp -a at a regular interval, and search for the mac address of your phone.
You could go even further with this and perform different actions depending on what brand of device is connected.
The first 3 hexadecimal digits of a mac address are the vendor id.
Take the following mac address:
00:19:E3:AB:CD:EF
00:19:E3: is one of the registered mac address for apple devices.
By comparing the devices on your network with this list, you could detect when for example a '3com' device, or a 'dell' device attaches to your network.
http://www.coffer.com/mac_find/?string=apple
You can do "arp-scan -l -r10" for that (tested this myself), but the problem is if mobile data enabled the iphone will go and suspend wifi if screen is locked to safe battery. so you need to disable mobile data .. then arp-scan will work.

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

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.