2

I am currently developing an application where I connect from an Android/iOS app to the Raspberry Pi 3 via Bluetooth/BLE. Once paired, the RPi will send temperature measurements to the mobile app.

I searched the internet, and honestly I found many articles and forum topics where they address these issues, but I wasn't fully satisfied with what I found (no step by step guide for newbies).

Skills missing to accomplish this:

  • Creating a node js server that sends data through RPi BLE/Bluetooth
  • Creating a mobile app that connects to RPi and gets the data.

I know there are million ways to do it, but I need the best and quickest solution. I already know how to develop Android Apps, but also I prefer using something like Cordova/PhoneGap (Fast and multi-platform)

Can you please suggest any guides for me to ramp up quickly?

4
  • I think the first problem is node.js - From what I understand that is a web only interface, so it requires something like nginx. Bluetooth does not support web interfaces - the closest thing would be RFCOMM Serial data. Creating an app... native android you can use Ecclipse or Visual Studio with Xamarin Forms for Android.
    – Piotr Kula
    Commented Aug 6, 2016 at 19:51
  • @ppumkin Thank you for your comment. Can you please suggest another alternative for node.js on Rpi to accomplish this?
    – Nick
    Commented Aug 6, 2016 at 20:07
  • @ppumkin Node js has modules that will do this bleno and noble for example. Node does not require a separate web server. I would suggest reading this amazon.com/Make-Bluetooth-Projects-Raspberry-Smartphones/dp/… It will cover most of the issues involved. Commented Aug 6, 2016 at 20:17
  • That's pretty cool then. I suppose I just learnt to use a web server to expose the API to node. I need to look into that.
    – Piotr Kula
    Commented Aug 6, 2016 at 22:11

2 Answers 2

0

Of course you can ! You can go very low level and look into ATT/GATT interfaces and commands. They work like AT commands if you've ever used them.

But of course this makes it much simpler : https://github.com/sandeepmistry/noble

0

Well for the nodejs part it won't be very complicated. Follow a tutorial and find some way to send req to the server from whatever device you use.

I would recommand this library that would make the use of blueZ easier: https://github.com/intel-iot-devkit/tinyb

First develop your Rpi App using C/C++ and tinyb, once that's done, find a way to pass calls from your device to the server, to your app. You can do that either by using a C daemon that will handle on it's own the bluetooth or via a wrapper from Nodejs to tinyb. Depending on your skills you should go for one or the other solution.

It seems that I might be wrong and that "noble" can be used, but I feel like C approach would be more effective. But I cannot be 100% of that without trying it first. @Kevin Roy thanks for showing noble, looks awesome !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.