Closed baliand closed 2 years ago
Hi @baliand , So first let me ask, have you taken a look at our samples for v2? specifically the pub_sub one might help you I believe. If you have then could you be a bit more specific on what you are having problems with?
@KaibaLopez I saw pub_sub and it not understandable for me. I need send command to device and wait response from device. My code running on AWS lambda.
I try to do next:
try {
const clientBootstrap = new io.ClientBootstrap();
const config = iot.AwsIotMqttConnectionConfigBuilder.new_websocket_builder()
.with_endpoint('<SECRET>.iot.<REGION_SECRET>.amazonaws.com')
.with_keep_alive_seconds(1000)
.with_client_id(uuidv4())
.build();
console.log(config);
const client = new mqtt.MqttClient(clientBootstrap);
const clientConnection = client.new_connection(config);
clientConnection.on('error', (err) => {
console.error(err);
});
clientConnection.on('connect', () => {
console.log('MQTT connected');
});
clientConnection.on('message', function (topic, payload) {
console.log('message', topic, payload.toString());
});
await clientConnection.connect()
} catch (e) {
console.log(e);
}
I;m getting
Failed to connect: aws-c-io: AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE, TLS (SSL) negotiation failed
What kind of difference between new_websocket_builder and new_with_websockets?
Many thanks!
I highly recommend that you start with getting the pubsub working and go from there. There is even a new example in javascript(vs the original example in typescript). What exactly do you not understand about the pubsub example?
The difference between new_websocket_builder and new_with_websockets is that there really is none. As seen here one just returns the other.
Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.
Confirm by changing [ ] to [x] below:
Known Issue
<prefix>-ats.iot.<region>.amazonaws.com
Platform/OS/Hardware/Device AWS Lambda arm and x86
Describe the question Please help me. I can'd find how to correct make migration
I have this connection
How can I do it now with
aws-iot-device-sdk-v2
?Thanks