Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29910

receive data in Raspbery Pi 4 with Android and BLE

$
0
0

I have learned a lot about Bluetooth Low Energy in the past 2 weeks.

I pretty much understood the concepts with the peripheral and central mode etc.

I explain to you what I want to do:

  • SMARTPHONE_1: Install a React-Native application that allow sending text as JSON to Raspbery Pi 4 with Bluetooth Low Energy.

  • Raspbery Pi 4 with Android OS: Receive data (sent by the application on SMARTPHONE_1) in a React-Native application and do something.

In SMARTPHONE_1, I used the [react-native-ble-plx] (https://github.com/Polidea/react-native-ble-plx) (central) library to list the devices, connect to them, retrieve the BLE services / characteristics, and send my data. To do my tests, I used [nrf connect] (https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=en) (an Android application on another phone) allowing me to configure a SERVER GATT with my customized services / characteristics.

Everything is working.

But how do I do the same with the Raspberry Pi 4?

I don't find effective libraries to create its own services / characteristics via React Native (like nrf Connect), except this one which seems to be used for debuging[react-ble-peripheral] (https://github.com/himelbrand/react-native-ble-peripheral#readme)I can't find any others.

I wanted to install Android on Raspbery Pi, advertise with my customized services, and receive data (from SMARTPHONE_1) via the Android application installed on the Raspbery Pi.

I saw that we could use Bluz for Raspberry Pi, to potentially configure services / characteristics but would it work with an Android OS?

But then, will it be possible to recover the data via the installed Android application in Raspbery Pi?

Sorry if it sounds confusing!


Viewing all articles
Browse latest Browse all 29910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>