Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

iotc.sendTelemetry(message) returns randomly error 4 #112

Open
e1614331TU opened this issue Mar 9, 2020 · 1 comment
Open

iotc.sendTelemetry(message) returns randomly error 4 #112

e1614331TU opened this issue Mar 9, 2020 · 1 comment

Comments

@e1614331TU
Copy link

I'm working on a project with iot central based data logging and the connection to the internet is done via a UMTS stic. Data is collected and stored locally until there is good signal strength, then all the collected data is sent to the iot central in a loop.

The issue is that after some messages
iotc.sendTelemetry(message)
returns code 4, connection refused.
After all collected messages I disconnect from iotc and reconnect again in the next cycle. Only some loops and some messages fail to send.

Does someone have any idea to fix this or experienced similar behavior?

@dmitriyteteruk
Copy link

dmitriyteteruk commented Mar 13, 2020

There are several limits in IoT Central - message size, # of messages per device and # of messages per second that IoT Hub (that is working in the back end) can absorb.
Could you please share size of message and # of messages that you are sending and during which period of time?
BTW. Error #4 = MQTT_ERR_NO_CONN = 4 it looks like no connection.
Also you can use
class IOTLogLevel: IOTC_LOGGING_ALL = 16
to see all logs.

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

No branches or pull requests

2 participants