I was not able to find any example for RN4871 module in the forum. I'm trying to modify the BLE chat example for RN4871 module in transparent UART mode. My B4A app finds the module, but never connects. When I use the "Microchip BluetoothData" app, It simply connects and sends/receives data. So, my N4871 configuration should be correct. Here are the logs when I run the BLE chat example:
Scanning
startLeScan(): null
STATE_ON
onClientRegistered() - status=0 clientIf=6
Found: BLE-0000, 00:00:00:00:00:00, RSSI = -89, (MyMap) {1=[B@75aff87, 9=[B@5041eb4, 0=[B@7541add}
stopLeScan()
STATE_ON
connect() - device: 00:00:00:00:00:00, auto: true
registerApp()
registerApp() - UUID=e744bc6a-9871-4bae-bcba-093dd4a017a3
onClientRegistered() - status=0 clientIf=6
onClientConnectionState() - status=133 clientIf=6 device=00:00:00:00:00:00
close()
unregisterApp() - mClientIf=6
Disconnected
Connect duration = 6719 miliseconds
I tried both "manager.Connect2(Id,False)" and "manager.Connect2(Id,True)", the same result. Am I missing something in my program? I'm posting both Main and BT_Service codes below. Any help is appreciated.
Scanning
startLeScan(): null
STATE_ON
onClientRegistered() - status=0 clientIf=6
Found: BLE-0000, 00:00:00:00:00:00, RSSI = -89, (MyMap) {1=[B@75aff87, 9=[B@5041eb4, 0=[B@7541add}
stopLeScan()
STATE_ON
connect() - device: 00:00:00:00:00:00, auto: true
registerApp()
registerApp() - UUID=e744bc6a-9871-4bae-bcba-093dd4a017a3
onClientRegistered() - status=0 clientIf=6
onClientConnectionState() - status=133 clientIf=6 device=00:00:00:00:00:00
close()
unregisterApp() - mClientIf=6
Disconnected
Connect duration = 6719 miliseconds
I tried both "manager.Connect2(Id,False)" and "manager.Connect2(Id,True)", the same result. Am I missing something in my program? I'm posting both Main and BT_Service codes below. Any help is appreciated.
Last edited: