implement bluetooth connection for all smartphone users in react-native - bluetooth

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?

Related

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

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?

Can chrome web bluetooth api connect to a Bluetooth V4 device?

I have read that Web Bluetooth API can connect to Bluetooth BLE devices. I understand that BLE is a part of Bluetooth V4, but will Web Bluetooth connect to a regular V4 device that is not BLE?
The version number in Bluetooth is mostly irrelevant. More optional features are added in every new version, but that's it. BLE was added in version 4. "Regular V4 devices" does not make sense. If you refer to "Bluetooth Classic" or BR/EDR devices, these are not BLE devices. However you will be able connect to these devices in Web Bluetooth if they run a GATT server, if the OS supports it, since GATT can also run over BR/EDR.

Grouping multiple Bluetooth devices

I'm developing an Android app that manages multiple Bluetooth LE devices such as speakers, lighting devices, various sensors.
For user convenience, these devices have to be 'grouped' together and only accessible through a single Bluetooth connection.
Is programming some kind of custom intermediary hardware to serve as an interface required in this case or are there some better solutions?
It is possible to group bluetooth device by the profiles they implement https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles . In Android the profile of a bluetooth device can possibly be determined like in In Android, how to get the profile of a connected bluetooth device?

Is there a way to connect to iBeacon while my Bluetooth device is invisible?

I'm researching iBeacons. Can I connect to iBeacons while my Bluetooth is invisible (to be protected from hacks)?
I don't have beacons to test myself and can't find any clear explanation online.
iBeacons connect to mobile phones using Bluetooth, so it is essential to have that turned on. You also need to have installed an app with iBeacon support in order to receive communication from them.
If you'd wish to use a solution that does not utilize Bluetooth, you could try out IndoorAtlas. It's an indoor navigation technology based on Earth's geomagnetic fields. It's also completely hardware-free solution, just requires you to collect fingerprints in the area you are going to use for your project.
Three points:
iBeacon technology does not rely on a bluetooth connection to your phone. Beacons are one way transmitters. They do not listen to or otherwise receive any info from your device. Beacon technology following this model is inherently privacy friendly.
Mobile devices cannot detect Bluetooth beacons with the Bluetooth radio turned off. Sorry, it is just not possible.
Properly built beacon apps will not expose your mobile device's Bluetooth info because they are receive only. Of course, other apps on your phone might use bluetooth for other purposes, so your best bet is to audit apps using bluetooth and remove any that are not doing what you want.
I just bought some beacons and tested that, The answer is YES. it is possible to read beacons mac addresses while using the phone's Bluetooth connection as invisible. Using this you will get access to your beacon in any open place without getting hacked through Bluetooth.
Thanks all for your answers.

Bluetooth support on Android Emulator

I want to know if the developer team which made the emulator have some information to make bluetooth work in the Android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future.
as far as I know there is no support in the emulator for bluetooth. And I will have to teach android and bluetooth in some classes. And the students will need to code stuff and test (guess it) in the android emulator.
So I came up with a bare-bone reimplementation of the android bluetooth API on top of tcp. You can find it on here on github.
Basically, you run a tcp-server on your machine, and the emulators will connect through it.
Instead of using the classes in the package android.bluetooth, you just need to use the classes in the package dk.itu.android.bluetooth (and other 2 little modifies).
As for now it supports:
switch on/off the "radio"
discovery devices (only other android emulators)
creating bluetooth services
connecting to bluetooth services
It's not much, but until we got some more from the android guys, I guess there is nothing else around.
Hope it'll be useful, cheers!
The documented bluetooth limitation appears inconsistent with the qemu -bt option. So, how is bluetooth enabled in the emulator so the -bt options can be used, or at least to know that bluetooth is supported?
The target/board/.../BoardConfig.mk having "BOARD_HAVE_BLUETOOTH := true" doesn't provide a bluetooth icon or enable bluetooth. So, how do we turn on bluetooth on the android qemu emulator?
What does it mean that bluetooth is not supported given the -bt option for emulating USB devices that were provided in 2008? The post and limitations are outdated.
The functional limitations of the emulator include:
No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
No support for USB connections
No support for device-attached headphones
No support for determining network connected state
No support for determining battery charge level and AC charging state
No support for determining SD card insert/eject
No support for Bluetooth
http://developer.android.com/tools/devices/emulator.html#limitations

Resources