Iot Board Disconnects from MQTT protocol after first attempt - amazon-web-services

I am currently using the AT&T IoT Starter kit, equipped with FRDM-K64F development board w/ cellular shield attached. I am using this kit to subscribe to a MQTT protocol via AWS and I am running into some issues. I successfully connect the first time, but then after a few seconds the connection is lost and when it reconnects it will either reconnect successfully or give me the following error (see link below)
Error1
After it attempts to reconnect a few times the following error shows up, which I think means there is no more RAM on the board and as a result there is no input.(see link below)
Error2
Can someone please help me figure why it cannot maintain a connection? It says tls handshake error, could it be a issue with the certificates? I'm at a loss.
EDIT: Looks like the pictures don't work so here are the errors
1.Error: failed
!mbedtls_ssl_handshake returned 0x1.
The other two errors it gives after attempting connection a few times is
2.Error: failed
!mbedtls_ssl_setup returned 0x7f00
and
3.Error: failed
!mbedtls_ssl_write returned 0x7100

Related

GCP IoT connection in bizarre state

I have a Google IoT app that's been running well for quite a while. The devices send telemetry, and occasionally receive commands from the cloud.
One of my devices recently got into a state where it was connected and sending telemetry, which was being received just fine, but trying to send a commands to it resulted in a "that device is not connected" error. The console page for that device showed last error as "[9] mqtt: The connection broke or was closed by the client". I could not send commands either from my software or from the console. But the device was connected and sending telemetry just fine.
My device will recover from disconnections just fine--but if it is perfectly connected and running fine from its point of view, it has no reason to. And I can't tell it to reboot remotely because I can't send commands to it. If the device remains in this state, it essentially becomes an orphan.
My questions, then, are:
(1) How is it possible to get into this state, and is there any way for me to avoid it, or detect it from the firmware side so that I can reboot?
(2) Is there any way to fix this from the cloud side--to force a reconnection when I can't reach the device?
(3) Am I saved by the fact that my device will eventually disconnect and reconnect when the JWT expires? Will this "fix" the connection to be bidirectional?

QtNetworkAccessManager doesn't work after network restart and issues QNetworkReply:UnknownNetworkError

I am a beginner in QT. I have a custom application which sends and receives information from my http server. When the network services are restarted, the Qt application doesn't connect with the server and issues network error as below. Also, after restart the issue gets resolved.
Here is my error log:
Network error QNetworkReply::UnknownNetworkError received
requestFinished, code: 500 url: "xxxx/xxxx/xxxx" (unknown:0) -
QIODevice::read (QDisabledNetworkReply): device not open
I have searched in forums but I couldn't get a solution to the same.

Connecting an ESP8266 to AWS IoT Core - getting "WiFiClientSecure SSL error: Unknown error code."

I am trying my first ever IoT project with an ESP8266 connecting to AWS IoT core. I've checked all my certificates, setup etc and they appear to be correct. However, when I run my code to publish a simple "Hello World" message to AWS IoT, I get:
Attempting MQTT connection...pm open,type:2 0
failed, rc=-4 try again in 5 seconds
WiFiClientSecure SSL error: Unknown error code.
Any help would be greatly appreciated. If you need any more detail, I'd be happy to provide it.
Thanx,
ramesh.
I ran into a similar issue and what I ended up finding is that you have to set your certificates BEFORE you connect to the WiFi.
So try and make sure that you are setting those before calling WiFi.begin(ssid, password)

gSoap: Connects over Wired network but TCP error over any wireless network

I have just started using gsoap and after spending a lot of time i have successfully included it in my project and have started to use it. The problem which has been troubling me for past many days is that when i hit a service,it connects over LAN,the connection is established but when i switch over to any wireless network connection doesn't establish,I debugged into the code and found that the connection could not be established over wireless network which results in connection timeout after apt retries.I am unable to figure out why this happens i.e why connection is not established over wireless networks,can anyone guide me as i am a newbie with gSoap and network programming as well. Any help would be appreciated.
I got the SOAP service hit and there was no problem of wired or wireless connection.Basically what I was doing was hitting the service from windows platform(msvc compiler) which was over LAN and then i was trying to integrate the same code with clang compiler to generate a .so to run it on an Android platform. I was getting a proper response when hitting from windows but when hitting from Android I got a TCP error.I could not find any issue in the code when I posted the question and the only difference I could see was connection type of two platforms but there was an underlying issue in integration over android due to which the error was getting generated and I resolved it and now the service is getting hit on both platforms.
GSOAP works like a charm over a network irrespective of the type(wired or wireless) so do not go astray after looking at the question thinking it can be a problem,if u think you have a similar issue,I would recommend looking into other things rather than wasting your time thinking it to be an issue like I did.

How to address RdKafka::ERR__TIMED_OUT and RdKafka::ERR__MSG_TIMED_OUT in librdkafka?

I am working on C++ kafka client librdkafka. Looking into the example https://github.com/edenhill/librdkafka/blob/master/src-cpp/rdkafkacpp.h and https://github.com/edenhill/librdkafka/blob/master/examples/rdkafka_example.cpp, it seems that there is no process of connecting to broker? How to do some reconnect staff for these connection errors? How to check the connection status?
librdkafka abstracts all broker connectivity from the application, it will attempt to always keep a connection to each known broker (either learnt through metadata.broker.list or by the broker list returned from the first bootstrap brokers).
Upon connection error librdkafka will attempt to connect again, forever.
If none of brokers can be connected to the ALL_BROKERS_DOWN event will be triggered but there is currently no corresponding event for when brokers being to come back online.
The application doesn't need to worry though since librdkafka takes care of all reconnects and message retransmissions in the background and it will keep trying to get the messages produced until either message.timeout.ms or message.send.max.retries are exceeded.
There's more information on this in the introduction guide:
https://github.com/edenhill/librdkafka/blob/master/INTRODUCTION.md