Skip to content

Updated the app to work with the nrf52DK Uart Precompiled Sample #9

Description

@AllyTechEngineering

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:
nrfdk52_uart_screenshot

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions