I have a Project to send data from flutter to Arduino to do some tasks, I was working with HC -05 and 'serial Bluetooth communication library' but I found that isn't support Low energy Bluetooth, so I have to work with 'flutter_blue' and I can't find exactly how just send data like "1"
if someone has already work with something like that, help me and thanks
method to how can I send data with this library "Flutter blue"
'how can I send data with this library "Flutter blue"?'
There is an example there in flutter blue page (https://pub.dev/packages/flutter_blue) on how to get and send data to a BLE device.
await c.write([0x12, 0x34])
There are initial steps before the app can read and write data to the BLE device. Basically, the steps consists of scanning, connecting, and discovering services. After that, the app can start reading and writing data. Data are written(or read) to (or from) a 'characteristics'. The app can also subscribe to a characteristics so it can receive data from the notification. These are just a general guide for communicating with BLE devices. You must know the details from the documentation of the specific device.
Related
I have made some apps in flutter (pedometer, heart rate, audio recorder) for the moto360 with flutter wear. everything works fine, but I don't know how to save the data on the watch and how to access the data on the smartphone. I have managed to send messages to the watch, but I can't send data from the watch to the phone. I can save my data on the smartphone, but I don't know how to manage it on the smartwatch. can someone show me a tutorial or an example? thank you so much!
how to get smartwatch data, how to retrieve steps count and heart rate etc. from a smartwatch with communicating Bluetooth in flutter so I have received Bluetooth device id and Bluetooth UUID. how to data read and get permission to data show the flutter app
I would like to build an app with Flutter that can read data from a Polar H9 or H10 heart rate monitor (Bluetooth).
I must say that I am a bit lost and don't see how to do.
I would appreciate some clues and a little guidance for it.
Thank you very much !
Best Regards
The best way to start with any new BLE would be to look for any kind of documentation describing the process of connecting and accessing the data. I found the official polar SDK on GitHub. It's written for either iOS (Swift) or Android (Java) but might help you anyway.
In case it is not possible to use native libraries with flutter you should start by using a generic BLE scanner such as nRF Connect to find out more about the device and the available BLE services. It could be that nRF Connect already recognizes the Heart Rate Service in case Polar uses the official Service structure. If that's the case you need to read the specification of the Heart Rate Service (Found here).
If they decided to use a custom service or protocol you could use nRF Connect to try to find out something about the device by sending some messages. This is a tedious process of try and error. A BLE sniffer might also help to collect data about existing communications between the sensor and a device.
I am looking for a package that can fit me in a flutter that will sync between smart watches like Samsung watch or Apple Watch. I want to get heart rate data from them. Anyone know of such a package or idea to communicate with the watch?
At present all of wear, tizen, and watch os have different mechanisms for obtaining this data natively, all of which would need a flutter MethodChannel mapping to expose to the flutter side. For wear you can use the wearable_communicator plugin for communicating via the data layer, but I’m not aware of any equivalent for the other two. Alternatively, you could publish this data from the watch to something like an MQTT broker and use an MQTT client on the flutter app to obtain the readings.
I'd be very grateful if somebody can help me. (I'm absolute beginer with Android).
There's a lot of code in the web, but I couldn't find anything suitable for my application.
I've an installation with some sensors connected to Arduino. All input data are collected in a String, and this String is sent via Bluetooth to an Android device every 1~2 seconds (depending on data availability from sensors). Is to be used for hours.
I made an App that receives the data (via Bluetooth) and shows all data in real time update in one layout, with the Bluetooth code in the MainActivity. Works well.
What I need is an App with three different Activities, all using the same String data from Bluetooth, and real time updated.
My question is how to build the App:
-Bluetooth running in a Service, and Activities connected to it?
-Which is a good way for real time update in any of the three Activities?
A similar example could be a weather station, an Android device receiving data via Bluetooth, showing the same weather data in three different layouts, with continous update.
Thanks in advance
I want to build some kind of two-way bluetooth connection on Raspberry-pi which actually works as beacon. Based on RadiusNetworks tutorial (How to Make an iBeacon Out of a Raspberry Pi http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html) I've built beacon on my Raspberry-pi, but it's working in "advertise and not-connectable" mode (which is connected with problem described here: Raspberry Pi iBeacon connection timing out).
What I want to achieve is beacon device, which works in advertise mode and also allows to receive some events from other device (i.e. iPhone). When iPhone discovers Raspberry-pi beacon I want it to send some data to Raspberry-pi to trigger some action. I know that in the simplest way my iPhone should send data via network to raspberry while it enters to the beacon region, but unfortunatelly my solution has to work in offline mode, so I'm looking for some kind of direct (and possibly fast) connection. I think that PayPal beacon is a good example of my needs (as it is decribed here: https://devblog.paypal.com/how-does-paypal-beacon-work/ their device works as gate for communication user smartphone with PayPal services).
I'm complete beginner in BLE topics, so I would be grateful for any hints where I can start exploration or how to properly ask Google for any good answers in this topic.
For complex interaction, you need to learn how to build a connectable Bluetooth service with BlueZ, which is the Linux open source Bluetooth stack. Once you have this service, you can write iOS code using CoreBluetooth to connect to this service when the beacon is nearby.
Unfortunately, I do not know of a good tutorial for building services on BlueZ. The BlueZ code is open source at least, so the code is a good place to start looking:
http://www.bluez.org/development/