Bluetooth Low Energy (BLE) In Flutter - BLE SCANNER

  Рет қаралды 23,507

Proto Coders Point

Proto Coders Point

Күн бұрын

#flutter #ble #bluetooth
Hello everyone! In this Flutter tutorial, we will delve into the seamless integration of a BLE Scanner within a Flutter application. Get ready to embark on this journey as we harness the power of the "flutter_blue" package, a vital component in our exploration of Bluetooth Low Energy (BLE) technology. Let's dive right in!
Source Code: protocoderspoi...
Support Proto Coders Point: www.buymeacoff...
_______________________________________________
Comment below for any queries 😀
Follow and support me:
🐦 Twitter: / rajatpalankar
💬 Facebook: / protocoderspoint
💸 Instagram: / protocoderspoint
Be sure to ask for help in the comments if you need any. Suggestions for future Flutter tutorials are also very welcome! :)
For mobile application development keep learning freely from proto coders point
Visit: protocoderspoi...

Пікірлер: 48
@pravinprince3221
@pravinprince3221 Жыл бұрын
Thank you for the wonderful video sir it is very useful for me and my team
@ProtoCodersPoint
@ProtoCodersPoint Жыл бұрын
Welcome 🤗, if you want tutorial on any topic comment down 😁
@gustavoalfonsorestrepomeji245
@gustavoalfonsorestrepomeji245 9 ай бұрын
Excellent work, we are waiting for you to create the video where it connects, sends data and also receives data. I am working on a project with an Arduino Mega and an HM-10 Bluetooth BLE module and this video and the following are very helpful to me. Thank you very much and blessings to your entire family.
@Grace-yc7ud
@Grace-yc7ud 9 ай бұрын
Agreed, really want to see a video on connecting and sending/receiving data!
@mehmetsinantatar1509
@mehmetsinantatar1509 6 ай бұрын
We would be very grateful if you could make a video about flutter_blue_plus this week. After adding the get package, I cannot import it. The same pattern applies to the flutter_blue package.
@ua9lif
@ua9lif 11 ай бұрын
Thank you, waiting a video on how to connect to bluetooth
@ProtoCodersPoint
@ProtoCodersPoint 11 ай бұрын
glad to hear it was helpful for you, will upload the next video as soon as possible
@robertgao8866
@robertgao8866 7 ай бұрын
Sir, I was trying to follow your youtube to tryout the BLE coding in flutter! I have running into some issues please help: 1. both flutter_blue and flutter_blue_plus should work? I noticed there are some discrepancies in the code snippets on your website, not sure, which one that I should follow; 2. If I am using the flutter_blue_plus package, I got build error, complaining to this line of code in main.dart : "FlutterBluePlus flutterBlue = FlutterBluePlus.instance;" the msg reads: "This expression has a type of 'void' so its value can't be used. Try checking to see if you're using the correct API; there might be a function or call that returns void you didn't expect. Also check type parameters and variables which might also be void." Please help..., Thanks...
@kirtishbarmecha9072
@kirtishbarmecha9072 8 ай бұрын
Would like to see connect to a ble peripheral and read data in to a service and characteristics. And My main hard stop for now is how I can keep the connection active and keep receiving data in the app.
@harishpenta9876
@harishpenta9876 6 ай бұрын
will this work for ios app as well?
@justEngineeringThings
@justEngineeringThings 10 ай бұрын
Instance feature is deprecated error showing,what i should do now
@thaytung-daylaixe5930
@thaytung-daylaixe5930 11 ай бұрын
How to transfer text or data, after connected multi device, can you help me ?
@mustafayildirim4087
@mustafayildirim4087 9 ай бұрын
not working scan results is empty
@mserif
@mserif 10 ай бұрын
hi sir.When will you upload connect and data sharing part
@tusharpatel764
@tusharpatel764 11 ай бұрын
how fetch the services and characteristics data from BLE and show to mobile screen ?? please make video for this.
@ProtoCodersPoint
@ProtoCodersPoint 11 ай бұрын
Sure will be uploaded soon
@yuen3771
@yuen3771 10 ай бұрын
i have donbe the same exact code in flutter in android Studio Interface but I'm facing Bluetooth privilege issues since it doesn't allow for third-party apps. Any recommendations?
@lokeshpuri3821
@lokeshpuri3821 2 ай бұрын
All the bluetooth devices are discovering, but ESP32 BLE device is not showing what can i do??
@meliherdogan
@meliherdogan 2 ай бұрын
hello my friend, you're luckier than me, your some devices are discovered at least. I can't discover any devices around me. Could you plz send me your flutter project to compare with myself? Maybe I couldn't see some points in this video.
@faheemahmad5853
@faheemahmad5853 3 ай бұрын
can we show the names of the devices??? also CONNECT them... to get thier mac adfress etc
@ProtoCodersPoint
@ProtoCodersPoint 3 ай бұрын
Yes we can
@manohar.acharya
@manohar.acharya Жыл бұрын
yes sir please make a video on how to connect to bluetooth
@ProtoCodersPoint
@ProtoCodersPoint Жыл бұрын
Sure soon video will be uploaded 🤗
@faizi2895
@faizi2895 7 ай бұрын
How to do ota update over ble in flutter
@AryanBarewar
@AryanBarewar 3 ай бұрын
how to connect specific ble device . Please make a video
@ProtoCodersPoint
@ProtoCodersPoint 3 ай бұрын
There is a video on that to on channel
@purplemoon1741
@purplemoon1741 11 ай бұрын
The code that you gave in the web site is not working.
@deepanshualuria8081
@deepanshualuria8081 6 ай бұрын
It is not workin in my case plus you didn't show complete library of your main.dart in video and the website has two code and sinnepts which is not like how professionals make videos for beginners.
@ProtoCodersPoint
@ProtoCodersPoint 6 ай бұрын
The complete source code is given in my website Can you tell you exactly what issue you are facing ( show the error log )
@deepanshualuria8081
@deepanshualuria8081 6 ай бұрын
@@ProtoCodersPoint import 'package:flutter_ble/ble_controller.dart is the first error it says flutter_ble is not compatible with dart 3.0.0 or above it tried to reduce the environment also but that didn't work. Second you have two procedure of your website one using flutter_blue_plus and other is flutter_blue . Flutter_blue have complete source code ( which didn't work for me ) second have not complete source code which i can copy paste and see the results to be honest i didn't use flutter_blue before so don't know how to follow those snippets and source code has the error i mentioned.
@carbonneauolivier6000
@carbonneauolivier6000 6 ай бұрын
i copied the code you provided. the app is working but when i click scan, no bluetooth devices is shown. Permission has been added and all... ? any idea ?
@ProtoCodersPoint
@ProtoCodersPoint 6 ай бұрын
This video is for BLE devices not to scab normal Bluetooth devices like earphone, laptop or any other This will just show the BLE DEVICES
@carbonneauolivier6000
@carbonneauolivier6000 6 ай бұрын
@@ProtoCodersPoint thanks, i will redo it with a ble devices. what would you suggest to use if i want to work with claissic bluetooth ?
@24.nguyenvanthanh37
@24.nguyenvanthanh37 3 ай бұрын
Pub failed to delete entry because it was in use by another process. This may be caused by a virus scanner or having a file in the directory open in another application. When running the yaml file, it looks like this, please tell me how to fix it
@DanielMoreno-lc9bx
@DanielMoreno-lc9bx 3 ай бұрын
Once you push enter, it will install the package Flutter_blue, but it will keep giving you that warning, but the App should run, if not, try to restart your pc.
@bhavadharani609
@bhavadharani609 Ай бұрын
Hey hi!! I don't know whether you have resolved the issue or not. But this problem can be solved by running your android studio or visual studio as administrator. Hope it helps someone✨
@supersaiyan2344
@supersaiyan2344 11 ай бұрын
But isn't flutter blue deprecated? When i try to run app it gives a warning of it using deprecated API
@ProtoCodersPoint
@ProtoCodersPoint 11 ай бұрын
In place of flutter_blue You can use flutter_blue_plus The code syntax will be same…
@supersaiyan2344
@supersaiyan2344 11 ай бұрын
@@ProtoCodersPoint hi, I tried the code as you suggested but it is not showing me any nearby devices, I debugged everything the scanner is starting properly and everything is fine but not devices are being shown, can you please help me? (Also I wanted to know does flutter blue plus show classic devices as well as ble devices?) Here is my code (it is one page only) to scan and list the nearby devices. /// Code starts code for the screen: import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter_blue/flutter_blue.dart'; import 'package:lottery/widgets/snackbar_widget.dart'; import 'package:permission_handler/permission_handler.dart'; class FBPlusScreen extends StatefulWidget { const FBPlusScreen({super.key}); @override State createState() => _FBPlusScreenState(); } class _FBPlusScreenState extends State { FlutterBlue flutterBlue = FlutterBlue.instance; Future scanDevices() async { var blePermission = await Permission.bluetooth.status; var bleConperm = await Permission.bluetoothConnect.status; var bleScanperm = await Permission.bluetoothScan.status; log("bluetooth status: $blePermission, bluetooth connect status: $bleConperm, scanning permission: $bleScanperm"); showCustomSnackbar(context, "Success", "bluetooth status: $blePermission, bluetooth connect status: $bleConperm, scanning permission: $bleScanperm"); if (blePermission.isDenied) { log("in req permission case"); if (await Permission.bluetoothScan.request().isGranted) { if (await Permission.bluetoothConnect.request().isGranted) { flutterBlue.startScan(); await Future.delayed(const Duration(seconds: 10)); flutterBlue.stopScan(); } } } else { // if permissions are granted log("in granted permission case"); flutterBlue.startScan(); await Future.delayed(const Duration(seconds: 10)); flutterBlue.stopScan(); showCustomSnackbar(context, "Success", "${getScanResults.toString()}"); } } Stream get getScanResults => flutterBlue.scanResults; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("BLE eg"), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const SizedBox( height: 15, ), StreamBuilder( stream: getScanResults, builder: (context, snapshot) { if (snapshot.hasData) { // Access the scan results from the snapshot.data List scanResults = snapshot.data!; return ListView.builder( shrinkWrap: true, itemCount: scanResults.length, itemBuilder: (context, index) { final data = scanResults[index]; return Card( elevation: 2, child: ListTile( title: Text(data.device.name), subtitle: Text(data.device.id.id), trailing: Text(data.rssi.toString()), ), ); }, ); } else { return const Center( child: Text("No Device Found"), ); } }), ElevatedButton( onPressed: () => scanDevices(), child: const Text("Scan")), const SizedBox( height: 15, ), ], ), ), ); } } ///Code ends ///Logs start Main error here it shows could not find callback wrapper logs: D/EGL_emulation( 6763): app_time_stats: avg=115.66ms min=5.03ms max=1708.82ms count=18 [log] bluetooth status: PermissionStatus.granted, bluetooth connect status: PermissionStatus.granted, scanning permission: PermissionStatus.granted D/BluetoothAdapter( 6763): isLeEnabled(): ON [log] in granted permission case 2 [log] Scan results received: [] D/BluetoothLeScanner( 6763): onScannerRegistered() - status=0 scannerId=4 mScannerId=0 3 [log] Scan results received: [] D/EGL_emulation( 6763): app_time_stats: avg=96.04ms min=7.35ms max=1922.53ms count=26 2 D/BluetoothAdapter( 6763): isLeEnabled(): ON D/BluetoothLeScanner( 6763): could not find callback wrapper D/EGL_emulation( 6763): app_time_stats: avg=510.39ms min=4.62ms max=7495.73ms count=15 ///Logs end
@SachinBansal-n1i
@SachinBansal-n1i 7 ай бұрын
how to connect to a bluetooth low energy
@pedrodiaaz
@pedrodiaaz 11 ай бұрын
The available devices do not appear :( Help meee pls
@julioculon
@julioculon 10 ай бұрын
Could you solve it another way?
@folaemmanuel7719
@folaemmanuel7719 9 ай бұрын
try turning on location
@vijeyakumarvineescar8439
@vijeyakumarvineescar8439 3 ай бұрын
@@folaemmanuel7719 thank you bro
8 ай бұрын
its not working
@ProtoCodersPoint
@ProtoCodersPoint 8 ай бұрын
Have you added the Bluetooth permission in androidManifest.xml file ?
BLE with ESP32 tutorial part 1: the Server
25:23
MoThunderz
Рет қаралды 90 М.
Master BLE Basics in Just 10 Minutes: The Ultimate Guide!
9:15
Novel Bits
Рет қаралды 103 М.
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 37 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 8 МЛН
Flutter + bluetooth | Mad Brains Техно
25:48
Mad Brains
Рет қаралды 933
We Built an App in 24 Hours [No Code]
11:56
Raw Startup
Рет қаралды 433 М.
Demo about thermal printer by using Flutter
9:44
Aakash Savant
Рет қаралды 696
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 810 М.
Connect to BLE devices - Bluetooth Low Energy (BLE) in Flutter
7:40
Proto Coders Point
Рет қаралды 8 М.
Control Lights with Flutter
5:26
Tadas Petra
Рет қаралды 44 М.
Building Android Apps to Control Bluetooth LE Devices
38:51
CrossComm, Inc.
Рет қаралды 35 М.
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19