flutter_reactive_ble_uart_example
flutter_reactive_ble_uart_example copied to clipboard
Updated the app to work with the nrf52DK Uart Precompiled Sample
The code as is will not connect (after you update the code to the current flutter version). I assume others have worked on this. The one key area is that the nrf52 code has two characteristics so you need to use the servicesWithCharacteristicsToDiscover to make it connect. I have not take care of the overflow for the persistentFooterButtons area. In the short term I made the font smaller.
Ran on my iPhone 14 Pro and you can see the screen shot.
Here is the main problem:
original code: // _currentConnectionStream = flutterReactiveBle.connectToAdvertisingDevice( // id: _foundBleUARTDevices[index].id, // prescanDuration: Duration(seconds: 2), // withServices: [_UART_UUID, _UART_RX, _UART_TX], // // withServices: [_UART_UUID], // ); Updated code - works: _currentConnectionStream = flutterReactiveBle.connectToDevice( id: _foundBleUARTDevices[index].id, servicesWithCharacteristicsToDiscover: {_UART_UUID: [_UART_RX, _UART_TX]}, connectionTimeout: const Duration(seconds: 2), );
I did not clone the work so not sure if someone else has fixed this? I can put in a link to my github if you would like.