question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting to AWS-IoT

See original GitHub issue

Hello,

I am trying to use your MQTT client to connect to AWS-IoT using a presigned websocket url as outlined here: http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html.

Here is my connection code (creds.presignedUrl contains the authentication headers needed as a query string):

            string CLIENT_ID = "notifications-test-mqtt-" + (new Random()).Next(1, 100000);
            var client = new MqttFactory().CreateMqttClient();
            var options = new MqttClientOptionsBuilder()
                .WithWebSocketServer(creds.presignedUrl)
                .WithClientId(CLIENT_ID)
                .Build();
            MqttClientConnectResult res = await client.ConnectAsync(options);

The issue is that client.ConnectAsync(options) never completes, it fails with a MQTTnet.Core.Exceptions.MqttCommunicationTimedOutException after about 10 seconds.

Any suggestions? Is what I am trying to do possible?

Thank you, Rowan

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
chkr1011commented, Nov 15, 2017

Thank you. I will have a look. We also have a bug in WebSocket handling probably it is related and will be fixed in the next version.

0reactions
acrabbcommented, Feb 21, 2018

Hm, i’ve got the same URL from both JS and the mobile client, and have all the comments here. But its still not connecting. Was there any special settings in AWS need to make this work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connecting to AWS IoT Core
AWS IoT Core supports connections with IoT devices, wireless gateways, services, and apps. Devices connect to AWS IoT Core so they can send...
Read more >
Connecting devices to AWS IoT
Devices connect to AWS IoT and other services through AWS IoT Core. Through AWS IoT Core, devices send and receive messages using device...
Read more >
Tutorial: Connecting a device to AWS IoT Core by using the ...
This tutorial demonstrates how to connect a device to AWS IoT Core so that it can send and receive data to and from...
Read more >
Connect policy examples - AWS IoT Core
The following policy denies permission to client IDs client1 and client2 to connect to AWS IoT Core, while allowing devices to connect using...
Read more >
Try the AWS IoT quick connect
In the AWS IoT console home page, on the left, choose Connect and then choose Connect one device. AWS IoT console home page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found