B4A Library [B4X] BLE 2 - Bluetooth Low Energy - Erel    
Jan 4, 2023   
(31 reactions)   
tags: Bluetooth, Bluetooth Low Energy, BLEThis library replaces the previous BLE library.
It is simpler to use and it is more powerful. Its API is based on B4i iBLE library which makes it easy to reuse B4i code.
See the iBLE tutorial: https://www.b4x.com/android/forum/threads/ble-bluetooth-low-energy-library.46099/#content
Tips &... characteristic.
- BLE is only supported on Android 4.3+.
See the attached example. Note...
link: Hi, I have an app that works fine on many devices, but not on some.
To test, on one of the devices that doesn't work, try the Erel demo, BLEExample - B4a.
It's a Redmi A1.
It does the proce...
B4A Library SD EscPos Printer (Lan,USB, Bluetooth SPP, BLE) - Star-Dust    
Oct 7, 2025   
(20 reactions) different communication channels (USB, Bluetooth SPP, BLE, LAN)
you can download the ble3 library from... version, such as LAN, USB, NFC please contact me privately.
OS
Bluetooth SPP
BLE (Beacon)
USB...-Dust
Version: 1.11
BLE_Printer
Events:
BLEoff
Connected (services As List)
Disconnected... Tab
eg. PrinterBLE.AddTab(Array As Byte(100,150,121))
Beep (Times As Byte, SecondsDurate As Byte... (Send to Printer) a Array of Byte
eg. PrinterBLE.Write_ArrayByte(Array As Byte(0x1D,150,23))
eg...
B4A Library Customise your BLE GATT Service with BLE Peripheral 2 Enhanced - Peter Simpson    
Nov 29, 2026   
(26 reactions) touch Java, I only started learning java so that I could enhance Erel's current BlePeripheral2... BlePeripheral2Enhanced library.
Using this library, you can create your own custom BLE GATT Service or emulate... the following features to the original BlePeripheral2 V1.12 library which I've renamed to BlePeripheral2Enhanced V1.5.
Create a custom primary service with your own unique UUID
Create multiple...
link: Updated the library to V1.52.
PLEASE NOTE:
I have replaced the Tilde(~) separator with a Comma(,). You will need to update CreateCharacteristicUUIDs in your code by replacing the Tildes(~) with Com...
B4A Question [SOLVED] - Android 10 - Background GPS/Ble scans stop getting data after 1 hr - Jmu5667    
Jan 19, 2021.
Hello All
I have a gps service and a ble service. They run every 5 minutes from a main service....
Both the BLE and GPS do not give any results for their scanning i.e No Beacons found and No GPS....REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
Application log data
*** Service (svc_ble) Create ***
01/08/2021 10:12:07.395 - Atlas SOS - svc_ble(), Service_Create
** Service (svc_ble) Start **
01/08/2021 10:12:07.409 - Atlas SOS - svc_ble(), Service_Start
01/08/2021 10:12:07.414 - Atlas SOS - svc_ble(), StartScan, STATE...
B4J Tutorial [B4X] [PyBridge] Desktop - Mobile Communication based on BLE (Bluetooth Low Energy) - Erel    
Mar 9, 2025   
(9 reactions)I've posted in the past a few examples of a simple chat app based on BLE: https://www.b4x.com/android/forum/threads/ble-chat-connecting-android-and-ios.66543/#content
A new version of this example is attached and B4J is now joining the party 🥳
B4J, using the Bleak library, implements the central role and B4A or B4i implement the peripheral role. For simplicity the central connects to...: https://www.b4x.com/android/forum/threads/pybridge-bleak-bluetooth-ble.165982
And B4J v10.2 beta #4...
B4A Library BLE Peripheral - Erel    
Oct 7, 2018   
(21 reactions)   
tags: bleA, BLEA BLE connection is made between a central device and a peripheral device. In most cases the Android device will be the central device.
Beacons, heart rate sensors and other BLE devices... B4i peripheral feature: https://www.b4x.com/android/forum/threads/ble-chat-connecting-android-and-ios... a BleManager2 object.
2. The StateChanged event will be raised. Assuming that the state is STATE_POWERED_ON you should initialize the BlePeripheral2 object.
3. Make sure that peripheral role...
B4A Question BLE Android 9 - Scanning stops when screen turned off - Jmu5667    
Feb 28, 2019 manager As BleManager2
Private currentStateText As String = "UNKNOWN"
Private...(Application.PackageName & ".svc_ble_sos_le$MyScanCallback", Null)
Timer1...("getRssi", Null)
log("svc_ble_sos_le() Scan_Result > name : " & name &... is turn back on the scan results resume.
We were using the standard Ble method that Erel provided, https://www.b4x.com/android/forum/threads/ble-2-bluetooth-low-energy.59937/#content
We switched to...
B4A Question BLE scanSettings? - JordiCP    
Jul 9, 2018   
(2 reactions)I have a "conflictive" BLE device with a quite-limited pairing time-window, as the user must perform some actions on it at the same time for security reasons.
Using BLEManager2, pairing usually works but only after a number of retries (different delays depending on the Android device), and this turns the process into something hard for the final user.
--> Is there any way by means of JavaObject to access the native BluetoothLEScanner in order to pass custom scanSettings built...
Wish Updated / new BLE library that can handle multiple services / characteristics using the same UUID - OliverA    
Mar 22, 2024   
(2 reactions)@Jmu5667 and I ran into an issue with BleManager2 while working on a device that implements Bluetooth's Environmental Sensing Service. The issue is that the UUIDs in Bluetooth can be the same for multiple services / multiple characteristics (and the device we are currently working on has multiple characteristics using the same UUID). Because of how the current BLE library is implemented, only... a BLE library that can work with services and characteristics that share the same UUID....
B4A Question BLE2 - How to read a Bluetooth characteristic descriptor? - emexes    
Feb 9, 2019The 0x2902 descriptor is written to by SetNotify, and that is working beautifully.
But there are other descriptors (per https://www.bluetooth.com/specifications/gatt/descriptors ) and I cannot work out how to read descriptor 0x2904 aka "Characteristic Presentation Format". The descriptor shows up in a BLE Analyser app, alongside the 0x2902 notify descriptor for the same characteristic.
The descriptor is of fixed format and length (7 bytes). It describes the value returned...
Page: 1  
2  
3  
4  
5  
6  
7