EzDevInfo.com

wifi interview questions

Top wifi frequently asked interview questions

Detect network connection type on Android

How do you detect the network connection type on Android?

Is it through ConnectivityManager.getActiveNetworkInfo().getType(), and is the answer limited to Wifi and mobile?


Source: (StackOverflow)

How to calculate distance from Wifi router using Signal Strength?

I would like to calculate the exact location of a mobile device inside a building ( so no GPS access)

I want to do this using the signal strength(in dBm) of at least 3 fixed wifi signals(3 fixed routers of which I know the position)

Google already does that and I would like to know how they figure out the exact location based on the this data

Check this article for more details : http://www.codeproject.com/Articles/63747/Exploring-GoogleGears-Wi-Fi-Geo-Locator-Secrets


Source: (StackOverflow)

Advertisements

Github (SSH) via public WIFI, port 22 blocked

I'm currently on a public WIFI spot and I'm unable to use SSH (they probably blocked that port). However, I need that connection to do a git push.

➜ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection refused

Is it possible to bypass this restriction by setting up a SSH tunnel via port 80 and tell github push to use that connection? How to do that? I'm on OSX (lion). This must be a common problem?


Source: (StackOverflow)

Android turn On/Off WiFi HotSpot programmatically

Is there an API to turn On/Off the WiFi HotSpot on Android programmatically?

What methods should I call to turn it On/Off?

UPDATE:There's this option to have the HotSpot enabled, and just turn On/Off the WiFi, but this is not a good solution for me.


Source: (StackOverflow)

Run/install/debug Android applications over Wi-Fi?

I thought there was a way to test your applications in development over Wi-Fi. Is this accurate?

I'd love to be able to untether my phone and develop wirelessly.


Source: (StackOverflow)

How to get name of wifi-network out of android using android API?

I thought that I should use NetworkInterface::getDisplayName. I got some name, but this name is different that this name which I can see, when I choosing to which network I want to connect.

Please help..

[EDIT]

acording to Loxley answer:

WifiManager wifiMgr = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = wifiMgr.getConnectionInfo();
String name = wifiInfo.getSSID();

Source: (StackOverflow)

iOS / Too frequent rssi event from driver..?

So my question came up looking an the console output of some iOS 7.0.x devices via iPhone Configuration Utility the other day. I was puzzled to see several indications that the WiFi daemon registers WiFi rssi activity out of the blue for no apparent reason (no background apps active / push messages pending and so on). These all appear as coupled records in the console in the form of:

Mar xx xx:xx:xx iDevice wifid[xx] <Notice>: WiFi:[406330748.823677]: 
Mar xx xx:xx:xx iDevice wifid[xx] <Notice>: Too frequent(1.822344 secs) rssi event from driver
Mar xx xx:xx:xx iDevice wifid[xx] <Notice>: WiFi:[406330748.895756]: 
Mar xx xx:xx:xx iDevice wifid[xx] <Notice>: Too frequent(0.835468 secs) rssi event from driver, ignoring

...and so on. What got me worried is that the lines above are duplicated every second or so and appear to never end.

Now I'm no programmer in any kind of form, but knowing some of the basics of UNIX and all I've managed to conclude that the WiFi daemon takes up substantial CPU time as shown in an top breakdown using the terminal, which in turn would suggest that this may (or not) be a reason I've also been experiencing poor battery life on some of these devices as of late.

Next up I would obviously ask you all if anyone's familiar with the behavior noted above and if so what would be the source of this "noise"..


Source: (StackOverflow)

Android apps, communicating with a device plugged in the USB port

I'm thinking about an Android app (with possibly an accompanying physical device), and i'm trying to figure out whether this is something that's feasible.

1) Let's say I plug my Android to my PC. Would it be possible for an app installed on the PC to communicate with an app running in the cell phone? I just need a very simplistic data exchange, it can even be one-way (just data pushed from the cell phone to the listening app on the PC, whenever the cell phone wants, I don't need any data sent from PC to phone).

