Bluetooth detection via webpage - mobile

Does anyone have a script (or know if it is possible) to detect bluetooth via a webpage (without knowing beforehand if the device viewing the page has bluetooth).
What I'd like to do is check for bluetooth and poll for nearby devices.
Can this be done? Or could it be done if you knew what device someone was using? ie. is it OS dependent?

You cannot do this from a webpage, without the help of some sort of browser plugin.
Besides, I would have serious issues with a site that tried to "poll for nearby [bluetooth] devices" whenever I visited it...

Related

SIM Toolkit Permissions

I'm doing a research on STK, the thing that is missing is do I need user's permissions to send and receive data to the operator?
What I know so far is that this tool is preinstalled in operating system, so isn't already have full permissions to send and receive in the background?
Thanks in advance for the help :)
A lot of SIM cards support STK and yes it can be used to send/receive information.
Permission for a SIM to send an SMS is normally device dependent, I remember the older Nokia phones had a setting that would prompt the user "allow SIM to send message". In my experience most newer devices (both Android and IOS) are setup such that the SIM can send SMSs in the background without user awareness.

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.

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

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?

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.

Detecting dropped call in Mobile

I'm using Motorola device and developed it with J2ME . I'm searching for a functionality to detect incomming or outcomming calls when dropped .
I mean , when the call is dropped I need to recognize this event.
Thanks
There is no standard J2ME telephony API.
There could be a working proprietary java-based API on that particular handset but that's both unlikely and not obvious to verify.
You could use the life-cycle of the application to detect interrupts. Your device can detect when a phone-call comes in and ends, and trigger shownotify(), hidenotify(), startApp(), pauseApp(), then do something accordingly. See the canvas class. So if you have an application running, you can detect an incoming phone-call, wait for it to end then do something. This is of course very device/manufacturer specific and you are in a world of hurt when it comes to porting this for many devices. I'm not sure if you can do something like this for outgoing calls, since your app will be in the background and paused for most devices.
You could try checking the motorola developer webpage. Motorola has its own set of libraries for j2me, it may support the case you need.

Resources