Programming techniques/libraries for locating a user with a mobile device within a building [closed] - mobile

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am looking to develop an application usable on the devices of visitors so that I can tell where they are. The initial idea I had, already done in some museums, is to have a number on specific locations within the museum, they call a phone number, enter that number, and get enhanced content, perhaps audio narration about that space. This is nicely device agnostic, though some WiFi only devices may not have a mechanism to call a phone number, but perhaps having folks on WiFi load a mobile website and choose their location (assuming the number of spots is not too many) from a list, and then click a button.
I'm new to this, and have been brainstorming on this, but I really don't know what I don't know. So here are my questions:
Can I use GPS indoors and get accurate information or will that basically not work in most buildings?
If I use a service like Skyhook Wireless, and use multiple WiFi routers, will I be able to locate the WiFi connected users accurately?
Can I use Bluetooth somehow? Setup for Bluetooth seems like a hassle, but maybe there's a Bluetooth mode that is simpler to use for an application like this?
For devices with a camera, what can I do with an image here. Photo of a QR Code? Are QR code reading libraries built into devices I can use, or would I need to find a library?
Are there are other techniques I might be able to use, maybe counting footsteps with the accelerometer somehow? Or using magnets somehow for devices with a compass?
Suggestions welcome, assume I'm trying to target as many smartphones as practical (Android, iOS, Blackberry, webOS, Windows Phone 7) that are popular in North America. If there is a way to also include devices that are not considered smartphones, that would be great too.
UPDATE
Why indoor navigation is so hard: Your phone can get you to the museum, but it can't guide you to the T-Rex by Nick Farina
UPDATE 2
Brooklyn Museum experiment with QR Codes: too soon to
tell/negative
Very few people can successfully scan and use a QR code
UPDATE 3
Think GPS is cool? IPS will blow your mind

QR codes are your best bet. They're cheap and, for example, in a museum you could put one next to every painting. For devices without a camera, you could choose to print a location-code next to the QR that they could enter manually in an app. Here's another solution as well:
Set up a wifi repeater/booster in each location you want to determine (ex: in a museum, each room) and record the SSID for each router. As the user walks from each room to the next, their device will automatically switch to the repeater with the highest quality signal (the one in that room). Simply have your application test for which SSID the user is connected to.
GPS is not accurate enough and may not work inside buildings and Skyhook wireless is only for one address. Having users call a number and/or go to a website to manually select a location is too many steps for the user, and the user may not have reception to place a call. Bluetooth is a huge hassle.

Can I use GPS indoors and get accurate
information or will that basically not
work in most buildings?
no, GPS needs a clear view of the sky. regardless, the accuracy of GPS is around +/- 50 feet and can be worse.
If I use a service like Skyhook
Wireless, and use multiple WiFi
routers, will I be able to locate the
WiFi connected users accurately?
aGPS is less accurate than GPS.
Can I use Bluetooth somehow?
bluetooth is not location aware.
android 2.3 introduces something called near-field communications. this would theoretically allow the person to wave their phone over a receiver and transmit information. it's quite new and i think the nexus s is the only device with hardware support for this. at best you are looking at some early adopter pain for that one.
Photo of a QR Code? Are QR code
reading libraries built into devices I
can use, or would I need to find a
library?
that's a good idea. QR codes are popular because they are simple. libraries are not part of the SDK but they exist. it would be hard to build one yourself if it came down to that. by the same token, you could just as the user to enter a simple location code. essentially the same thing and might be simpler than aligning the camera for a QR read.
it does depend on your application. if you want this to automatically locate everyone without an user intervention, QR codes / codes won't work because the user has to take some action. even NFC, from what i've read, operates on very short distances so the person would need to wave the phone across something closely not just walk by.

If you're talking indoors, I think you have some great ideas. GPS may be spotty depending on the building, and Wi-Fi triangulation only works if your signal is proportional to the proximity of the user to the unit. Here is my suggestion:
QR Codes sounds like the best option here if you don't mind having them all over the place. If someone can scan a QR code, (which they are on most all platforms, it's just making sure your users have a decoder installed and can actually use it), then you have three things going for you:
You know they have to be in range to scan it...so that's far more accurate than you can get with other location devices.
you can use the QR code to embed a link to a download site or embed the actual information into the QR code if it's not too much.
Most smartphones today have QR code scanner apps built in, and there are libraries (java and .net) that you could use to build your own app.
The downside here of course is that you're assuming the cameras are good enough quality and that someone isn't going to deface your QR code so that subsequent visitors can't read it.

