Bluetooth connection via HID/HSP profiles (Smartphone/PWA to IoT device) - bluetooth

Bluetooth connection via HID/HSP profiles (Smartphone/PWA to IoT device)
We are developing an IoT device and face issues with automatic connectivity to the smartphone via Bluetooth, as we have to use a PWA instead of a native app.
We consider using a standard profile (e.g. Headset Profile (HSP), Human Interface Device Profile (HID)) to enable communication via Bluetooth between device and PWA.
We now require a workaround for the following issue:
When using HSP/HID, existing connections to the smartphone's hardware (e.g. headset, keyboard) can be interrupted.
Have you faced similar issues and do you know workarounds for this?
Are you knowledgeable about alternative connection mechanisms (e.g. NFC, SIM) to connect IoT with PWA incl. pros and cons?

Related

implement bluetooth connection for all smartphone users in react-native

I want to scan and connect devices using Bluetooth in React-Native. I tried react-native-ble-manager and react-native-ble-plx plugins.
But I have a problem these plugins connected to special devices that have peripheral mode enabled. Look this answer.
Question:
How can I implement Bluetooth for all (at least all smartphones) devices in REACT-NATIVE?

How exactly does the new Bluetooth Mesh network handle provisioning?

I have read in a couple of places (but nowhere official) that you need to use a smartphone to setup and add devices to a mesh. Is that true? Can you not do it with IR or a NFC? What are my options?
Bluetooth Mesh defines the Provisioner as the device that is able to create a mesh network and add (provision) new nodes into the network.
A Provisioner does not necessarily have to be a smartphone, although that will generally be the case. Provisioning is performed over Bluetooth channels - either over advertising channels (using a new protocol defined by Bluetooth Mesh), or over GATT (to support legacy smartphones that cannot advertise custom AD types).
To provision nodes over the advertising channels (the so-called PB-ADV bearer), the smartphone OS needs to be updated to allow developers to implement the PB-ADV protocol. That is not likely to happen soon enough.
Therefore the best option will be to provision nodes over GATT. The unprovisioned node (e.g., the sensor) will have to include the Mesh Provisioning Service in its GATT Database. The smartphone (as GATT Client) will connect and discover this service, and use its characteristics to exchange Mesh Provisioning PDUs.
You can wait until some companies will develop these smartphone apps, or, if you are in a hurry, you can grab the Mesh specification available on the Bluetooth website and develop a provisioning app yourself. The current smartphones' OS allows you to develop a GATT Provisioner (both on Android and iOS).
In general, a phone/tablet class device is needed for provisioning. IR or NFC can be used for OOB authentication, but the full Bluetooth mesh stack is required to initiate and complete the provisioning process.
A good reference as an introduction to Bluetooth mesh can be downloaded from the bluetooth.com web site Bluetooth mesh Introduction for Developers.
At the moment, the best place to start is the Nordic Mesh SDK that uses the Bluetooth SIG mesh. This has an example (for lighting) where a Bluetooth device itself does the provisioning. There's also a 'Serial' example where, again, a Bluetooth device does the provisioning connected via UART to USB that can be controlled via a desktop/laptop. You could extend the examples so that the provisioning BT device has extra GATT services that open up the provisioning to smartphones.

Device to device communication in Windows 10 IoT Core

What technologies are recommended when we want to do Device-to-device communication in an IoT Scenario? Does Windows 10 IoT Core have support for this type of communication? Could I use AMQP connections for this?
Device to device communication can happen on multiple levels. Setting up an AMQP server might be feasible using implementations like Apache QPid but this doesn't seem like a responsibility device should be bothered with. You could run an API server on a W10 IoT Core device for other devices to communicate with.
There are specific standards like AllJoyn that lets us communicate device with eachother and Windows IoT Core has native support for this. Take at look at the samples to find out if this fits your scenario: https://developer.microsoft.com/en-us/windows/iot/win10/samples/alljoynjs

App Specific Bluetooth Pairing

I was wondering if there's any way that I can control BLE device pairing specific to my app running on mobile device?
I do not want to write my own bluetooth profile so that only my app can talk to the BLE device instead i want to standard profiles available in BLE device but when it's paired to my phone, only my app should be able to communicate to it and none of the other apps should be able to communicate.
No don't do that.
If you MUST then you should encrypt your data with a key only your app knows.
Bluetooth Low Energy is supposed to be open and free for all.
What is the purpose for you to block others? Preventing them to block your service?
Then use some pre-shared key to verify that it's your app in both sides and close the connection if it's not.

Bluetooth services on Google glass

Has anyone tried SPP service (RFCOMM) on Google glass? I couldn't find any documentation anywhere listing what kind of Bluetooth protocol or profile that Google glass supports.
I have run an OBEX service search on the glass, and it seemed like Google glass doesn't support OBEX. Other than OBEX, what other BT profile is known to work properly on the glass?
So for SPP service (RFCOMM) you can use the UUID "00001101-0000-1000-8000-00805F9B34FB" as you might already know, I'm using this and it works fine at 115.2K of baudrate.
Then in a separate thread you manage the connection, if you go to the developers portal of Android they have an explained example and good info of the protocol.
Using the Bluetooth APIs, an Android application can perform the following:
-Scan for other Bluetooth devices
-Query the local Bluetooth adapter for paired Bluetooth devices
-Establish RFCOMM channels
-Connect to other devices through service discovery
-Transfer data to and from other devices
-Manage multiple connections
Hope this helps!

Resources