Not able to connect Android to Aranet
markus
Posted: 14.01.2022 14:24
Modified: 20.11.2024 19:01
Hi,
I have an Aranet sensor I used to connect to my Nokia 6.1 Android device.
Recently, I had to reset my Android Phone, and I am no more able to use it with "aranet4" app while it works with "Aranet4 Display".I tried to see what happen with "nRF Connect" Android app, and it seems that the connection works, but not the bound as you can see below:
Aranet4 0D03D (FF:7E:48:A0:XX:XX)
V 13:08:16.837 Connecting to FF:7E:48:A0:XX:XX...
D 13:08:16.837 gatt = device.connectGatt(autoConnect = true, TRANSPORT_LE, preferred PHY = LE 1M)
D 13:08:17.115 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 13:08:17.148 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 13:08:17.148 Connected to FF:7E:48:A0:XX:XX
V 13:08:17.189 Discovering services...
D 13:08:17.189 gatt.discoverServices()
I 13:08:17.905 PHY updated (TX: LE 2M, RX: LE 2M)
I 13:08:18.361 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 13:08:18.632 [Callback] Services discovered with status: 0
I 13:08:18.632 Services discovered
V 13:08:18.653 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
- Central Address Resolution [R] (0x2AA6)
Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
Client Characteristic Configuration (0x2902)
Secure DFU Service (0xFE59)
- Buttonless DFU [I W] (8ec90003-f315-4f60-9fb8-838830daea50)
Client Characteristic Configuration (0x2902)
Battery Service (0x180F)
- Battery Level [N R] (0x2A19)
Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Hardware Revision String [R] (0x2A27)
- Firmware Revision String [R] (0x2A26)
- Software Revision String [R] (0x2A28)
- System ID [R] (0x2A23)
Unknown Service (f0cd1400-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd1401-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [W] (f0cd1402-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd1503-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2001-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2002-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [N R] (f0cd2003-95da-4f4b-9ac8-aa55d312af0c)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [R] (f0cd1502-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2004-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd3001-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2005-95da-4f4b-9ac8-aa55d312af0c)
D 13:08:18.654 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 13:08:18.657 gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
D 13:08:18.658 gatt.setCharacteristicNotification(f0cd2003-95da-4f4b-9ac8-aa55d312af0c, true)
I 13:08:18.713 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
V 13:08:22.418 Refreshing device cache...
D 13:08:22.418 gatt.refresh() (hidden)
I 13:08:22.420 Cache refreshed
V 13:08:22.421 Discovering services...
D 13:08:22.421 gatt.discoverServices()
I 13:08:22.902 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 13:08:23.286 [Callback] Services discovered with status: 0
I 13:08:23.286 Services discovered
V 13:08:23.313 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
- Central Address Resolution [R] (0x2AA6)
Generic Attribute (0x1801)
- Service Changed [I] (0x2A05)
Client Characteristic Configuration (0x2902)
Secure DFU Service (0xFE59)
- Buttonless DFU [I W] (8ec90003-f315-4f60-9fb8-838830daea50)
Client Characteristic Configuration (0x2902)
Battery Service (0x180F)
- Battery Level [N R] (0x2A19)
Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Hardware Revision String [R] (0x2A27)
- Firmware Revision String [R] (0x2A26)
- Software Revision String [R] (0x2A28)
- System ID [R] (0x2A23)
Unknown Service (f0cd1400-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd1401-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [W] (f0cd1402-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd1503-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2001-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2002-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [N R] (f0cd2003-95da-4f4b-9ac8-aa55d312af0c)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [R] (f0cd1502-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2004-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd3001-95da-4f4b-9ac8-aa55d312af0c)
- Unknown Characteristic [R] (f0cd2005-95da-4f4b-9ac8-aa55d312af0c)
D 13:08:23.313 gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
D 13:08:23.316 gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
D 13:08:23.318 gatt.setCharacteristicNotification(f0cd2003-95da-4f4b-9ac8-aa55d312af0c, true)
I 13:08:23.389 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
V 13:08:25.170 Starting pairing...
D 13:08:25.170 device.createBond()
D 13:08:25.234 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
D 13:08:25.301 [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_PIN (0)
D 13:08:35.949 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_NONE (10)
I 13:08:35.949 Bonding failed
D 13:08:39.008 [Callback] Connection state changed with status: 14 and new state: DISCONNECTED (0)
E 13:08:39.008 Error 14 (0xe): UNKNOWN (14)
I 13:08:39.008 Disconnected
D 13:08:39.222 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTEDI tried almost everything :
- Connect with Aranet4
- Connect with Android
- Reinstall Aranet4 between each try
- Remove the battery of the sensor, disable BLE under the battery and wait a looooonnng time before the retries.
Sometimes, the error in "nRF Connect" app is : "Error 22 GATT CONN TERMINATE LOCAL HOST"
The sensor works fine on the others Android devices from the house.
So can anyone help me?
Regards,
Markus.aranet-techsupport
Posted: 14.01.2022 15:12
Hi Marcus,
What Android version your phone is running? Aranet4 app v3.0.1 has very restricted compatibility with earlier than Android 10 versions.
You can also find some workouts in the adjacent topic: https://forum.aranet.com/all-about-aranet4/what-to-do-if-my-app-shows-failed-to-load-data-please-try-again/
markus
Posted: 14.01.2022 16:51
Hi,
I use Android 11.
I tried everything from the post you mentioned, except firmware update. I'll try with another Android device.Markus.
aranet-techsupport
Posted: 14.01.2022 16:54
You do need to update sensor firmware if an update is available.
guest
Posted: 14.01.2022 18:16
Device is up to date as said by Aranet App.
So I still have the issue and don't know what to do.
aranet-techsupport
Posted: 14.01.2022 18:23
Did you clear phone's Bluetooth cache and then re-connect the sensor using app and 6-digits PIN-code?
Please report your phone's software build number.markus
Posted: 14.01.2022 18:43
Yes, I did this several times.
I'll try to make a Bluetooth log with developper tools.
Android Build Number is 00WW_3_440_SP01
markus
Posted: 14.01.2022 19:25
Modified: 14.01.2022 19:27
It it can help, I can send you the Bluetooth acquisition file that can be read with WireShark.
I saw in it a "Rcvd Pairing Failed: Confirm Value Failed"
I swear I entered the good confirmation code. A made it a thousand times and I also ask someone else to do it.
aranet-techsupport
Posted: 17.01.2022 14:37
Hello Marcus,
Thank you for reporting. As the sensor is working fine on other devices, it seems that you hard tweaked your phone. Unfortunately, we do have not Nokia 6.1 at our testers. Could you reset your phone to factory configuration and then check Aranet4 app functionality again?
markus
Posted: 18.01.2022 15:18
Hi,
I just made a factory reset through the recovery boot.
The first thing I tried was to pair the Sensor (before restoring any data), and it fails.Is it possible that the sensor keep somewhere some information about my phone? In a FRAM for example. It's strange that I was able to connect the first time.
If I can give you some debug informations, please tell me.
Regards,
Markus.markus
Posted: 18.01.2022 22:21
Hi,
Good news. I've done a hardware reset, and I sucessfully pair the sensor through the app.
Thank you for your help.
aranet-techsupport
Posted: 19.01.2022 09:12
Hi,
Thank you for informing us!
You have to log in to reply.