When I plug it in, the phone gives me 4 options (charge, disk drive, HTC sync, tethering), which makes me think this is not doable, but still worth the shot.

2) Would it be possible for an app on the PC to talk to an app on the phone through any other way? (Wi-fi, bluetooth, etc). I'm guessing no on wi-fi since neither party has the other's IP (and I want this to kinda just work, not having to input IPs manually all the time).

3) If I make a device that's plugged to the little USB port at the bottom of the phone (and let's say this is a magical device that can do anything, I don't quite care about those details as long as it's doable). Can I have an Android app talk to that device?

4) Any other ideas to make the phone talk to a "device" that I make, or to an app in the PC are more than welcome. Going "through the web" could be an option (although there'd have to be a central server that I own as a middle man, I believe). But i'd prefer if the communication was direct between the two devices.

Thank you very much for any ideas!
Daniel


Source: (StackOverflow)

How to programatically create and read WEP/EAP WiFi configurations in Android?

How to programatically create and read WEP/EAP WiFi configurations in Android?

I have seen a number of people struggling on this very question on various forums and all across the community. I know this is not that straight forward(especially EAP) to figure out because When I wanted to acheive the same I too struggled quite a lot.Well, all the hard work of code analysis and searching various implementations on the internet done with I was finally able to acheive the goal. All the credit goes to number of open source projects and their developers.

I would like to share this knowledge with all, Since SO encourages this: "It's also perfectly fine to ask and answer your own question, as long as you pretend you're on Jeopardy: phrase it in the form of a question."

Part 1: Creating a WEP WiFi configuration programatically.

Part 2: Read a WEP WiFi configuration programatically.

Part 3: Read a EAP WiFi Configuration programatically.

Part 4: Save a EAP WiFi configuration programatically.


Source: (StackOverflow)

Checking Wifi enabled or not in Android?

Can you mention the code for checking whether the Wifi is enabled or not?


Source: (StackOverflow)

Enabling Wifi on Android Emulator

My question is how to enable wifi on Android emulator? I have tried to find this but no one is giving me satisfactory answer. Everyone is confusing wifi with 3G. Please help me out.


Source: (StackOverflow)

Can Android do peer-to-peer ad-hoc networking?

Is it possible to set up Android in ad-hoc peer-to-peer wifi mode? For example, I would like to have one phone broadcast a message, and have all peers in the network receive the broadcast, without having a server. I would like to use wifi since bluetooth range is more limited.


Source: (StackOverflow)

Adding a new network bearer to Android

I'd like to add new bearer(s) to Android (rooted/custom build), to be a peer with Wifi and GPRS.

I have done some Android development and I am aware that (in Android 2.2) there are constants for WIFI and GPRS. Does this mean that I will need to be adding constants in all over the place, as well as providing the network stack?

The first bearer I want to add is USBNet (for Androids with USB host).

Another will be a 3G USB dongle as a second GPRS bearer.

I have started by downloading the source.


Source: (StackOverflow)

Is Wi-Fi Direct connection possible within iOS devices and among Wi-Fi Direct enabled devices?

Is Wi-Fi Direct connection possible within iOS devices and among Wi-Fi Direct enabled devices?

The objective is to enable communication between an iOS device and another device (not necessarily another iOS device. It could be Android, Mac, PC) without the presence of any controllers. (WAPs).


Source: (StackOverflow)

iOS Detect 3G or WiFi

I am not sure if this is possible, but I have this scenario.

I have a website displayed in my UIWebView which has the link set in a UISegmentedController. They website can detect if you are on wifi or on the 3g network.

Now The segmented controller points to 2 different pages. 1 - an iPhone friendly login screen 2 - the home page, once you are logged in.

Now this is the question:

Can I program my application to detect if it is on wifi or 3g (I know you can do this), but then based on the answer go to segment 1 or 2

Kind like this:

if(iPhone device is on 3g) {
    Go to Segment 1;
} else {
    Go to Segment 0;
}

Source: (StackOverflow)