If I have a mobile entered in WiFi network, how to know the single strength between a device and a router without getting connected.
Related
In my app I am detecting if there is an internet connection and through what connection (wifi or cellular).
I want to know if there is an option to force the app using the cellular data in case that I am connected to wifi but for some reason or malfunction there is no internet.
Scenario: I want to have an iOS device connect to a LAN that has no upstream Internet connection, yet still retain and use its cellular data connection.
Theoretically, it strikes me that the iOS wifi NIC and the cellular data NIC are similar enough to dual NICs in a PC that I should be able to set up routing such that any request to, say, 192.168.. goes through the wifi connection, and any other request goes through the cellular data connection.
I did a test to see if both NICs are active when the iOS device is connected to wifi by the following steps.
Ensure that my iPhone's wifi is off and that I have a good cellular data connection.
Disconnect my wifi router's Ethernet cable to my cable modem.
Connect my iPhone to the wifi router.
Use another iPhone that's connected only via cellular data to create a game of Words with Friends.
As soon as the other iPhone completed the first move, my iPhone received a notification that there was a new game to play.
This confirmed that the cellular data connection was indeed alive and well enough to receive push notifications despite the wifi NIC's being connected.
The question becomes, then, can an app programmatically connect to a given wifi network, set the cellular data network to be the default route, and route any requests to, say, 192.168.. to go through the wifi network?
I know this post is old, but I happen to have done some work on using multiple network interfaces on iOS.
My experiments showed that accessing via hostname results in iOS choosing the network interface it wants to use, and not trying any further interfaces if the host cannot be resolved.
If you know the DNS Server IP address for any Ethernet/WiFi based network, you can send a DNS request yourself, convert the hostname into an IP address and access via IP address. iOS will then use the correct interface.
My guess is, that if you have the private class IP address space accessible over both connections, there's probably nothing you can do to specify which network interface should be used.
When I change my network from 3G to Wifi what is happening to all the services I'm using (like Facebook, Gmail, etc.)? Do they disconnect and then connect again? Is it like roaming between mobile networks?
Yes they are disconnected and they have to reconnect. I checked that in my own Android app. There I'm handling mobile and wifi network strength and on change the device is offline.
Since you change your connection you will get another IP which requires to reconnect.
Im trying to measure the signal strength of mobile devices from either existing WLAN routers or creating directional antennas. I want to see what specific routers are picking up the top 3-4 signal strengths from a specific mobile device, and use triangulaiton to gather their locaiton. Any ideas of the best route to do this?
I don't know whether such router exists or not, but can provide you an alternative and convenient way. Wireless channel is symmetric in both direction; this is, if the router transmits signal at 20 dBm and mobile device receives such signal at -30 dBm, the received signal strength at router would be -30 dBm if the mobile phone transmits at 20 dBm (given that environment does not change much). Then simply install WiFi analyzer app on your Android phone and record the signal strength of your normal routers.
I got a WiFi router connected to my PC.
What I want is to send from another device some data to my PC through the Wi-Fi adapter.
Program on the device is developed using EVC++. The one on PC - on VC++.
EDIT 1:
PC has an IP address.
Another device s IP is set at program execution. I mean WiFi IP address. And then connection to WiFi router is proceeded.
EDIT 2:
What if it uses an ethernet and wifi together?
How should I make a connection through WiFi?
WiFI is no different to usual Ethernel network.
So you just usually find out IP of other computer (in config/ask user/DNS), establish usual TCP/IP connection and send data on.