Using bluetooth as a proximity sensor. #1842
Replies: 11 comments
-
Posted at 2016-12-21 by dklinkman I think your phone would have to be 'advertising' in order to be 'discoverable' for Puck to be able to detect it and evaluate the RSSI. The Tessel 2 has native WiFi. Another option, perhaps, is to give your phone a static IP on your WiFi LAN, and then Tessel can detect your phone's 'arrival' and control the bulbs. Just thinking out loud. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by @MaBecker RSSI is an indicator for that - look at proximity-and-rssi Puck can do a find devices
there are some nice cell-phone apps like "BLE Scanner" for Android It defines three zones
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by JanDW Thanks to you both. I had considered the wifi option, but the reason that I want to use bluetooth is so I can more or less scope it to a room (== a particular puck). the rssi property on the objects returned by |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by dklinkman Ok good point. But I think you will find that your phone doesn't advertise itself continuously like the Puck does. My android phone, for example, only advertises when the bluetooth settings page is open. So the iPhone maybe isn't hiding, per se, but is just not advertising. Another possible issue as I also have with my phone, is it doesn't advertise as a BLE device. EspruinoHub for example doesn't see it. But from my PC I was able to add the phone as a Bluetooth device and send files and play music from it. Maybe you could do it in reverse and detect the Puck proximity from the phone, and then take some action. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by JanDW Thanks—Yeah, I think you're right it doesn't advertise itself. At first glance, it looks like on my mac I'm not seeing my iphone appear under "Open Bluetooth Preferences..." unless I open the bluetooth settings on my phone. So that supports your advertising theory... I didn't have any luck with the puck with my bluetooth setting open—even when I set changed the scantime for NRF.findDevices() to 5000ms from 1000ms. It's an annoying thing to google, because no matter how I phrased my query, I just kept getting results about bluetooth devices not connecting to an iPhone. I didn't see the pucks show up as bluetooth devices on my iPhone either (or on my mac, though it did work through web bluetooth). I'm not sure what's going on there. I bought the make:bluetooth book, which has a project for a BLE doorlock which unlocks with an iOS/Android phone, but it involves creating a phonegap app, etc. However, it uses the phone to require the user to enter a security code, while I just want to use proximity. I also don't want to have to take my phone out and start up an app: at that point I might as well open the Philips Hue app and turn on the lights that way :) It'd be so much easier if I could just have the puck see the iPhone and contact the Tessel over bluetooth. Anyway, looks like I'll have to gain a better understanding of BLE. Seemed like this would be easy, but nothing... ever... is... sobs |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by JanDW Uncle Google finally had some words of wisdom to impart, I suppose this might be the reason?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by JanDW
On the puck.js kickstarter page it says HID is supported though... Oh well, I'll stop posting and see what I find... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-22 by Spocki |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-23 by JanDW @spocki Thanks, that looks useful. I'll hopefully have time to experiment next week. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-04 by @gfwilliams Without an app on the iPhone, the best solution might be to use HID as you say. Just turn it into a keyboard and when you get the It might work - otherwise you'd need an app I'm afraid... Or you might be able to do something by turning the Puck into an iBeacon? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-04 by user72083 I had thought of iBeacons but wasn't quite sure what they can do. Thanks for pointing out some directions. I'll look into it and will report back if/when I get it working. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-12-21 by JanDW
Hi all,
I was wondering if it was possible to have the puck to act as a proximity sensor.
I have Philips Hue bulbs in my office (which can be controlled via a REST API) and a Tessel 2.
I was wondering the puck could see my phone BLE (can it measure the strength of the BLE signal?) and send an event to the Tessel over Bluetooth. Could someone point me in the right direction?
The tessel could then control the bulbs over WiFi.
Thanks,
Jan
Beta Was this translation helpful? Give feedback.
All reactions