Keep in mind the bump application. They don't use bluetooth or any form of wireless technique to determine if two people are near each other. http://bu.mp/faq
Since you have 1 building that you care about. Why not simply have a root device or network of devices in your building that you care about. This root device would communicate with all the clients to do your bidding.

Maybe cellphones can´t solve your problem, have you considered cameras on each room and a QR code tag on each guest? you might get the images from the security camera since they are infrared. Another way of achieving this is by locating the camera in front of the door so that the guests are always seen by the QR code algorithm.
Cellphones are just too diverse to implement this, have you thought that the guests might not have a cellphone at all?

Related

Use DroneKit to build a Ground Control Station for Windows

On the DroneKit.io page, it mentions using DroneKit Python when creating Ground Control Stations for Windows. However, there appears to be no documentation for this.
Is it meant to simply simulate a com port and act as a proxy for other Ground Control Stations, which just makes it easier hijack the MAVLink?
Also, it mentions Python being used for low-latency processes. This seems to be oxymoronic. Is there a reason that it would be better than just using C/C++ for the purpose of hijacking the MAVLink?
Thanks!
DroneKit-Python can be used either to create a python-based ground station or it can be run on a companion computer. There is no practical difference between the two except how you set up the connection to the vehicle from the computer running the script. The different ways of starting MAVProxy for the different connections are covered in the Getting Started documentation.
The reason that there is no "specific" documentation on using DK-Python for GCS is primarily "marketing". The far bigger market for ground station GCS software is in tablets/phones that will use DK-Android or a future iOS port. DK-Python has been positioned solely as for use in the air interface. Even though there is no "specific" documentation, in fact all the existing documentation is relevant.
Is it meant to simply simulate a com port and act as a proxy for other Ground Control Stations, which just makes it easier hijack the MAVLink?
No. See above.
Also, it mentions Python being used for low-latency processes. This seems to be oxymoronic. Is there a reason that it would be better than just using C/C++ for the purpose of hijacking the MAVLink?
It doesn't mention low-latency processes, so the answer is "invalid question".
You're probably misreading the text "that require a low-latency link". The point here is that if you have dronekit-python running on a companion computer and connected by a fast link you can do real time handling of incoming sensor data. This allows computer vision control of the UAV. However if you run DK-Python on a ground control station you will have a much slower link. You can still control movement of the UAV but the latency will be much higher.
Hope that helps!

BlackBerry OS 5 - 7, how to implement listener to listen if BlackBerry Device just get internet connection

I have questions about programming in BlackBerry Devices OS 5 - 7. Is there a listener that can listen if the device is just connected to internet connection? The task of my app is that if the device is connected, it will send a http request right away.
Looking forward to it.
Best regards,
Hammy
The listener you want is called CoverageStatusListener. Have a look at the API: CoverageStatusListener and CoverageStatusListener OS6.0+. Note the two flavours - you might want to use the extended version in your OS 6 and above apps.
But that said, coverage is only 1/2 the story. You might have good coverage but no access to the specific web site you are targeting. Another common problem is things like WiFi Hotspots - you can be talking quite happily on WiFi, but unless you have signed in to the Hotspot, you are not going to be able to communicate with your web site. So the many links that have already been provided by Signare (in the comments for your question), are useful. Here they are again, plus one more that I think is useful:
how-to-check-availability-of-internet-connectionwifi-gprs-edge-in-blackberry
how-to-check-for-an-active-internet-connection-in-blackberry-sdk
how-to-check-internet-connection-in-java-in-blackberry
how-to-check-network-connection-type-in-blackberry

I need to execute a user space application every time a USB device is connected

I am working with an embedded platform. Typical software in this devices are Linux 2.6 + Busybox, so resources are limited.
I need to run an user space application every time a USB device is connected. I need to pass as parameter to this user space app the DeviceID and ProductID.
I don't really know which strategy should I follow to achieve this:
Writing a linux kernel module.
Doing it from inside the kernel (usb drivers) i'm currently doing this, but i dont think its the best way to do it
A user space app that 'polls' for usb connected devices.?
Which one should be the best way?
Thanks for your answer!
If you want to remain in user space, then you can use libudev.
You have an example here. You can extract product id and device id from this.
Even though other options like #aisbaa mentioned, modifying kernel is interesting and challenging one. I suggest you to modify the USB driver. Reason is, you need to send the arguments to the user space application(Product ID, Device ID).
These Ids will be obtained in driver. so calling user space app with these Ids are my choice.
For calling user space app nice explanation available here.
To the best of my knowledge, there is a mechanism for USB hot plugging in the kernel.
When a hot plug event happens, the user can be notified. Unfortunately, I am not very familiar with the details.
Maybe linux-3.3.5/samples/kobject/kset-example.c will give you some ideas.

