Using BLE between devices with React Native

梦想与她 提交于 2019-12-13 03:49:52

问题


I am trying to make an app that uses Bluetooth Low Energy between two smartphones in proximity using React Native.

I am looking at react-native-ble-manager but i don't understand how to create the "server" (or in this case peripheral) part.

I understood the methods to discover and connect to a peripheral but I don't understand how to make a smartphone (with enabled bluetooth) listening incoming connections.

How can I listen incoming connections with BLE?

Thank you in advance for your answers


回答1:


For any BLE connection there has two part, i.e central and peripheral.

react-native-ble-manager is a central library. You can not create peripheral using this. Also, every smartphone does not have peripheral mode enabled. So in the situation, you can not use your application properly.



来源:https://stackoverflow.com/questions/47678609/using-ble-between-devices-with-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!