How can I use Bluetooth 4.0 LE to detect/measure proximity to a PC (Windows 8.1)? - windows-8

I have a crazy dream that one day I'll be able to way into my rec room and my lighting system will turn on based on my proximity to the seating area. I've played with home automation (SmartThings most recently, the proximity sensor is unreliable and has no way to measure room area proximity), motion sensors, etc... but none of them actually do what I want, and that is detect if I'm in a room for real, not if I'm waving my arms in front of a sensor.
One idea I had was to measure the SNR between WIFI devices. I was thinking of playing around with some wifi survey tools and see what I can measure in my home. The problem I think will be sensitivity and range. Wifi's range is typically intended to try and cover a home, so if I go that route, I'm worried it'll be a waste as I'll only be able to measure when I arrive home, not if I'm in a specific room.
The other approach I'd like to try is Bluetooth 4.0 LE. The Bluetooth GATT specification includes a Proximity Profile, but the problem with profiles is it's something that a Bluetooth enabled device would share with another device it's peered to. e.g. You have a proximity sensor in your pocket and it shares proximity info with a PC or another device.
In my case I'm hoping to try using my iPhone as the marker, and my HTPC as the measuring system. The HTPC can continuously measure the RSSI or SNR of any paired Bluetooth devices without having to actually exchange profile data with the device.
I could do something like write a Windows app/service that registers or watches for a paired Bluetooth device to connect. (such as when I get home and my iPhone auto-pairs with my PC, just like when you get in your car and it pair with your stereo) From there it would measure the SNR as a source of distance information. If the SNR is high enough (least noise, strongest signal) it could automate doing something. I was thinking sending a HTTPS call to my Smartthings hub to turn on my lighting system.
When the SNR drops too low (lower signal strength), it would again send a call to turn off the lighting system.
This method could work with any device that bluetooth pairs. The concept would work with pretty much any platform, not just Windows. Like in a Raspberry Pi with Bluetooth.
Does anyone know if this is possible or am I crazy? I was going to grab the Visual Studio C# 2013 Express IDE when I get home and see what the Windows 8.1 APIs let me get access to.
Also, Bluetooth 4.0 LE should be nicer to use. I was hoping that a heavy, full Bluetooth connection wouldn't be needed as I simply want to detect the device within a small range. (25' of free air)
Thanks.

Related

How to get animal location GPS receiver information to a webserver

I am new to development using GPS so any help will be most appreciated.
Project:- I am attempting to locate gps tracking hardware for a student project to locate animals.
I do not want to use cell phone SMS or yearly subscriptions packages as this is not practical where there a number of animals to be tracked. A solar powered device would be a bonus?
My understanding is the following will be required:
A GPS receiver (to get the gps location from satelites) - result is a 'navigation message'. This hardware device would be on the animal.
A transmitter with an antenna which will listen out for radio waves on set frequencies from the receivers, amplify them and its tuner will filter based on a particular frequency.
The 'navigation message' (or number of navigation messages) would be held on the the transmitter.
I am not sure if I can get an appropriate hardware transceiver with both the receiver and transmitter in 1 that can be attached to the animal?
The data would then to be sent over the internet from the transmitter to a web server via a HTTP request and parsed to be stored on the database.
A phone app / web app could then query the database to identify where the animal is at its last stored location or analyse data to determine its route over time when required.
If you have any advice / suggestions on the process above or advice on types of hardware / location of hardware to complete this project I would really appreciate it.
Polly, here are a few commercial solutions for GPS Animal Tracking. Some are rather expensive, but at least this shows what is out there professionally.
I think one of your primary issues here is battery power, size, and weight. GPS receivers use a fair bit of power when on, so it would have to be "off" but for a few seconds every-so-often, the rate determining how long the batteries will last. Solar recharging is an idea, but is that compatible with these particular animals?
If you wanted to construct something like this, there are a vast array of GPS modules to start with, depending on how integrated and customized you want to get with the idea. But these are receivers only - they will not broadcast anything. To get the GPS data remotely, you're going to need both a way to store the GPS data, and a transmitter (your #3) to send it to you. Since the transmitters would be small and low-power, this will limit the range you can receive them from. Not impossible, just a little more challenging.
Is a web developer available that can write that web and database code?
Is a phone developer available for the phone app?
Here are some interesting articles from others that have DIY their own low-budget trackers. I hope this gives you some ideas.

Getting the Mac addresses of all devices in a building