Using WiFi to triangulate instead of GPS

I know its probably possible, but is it practical and doable to try and geo-position someone using WiFi to triangulate...
Thinking if I was underground and didn't have access to GPS, could I setup WiFi spots around the place to help locate someone.
Or if I was on a plane or a train (which is constantly moving), could I setup WiFi spots around the place to help locate someone.
Where would I start in doing this? Is there software components/infrastructure? If not would it be possible to do this... i.e. at a router level add location information to the packets about which router the incoming message was coming from and then the server being able to pick up on this...
This is exactly how the Skyhook database (built into many phones) works. It uses cell towers and WiFi points to triangulate the position in the absence of a GPS signal.
Google also does this with their street view vans—they look for open wi-fi networks as they go, and record their positions.
This is already widely available. Google the terms wifi location aware.
This is how laptop "Lo Jack" theft recovery systems work, for example.

Ethernet MAC address as activation code for an appliance?

Let's suppose you deploy a network-attached appliances (small form factor PCs) in the field. You want to allow these to call home after being powered on, then be identified and activated by end users.
Our current plan involves the user entering the MAC address into an activation page on our web site. Later our software (running on the box) will read the address from the interface and transmit this in a "call home" packet. If it matches, the server response with customer information and the box is activated.
We like this approach because it's easy to access, and usually printed on external labels (FCC requirement?).
Any problems to watch out for? (The hardware in use is small form factor so all NICs, etc are embedded and would be very hard to change. Customers don't normally have direct acccess to the OS in any way).
I know Microsoft does some crazy fuzzy-hashing function for Windows activation using PCI device IDs, memory size, etc. But that seems overkill for our needs.
--
#Neall Basically, calling into our server, for purposes of this discussion you could call us the manufacturer.
Neall is correct, we're just using the address as a constant. We will read it and transmit it within another packet (let's say HTTP POST), not depending on getting it somehow from Ethernet frames.
I don't think that the well-known spoofability of MAC addresses is an issue in this case. I think tweakt is just wanting to use them for initial identification. The device can read its own MAC address, and the installer can (as long as it's printed on a label) read the same number and know, "OK - this is the box that I put at location A."
tweakt - would these boxes be calling into the manufacturer's server, or the server of the company/person using them (or are those the same thing in this case)?
I don't think there's anything magic about what you're doing here - couldn't what you're doing be described as:
"At production we burn a unique number into each of our devices which is both readable by the end user (it's on the label) and accessible to the internal processor. Our users have to enter this number into our website along with their credit-card details, and the box subsequently contacts to the website for permission to operate"
"Coincidentally we also use this number as the MAC address for network packets as we have to uniquely assign that during production anyway, so it saved us duplicating this bit of work"
I would say the two obvious hazards are:
People hack around with your device and change this address to one which someone else has already activated. Whether this is likely to happen depends on some relationship between how hard it is and how expensive whatever they get to steal is. You might want to think about how easily they can take a firmware upgrade file and get the code out of it.
Someone uses a combination of firewall/router rules and a bit of custom software to generate a server which replicates the operation of your 'auth server' and grants permission to the device to proceed. You could make this harder with some combination of hashing/PKE as part of the protocol.
As ever, some tedious, expensive one-off hack is largely irrelevant, what you don't want is a class-break which can be distributed over the internet to every thieving dweep.
The MAC address is as unique as a serial number printed on a manual/sticker.
Microsoft does hashing to prevent MAC address spoofing, and to allow a bit more privacy.
With the only MAC approach, you can easily match a device to a customer by only being in the same subnet. The hash prevents that, by being opaque to what criteria are used and no way to reverse engineer individual parts.
(see password hashing)
From a security perspective, I know that it is possible to spoof a MAC, though I am not entirely sure how difficult it is or what it entails.
Otherwise, if the customers don't have easy access to the hardware or the OS, you should be fairly safe doing this... probably best to put a warning sticker on saying that messing with anything will disrupt communication to the server.

Resources