Android Question BLE_EXAMPLE

Lvh

Member
Licensed User
Hi,
I am new for B4A using BLE2 library.
I am trying BLE_Example. When I click the button "Scan & Connect", the application starts scanning for few time the stops scanning. No device was connected. I thr logs, I found :
Found: BleSw-BL600, FE4:CC:A5:01:02, RSSI = -53, (MyMap) {1=[B@f2f9371, 7=[B@946556, 9=[B@c9389d7, 0=[B@21b62c4}
Disconnected.
Can you help me ?

My device is a BL600 of Laid Technologies executing a Gatt Service on a Samsung S8. It is perfectly discovered an connected with the utility "nRF Master Control Panel" of Nordic Semiconductor. See the log below :
nRF Master Control Panel, 2017-11-11
BleSw-BL600 (FE4:CC:A51:02)
V 14:06:29.553 Connecting to FE4:CC:A51:02...
D 14:06:29.560 gatt = device.connectGatt(autoConnect = false)
D 14:06:32.503 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 14:06:32.517 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:06:32.542 Connected to FE4:CC:A51:02
D 14:06:32.567 wait(600ms)
V 14:06:33.185 Discovering services...
D 14:06:33.199 gatt.discoverServices()
D 14:06:33.227 [Callback] Services discovered with status: 0
I 14:06:33.258 Services discovered
V 14:06:33.305 Generic Access (0x1800)
- Device Name [R W] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
Generic Attribute (0x1801)
- Service Changed (0x2A05)
Client Characteristic Configuration (0x2902)
Unknown Service (569a1902-b87f-490c-92cb-11ba5ea5167c)
- Unknown Characteristic [I R] (569a2030-b87f-490c-92cb-11ba5ea5167c)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [R W] (569a2031-b87f-490c-92cb-11ba5ea5167c)
V 14:08:02.255 Writing request to characteristic 569a2031-b87f-490c-92cb-11ba5ea5167c
D 14:08:02.266 gatt.writeCharacteristic(569a2031-b87f-490c-92cb-11ba5ea5167c, value=0x0100)
I 14:08:02.362 Data written to 569a2031-b87f-490c-92cb-11ba5ea5167c, value: (0x) 01-00
A 14:08:02.382 "(0x) 01-00" sent


Regards
 

Lvh

Member
Licensed User
Hi Erel,
Thank you so much fot your (very) quick help.
In the meantime, I have connected with reliability to my device using "manager.Connect(id)". I don't no why.
I am waiting a futur unsuccessfull connection then I will try your solution.

Best regards.
Lvh
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…