Me and my team we are working on a project for University. Our goal is to prevent people that are outside of a specific range to enter our wireless network. Lets say u are sitting in Starbucks and next to that there is another coffee shop. If u are a starbucks customer you will be able to enter the network and surf the internet. If you are sitting at the coffee shop next to starbucks though u will still see the wireless on your device but you won't be able to connect, or if you connect you will get kicked automatically.
My question is . Is there a way to get all the mac addresses of all devices in a specific area (Sturbucks building) and then only allow those to enter the wireless network. If thats possible through a mapping of a network or a device we don't care. We just want a way. And also is there a way to determine where exactly is a device,its location ? With or without a GPS.
The answer of all your questions is: NO.
You cannot get the mac adresses of foreign networks (sturbucks) without hacking the routers
You cannot get the location of a device in general. If the device is connected to your router, hotspot, Wlan, etc, you then could know that. In generall you cannot get the device GPS position, only if the user of the device allows that.
The other location possibility is the cell tower the user is logged in, that does not help you because you will not get the info in wich GSM cell the user is connected, without hacking the GSM network, and probably sturbucks and the uni has the same cell tower.
Remain wlan locationing: Here the same, the device might know it but you not.
Update:
There is one solution I remember now. Remeber the waste bins installed in London on public roads, they track when user pass by. They behave like WLAN devices, and track the mac adress. You could create such a system, maybe you cannot buy that. And place it near the entrance of the shop. Users which pass by have their mac adress recorded, you send that mac to your special wlan router and add that macs dynamically. Another possibility would be the use of bluetopot but this has to be enabled on the phone:
Look at the system how Apple's low energy blue tooth "location beacons" work: It is build for indoor positioning. you can triangulate the signal strength of a device. But probably the effort is beyond your project budget. (And still the useres woul dhave to enable blue tooth)

How can I send/receive data to/from my samsung s3 to a (medical) device via an arduino board (wifi + usb)?

I am new to using arduino board. I will like to connect my samsung s3 to a medical device via a an ardunio board.
The first idea is to send/recieve data to/from the phone to the medica device via usb on an arduino board and the medical device recieve/send data from/to my phone via usb on the arduino board.
The second idea is send/recieve data to/from the phone to the medica device via WIFI on an arduino board via usb and the medical device recieve/send data from/to my phone via usb on the ardunio board.
Thanks for your proposed solutions.
All problems, including this one are best approached in increments. In this particular case, I assume you already have an arduino with a WiFi shield and a Samsung s3.
You don't mention the medical device or how it is programmed. But first, concentrate on how to get the Samsung to talk to your PC via wireless. In doing this you will learn a lot about how to write code for the Samsung and how to write code for a PC/Wireless connection. There are probably already sample applications that do this.
Next, identify how the arduino board will connected to the medical device and make the same connection from the arduino to your PC. Get this connection to work. I know there are many examples of how to do this.
Next, get the Samsung to talk just to the arduino board which maybe turns on an LED. Since you already learned how to code the Samsung to do wireless in the first step, then this step might be easy.
Next, connect the arduino to the PC and have the Arduino pass data back and forth between the PC and the Samsung.
After you have this "stack" of: Samsung <==> Arduino <==> PC working then consider what it would take to replace the PC with a medical device so that you have:
Samsung <==> Arduino <==> Medical Device
You can design your own series of incremental steps based on your more specific knowledge of the devices that you have. But the idea is the same, each step is something easy to do and easy to debug. But taking all the steps results in a complex system!
No one is able to do what you want on the first try (unless they have already developed the same or similar system). But everyone is capable of learning new material, if they are persistent.
Please keep me informed as you work on this, it is an interesting project!!

How to get device Bluetooth address on OS X?

I've looked over the IOBluetooth framework what feels like a dozen times, but I can't for the life of me find a way to retrieve the Bluetooth device address for the current device. I've written an application that scans for devices in range utilizing IOBluetoothDeviceInquiry, but this doesn't seem to offer up the address of the device doing the scanning.
How might this be accomplished programatically? (Without opening up System Profiler)
[[IOBluetoothHostController defaultController] addressAsString]
or getAddress: if you want a BluetoothDeviceAddress.

GPS modem that can send data to our server

We are planning for vehicle tracking system. We would like to relay on GPS Tracking System and view position report via Google Maps.
For hardware requirement we are thinking of GPS modem that can transmit data to our system.
Which GPD Modem is suitable for my project?
Use a smartphone. Haha.
On a more serious note, since it's for vehicular application only, there are a lot of companies that manufacture GPS modules (u-blox is one of them). Just google and you'll find thousands of companies manufacturing them. But before you choose a GPS module, make sure you check the regulations of your target country. If the module works on the Iridium satellite network, countries like India & China won't allow it as Iridium frequency is close to their military frequencies. In Europe you'll be better off with the Inmarsat network. So, do your homework & you should be good.
Also, if you're developing your own map interface, you might wanna ask the manufacturer if they have any existing mapping interface you can hook into or disable. You mag be charged for either.
All the best!
Are mobile networks (like GSM/GPRS/UMTS) available where you are?
if so check-out the tracking products from this site or this site (Google keywords: GPS GPRS)
If not, you should consider a custom solution, maybe someone like this company can help...
I have worked on a project that involved sending data over GSM/CDMA network. It used a simple GSM/CDMA modem connected to an embedded linux device and was a stationary piece of hardware. Attach a GPS device and it may very well be a tracking system. The problem is when the network drops or the device moves out of the network coverage area. I am not sure if there any GSM/CDMA modem available with GPS added to them as we didn't have this facility in our hardware and it was very much desirable. We needed to use a separate GPS device, mostly iPhone, separately to determine the lat long of our device.
You can use any GSM/GPRS modem equipped with GPS device. The modem will forward the GPS data to your central server through GPRS and at the server side you just need to process rcvd data and display it on google maps.