Detect other iPhones in a range [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm looking to create a mobile app on IOS devices before I started I just needed to check up on one thing. How can I detect other IOS mobile devices within local rage e.g same room, same train, etc..
I want to be able to do it while the phone is locked, so bluetooth wouldn't be a great example as most people have it turned off.
Thanks!

The application has to send its location to the server.
Then the server knows where every devices that shared its location are.
Then your application can ask "who is around?" to your server... and your server calculates (let's suppose within a radius of 2 miles) who is around... and sends back to you.
It doesn't have anything to do with bluetooth. It's done via regular internet.

For other users of your app who want to be discovered you could use Bluetooth LE and the new iBeacon support added in iOS 7. Each user would have to launch your app and give it permission to start "advertising" their presence. However, the range of Bluetooth LE is like 10-20 meters (I forget the exact figure) and that will go down in "RF hostile" environments.
If everybody's connected to the same WiFi network you could use Bonjour.
Another option, as suggested by Wagner, above, is to have the devices send their locations to a central server.

Related

Wireless API for Linux in C\C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to find a proper way how to reuse existing implementations of wifi tools(iw) in own code(c\c++). I need to get information about available AccessPoints in range(signal strength, mac addr., etc). I found couple example codes(WEXT and others) that uses ioctl approach, but it makes passive scans(and i get new information only once in two minutes in my network)[UPDATE1: Thanks to #fluter, i know that WEXT can do active scanning, too.]. I found that iw makes an active scan and that is what i need. So my question:
Is there a way to use iw code in my own app without parsing its source code in chunks, or, maybe, there is an Wireless API for such purpose?
(UPDATE1: with basic code examples to start with.)
Similar question
UPDATE2: I have reviewed my task and found that AP information is not enough for me, i need to capture clients data, too. That leads me to wifi packet sniffing and the best tool i have found to do that is Horst. So, i'm trying to reuse its code in my app, now.
You might wish to start with cfg80211.
cfg80211 replaces Wireless-Extensions and it is suggested that :
All new Linux wireless drivers should be written targeting either cfg80211 for fullmac devices or mac80211 for softmac devices.
Also, it is written:
Instead of writing wext ioctls you now write cfg80211 operation
callbacks and fill in the wiphy struct to indicate to cfg80211 its
device capabilities.
To start with active scanning start here
You can use the wext api provided by kernel, basically, call ioctl with SIOCSIWSCAN, and get the scanned result with SIOCGIWSCAN.
You can set to scan all by using flag IW_SCAN_ALL_ESSID, and choose scan type with flag IW_SCAN_TYPE_ACTIVE or IW_SCAN_TYPE_PASSIVE.

ESXi 5.5 crashing under load [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a whitebox dual CPU home server running ESXi 5.5.
I have loaded the server up with a bunch of VM's for learning Microsoft SCCM. I noticed that as soon as one of the guests gets under load, the host will crash with the attached photo (apologies for the quality). Could this be due to a dying CPU? I have noticed that one of the CPU's runs quite a bit hotter than the other.
Usually with CPU overheating the machine would shut down first, however if the temperature inside the case is too hot, something else might be getting affected (e..g memory or video display circuitry).
If you want to diagnose overheating, I can suggest placing a vacuum cleaner hose over the air vent, this will draw much more air than your regular fans. If the system stays up under load with the vacuum cleaner attached, it will be an overheating problem.
Not a programming issue, so I'll close this off and note the resolution I found incase anyone else has the same issue.
Looks like this was a known issue under ESXi 5.X that has to do with the E1000 and E1000e virtual network adapter as per the lines:
#BlueScreen: #PF Exception 14 in world wwww:WorldName IP 0xnnnnnnnn addr 0x0
PTEs:0xnnnnnnnn;0xnnnnnnnn;0x0;
0xnnnnnnnn:[0xnnnnnnnn]E1000PollRxRing#vmkernel#nover+0xdb9
0xnnnnnnnn:[0xnnnnnnnn]E1000DevRx#vmkernel#nover+0x18a
0xnnnnnnnn:[0xnnnnnnnn]IOChain_Resume#vmkernel#nover+0x247
0xnnnnnnnn:[0xnnnnnnnn]PortOutput#vmkernel#nover+0xe3
0xnnnnnnnn:[0xnnnnnnnn]EtherswitchForwardLeafPortsQuick##+0xd6
0xnnnnnnnn:[0xnnnnnnnn]EtherswitchPortDispatch##+0x13bb
0xnnnnnnnn:[0xnnnnnnnn]Port_InputResume#vmkernel#nover+0x146
0xnnnnnnnn:[0xnnnnnnnn]Port_Input_Committed#vmkernel#nover+0x29
0xnnnnnnnn:[0xnnnnnnnn]E1000DevAsyncTx#vmkernel#nover+0x190
0xnnnnnnnn:[0xnnnnnnnn]NetWorldletPerVMCB#vmkernel#nover+0xae
0xnnnnnnnn:[0xnnnnnnnn]WorldletProcessQueue#vmkernel#nover+0x486
Simply remove any adapters using E1000/e and replace with VMXNET3.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2059053

Is there a way to see incoming/outgoing connections with c++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm trying to build a program in c++ to see what game servers a client is connected to for a gaming site. For the program we need to be able to see if a client is connected to a specific server or not. I've tested using wireshark and this program can see the incoming/outgoing connections to and from the server - which is the exact thing I need but i'm just not sure how to do it. I understand you can see which port connections are going in and out through using command prompt using netstat, but netstat doesnt give the details i'm after. All I need to be able to do is basically scan through their outgoing connections and compare it to an IP, and if the IP matches then they're connected to the server.
Is this possible through c++? If not, does anyone know how wireshark does it?
Cheers.
This depends on your operating system and is different in Windows and Linux.
In Linux you can get all of the information about a program's sockets using lsof -p [PID] where PID is the program's PID.
To do this in your own program look up the lsof source code and see how it is done. As I recall, it is done by reading files in /proc.
In Windows you could try C++ Get Handle of Open Sockets of a Program
Check out libpcap http://www.tcpdump.org/
You may need to deconstruct the UDP/TCP packets themselves.
If you want a simpler solution you could pipe the output of tcpdump as stdin. You can give tcpdump filter to ensure your application isn't spammed with useless content.

Hardware Fastboot Boot Method in XE11 not working? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I got stuck on my Glass unit with Launchy crashing (sideloaded the wrong version -_-) in XE11 every time I try to launch an application, including the built-in settings. The problem is for some reason I don't have ADB access anymore and because of Launchy, now can't even reenable Debug mode.
So I am now trying to boot into fastboot mode using the hardware method reference here: Having issues seeing GLASS in Fastboot
But when I keep the camera button pressed and press the power button briefly, the LED is solid for a few seconds and then goes on to blink at very low frequency. No matter how long I seem to keep the camera button pressed, the LED never goes solid.
I've also tried to plug in the unit to my computer and look for it show up in the System Information (the Apple Device Manager equivalent).
Does anyone know if the fastboot hardware method changed in XE11? Or what am I doing wrong?
Thanks in advance,
Charles.
The slow blink you're seeing is Glass in fastboot. Once in fastboot you can verify that it's connected by doing a device list:
$ fastboot devices
If you see output, you'll be able to run other fastboot commands.

What is your favorite free Netstat GUI / Connection Monitor app for Windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I need something a little more feature rich than Sysinternals TCPView (which I regularly use) ... but it also must be freeware. :)
Well, the question is a bit old and I realize that probably you already found the software you were looking for... just in case, an interesting connection monitor utility is CurrPorts, by Nir Sofer.
Freely adapted from the program's home page:
displays the list of all currently opened TCP/IP and UDP ports on your local computer;
for each port in the list, information about the process that opened the port is also displayed, including the process name, full path of the process, version information of the process (product name, file description, and so on), the time that the process was created, and the user that created it;
allows you to close unwanted TCP connections, and kill the process that opened the ports;
allows custom filters for inclusion/exclusion of connections.
Maybe a full blown traffic sniffer like Wireshark will complement your tool set?
Amongst wiresharks features are:
packet analysis
traffic statistics
capture
coloring
data export
I recommend TCPView for Windows v2.53.
image http://i.technet.microsoft.com/bb897437.TcpView(en-us,MSDN.10).gif
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, NT, 2000 and XP TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.
Not sure what features you are looking for so this is my suggestion.
Without having used it, I have seen TCPStat advertised a few times.
It looks like it was a discontinued project somewhere around 2003 and it's an awful blue color.
There's the MS Network Monitor.
Process Hacker shows also send/receive bytes, speed, country flag etc.