Raspberry PI or Mobile App


#1

Hello all,

Trying to figure out the best way to collect telemetry packets from 150 Location Beacons.

I was able to create a mobile app to collect packets from nearables but now I need a way to capture the telemetry packets from the Location Beacons. If its as simple of changing the nearable to beacon in the calls then cool thanks, but it can’t be that easy. Can it?

Ive spoken to heypiotr about it and he suggested using RPis. Looked into and it looks promising, but any one have any experience with doing something similar in a space roughly 10,000 sq/ft full of office furniture and people.

My use case is basically see packet with movement flag, update a firebase DB incrementally real time.

Was looking for any input from the community on this.

Thanks


#2

@DaveM

Hi I have and still am currently developing software on the Raspberry Pi which sounds pretty close to what you are doing. The Raspberry Pi 3 has built in bluetooth and wifi any other versions of the Pi you would have to buy dongles for.

The programming language I am using on the Pi is Node.js with a library called Node-Bleacon, a simple search will give you the git hub repository.

I use this to scan for signal strength and distance and log it to a file then run a python script that reads the file and does the calculations/rest of what I want. There is another library part of node-bleacon that allows you to set or read: Name, Tx Power Level, Read Uuid, Write Uuid, Read/Write Major and Minor, temp and motion. The API is well put together and easy to understand. make sure you install all the requirements for the library if you are going this route, the git hub page does tell you what you need.

I have used the bleacon part of the library and could better help you going in this route.

Any further assistance feel free to ask! :slight_smile: Hope it helped a bit.

Node-Bleacon(Git Hub): https://github.com/sandeepmistry/node-bleacon


#3

BTW, I posted example code which shows how to use bleacon to detect and extract the motion data from an Estimote Telemetry packet:


#4

@heypiotr your script works great !!!

@VRLabs Thank you also for you insight

I used A RPI 3 with BlueZ, Noble, and Node.js everything works great… just a bit of a delay with so many beacons around need to reduce the signal strength and I think Ill be in good shape.

Thanks again guys.


#5

Hey DaveM, how is that working out for you? We’re working on using the location beacons for something very similar. How stable is everything?


#6

Hey Piotr, why did you suggest going with a raspberry pi as opposed to a mobile app? not to criticize, just wondering what are the relative advantages?


#7

Hi @Shema_Kalisa ,
there is nothing wrong with using the mobile app and sdk, but there are way more APIs and libraries for the “PI” mostly because you can use a assortment of languages, Ex: Nodejs, Python, C, C++, Java, and Ruby. Some are preinstalled some you have to install. Also there are way more attachments for the “PI” then for your phone, say you wanted to turn your lights on when you walk into a room you have a pi monitoring the room and when you walk in with a estimate beacon attached to something the lights come on. This is just a simple example I thought of the top of my head.

The Raspberry Pi is very good at computing with physical objects due to its many GPIO pins

But to sum it all up it doesn’t really matter what you use, just what your project needs. It may work perfectly fine with a phone App or maybe you want to add something a little extra.

If you have any more questions feel free to ask, sorry I answered for @heypiotr Hope it helps :slight_smile:

P.S I used a PI in my project so I could add the ability to have LED indicators and start and stop buttons that’s why I went with the PI, its also a dedicated system.


#8

My personal thinking is: if you’re building an app that users will install on their smartphones, and those users will be moving in the area with the beacons, mobile is obviously the way to go (:

But some use cases don’t rely on users & their smartphones, e.g., you might want to put beacons inside some packages, and use Raspberry Pi statically mounted in some place, and track when beacons come and go inside/outside that place. (Because maybe you can’t rely on some user to always be there, have the app installed, have Bluetooth enabled, etc.)


#9

@VRLabs thank you so much for your feedback and input, its much appreciated! I was concerned about the app but for our use it makes much more sense- we want someone with no technical ability to be able to quickly get setup and using a cheap mobile phone means all they would have to do is 1/Open the app 2/Plug the phone in 3/ Turn on Wifi and Bluetooth

It seems to me that if you’re building a service to scale, unless your targeted users/customer or the folks placing the beacons and the node are technical/knowledgable, you need a solution outside of the Pi that can be quickly understood and set up. That being said, it looks like the Pi just offer so much more versatility. Will experiment with both and let you know how it goes!


#10

Sorry, for the late delay @Shema_Kalisa . But, everything worked out great. Had an issue with keeping the script running didn’t know about the & flag, that was just being a novice with using linux based commands.

I would recommend thoroughly testing out the broadcast interval, for your use case. The shorter the interval the more accurate the data on the collection side will be; then you can trim as needed.


#11

Thanks heypiotr! the problem is, we want an administrator or manager to be able to remotely access the telemetry data of each beacon, even if no one in the facility has an app on their personal device. In that case, just because we know that manager is not technically savvy, it makes sense for us to build a relay/transmit app and put it on a cheap mobile phone ( easy set-up for the admin. )


#12

@Shema_Kalisa, I used firebase which is a backend as a service from google. Will in realtime show any telemetry packet collected. Very simple and easy for what you had just mentioned.


#13

@Shema_Kalisa Glad I could help! Thanks keep me posted, would love to hear what you’ve done with the PI and/or the App


#14

Make sense @Shema_Kalisa! I guess my only comment would be, cheap smartphones usually have cheap/bad Bluetooth support and as a result could e.g. detect less packets. Definitely agree it’s much easier to set up though—tradeoffs, tradeoffs! (:

Great conversation overall, thanks everybody for chipping in!


#15

:slight_smile: @heypiotr you know it! Tradeoffs is the name of the game. Thats why I asked about the cassia bluetooth router :slight_smile:

Do you think an iPhone 5 would be robust enough?

Best

Shema


#16

I think iPhone 5 should be all right!


#17

Hello,

I am working on a proof of concept using estimote stickers and a Pi. I am able to use the code below to get a demo running. I have a couple questions, however.

How do I get proximity? I do not see that in the above code. I am talking about the simple 'immediate, near, etc.'
What are the units of the x,y,z acceleration?
Is anyone visualizing the data? If so, what tools are you using?

Cheers,
Peter