3

I'm developing a piece of software which consists on mobile clients and a machine acting like a server. This is for a highly trusted environment (not public), so I don't care much about security.

I want the clients to be allowed to perform a certain action only if they are, say, 2 meters from the server.

As the client is actually an HTML5 app, it would be better if the server perform the check, not the clients (maybe the clients can send its position to the server and then he performs the check), but if it cannot be done, it doesn't matter.

I have run out of ideas about how this can be done. I have thought about bluetooth and geolocation, but can that detect if the client is at least 5 meters nearby?

Is this even remotely possible?

Jorjon
  • 5,316
  • 1
  • 41
  • 58
  • 1
    The range of just about every wireless protocol is either significantly larger (Bluetooth is ~30m IIRC) or significantly smaller (NFC is on the order of a few millimeters). Bluetooth Low Energy (LE) *might* work, but there is no standard support for that just yet. GPS accuracy is ~30m in good conditions, and since your server is probably indoors, you will not have good conditions. – CommonsWare May 20 '13 at 05:50

1 Answers1

1

You can use sound waves to do this. These links might help you get started:

Community
  • 1
  • 1
Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84
  • Hi thanks for the answer, I'm checking it out. Do you know if is this feasible in a loud environment? Where I will place the server is a loud environment with many clients at once. I didn't mention that because I wasn't expecting this answer :) – Jorjon May 20 '13 at 05:54
  • But anyway, it was a great idea to use sound, I didn't even thought about it. It can work even on HTML5, the server only has to have a microphone. Awesome! Still I'm a bit worried about the loud environment, I will need to check this out. – Jorjon May 20 '13 at 05:57
  • I suppose you could create a wave of a particular frequency and track it. This could be a frequency that isn't used by the waves emitted by other machines in the server environment. It needs to be tailored to your specific situation I suppose. Custom hardware might also be needed. – Anup Cowkur May 20 '13 at 05:58