Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AllyTechEngineering opened this issue Nov 15, 2023 · 0 comments

Comments

@AllyTechEngineering
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant