# How to connect a node to a mobile application?

**URL:** <https://forum.algorand.co/t/how-to-connect-a-node-to-a-mobile-application/4451>\
**Category:** General\
**Tags:** testnet, community\
**Created:** [October 4, 2021, 8:47am UTC](https://forum.algorand.co/t/how-to-connect-a-node-to-a-mobile-application/4451 "2021-10-04T08:47:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![simospa](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@simospa](https://forum.algorand.co/u/simospa)\
**Post date:** [October 4, 2021, 8:47am UTC](https://forum.algorand.co/t/how-to-connect-a-node-to-a-mobile-application/4451/1 "2021-10-04T08:47:22Z")

</div>

Hello everyone, I am developing an application on Flutter in Dart, using an external API for algorithm, this is the library used: https: [//github.com/RootSoft/algorand-dart](https://github.com/RootSoft/algorand-dart)

I am trying to use kmd to get new addresses but every time I try I get connection errors like: `SocketException: OS error: connection refused, errno = 111, address = localhost, port = 57838 # 0`

I understand that I am doing something wrong with the connection to the node and the http communication ports but I don’t know how to set them to make them work correctly.  
For the node I use docker sandbox.  
This is the code from which I get the error:

```auto
Future<String> createNewAddress() async {

    final walletRequest = (CreateWalletRequestBuilder()
      ..walletName = 'wallet'
      ..walletPassword = 'test'
      ..walletDriverName = '')
        .build();

    final handleTokenRequest = (InitWalletHandleTokenRequestBuilder()
        ..walletId = 'wallet'
        ..walletPassword = 'test')
          .build();

    final keyRequest = (GenerateKeyRequestBuilder()
      ..displayMnemonic = true
      ..walletHandleToken = 'aa')
        .build();

      final response = await algorand.kmd.createWallet(createWalletRequest: walletRequest);

      final handleToken = await algorand.kmd.initWalletHandleToken(initializeWalletHandleTokenRequest: handleTokenRequest);

      final address = await algorand.kmd.generateKey(generateKeyRequest: keyRequest);

      return address.toString();
  }

```

Thank you so much for anyone who has the time and willingness to listen to me

---

_[View the full topic](https://forum.algorand.co/t/how-to-connect-a-node-to-a-mobile-application/4451)._
