Is it possible to detect sensor support on a Firefox OS device? - sensors

I'm planning to add support for various sensors like light sensor, motion sensor, orientation sensor and proximity sensor to my Firefox OS app. But while trying to understand how those device APIs work, I cannot seem to find an API call to detect whether a specific sensor is supported by the underlying device hardware. Is it possible to do that in any ways from an app?

Hey you have proximity sensor API here < https://developer.mozilla.org/en-US/docs/Web/API/Proximity_Events >
You can find boilerplate app here which uses proximity API and other couple of API's here< https://github.com/robnyman/Firefox-OS-Boilerplate-App >

Related

How to track mobile devices around beacon

I saw a video about a Pi 0 that has been coded to track the amount of people that are in a location at a certain time to report the data to an app that tell's people if the area is busy. This does not require for the tracked devices to be connected to a wifi.
How would one go by that? Are there specific node modules?
Thank you in advance
The RPi Zero is able to discovery nearby Bluetooth devices if those devices are advertising there presence.
The command line tool bluetoothctl allows you to scan for devices to test this.
To do this with code, BlueZ has a set of APIs which are documented at:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt
There is an example of how to discovery with the API using Python at:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/test-discovery
The BlueZ API uses D-Bus so can be used with any language that has D-Bus bindings.
https://www.freedesktop.org/wiki/Software/DBusBindings/

Open BLE sensors tracking heartrate?

I have trouble finding devices from the market that send live data of heartrate via bluetooth.
Getting SDKs from big companies is a tedious task, and therefore I need just a simple device, which is possible to pair to native Android or to Unity via plugin.
Any suggestions?
All Polar products will fit your needs. I recommend the Polar H7, H10 or OH1.

HoloLens Geolocation Scenarios

I have a number of required business cases for HoloLens that require the device to understand a general geolocation, such as the current wearer longitude and latitude within 10 meters or so, as well as sending location information to and from an endpoint during various processes. Users WILL have a mobile device with geolocation capabilities that could assist in the process if necessary, and could also be used as a WiFi hotspot.
Is this a reasonable and reliable use case for HoloLens? Can apps be created that use geolocation and maintain connectivity during an experience, either on their own or with real-time communication to and from a mobile device that has these capabilities?
Yes - definitely is a realistic scenario. I've done some integration between a blue-tooth GPS and the Hololens. Let me know the particular device you're looking at and I'll see if I can get it working with the Hololens. //Lance Larsen (Microsoft MVP) - www.lancelarsen.com

Multiple Eddystone-URL/UID's from same Bluetooth Beacon?

Is it possible to program a BT beacon to advertise a sequence of different Eddystone-URL/UID's in sequence? I imagine I could from something like a Raspberry Pi3 with a BT adapter, but I was wondering about something like an actual beacon.
Yes, this is possible. This technique is called "interleaving", and it is possible to do with both software beacons and hardware beacons.
Eddystone actually relies on this technique in order to match its multiple frames. When a receiver sees an Eddystone-TLM frame coming from the same device as Eddystone-URL or Eddystone-UID, it knows that the telemetry is for that beacon frame.
Using the same technique, it is possible to send out multiple URL or UID frames from the same device using different identifiers for each frame. Some commercial manufacturers such as Radius Networks support doing this in some of their products.
I dont think so. Im pretty sure you would need to have some smart device nearby that is running a program that is periodically changing the UIDs. The micro-controllers that power these beacons are pretty bare bones and are really optimized for transmitting bluetooth signals.
Here's how to do it.
EddyStone supports four types of payloads/frame-formats i.e, UID, URL, TLM, and EID.
Eddystone UID/EID are the frame-formats to use for this purpose.
As far as using the 'NordicSemiconductor NRF line' of beacons just make sure that these are fully Eddystone compliant i.e, support the EID frame-format.
Freely available Google Beacon Cloud platform is great for trying this out (called 'registering and provisioning your beacon').
It can be implemented w/o building or requiring any custom app at the client end.
On the client-side.
Use 'Google Nearby Notifications' & 'Google Nearby Messages'
On the server/cloud-side.
Google Proximity API for 'registering and provisioning your beacon'
Use 'Google Nearby Messages' API
Good luck with your project .

Wireless protocol for accelerometer data

I'm building an application where a mobile phone with an accelerometer is used to control an app on a computer in a similar way you would use a mouse. So I need to send the movement from the phone to the computer over some wireless protocol. I am thinking about using Bluetooth but I am not sure what transfer delay to expect. Another possibility is using 802.11g. What do you think? What delay could I expect given that I don’t hit the bandwidth limit?
I worked with a group at Motorola who linked up an external accelerometer pack to a mobile phone using Bluetooth. This work supported a mobile games development class at USC's GamePipe Laboratory, and the speed was sufficient to control the mobile games developed by the students. You'll need to make sure your handset's Bluetooth stack has the correct profile enabled to allow data communication.
Another advantage of Bluetooth over 802.11g is that the frequency hopping Bluetooth uses will make it less vulnerable to interference by all the other 802.11 devices in the vicinity, which sit on one frequency.
I wouldn't expect the amount of data sent by an accelerometer would give Bluetooth any problems.

Resources